11 #ifndef __FACTOR_RELATED_H__
12 #define __FACTOR_RELATED_H__
49 virtual const char*
get_name()
const {
return "FactorDataSource"; }
125 virtual const char*
get_name()
const {
return "Factor"; }
void set_energy(int32_t ei, float64_t value)
bool is_data_sparse() const
float64_t get_energy(int32_t index) const
CTableFactorType * get_factor_type() const
SGSparseVector< float64_t > get_data_sparse() const
virtual SGVector< float64_t > get_data() const
const SGVector< int32_t > get_variables() const
void set_variables(SGVector< int32_t > vars)
SGVector< float64_t > get_data() const
virtual const char * get_name() const
virtual SGSparseVector< float64_t > get_data_sparse() const
void compute_gradients(const SGVector< float64_t > marginals, SGVector< float64_t > ¶meter_gradient, double mult=1.0) const
float64_t evaluate_energy(const SGVector< int32_t > state) const
virtual void set_data_sparse(SGSparseVectorEntry< float64_t > *sparse, int32_t dlen)
SGVector< float64_t > get_energies() const
bool is_data_dependent() const
Class SGObject is the base class of all shogun objects.
SGSparseVector< float64_t > m_data_sparse
SGVector< int32_t > m_var_index
Class CFactorDataSource Source for factor data. In some cases, the same data can be shared by many fa...
virtual void set_data(SGVector< float64_t > dense)
const int32_t get_num_vars() const
void set_energies(SGVector< float64_t > ft_energies)
virtual const char * get_name() const
all of classes and functions are contained in the shogun namespace
void set_data_sparse(SGSparseVectorEntry< float64_t > *data_sparse, int32_t dlen)
virtual bool is_sparse() const
Class CTableFactorType the way that store assignments of variables and energies in a table or a multi...
void set_factor_type(CTableFactorType *ftype)
virtual ~CFactorDataSource()
CTableFactorType * m_factor_type
Class CFactor A factor is defined on a clique in the factor graph. Each factor can have its own data...
void set_data(SGVector< float64_t > data_dense)
const SGVector< int32_t > get_cardinalities() const
SGVector< float64_t > m_data
CFactorDataSource * m_data_source
SGVector< float64_t > m_energies