2 * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __DATA_SET_MANAGER_H__
18 #define __DATA_SET_MANAGER_H__
24 #include "feature_vector_manager.h"
29 std::map<unsigned int, unsigned int> _fv_cnt_per_label;
30 std::vector<std::vector<float> > _data;
31 std::vector<std::vector<float> > _labels;
32 std::vector<unsigned int> _label_index;
33 size_t _feature_vector_size;
38 virtual ~DataSetManager();
41 bool IsFeatureVectorDuplicated(const std::vector<float> &vec);
42 std::vector<std::vector<float> > &GetData(void);
43 std::vector<std::vector<float> > &GetLabel(void);
44 size_t GetFeaVecSize(void);
45 std::vector<unsigned int> &GetLabelIdx(void);
47 virtual bool IsFeatureVectorAllowed(unsigned int label_idx) = 0;
48 virtual void LoadDataSet(const std::string file_name, unsigned int new_label_cnt) = 0;
49 virtual void AddDataSet(std::vector<float> &feature_vec, const unsigned int label_idx,
50 const unsigned int label_cnt) = 0;