Domain concepts¶
Table of Contents
Domain¶
Let Dom be a type that models Domain (details).
Then Dom also models Regular (fundamentals).
Types
Then we can define :
| Definition | Description | Requirement |
|---|---|---|
| Dom::point_type | type of a point | models Point concept |
| Dom::const_point_range | type of the range to iterate over all the point | models BidirectionalRange concept |
| Dom::value_type | type of a value |
|
Expressions
- Let :
dombe an instance of Dom.dom_cpybe an instance of Dom.cdombe an instance of const Dom.lhsbe an instance of const Dom.rhsbe an instance of const Dom.pbe an instance of Dom::point_type.
Then we have the following valid expressions :
| Expression | Return type | Pre-condition | Post-condition | Description |
|---|---|---|---|---|
dom() |
Dom | none | none | Constructs a domain dom of type Dom |
cdom() |
const Dom | none | none | Constructs a domain cdom of type Dom |
dom_cpy(dom) |
Dom | none | none | Copy-constructs a domain dom_cpy from dom |
dom_cpy(cdom) |
Dom | none | none | Copy-constructs a domain dom_cpy from cdom |
dom_cpy(move(dom)) |
Dom | none | none | Move-constructs a domain dom_cpy from dom |
dom_cpy = dom |
Dom& | none | none | Assign dom to dom_cpy |
dom_cpy = cdom |
Dom& | none | none | Assign cdom to dom_cpy |
dom_cpy = move(dom) |
Dom& | none | none | Move-assign dom to dom_cpy |
lhs == rhs |
bool | none | none | Compare wether two domains are equal |
lhs != rhs |
bool | none | none | Compare wether two domains are different |
rhs == lhs |
bool | none | none | Compare wether two domains are equal |
rhs != lhs |
bool | none | none | Compare wether two domains are different |
cdom.has(p) |
bool | none | none | Check wether p belongs to the domain cdom |
cdom.empty() |
bool | none | none | Check wether cdom is an empty domain |
cdom.is_continuous() |
bool | none | none | Check wether cdom is a continuous domain |
cdom.is_discrete() |
bool | none | none | Check wether cdom is a discrete domain |
cdom.points() |
const_point_range | none | none | Return a range of points to iterate over it |