forpy 2

Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
forpy::TsallisEntropy Class Reference
Impurity Measures

Computes the Tsallis entropy. More...

`#include <tsallisentropy.h>`

Inheritance diagram for forpy::TsallisEntropy:

## Public Member Functions
| TsallisEntropy (const float &q)
| ~TsallisEntropy ()
float | operator() (const float *class_members_numbers, const size_t &n, const float &fsum) const
bool | operator== (const IEntropyFunction &rhs) const
float | get_q () const
Public Member Functions inherited from forpy::IEntropyFunction
virtual | ~IEntropyFunction ()
virtual float | operator() (const std::vector< float > &class_members_numbers, const float &fsum) const
| The interface function that must be implemented. More...
virtual float | operator() (const std::vector< float > &class_members_numbers) const
| Classical entropy calculation function. More...

## Private Member Functions
| TsallisEntropy ()
| DON'T USE. Non-initializing constructor for serialization purposes. More...
template<class Archive >
void | serialize (Archive &ar, const uint &)
| DISALLOW_COPY_AND_ASSIGN (TsallisEntropy)

## Private Attributes
float | q
std::unique_ptr< ShannonEntropy > | shannon_entropy
std::unique_ptr< InducedEntropy > | induced_p

## Friends
class | InducedEntropy
class | ShannonEntropy
class | cereal::access
std::ostream & | operator<< (std::ostream &stream, const TsallisEntropy &self)

## Additional Inherited Members
Protected Member Functions inherited from forpy::IEntropyFunction
| IEntropyFunction ()

## Detailed Description

Computes the Tsallis entropy.

Works correctly up to a total sum of elements of numeric_limits<float>::max().

This is the Tsallis entropy, as introduced by Constantino Tsallis (see http://en.wikipedia.org/wiki/Tsallis_entropy).

Definition at line 32 of file tsallisentropy.h.

## Constructor & Destructor Documentation

## ◆ TsallisEntropy() [1/2]

forpy::TsallisEntropy::TsallisEntropy | ( | const float & | q | ) |
| explicit

Parameters

  q | float>0.f The entropy parameter.

## ◆ ~TsallisEntropy()

forpy::TsallisEntropy::~TsallisEntropy | ( |  | ) |

## ◆ TsallisEntropy() [2/2]

forpy::TsallisEntropy::TsallisEntropy | ( |  | ) |
| private

DON'T USE. Non-initializing constructor for serialization purposes.

It is currently used by the Shannon entropy to break a dependency circle.

## Member Function Documentation

## ◆ DISALLOW_COPY_AND_ASSIGN()

forpy::TsallisEntropy::DISALLOW_COPY_AND_ASSIGN | ( | TsallisEntropy |  | ) |
| private

## ◆ get_q()

float forpy::TsallisEntropy::get_q | ( |  | ) | const

Returns q as set in the constructor.

## ◆ operator()()

float forpy::TsallisEntropy::operator() | ( | const float * | class_members_numbers,
|  | const size_t & | n,
|  | const float & | fsum
| ) |  | const
| inline virtual

Reimplemented from forpy::IEntropyFunction.

Definition at line 41 of file tsallisentropy.h.

## ◆ operator==()

bool forpy::TsallisEntropy::operator== | ( | const IEntropyFunction & | rhs | ) | const
| virtual

Deep equality comparison.

Reimplemented from forpy::IEntropyFunction.

## ◆ serialize()

template<class Archive >

void forpy::TsallisEntropy::serialize | ( | Archive & | ar,
|  | const uint & |
| ) |  |
| inline private

Definition at line 91 of file tsallisentropy.h.

## Friends And Related Function Documentation

## ◆ cereal::access

friend class cereal::access
| friend

Definition at line 89 of file tsallisentropy.h.

## ◆ InducedEntropy

friend class InducedEntropy
| friend

Definition at line 78 of file tsallisentropy.h.

## ◆ operator<<

std::ostream& operator<< | ( | std::ostream & | stream,
|  | const TsallisEntropy & | self
| ) |  |
| friend

Definition at line 69 of file tsallisentropy.h.

## ◆ ShannonEntropy

friend class ShannonEntropy
| friend

Definition at line 79 of file tsallisentropy.h.

## Member Data Documentation

## ◆ induced_p

std::unique_ptr<InducedEntropy> forpy::TsallisEntropy::induced_p
| private

Definition at line 98 of file tsallisentropy.h.

## ◆ q

float forpy::TsallisEntropy::q
| private

Definition at line 94 of file tsallisentropy.h.

## ◆ shannon_entropy

std::unique_ptr<ShannonEntropy> forpy::TsallisEntropy::shannon_entropy
| private

Definition at line 97 of file tsallisentropy.h.

The documentation for this class was generated from the following file:

- /Users/classner/git/forpy/include/forpy/impurities/tsallisentropy.h