BlosSOM
Interactive dimensionality reduction on large datasets (EmbedSOM and FLOWER combined)
data_model.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 DATA_MODEL_H
20#define DATA_MODEL_H
21
22#include <string>
23#include <vector>
24
25#include "dirty.h"
26
27/**
28 * @brief Storage of data from loaded input file.
29 *
30 */
31struct DataModel : public Dirts
32{
33 /** One-dimensional array storing d-dimensional input data in
34 * row-major order. */
35 std::vector<float> data;
36 /** Names of the dimensions. */
37 std::vector<std::string> names;
38 /** Dimension size. */
39 size_t d;
40
41 /**
42 * @brief Calls @ref clear().
43 *
44 */
46
47 /**
48 * @brief Clears all DataModel data to their default values.
49 *
50 */
51 void clear()
52 {
53 d = n = 0;
54 data.clear();
55 names.clear();
56 touch();
57 }
58};
59
60#endif
Storage of data from loaded input file.
Definition: data_model.h:32
void clear()
Clears all DataModel data to their default values.
Definition: data_model.h:51
std::vector< std::string > names
Names of the dimensions.
Definition: data_model.h:37
DataModel()
Calls clear().
Definition: data_model.h:45
size_t d
Dimension size.
Definition: data_model.h:39
std::vector< float > data
One-dimensional array storing d-dimensional input data in row-major order.
Definition: data_model.h:35
void touch()
Make the cache dirty.
Definition: dirty.h:43
Multi-piece cache-dirtying object.
Definition: dirty.h:82
size_t n
Definition: dirty.h:83