The TwoStateSpace is a discrete Space with only two values, for example {0,1} or {-1,1}. More...
#include <shark/Unsupervised/RBM/StateSpaces/TwoStateSpace.h>
Public Types | |
typedef tags::DiscreteSpace | EnumerationTag |
Tag which tells an approximating function of the partition function, that this space can be enumerated. More... | |
Static Public Member Functions | |
static std::size_t | numberOfStates (std::size_t numberOfNeurons) |
Returns the number of states a vector of n random variables (neurons) with values in this state space may have. More... | |
template<class Vector > | |
static void | state (Vector &vec, std::size_t stateNumber) |
Returns the i-th state vector. More... | |
template<class Matrix > | |
static void | state (blas::matrix_row< Matrix > vec, std::size_t stateNumber) |
Returns the i-th state vector for a matrix row. More... | |
The TwoStateSpace is a discrete Space with only two values, for example {0,1} or {-1,1}.
Definition at line 41 of file TwoStateSpace.h.
typedef tags::DiscreteSpace shark::TwoStateSpace< State1, State2 >::EnumerationTag |
Tag which tells an approximating function of the partition function, that this space can be enumerated.
Definition at line 44 of file TwoStateSpace.h.
|
inlinestatic |
Returns the number of states a vector of n random variables (neurons) with values in this state space may have.
For example if {a,b} is the state space it returns the cardinality of the set \( {a,b}^n = 2^n \)
numberOfNeurons | the size of the vector |
Definition at line 51 of file TwoStateSpace.h.
References SHARK_RUNTIME_CHECK.
|
inlinestatic |
Returns the i-th state vector.
vec | the vector the i-th state vector is stored in |
stateNumber | the number of the state |
Definition at line 63 of file TwoStateSpace.h.
|
inlinestatic |
Returns the i-th state vector for a matrix row.
vec | the vector the i-th state vector is stored in |
stateNumber | the number of the state |
Definition at line 74 of file TwoStateSpace.h.