|
Infrared
|
A materialized function. More...
#include <functions.hpp>


Public Types | |
| using | self_t = MaterializedFunction< FunValue, ContainerS > |
| using | parent_t = Function< FunValue > |
| using | base_t = typename parent_t::base_t |
| using | var_idx_t = typename parent_t::var_idx_t |
| using | assignment_t = typename parent_t::assignment_t |
| using | fun_value_t = FunValue |
| using | function_t = Function< fun_value_t > |
| using | data_t = typename container_selector< FunValue, ContainerS >::type |
Public Types inherited from ired::Function< FunValue > | |
| using | self_t = Function< FunValue > |
| using | base_t = self_t |
| using | assignment_t = Assignment |
| using | fun_value_t = FunValue |
Public Types inherited from ired::Dependency | |
| using | var_idx_t = int |
Public Member Functions | |
| template<class FeatureNetwork > | |
| MaterializedFunction (const std::vector< var_idx_t > &vars, const FeatureNetwork &cn) | |
| construct 'empty' with variables, domains, and zero value | |
| template<class FeatureNetwork > | |
| MaterializedFunction (const function_t *function, const FeatureNetwork &cn) | |
| materializing constructor | |
| fun_value_t | operator() (const assignment_t &a) const override |
| evaluate function | |
| void | set (const assignment_t &a, const fun_value_t &val) |
| set function value | |
| bool | guaranteed_zero (const assignment_t &a) const override |
| check whether this object knows that some function value is zero | |
| virtual bool | auto_materialize () const override |
| whether to automatically materialize when added to CN | |
| virtual std::string | name () const override |
| name of the class | |
| auto | datasize () const |
| number of stored function values | |
Public Member Functions inherited from ired::Function< FunValue > | |
| Function (const std::vector< var_idx_t > &vars) | |
| virtual fun_value_t | operator() (const assignment_t &) const=0 |
| virtual bool | guaranteed_zero (const assignment_t &a) const |
| virtual bool | auto_materialize () const |
| virtual std::string | name () const |
| virtual | ~Function () |
Public Member Functions inherited from ired::Dependency | |
| Dependency (const std::vector< var_idx_t > &vars) | |
| const std::vector< var_idx_t > & | vars () const |
| virtual | ~Dependency () |
A materialized function.
A function that holds a table of function values. It is used to represent computed messages (DP matrices) during evaluation of the cluster tree, or precomputed functions.
Supports sparse and non-sparse representation of the function value table. The choice is made by a template mechanism using selector classes.
| using ired::MaterializedFunction< FunValue, ContainerS >::assignment_t = typename parent_t::assignment_t |
| using ired::MaterializedFunction< FunValue, ContainerS >::base_t = typename parent_t::base_t |
| using ired::MaterializedFunction< FunValue, ContainerS >::data_t = typename container_selector<FunValue,ContainerS>::type |
| using ired::MaterializedFunction< FunValue, ContainerS >::fun_value_t = FunValue |
| using ired::MaterializedFunction< FunValue, ContainerS >::function_t = Function<fun_value_t> |
| using ired::MaterializedFunction< FunValue, ContainerS >::parent_t = Function<FunValue> |
| using ired::MaterializedFunction< FunValue, ContainerS >::self_t = MaterializedFunction<FunValue,ContainerS> |
| using ired::MaterializedFunction< FunValue, ContainerS >::var_idx_t = typename parent_t::var_idx_t |
|
inline |
construct 'empty' with variables, domains, and zero value
| vars | vector of indices of variable in a cn |
| domains | domains of the variables in the cn |
| zero | value (default for not explicitly set function values) |
The (non-zero) function values are typically set after construction, using method
|
inline |
materializing constructor
copy constructs from function, thereby materializing it
| function | the function to be copied |
| cn | constraint network (must outlive this object) |
| evaluation | policy |
|
inlineoverridevirtual |
whether to automatically materialize when added to CN
Reimplemented from ired::Function< FunValue >.
|
inline |
number of stored function values
|
inlineoverridevirtual |
check whether this object knows that some function value is zero
| a | assignment where this is checked |
Reimplemented from ired::Function< FunValue >.
|
inlineoverridevirtual |
name of the class
Reimplemented from ired::Function< FunValue >.
|
inlineoverridevirtual |
evaluate function
| a | assignment where the function is evaluated |
Implements ired::Function< FunValue >.
|
inline |
set function value
| a | assignment where the value is set |
| value | value to be set |