forpy 2

igaincalculator.h
Go to the documentation of this file.
1 /* Author: Christoph Lassner. */
2 #pragma once
3 #ifndef FORPY_GAINS_IGAINCALCULATOR_H_
4 #define FORPY_GAINS_IGAINCALCULATOR_H_
5
6 #include "../global.h"
7
8 #include "../util/serialization/basics.h"
9
10 #include <vector>
11
12 #include "../types.h"
13
14 namespace forpy {
29 class IGainCalculator {
30 public:
31 virtual ~IGainCalculator() {}
32
34 virtual float operator()(const std::vector<float> &members_numbers_left,
35 const std::vector<float> &members_numbers_right)
36 VIRTUAL(float);
37
40 virtual float operator()(const float &current_entropy,
41 const std::vector<float> &members_numbers_left,
42 const std::vector<float> &members_numbers_right)
43 VIRTUAL(float);
44
47 virtual float approx(const std::vector<float> &members_numbers_left,
48 const std::vector<float> &members_numbers_right)
49 VIRTUAL(float);
50
54 virtual bool operator==(const IGainCalculator &rhs) const VIRTUAL(bool);
55
56 protected:
57 IGainCalculator() {}
58
59 private:
60 DISALLOW_COPY_AND_ASSIGN(IGainCalculator);
61
62 friend class cereal::access;
63 template <class Archive>
64 void serialize(Archive &, const uint &) {}
65 };
66 }; // namespace forpy
67 #endif // FORPY_GAINS_IGAINCALCULATOR_H_
forpy::IGainCalculator
Interface for a gain calculator class.
Definition: igaincalculator.h:29
forpy::IGainCalculator::operator==
virtual bool operator==(const IGainCalculator &rhs) const VIRTUAL(bool)
forpy::IGainCalculator::serialize
void serialize(Archive &, const uint &)
Definition: igaincalculator.h:64
forpy::IGainCalculator::access
friend class cereal::access
Definition: igaincalculator.h:62
forpy::IGainCalculator::operator()
virtual float operator()(const std::vector< float > &members_numbers_left, const std::vector< float > &members_numbers_right) VIRTUAL(float)
forpy::IGainCalculator::IGainCalculator
IGainCalculator()
Definition: igaincalculator.h:57
VIRTUAL
#define VIRTUAL(type)
Definition: global.h:31
forpy
Definition: fastdprov.h:13
forpy::IGainCalculator::~IGainCalculator
virtual ~IGainCalculator()
Definition: igaincalculator.h:31
forpy::IGainCalculator::approx
virtual float approx(const std::vector< float > &members_numbers_left, const std::vector< float > &members_numbers_right) VIRTUAL(float)
forpy::uint
unsigned int uint
Convenience typedef for unsigned int.
Definition: types.h:113
forpy::IGainCalculator::DISALLOW_COPY_AND_ASSIGN
DISALLOW_COPY_AND_ASSIGN(IGainCalculator)