11 #ifndef __FACTOR_TYPE_H__
12 #define __FACTOR_TYPE_H__
47 virtual const char*
get_name()
const {
return "FactorType"; }
89 virtual bool is_table()
const {
return false; }
140 virtual const char*
get_name()
const {
return "TableFactorType"; }
virtual void set_type_id(int32_t id)
Class CFactorType defines the way of factor parameterization.
int32_t index_from_assignment(const SGVector< int32_t > assig) const
virtual void compute_energies(const SGVector< float64_t > factor_data, SGVector< float64_t > &energies) const
SGVector< float64_t > m_w
virtual SGVector< float64_t > get_w()
SGVector< int32_t > m_cards
virtual bool is_table() const
SGVector< int32_t > m_cumprod_cards
virtual int32_t get_type_id() const
void set_w(SGVector< float64_t > w)
Class SGObject is the base class of all shogun objects.
virtual void compute_gradients(const SGVector< float64_t > factor_data, const SGVector< float64_t > marginals, SGVector< float64_t > ¶meter_gradient, double mult) const
int32_t m_num_assignments
virtual void set_cardinalities(SGVector< int32_t > cards)
int32_t index_from_new_state(int32_t old_ei, int32_t var_index, int32_t var_state) const
virtual ~CTableFactorType()
int32_t state_from_index(int32_t ei, int32_t var_index) const
all of classes and functions are contained in the shogun namespace
virtual int32_t get_w_dim() const
virtual const char * get_name() const
virtual bool is_table() const
Class CTableFactorType the way that store assignments of variables and energies in a table or a multi...
virtual const SGVector< int32_t > get_cardinalities() const
virtual int32_t get_num_vars()
SGVector< int32_t > assignment_from_index(int32_t ei) const
int32_t index_from_universe_assignment(const SGVector< int32_t > assig, const SGVector< int32_t > var_index) const
virtual const char * get_name() const
virtual int32_t get_num_assignments() const