BlosSOM
Interactive dimensionality reduction on large datasets (EmbedSOM and FLOWER combined)
graph_layout.h
Go to the documentation of this file.
1/* This file is part of BlosSOM.
2 *
3 * Copyright (C) 2021 Mirek Kratochvil
4 * Sona Molnarova
5 *
6 * BlosSOM is free software: you can redistribute it and/or modify it under
7 * the terms of the GNU General Public License as published by the Free
8 * Software Foundation, either version 3 of the License, or (at your option)
9 * any later version.
10 *
11 * BlosSOM is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14 * details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * BlosSOM. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef LAYOUT_H
21#define LAYOUT_H
22
23#include <glm/glm.hpp>
24
25#include <vector>
26
27#include "landmark_model.h"
28#include "mouse_data.h"
29
30/**
31 * @brief Data for landmark graph layouting algorithm using forces.
32 *
33 */
35{
36 /** Velocities of 2D landmarks. */
37 std::vector<glm::vec2> velocities;
38 /** Forces of 2D landmarks. */
39 std::vector<glm::vec2> forces; // kept allocated for efficiency
40};
41
42/**
43 * @brief One iteration step of the landmark layouting algorithm.
44 *
45 * @param data Data of the layouting algorithm.
46 * @param mouse Coordinations of the mouse.
47 * @param lm Landmark model.
48 * @param time Time duration of the last frame.
49 */
50void
52 bool vert_pressed,
53 int vert_ind,
54 LandmarkModel &lm,
55 float time);
56
57#endif
void graph_layout_step(GraphLayoutData &data, bool vert_pressed, int vert_ind, LandmarkModel &lm, float time)
One iteration step of the landmark layouting algorithm.
Data for landmark graph layouting algorithm using forces.
Definition: graph_layout.h:35
std::vector< glm::vec2 > forces
Forces of 2D landmarks.
Definition: graph_layout.h:39
std::vector< glm::vec2 > velocities
Velocities of 2D landmarks.
Definition: graph_layout.h:37
Model of the high- and low-dimensional landmarks.