Changeset 869 for cpp/frams/model/similarity/simil_model.h
- Timestamp:
- 05/02/19 23:50:27 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/similarity/simil_model.h
r817 r869 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-201 6Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2019 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 9 9 #include "frams/genetics/geno.h" 10 10 #include "frams/model/model.h" 11 #include "frams/util/3d.h"12 11 #include "simil_match.h" 13 12 … … 27 26 * Marek Kubiak (concept, implementation) 28 27 * Maciej Komosinski (concept, Framsticks interface) 29 * Agnieszka Mensfelt (refactoring )28 * Agnieszka Mensfelt (refactoring, improvements) 30 29 */ 31 30 class ModelSimil … … 34 33 ModelSimil(); 35 34 virtual ~ModelSimil(); 36 double EvaluateDistance(const Geno *G0, const Geno *G1); 35 double EvaluateDistance(const Geno *G0, const Geno *G1); //chooses greedy or hungarian 36 double EvaluateDistanceGreedy(const Geno *G0, const Geno *G1); 37 double EvaluateDistanceHungarian(const Geno *G0, const Geno *G1); 37 38 38 39 static int CompareDegrees(const void *pElem1, const void *pElem2); 40 static int CompareFuzzyDegrees(const void *pElem1, const void *pElem2); 39 41 static int CompareConnsNo(const void *pElem1, const void *pElem2); 40 42 static int GetNOFactors(); … … 48 50 int MatchPartsGeometry(); 49 51 void ComputeMatching(); 52 void FillPartsDistances(double *&dist, int bigger, int smaller, bool geo); 50 53 void _PrintPartsMatching(); 51 54 void SaveIntermediateFiles(); 52 55 53 static int CheckPartsIdentity(Part *P1, Part *P2); 56 static int CheckPartsIdentity(Part *P1, Part *P2); //TODO exists? 54 57 int SortPartInfoTables(); 55 58 int CountPartNeurons(); … … 58 61 int CountPartDegrees(); 59 62 60 int SortPartInfoFuzzy();61 63 void CountFuzzyNeighb(); 62 64 void SortFuzzyNeighb(); 63 65 void GetNeighbIndexes(int mod, int partInd, std::vector<int> &indexes); 64 void CheckFuzzyIdentity();66 void FuzzyOrder(); 65 67 66 68 int CreatePartInfoTables(); … … 68 70 void _PrintArray(int *array, int base, int size); 69 71 void _PrintNeighbourhood(int i); 72 void _PrintFuzzyNeighbourhood(int i); 70 73 void _PrintArrayDouble(double *array, int base, int size); 71 74 int CountPartsDistance(); … … 73 76 74 77 public: 78 /// Currently selected matching algorithm. Allowed values: 0 (more exact, slower), 1 (more greedy, faster). Details in https://doi.org/10.1007/978-3-030-16692-2_8 79 /// @sa EvaluateDistance 80 int matching_method; 81 75 82 /// Table of weights for weighted distance function. 76 83 /// Weights are for factors in the following order: … … 88 95 int fuzzyDepth; 89 96 int isFuzzy; 90 97 91 98 //For wMDS = 1 weighted MDS with vertex degrees as weights is used for the alignment. 92 99 int wMDS; 100 101 //For saveMatching = 1 the best matching found will be saved. 102 int saveMatching; 93 103 94 104 /// Interface to local parameters … … 181 191 }; 182 192 183 184 193 #endif
Note: See TracChangeset
for help on using the changeset viewer.