ell::SC_PartitionFunction Class Reference
#include <StateCollector.hh>
Inheritance diagram for ell::SC_PartitionFunction:
Detailed Description
This StateCollector implementation counts the number of collected States and calculates the canonical partition function Z of these States. Z = sum( e^(-E(State)/kT) ) is the sum of the Boltzmann weights of all States. The kT value is derived from LandscapeTopology::BOLTZMANN_KT.NOTE : if the energy of collected states is << 0 one will face immense rounding errors due to the summing of e^(-energy). In this case we recommend the SC_PartitionFunction_Shifted state collector which uses a more advanced handling of the Boltzmann weights based on energy differences instead of pure energies (without negative impact in accuracy).
Definition at line 369 of file StateCollector.hh.
Public Member Functions | |
virtual void | add (const State &s) |
double | getEnergy (void) const |
virtual const State *const | getLastAdded () const |
double | getZ (void) const |
SC_PartitionFunction () | |
virtual size_t | size () const |
virtual | ~SC_PartitionFunction () |
Protected Attributes | |
State * | lastAdded |
size_t | stateCount |
double | Z |
Constructor & Destructor Documentation
ell::SC_PartitionFunction::SC_PartitionFunction | ( | ) |
ell::SC_PartitionFunction::~SC_PartitionFunction | ( | ) | [virtual] |
Member Function Documentation
void ell::SC_PartitionFunction::add | ( | const State & | s | ) | [virtual] |
This function makes the collector manage the given State.
- Parameters:
-
s the added State
Reimplemented from ell::SC_Counting.
Definition at line 20 of file SC_PartitionFunction.cc.
double ell::SC_PartitionFunction::getEnergy | ( | void | ) | const |
Calculates the free energy of the collected State ensemble based on the canonical partition function : E = -kT * ln(Z)
- Returns:
- the energy of the State ensemble
Definition at line 38 of file SC_PartitionFunction.cc.
const State *const ell::SC_Counting::getLastAdded | ( | ) | const [virtual, inherited] |
Returns last added State.
- Returns:
- last added State
Implements ell::StateCollector.
Definition at line 37 of file SC_Counting.cc.
double ell::SC_PartitionFunction::getZ | ( | void | ) | const |
Access to the canonical partition function of the collected States.
- Returns:
- the partition function Z
Definition at line 31 of file SC_PartitionFunction.cc.
size_t ell::SC_Counting::size | ( | ) | const [virtual, inherited] |
Returns number of added States.
- Returns:
- the number of added states
Implements ell::StateCollector.
Definition at line 30 of file SC_Counting.cc.
Field Documentation
State* ell::SC_Counting::lastAdded [protected, inherited] |
size_t ell::SC_Counting::stateCount [protected, inherited] |
double ell::SC_PartitionFunction::Z [protected] |
the current canonical partition function of the collected States
Definition at line 384 of file StateCollector.hh.
The documentation for this class was generated from the following files:
- src/ell/StateCollector.hh
- src/ell/SC_PartitionFunction.cc