OpenGM  2.3.x
Discrete Graphical Model Library
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
opengm::functions::learnable::LUnary< T, I, L > Class Template Reference

#include <lunary.hxx>

+ Inheritance diagram for opengm::functions::learnable::LUnary< T, I, L >:
+ Collaboration diagram for opengm::functions::learnable::LUnary< T, I, L >:

Public Types

typedef T ValueType
 
typedef T V
 
typedef L LabelType
 
typedef I IndexType
 
- Public Types inherited from opengm::FunctionBase< opengm::functions::learnable::LUnary< T, I, L >, T, I, L >
typedef AccessorIterator< FunctionShapeAccessorType, true > FunctionShapeIteratorType
 

Public Member Functions

 LUnary ()
 
 LUnary (const opengm::learning::Weights< T > &weights, std::vector< FeaturesAndIndices< T, I > > featuresAndIndicesPerLabel)
 
 LUnary (const opengm::learning::Weights< T > &weights, const LabelType numberOfLabels, marray::Marray< size_t > weightIds, marray::Marray< ValueType > features, const bool makeFirstEntryConst)
 
shape (const size_t) const
 
size_t size () const
 
size_t dimension () const
 
template<class ITERATOR >
operator() (ITERATOR) const
 
void setWeights (const opengm::learning::Weights< T > &weights) const
 
size_t numberOfWeights () const
 
weightIndex (const size_t weightNumber) const
 
template<class ITERATOR >
weightGradient (size_t, ITERATOR) const
 
- Public Member Functions inherited from opengm::FunctionBase< opengm::functions::learnable::LUnary< T, I, L >, T, I, L >
bool isPotts () const
 
bool isGeneralizedPotts () const
 
bool isSubmodular () const
 
bool isSquaredDifference () const
 
bool isTruncatedSquaredDifference () const
 
bool isAbsoluteDifference () const
 
bool isTruncatedAbsoluteDifference () const
 
bool isLinearConstraint () const
 
MinMaxFunctor< T > minMax () const
 find minimum and maximum of the function in a single sweep More...
 
ReturnType min () const
 
ReturnType max () const
 
ReturnType sum () const
 
ReturnType product () const
 
ReturnType accumulate () const
 accumulate all values of the function More...
 
void forAllValuesInOrder (FUNCTOR &functor) const
 call a functor for each value of the function (in lexicographical order of the variable indices) More...
 
void forAllValuesInSwitchedOrder (FUNCTOR &functor) const
 
void forAllValuesInAnyOrder (FUNCTOR &functor) const
 call a functor for each value of the function (in un-specified order) More...
 
void forAtLeastAllUniqueValues (FUNCTOR &functor) const
 call a functor for at least all unique values of the function More...
 
void forAllValuesInOrderWithCoordinate (COORDINATE_FUNCTOR &functor) const
 
void forAllValuesInAnyOrderWithCoordinate (COORDINATE_FUNCTOR &functor) const
 
void forAtLeastAllUniqueValuesWithCoordinate (COORDINATE_FUNCTOR &functor) const
 
bool operator== (const opengm::functions::learnable::LUnary< T, I, L > &) const
 
FunctionShapeIteratorType functionShapeBegin () const
 
FunctionShapeIteratorType functionShapeEnd () const
 
size_t numberOfWeights () const
 
weightIndex (const size_t weightNumber) const
 
void setWeights (const opengm::learning::Weights< T > &) const
 
weightGradient (size_t, ITERATOR) const
 

Protected Member Functions

size_t numWeightsForL (const LabelType l) const
 
size_t weightIdOffset (const LabelType l) const
 
size_t featureOffset (const LabelType l) const
 

Protected Attributes

const opengm::learning::Weights< T > * weights_
 
IndexType numberOfLabels_
 
std::vector< IndexTypeoffsets_
 
std::vector< size_tweightIds_
 
std::vector< ValueTypefeatures_
 

Detailed Description

template<class T, class I, class L>
class opengm::functions::learnable::LUnary< T, I, L >

Definition at line 32 of file lunary.hxx.

Member Typedef Documentation

§ IndexType

template<class T, class I, class L>
typedef I opengm::functions::learnable::LUnary< T, I, L >::IndexType

Definition at line 39 of file lunary.hxx.

§ LabelType

template<class T, class I, class L>
typedef L opengm::functions::learnable::LUnary< T, I, L >::LabelType

Definition at line 38 of file lunary.hxx.

§ V

template<class T, class I, class L>
typedef T opengm::functions::learnable::LUnary< T, I, L >::V

Definition at line 37 of file lunary.hxx.

§ ValueType

template<class T, class I, class L>
typedef T opengm::functions::learnable::LUnary< T, I, L >::ValueType

Definition at line 36 of file lunary.hxx.

Constructor & Destructor Documentation

§ LUnary() [1/3]

template<class T, class I, class L>
opengm::functions::learnable::LUnary< T, I, L >::LUnary ( )
inline

Definition at line 41 of file lunary.hxx.

+ Here is the caller graph for this function:

§ LUnary() [2/3]

template<class T , class I , class L >
opengm::functions::learnable::LUnary< T, I, L >::LUnary ( const opengm::learning::Weights< T > &  weights,
std::vector< FeaturesAndIndices< T, I > >  featuresAndIndicesPerLabel 
)
inline

Definition at line 194 of file lunary.hxx.

+ Here is the call graph for this function:

§ LUnary() [3/3]

template<class T , class I , class L >
opengm::functions::learnable::LUnary< T, I, L >::LUnary ( const opengm::learning::Weights< T > &  weights,
const LabelType  numberOfLabels,
marray::Marray< size_t weightIds,
marray::Marray< ValueType features,
const bool  makeFirstEntryConst 
)

Definition at line 116 of file lunary.hxx.

+ Here is the call graph for this function:

Member Function Documentation

§ dimension()

template<class T , class I , class L >
size_t opengm::functions::learnable::LUnary< T, I, L >::dimension ( ) const
inline

Definition at line 311 of file lunary.hxx.

§ featureOffset()

template<class T, class I, class L>
size_t opengm::functions::learnable::LUnary< T, I, L >::featureOffset ( const LabelType  l) const
inlineprotected

Definition at line 98 of file lunary.hxx.

§ numberOfWeights()

template<class T, class I, class L>
size_t opengm::functions::learnable::LUnary< T, I, L >::numberOfWeights ( ) const
inline

Definition at line 76 of file lunary.hxx.

§ numWeightsForL()

template<class T, class I, class L>
size_t opengm::functions::learnable::LUnary< T, I, L >::numWeightsForL ( const LabelType  l) const
inlineprotected

Definition at line 92 of file lunary.hxx.

§ operator()()

template<class T , class I , class L >
template<class ITERATOR >
T opengm::functions::learnable::LUnary< T, I, L >::operator() ( ITERATOR  begin) const
inline

Definition at line 274 of file lunary.hxx.

+ Here is the call graph for this function:

§ setWeights()

template<class T, class I, class L>
void opengm::functions::learnable::LUnary< T, I, L >::setWeights ( const opengm::learning::Weights< T > &  weights) const
inline

Definition at line 72 of file lunary.hxx.

§ shape()

template<class T , class I , class L >
L opengm::functions::learnable::LUnary< T, I, L >::shape ( const size_t  i) const
inline

Definition at line 303 of file lunary.hxx.

+ Here is the caller graph for this function:

§ size()

template<class T , class I , class L >
size_t opengm::functions::learnable::LUnary< T, I, L >::size ( ) const
inline

Definition at line 317 of file lunary.hxx.

§ weightGradient()

template<class T , class I , class L >
template<class ITERATOR >
T opengm::functions::learnable::LUnary< T, I, L >::weightGradient ( size_t  weightNumber,
ITERATOR  begin 
) const
inline

Definition at line 251 of file lunary.hxx.

+ Here is the caller graph for this function:

§ weightIdOffset()

template<class T, class I, class L>
size_t opengm::functions::learnable::LUnary< T, I, L >::weightIdOffset ( const LabelType  l) const
inlineprotected

Definition at line 95 of file lunary.hxx.

§ weightIndex()

template<class T, class I, class L>
I opengm::functions::learnable::LUnary< T, I, L >::weightIndex ( const size_t  weightNumber) const
inline

Definition at line 80 of file lunary.hxx.

Member Data Documentation

§ features_

template<class T, class I, class L>
std::vector<ValueType> opengm::functions::learnable::LUnary< T, I, L >::features_
protected

Definition at line 107 of file lunary.hxx.

§ numberOfLabels_

template<class T, class I, class L>
IndexType opengm::functions::learnable::LUnary< T, I, L >::numberOfLabels_
protected

Definition at line 104 of file lunary.hxx.

§ offsets_

template<class T, class I, class L>
std::vector<IndexType> opengm::functions::learnable::LUnary< T, I, L >::offsets_
protected

Definition at line 105 of file lunary.hxx.

§ weightIds_

template<class T, class I, class L>
std::vector<size_t> opengm::functions::learnable::LUnary< T, I, L >::weightIds_
protected

Definition at line 106 of file lunary.hxx.

§ weights_

template<class T, class I, class L>
const opengm::learning::Weights<T>* opengm::functions::learnable::LUnary< T, I, L >::weights_
mutableprotected

Definition at line 102 of file lunary.hxx.