36 void print(
const std::string& s =
"Assignment: ")
const {
37 std::cout << s <<
": ";
38 for(
const typename Assignment::value_type& keyValue: *
this)
39 std::cout <<
"(" << keyValue.first <<
", " << keyValue.second <<
")";
40 std::cout << std::endl;
44 return (*
this == other);
63 const std::vector<std::pair<L, size_t> >& keys) {
64 std::vector<Assignment<L> > allPossValues;
68 values[key.first] = 0;
70 allPossValues.push_back(values);
72 for (j = 0; j < keys.size(); j++) {
73 L idx = keys[j].first;
75 if (values[idx] < keys[j].second)
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
std::pair< Key, size_t > DiscreteKey
Key type for discrete conditionals Includes name and cardinality.
Definition: DiscreteKey.h:34
std::vector< Assignment< L > > cartesianProduct(const std::vector< std::pair< L, size_t > > &keys)
Get Cartesian product consisting all possible configurations.
Definition: Assignment.h:62
Template to create a binary predicate.
Definition: Testable.h:111
An assignment from labels to value index (size_t).
Definition: Assignment.h:34