Infrared
|
Cluster (or bag) in the cluster tree. More...
#include <cluster.hpp>
Public Types | |
using | var_idx_t = int |
using | function_t = Function< FunValue > |
using | constraint_t = Constraint |
using | assignment_t = Assignment |
Public Member Functions | |
Cluster () | |
empty constructor | |
Cluster (const std::vector< var_idx_t > &vars) | |
constructor with variables | |
~Cluster () | |
const std::vector< var_idx_t > & | vars () const |
Get variables. | |
bool | empty () const |
Check whether cluster is empty. | |
const auto & | constraints () const |
Get constraints. | |
const auto & | functions () const |
Get functions. | |
void | add_constraint (const constraint_t *c) |
Assign constraint to this cluster. | |
void | add_function (const function_t *f) |
Assign function to this cluster. | |
auto | sep_vars (const Cluster &parent) const |
Calculate separator variables. | |
auto | diff_vars (const Cluster &parent) const |
Calculate difference variables. | |
Cluster (or bag) in the cluster tree.
A cluster consists of collections
Implicitly, a cluster belongs to a cluster tree and, thus, a constraint network CN. Variables are stored/identified by their unique indices in the CN.
using ired::Cluster< FunValue >::assignment_t = Assignment |
using ired::Cluster< FunValue >::constraint_t = Constraint |
using ired::Cluster< FunValue >::function_t = Function<FunValue> |
using ired::Cluster< FunValue >::var_idx_t = int |
|
inline |
empty constructor
|
inlineexplicit |
constructor with variables
vars | vector of indices of variables in the cluster |
|
inline |
|
inline |
Assign constraint to this cluster.
|
inline |
Assign function to this cluster.
|
inline |
Get constraints.
|
inline |
Calculate difference variables.
parent | parent cluster of this object |
The difference variables are the variables of this object that are not already present in the parent.
|
inline |
Check whether cluster is empty.
|
inline |
Get functions.
|
inline |
Calculate separator variables.
parent | parent cluster of this object |
The separator variables are the variables of this object that are already present in the parent. In other terms, the cut set of the variables of this and the parent cluster
|
inline |
Get variables.