BlosSOM
Interactive dimensionality reduction on large datasets (EmbedSOM and FLOWER combined)
src
tsne_layout.h
Go to the documentation of this file.
1
/* This file is part of BlosSOM.
2
*
3
* Copyright (C) 2021 Mirek Kratochvil
4
*
5
* BlosSOM is free software: you can redistribute it and/or modify it under
6
* the terms of the GNU General Public License as published by the Free
7
* Software Foundation, either version 3 of the License, or (at your option)
8
* any later version.
9
*
10
* BlosSOM is distributed in the hope that it will be useful, but WITHOUT ANY
11
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13
* details.
14
*
15
* You should have received a copy of the GNU General Public License along with
16
* BlosSOM. If not, see <https://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef TSNE_LAYOUT_H
20
#define TSNE_LAYOUT_H
21
22
#include <glm/glm.hpp>
23
24
#include <vector>
25
26
#include "
landmark_model.h
"
27
#include "
mouse_data.h
"
28
29
/** A context structure for tSNE computation.
30
*
31
* This mostly holds pre-allocated memory so that the vectors don't need to get
32
* recreated every frame.
33
*/
34
struct
TSNELayoutData
35
{
36
std::vector<float>
pji
;
37
std::vector<size_t>
heap
;
38
std::vector<glm::vec2>
updates
;
39
};
40
41
/** Optimize the positions of low-dimensional landmarks using the t-SNE
42
* algorithm. */
43
void
44
tsne_layout_step
(
TSNELayoutData
&data,
45
bool
vert_pressed,
46
int
vert_ind,
47
LandmarkModel
&lm,
48
float
time);
49
#endif
landmark_model.h
mouse_data.h
LandmarkModel
Model of the high- and low-dimensional landmarks.
Definition:
landmark_model.h:34
TSNELayoutData
A context structure for tSNE computation.
Definition:
tsne_layout.h:35
TSNELayoutData::pji
std::vector< float > pji
Definition:
tsne_layout.h:36
TSNELayoutData::updates
std::vector< glm::vec2 > updates
Definition:
tsne_layout.h:38
TSNELayoutData::heap
std::vector< size_t > heap
Definition:
tsne_layout.h:37
tsne_layout_step
void tsne_layout_step(TSNELayoutData &data, bool vert_pressed, int vert_ind, LandmarkModel &lm, float time)
Optimize the positions of low-dimensional landmarks using the t-SNE algorithm.
Definition:
tsne_layout.cpp:28
Generated by
1.9.4