source: cpp/frams/model/similarity/simil-measure-base.h @ 1273

Last change on this file since 1273 was 1048, checked in by Maciej Komosinski, 4 years ago

SimilMeasure? -> SimilMeasureBase?; introduced a new class (SimilMeasure?) that allows scripts to access all similarity measures; a number of minor fixes and improvements

File size: 873 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_BASE_H
6#define _SIMIL_MEASURE_BASE_H
7
8#include "frams/genetics/geno.h"
9#include "frams/model/model.h"
10
11class SimilMeasureBase
12{
13public:
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
26protected:
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.