shark::State Struct Reference

Represents the State of an Object. More...

#include <shark/Core/State.h>

+ Inheritance diagram for shark::State:

Public Member Functions

virtual ~State ()
 prevents that this class can be instantiated More...
 
template<class DerivedStateType >
DerivedStateType const & toState () const
 Safely downcast State to it's derived type. More...
 
template<class DerivedStateType >
DerivedStateType & toState ()
 

Detailed Description

Represents the State of an Object.

Often the State of an object is changed during usage. This, however, makes it impossible to use the object in a multithreaded environment in parallel. The solution is to externalize the state, so that every thread can have it's own storage.

Definition at line 49 of file State.h.

Constructor & Destructor Documentation

◆ ~State()

virtual shark::State::~State ( )
inlinevirtual

prevents that this class can be instantiated

Definition at line 52 of file State.h.

Member Function Documentation

◆ toState() [1/2]

template<class DerivedStateType >
DerivedStateType const& shark::State::toState ( ) const
inline

Safely downcast State to it's derived type.

Tries to do a safe cast from State to it's derived type. The program is terminated in debug mode, if the wrong Type was used.

Definition at line 60 of file State.h.

Referenced by shark::PointSetKernel< InputType >::eval(), shark::MonomialKernel< InputType >::eval(), shark::DropoutLayer< VectorType >::eval(), shark::NormalizedKernel< InputType >::eval(), shark::GaussianRbfKernel< InputType >::eval(), shark::ARDKernelUnconstrained< InputType >::eval(), shark::ConcatenatedModel< VectorType >::eval(), shark::PolynomialKernel< InputType >::eval(), shark::WeightedSumKernel< InputType >::eval(), shark::ConcatenatedModel< VectorType >::hiddenResponses(), shark::ConcatenatedModel< VectorType >::hiddenState(), shark::ConcatenatedModel< VectorType >::weightedDerivatives(), shark::LinearModel< VectorType >::weightedDerivatives(), shark::DropoutLayer< VectorType >::weightedInputDerivative(), shark::MonomialKernel< InputType >::weightedInputDerivative(), shark::GaussianRbfKernel< InputType >::weightedInputDerivative(), shark::ARDKernelUnconstrained< InputType >::weightedInputDerivative(), shark::ConcatenatedModel< VectorType >::weightedInputDerivative(), shark::Conv2DModel< VectorType, ActivationFunction >::weightedInputDerivative(), shark::NormalizedKernel< InputType >::weightedInputDerivative(), shark::PolynomialKernel< InputType >::weightedInputDerivative(), shark::LinearModel< VectorType >::weightedInputDerivative(), shark::WeightedSumKernel< InputType >::weightedInputDerivativeImpl(), shark::PointSetKernel< InputType >::weightedParameterDerivative(), shark::GaussianRbfKernel< InputType >::weightedParameterDerivative(), shark::ConcatenatedModel< VectorType >::weightedParameterDerivative(), shark::Conv2DModel< VectorType, ActivationFunction >::weightedParameterDerivative(), shark::ARDKernelUnconstrained< InputType >::weightedParameterDerivative(), shark::NormalizedKernel< InputType >::weightedParameterDerivative(), shark::PolynomialKernel< InputType >::weightedParameterDerivative(), and shark::WeightedSumKernel< InputType >::weightedParameterDerivative().

◆ toState() [2/2]

template<class DerivedStateType >
DerivedStateType& shark::State::toState ( )
inline

Definition at line 65 of file State.h.


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