Changeset 1120 for cpp/frams/model/similarity/measuredistribution.h
 Timestamp:
 04/01/21 17:07:37 (3 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

cpp/frams/model/similarity/measuredistribution.h
r1048 r1120 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999202 0Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 19992021 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 8 8 #include "similmeasurebase.h" 9 9 #include "EMD/emd.h" 10 #include <random> 10 11 11 12 class SimilMeasureDistribution : public SimilMeasureBase … … 13 14 public: 14 15 SimilMeasureDistribution(); 15 ~SimilMeasureDistribution() {};16 ~SimilMeasureDistribution() {}; 16 17 int setParams(std::vector<double> params); 17 18 void calculateFuns(); 18 void calculateFun(std::pair<double, float> *fun, Model &sampled);19 void calculateFun(std::pair<double, float> *fun, const Model &sampled); 19 20 double compareFuns(); 20 21 double EMD(std::pair<double, float> *fun1, std::pair<double, float> *fun2); … … 28 29 std::pair<double, float> *funs[2]; 29 30 SolidsShapeTypeModel *sst_models[2]; 30 std::vector<double> (SimilMeasureDistribution::*distribution_fun)(int samples_taken, Model *sampled);31 void (SimilMeasureDistribution::*distribution_fun)(int samples_taken, std::uniform_int_distribution<> &distribution, const Model &sampled, std::vector<double> &dist_vect); 31 32 32 33 void fillPointsWeights(std::pair<double, float> *fun, feature_t *points, float *weights); 33 34 double getDistance(); 34 std::vector<double> D2(int samples_taken, Model *sampled); 35 std::vector<double> D1(int samples_taken, Model *sampled); 36 std::vector<double> D3(int samples_taken, Model *sampled); 37 std::vector<double> D4(int samples_taken, Model *sampled); 38 std::vector<double> A3(int samples_taken, Model *sampled); 35 void D2(int samples_taken, std::uniform_int_distribution<> &distribution, const Model &sampled, std::vector<double> &dist_vect); 36 void D1(int samples_taken, std::uniform_int_distribution<> &distribution, const Model &sampled, std::vector<double> &dist_vect); 37 void D3(int samples_taken, std::uniform_int_distribution<> &distribution, const Model &sampled, std::vector<double> &dist_vect); 38 void D4(int samples_taken, std::uniform_int_distribution<> &distribution, const Model &sampled, std::vector<double> &dist_vect); 39 void A3(int samples_taken, std::uniform_int_distribution<> &distribution, const Model &sampled, std::vector<double> &dist_vect); 40 41 private: 42 std::mt19937 rndgen; 39 43 }; 40 44
Note: See TracChangeset
for help on using the changeset viewer.