BlosSOM
Interactive dimensionality reduction on large datasets (EmbedSOM and FLOWER combined)
src
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
*/
34
struct
GraphLayoutData
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
*/
50
void
51
graph_layout_step
(
GraphLayoutData
&data,
52
bool
vert_pressed,
53
int
vert_ind,
54
LandmarkModel
&lm,
55
float
time);
56
57
#endif
graph_layout_step
void graph_layout_step(GraphLayoutData &data, bool vert_pressed, int vert_ind, LandmarkModel &lm, float time)
One iteration step of the landmark layouting algorithm.
Definition:
graph_layout.cpp:25
landmark_model.h
mouse_data.h
GraphLayoutData
Data for landmark graph layouting algorithm using forces.
Definition:
graph_layout.h:35
GraphLayoutData::forces
std::vector< glm::vec2 > forces
Forces of 2D landmarks.
Definition:
graph_layout.h:39
GraphLayoutData::velocities
std::vector< glm::vec2 > velocities
Velocities of 2D landmarks.
Definition:
graph_layout.h:37
LandmarkModel
Model of the high- and low-dimensional landmarks.
Definition:
landmark_model.h:34
Generated by
1.9.4