SOMHunter Core
som.h
Go to the documentation of this file.
1 /* This file is part of SOMHunter.
2  *
3  * Copyright (C) 2021 Frantisek Mejzlik <frankmejzlik@protonmail.com>
4  * Mirek Kratochvil <exa.exa@gmail.com>
5  * Patrik Vesely <prtrikvesely@gmail.com>
6  *
7  * SOMHunter is free software: you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License as published by the Free
9  * Software Foundation, either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * SOMHunter is distributed in the hope that it will be useful, but WITHOUT ANY
13  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15  * details.
16  *
17  * You should have received a copy of the GNU General Public License along with
18  * SOMHunter. If not, see <https://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef embedsom_h
22 #define embedsom_h
23 
24 #include <random>
25 #include <vector>
26 
27 namespace sh {
28 void fit_SOM(size_t _size, size_t k, size_t dim, size_t niter, const std::vector<float>& points,
29  std::vector<float>& koho, const std::vector<float>& nhbrdist, const float alphasA[2],
30  const float radiiA[2], const float alphasB[2], const float radiiB[2], const std::vector<float>& scores,
31  const std::vector<bool>& present_mask, std::mt19937& rng);
32 
33 void map_points_to_kohos(size_t start, size_t end, size_t k, size_t dim, const std::vector<float>& points,
34  const std::vector<float>& koho, std::vector<size_t>& mapping,
35  const std::vector<bool>& present_mask);
36 
37 }; // namespace sh
38 #endif
Definition: common-types.h:33
void map_points_to_kohos(size_t start, size_t end, size_t k, size_t dim, const std::vector< float > &points, const std::vector< float > &koho, std::vector< size_t > &mapping, const std::vector< bool > &present_mask)
Definition: som.cpp:157
void fit_SOM(size_t, size_t k, size_t dim, size_t niter, const std::vector< float > &points, std::vector< float > &koho, const std::vector< float > &nhbrdist, const float alphasA[2], const float radiiA[2], const float alphasB[2], const float radiiB[2], const std::vector< float > &scores, const std::vector< bool > &, std::mt19937 &rng)
Definition: som.cpp:102