Last change
on this file since 1047 was
1044,
checked in by oriona, 4 years ago
|
Similarity measures code refactored. Distribution-based similarity measure added.
|
File size:
939 bytes
|
Line | |
---|
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_H |
---|
6 | #define _SIMIL_MEASURE_H |
---|
7 | |
---|
8 | #include "frams/genetics/geno.h" |
---|
9 | #include "frams/model/model.h" |
---|
10 | #include <assert.h> |
---|
11 | |
---|
12 | class SimilMeasure |
---|
13 | { |
---|
14 | public: |
---|
15 | SimilMeasure(); |
---|
16 | int measure_type; |
---|
17 | /// Interface to local parameters |
---|
18 | Param localpar; |
---|
19 | |
---|
20 | virtual ~SimilMeasure(){}; |
---|
21 | virtual double getDistance() = 0; |
---|
22 | double evaluateDistance(const Geno *G0, const Geno *G1); |
---|
23 | virtual int setParams(std::vector<double> params) = 0; |
---|
24 | Model sampleSurface(Model *M, double density); |
---|
25 | |
---|
26 | #define STATRICKCLASS SimilMeasure |
---|
27 | PARAMPROCDEF(p_evaldistance); |
---|
28 | #undef STATRICKCLASS |
---|
29 | |
---|
30 | protected: |
---|
31 | /// Genotypes between which distance is evaluated. |
---|
32 | const Geno *genos[2]; |
---|
33 | /// Models created from the genotypes array |
---|
34 | Model *models[2]; |
---|
35 | Model* newModel(const Geno *g); |
---|
36 | }; |
---|
37 | |
---|
38 | #endif |
---|
39 | |
---|
Note: See
TracBrowser
for help on using the repository browser.