Views

The concept of views in Constraint Programming is halfway between variables and constraints. Specifically, a view is a special kind of variable that does not declare any domain, but instead relies on one or several other variables through a logical relation. From a modelling perspective, a view can be manipulated exactly as any other variable. In pychoco, the only difference that you will notice is that the is_view() method will return True when a variable is actually a view.

Views are directly declared from a Model object (see Model).

Boolean views

Boolean view can be declared over several types of variables, and behave as Boolean variables.

bool_not_view

set_bool_view

set_bools_view

Integer views

Integer view can be declared over several types of variables, and behave as Integer variables.

int_offset_view

int_minus_view

int_scale_view

int_abs_view

int_affine_view

int_eq_view

int_ne_view

int_le_view

int_ge_view

Set views

Set view can be declared over several types of variables, and behave as Set variables.

bools_set_view

ints_set_view

set_union_view

set_intersection_view

set_difference_view

graph_node_set_view

graph_successors_set_view

graph_predecessors_set_view

graph_neighbors_set_view

Graph views

node_induced_subgraph_view

edge_induced_subgraph_view

graph_union_view