Rev | Line | |
---|
[1048] | 1 | // This file is a part of Framsticks SDK. http://www.framsticks.com/ |
---|
| 2 | // Copyright (C) 1999-2020 Maciej Komosinski and Szymon Ulatowski. |
---|
| 3 | // See LICENSE.txt for details. |
---|
| 4 | |
---|
| 5 | #ifndef _SIMIL_MEASURE_BASE_H |
---|
| 6 | #define _SIMIL_MEASURE_BASE_H |
---|
| 7 | |
---|
| 8 | #include "frams/genetics/geno.h" |
---|
| 9 | #include "frams/model/model.h" |
---|
| 10 | |
---|
| 11 | class SimilMeasureBase |
---|
| 12 | { |
---|
| 13 | public: |
---|
| 14 | SimilMeasureBase(); |
---|
| 15 | virtual ~SimilMeasureBase() {}; |
---|
| 16 | |
---|
| 17 | virtual double getDistance() = 0; |
---|
| 18 | double evaluateDistance(const Geno *G0, const Geno *G1); |
---|
| 19 | virtual int setParams(std::vector<double> params) = 0; |
---|
| 20 | Model sampleSurface(Model *M, double density); |
---|
| 21 | |
---|
| 22 | #define STATRICKCLASS SimilMeasureBase |
---|
| 23 | PARAMPROCDEF(p_evaldistance); |
---|
| 24 | #undef STATRICKCLASS |
---|
| 25 | |
---|
| 26 | protected: |
---|
| 27 | /// Genotypes between which distance is evaluated. |
---|
| 28 | const Geno *genos[2]; |
---|
| 29 | /// Models created from the genotypes array |
---|
| 30 | Model *models[2]; |
---|
| 31 | Model* newModel(const Geno *g); |
---|
| 32 | }; |
---|
| 33 | |
---|
| 34 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.