Adiar
2.1.0
An External Memory Decision Diagram Library
|
Global domain of variables. More...
Typedefs | |
using | adiar::domain_var = internal::node::label_type |
The variable type of a domain variable. | |
Functions | |
void | adiar::domain_set (const domain_var varcount) |
Set the domain globally for all of Adiar to be [0, varcount). | |
void | adiar::domain_set (const generator< domain_var > &dom) |
Set the domain globally for all of Adiar to be the variables produced by the given generator function. More... | |
template<typename ForwardIt > | |
void | adiar::domain_set (ForwardIt begin, ForwardIt end) |
Set the domain globally for all of Adiar to be the variables in the given range of iterators. More... | |
void | adiar::domain_set (const internal::shared_file< domain_var > &dom) |
Set the domain globally for all of Adiar. More... | |
void | adiar::domain_unset () |
Removes any globally shared domain variables (if any). More... | |
bool | adiar::domain_isset () |
Whether Adiar has a global domain. | |
internal::shared_file< domain_var > | adiar::domain_get () |
Returns the global domain. More... | |
domain_var | adiar::domain_size () |
The size of the domain. More... | |
Variables | |
constexpr domain_var | adiar::domain_max = internal::node::max_label |
The maximum supported domain variable. | |
Global domain of variables.
Some operations relate to the entire variable domain. Instead of passing this around explicitly, you may set it once and then Adiar will take care of using it when needed.
internal::shared_file<domain_var> adiar::domain_get | ( | ) |
Returns the global domain.
This may be usable, if one needs to change the domain, but wants to set it back again to the prior value without recreating the entire file.
domain_isset() == true
domain_error | If no domain is set, i.e. domain_isset() == false . |
void adiar::domain_set | ( | const generator< domain_var > & | dom | ) |
Set the domain globally for all of Adiar to be the variables produced by the given generator function.
dom | Generator that produces variables to be quantified in ascending order. When none are left, it must return a value greater than domain_max . |
void adiar::domain_set | ( | const internal::shared_file< domain_var > & | dom | ) |
Set the domain globally for all of Adiar.
This may be usable, if one needs to change the domain, but wants to set it back again to the prior value without recreating the entire file.
dom | A shared_file containing all labels of the problem domain in ascending order. |
void adiar::domain_set | ( | ForwardIt | begin, |
ForwardIt | end | ||
) |
Set the domain globally for all of Adiar to be the variables in the given range of iterators.
begin | Single-pass forward iterator that provides the domain variables in ascending order. |
end | Marks the end for begin . |
domain_var adiar::domain_size | ( | ) |
The size of the domain.
Returns 0
if domain_isset() == false
.
void adiar::domain_unset | ( | ) |
Removes any globally shared domain variables (if any).