|
| | r_Minterval (const r_Point &low, const r_Point &high) |
| | constructor getting a low, high pair More...
|
| |
| | r_Minterval (r_Dimension) |
| | constructor getting dimensionality for stream initializing More...
|
| |
| | r_Minterval (const char *) |
| | constructor taking string representation (e.g. [ 1:255, *:200, *:* ]) More...
|
| |
| | r_Minterval (char *) |
| | constructor taking string representation (e.g. [ 1:255, *:200, *:* ]) More...
|
| |
| | r_Minterval (std::vector< r_Sinterval > intervals) |
| | construct from interval axes More...
|
| |
| r_Minterval & | operator<< (const r_Sinterval &) |
| | for stream initializing with intervals More...
|
| |
| r_Minterval & | operator<< (r_Range) |
| | for stream initializing with point intervals More...
|
| |
| | r_Minterval ()=default |
| | default constructor More...
|
| |
| | ~r_Minterval ()=default |
| | default destructor More...
|
| |
| | r_Minterval (r_Minterval &&other)=default |
| | move constructor More...
|
| |
| r_Minterval & | operator= (r_Minterval &&other)=default |
| | move assignment More...
|
| |
| | r_Minterval (const r_Minterval &other)=default |
| | copy constructor More...
|
| |
| r_Minterval & | operator= (const r_Minterval &other)=default |
| | copy assignment More...
|
| |
| const r_Sinterval & | operator[] (r_Dimension) const |
| | read access the i-th interval More...
|
| |
| const r_Sinterval & | at (r_Dimension) const |
| | read access the i-th interval with bound checking More...
|
| |
| r_Sinterval & | operator[] (r_Dimension) |
| | write access the i-th interval More...
|
| |
| r_Sinterval & | at (r_Dimension) |
| | write access the i-th interval with bound checking More...
|
| |
| const r_Sinterval & | at_unsafe (r_Dimension dim) const |
| |
| r_Sinterval & | at_unsafe (r_Dimension dim) |
| |
| bool | operator== (const r_Minterval &) const |
| | Two domains are equal if they have the same number of dimensions and each dimension has the same lower and upper bounds. More...
|
| |
| bool | operator!= (const r_Minterval &) const |
| | non equal operator - negation of equal operator More...
|
| |
| bool | equal_extents (const r_Minterval &other) const |
| | Return true if the extents of each dimension are equal, otherwise false. More...
|
| |
| bool | covers (const r_Point &pnt) const |
| | Does this interval cover the given point. More...
|
| |
| bool | covers (const r_Minterval &inter) const |
| | Does this interval cover the given interval. More...
|
| |
| bool | inside_of (const r_Minterval &) const |
| | Check whether one interval is within another. More...
|
| |
| std::vector< r_Minterval > | split_equal (int n) |
| | Split into n smaller mintervals. More...
|
| |
| r_Dimension | dimension () const |
| | get dimensionality More...
|
| |
| bool | is_scalar () const noexcept |
| |
| r_Point | get_origin () const |
| | Returns a point with the minimum coordinates in all dimensions. More...
|
| |
| r_Point | get_high () const |
| | Returns a point with the maximum coordinates in all dimensions. More...
|
| |
| r_Point | get_extent () const |
| | Get size of minterval as point. More...
|
| |
| bool | is_origin_fixed () const noexcept |
| | Returns true if all lower bounds are fixed, otherwise false. More...
|
| |
| bool | is_high_fixed () const noexcept |
| | Returns true if all upper bounds are fixed, otherwise false. More...
|
| |
| bool | is_fixed () const noexcept |
| | Returns true if all intervals are fixed. More...
|
| |
| std::vector< std::string > | get_axis_names () const |
| |
| void | set_axis_names (std::vector< std::string > axis_names) |
| | set new axis names to the underlying sintervals; the size of the axis_names vector must match the dimension of this minterval, otherwise an exception is thrown. More...
|
| |
| void | set_axis_names (const r_Minterval &o) |
| | copy the axis names from o to this minterval; minterval dimensions must match, otherwise an exception is thrown. More...
|
| |
| bool | axis_names_match (const r_Minterval &o) const |
| |
| bool | has_axis_names () const |
| |
| bool | is_mergeable (const r_Minterval &other) const |
| | This method checks if two r_Mintervals are "mergeable" side by side. More...
|
| |
| r_Minterval & | reverse_translate (const r_Point &) |
| | Subtracts respective coordinate of a point to the lower bounds of an interval. More...
|
| |
| r_Minterval | create_reverse_translation (const r_Point &) const |
| | Returns new interval as translation of this by a point. More...
|
| |
| r_Minterval & | translate (const r_Point &) |
| | Translates this by a point. More...
|
| |
| r_Minterval | create_translation (const r_Point &) const |
| | Returns new interval as translation of this by a point. More...
|
| |
| r_Minterval & | scale (const double &) |
| | Scales all extents by factor. More...
|
| |
| r_Minterval & | scale (const std::vector< double > &) |
| | Scales respective extents by vector of factors. More...
|
| |
| r_Minterval | create_scale (const double &) const |
| | Returns new interval as scaled from this by factor. More...
|
| |
| r_Minterval | create_scale (const std::vector< double > &) const |
| | Returns new interval as scaled from this by vector of factors. More...
|
| |
| std::vector< double > | scale_of (const r_Minterval &op) const |
| |
| r_Minterval & | union_of (const r_Minterval &, const r_Minterval &) |
| | Return new minterval as union of the argument mintervals. More...
|
| |
| r_Minterval & | union_with (const r_Minterval &) |
| | Union of argument with this minterval. More...
|
| |
| r_Minterval & | operator+= (const r_Minterval &) |
| | Operator for union_with. More...
|
| |
| r_Minterval | create_union (const r_Minterval &) const |
| | Same as union_with but return a new minterval instead of modifying this one. More...
|
| |
| r_Minterval | operator+ (const r_Minterval &) const |
| | Operator for create_union. More...
|
| |
| r_Minterval & | difference_of (const r_Minterval &, const r_Minterval &) |
| | Return new minterval as difference of the argument mintervals. More...
|
| |
| r_Minterval & | difference_with (const r_Minterval &) |
| | Difference of argument with this minterval. More...
|
| |
| r_Minterval & | operator-= (const r_Minterval &) |
| | Operator for difference_with. More...
|
| |
| r_Minterval | create_difference (const r_Minterval &) const |
| | Same as difference_with but return a new minterval instead of modifying this one. More...
|
| |
| r_Minterval | operator- (const r_Minterval &) const |
| | Operator for difference_with. More...
|
| |
| r_Minterval & | intersection_of (const r_Minterval &, const r_Minterval &) |
| | Return new minterval as intersection of the argument mintervals. More...
|
| |
| r_Minterval & | intersection_with (const r_Minterval &) |
| | Intersection of argument with this minterval. More...
|
| |
| r_Minterval & | operator*= (const r_Minterval &) |
| | Operator for intersection_with. More...
|
| |
| r_Minterval | create_intersection (const r_Minterval &) const |
| | Same as intersection_with but return a new minterval instead of modifying this one. More...
|
| |
| r_Minterval | operator* (const r_Minterval &) const |
| | Operator for intersection_with. More...
|
| |
| bool | intersects_with (const r_Minterval &) const |
| | Determines if the self minterval intersects with the argument one. More...
|
| |
| bool | touches (const r_Minterval &o) const |
| | Determines if this minterval touches given minterval. More...
|
| |
| r_Minterval & | closure_of (const r_Minterval &, const r_Minterval &) |
| | Return new minterval as closure of the argument mintervals. More...
|
| |
| r_Minterval & | closure_with (const r_Minterval &) |
| | Closure of argument with this minterval. More...
|
| |
| r_Minterval | create_closure (const r_Minterval &) const |
| | Same as closure_with but return a new minterval instead of modifying this one. More...
|
| |
| std::vector< r_Minterval > | extension_of (const r_Minterval &big) const |
| |
| r_Minterval | trim_along_slice (const r_Minterval &, const std::vector< r_Dimension > &) const |
| | the vector of projection dimensions cannot have more values than dimension() this should really be called "trim_wrt_slice" because the result dimension is dimension() More...
|
| |
| r_Minterval | project_along_dims (const std::vector< r_Dimension > &) const |
| | the vector of projection dimensions can have more values than this->dimensionality More...
|
| |
| void | print_status (std::ostream &s) const |
| | Serialize the object to the specified stream. More...
|
| |
| char * | get_string_representation () const |
| | Returns a string representation of this minterval as a pointer that should eventually be deallocated by the caller with free(). More...
|
| |
| std::string | to_string () const |
| | Returns a string representation of this minterval as a string object. More...
|
| |
| r_Area | cell_count () const |
| | calculate number of cells More...
|
| |
| r_Area | cell_offset (const r_Point &) const |
| | calculate offset in cells for one dimensional access (dimension ordering is high first) More...
|
| |
| r_Area | cell_offset_unsafe (const r_Point &) const |
| | as above, but without error checking, for performance More...
|
| |
| r_Point | cell_point (r_Area) const |
| | calculate point index out of offset More...
|
| |
| void | add_dimension () |
| | add dimension with open bounds More...
|
| |
| void | delete_dimension (r_Dimension) |
| | delete the specified dimension More...
|
| |
| void | swap_dimensions (r_Dimension d1, r_Dimension d2) |
| | swap dimensions More...
|
| |
| void | delete_non_trims (const std::vector< bool > &trims) |
| | delete slices (false values in trims); does nothing if trims size != dimension More...
|
| |
| void | delete_slices () |
| | delete intervals which are slices (i.e. interval.is_slice() is true) More...
|
| |
| void | append_axes (const r_Minterval &mint) |
| | append mint's intervals to the end of this minterval, resulting in [ ..., mint[0], ..., mint[mint.dimension()-1] ] More...
|
| |
| void | append_axes (const r_Point &pnt) |
| | append pnt's coordinates to the end of this minterval, resulting in [ ..., pnt[0]:pnt[0], ..., pnt[pnt.dimension()-1]:pnt[pnt.dimension()-1]] More...
|
| |
| bool | is_point () const noexcept |
| |
| r_Bytes | get_storage_size () const |
| | calculate the size of the storage space occupied More...
|
| |
| r_Dimension | get_trim_count () const |
| |
| bool | has_slices () const |
| |
| bool | compareDomainExtents (const r_Minterval &b) const |
| |
| void | validateDomainExtents (const r_Minterval &b) const |
| | throw error if domains differ in the extents of any axis. More...
|
| |
| r_Minterval | computeDomainOfResult (const r_Minterval &b) const |
| |
The spatial domain of an MDD is represented by an object of class r_Minterval.
It specifies lower and upper bound of the point set for each dimension of an MDD. Internally, the class is realized through an array of intervals of type r_Sinterval.
For the operations union, difference, and intersection the dimensionalties of the operands must be equal, otherwise an exception is raised. The semantics of the operations are defined as follows for each dimension:
| ... fixed bound \ ... open bound
class orientation union difference intersection
-----------------------------------------------------------
1 |-a-| |-b-| error a error
2 |-a-| [a1,b2] [a1,b1] [b1,a2]
|-b-|
3 |--a--| a error b
|-b-|
4 |-b-| [b1,a2] [b2,a2] [a1,b2]
|-a-|
5 |--b--| b error a
|-a-|
6 |-b-| |-a-| error a error
7 |-a-|-b-| [a1,b2] a [a2,a2]
8 |-b-|-a-| [b1,a2] a [b2,b2]
9 |--a--| a [a1,b1] b
|-b-|
10 |--a--| a [b2,a2] b
|-b-|
11 |-a-| a error a
|-b-|
12 |--b--| b error a
|-a-|
13 |--b--| b error a
|-a-|
-----------------------------------------------------
14 |--a--* a error b
|-b-|
15 |--a--* a [b2,a2] b
|-b-|
16 |-b-| |-a-* error a error
17 |-b-|-a-* [b1,a2] a [b2,b2]
18 |--a--* [b1,a2] [b2,a2] [a1,b2]
|-b-|
-----------------------------------------------------
19 *--a--| a error b
|-b-|
20 *--a--| a [a1,b1] b
|-b-|
21 *-a-| |-b-| error a error
22 *-a-|-b-| [a1,b2] a [a2,a2]
23 *--a--| [a1,b2] [a1,b1] [b1,a2]
|-b-|
-----------------------------------------------------
24 |--b--* b error a
|-a-|
25 |--b--* b error a
|-a-|
26 |-a-| |-b-* error a error
27 |-a-|-b-* [a1,b2] a [a2,a2]
28 |--b--* [a1,b2] [a1,b1] [b1,a2]
|-a-|
-----------------------------------------------------
29 *--b--| b error a
|-a-|
30 *--b--| b error a
|-a-|
31 *-b-| |-a-| error a error
32 *-b-|-a-| [b1,a2] a [b2,b2]
33 *--b--| [b1,a2] [b2,a2] [a1,b2]
|-a-|
-----------------------------------------------------
34 *-a-| |-b-* error a error
35 *-a-|-b-* [a1,b2] a [a2,a2]
36 *-a-| [a1,b2] [a1,b1] [b1,a2]
|-b-*
-----------------------------------------------------
37 *-b-| |-a-* error a error
38 *-b-|-a-* [b1,a2] a [b2,b2]
39 *-b-| [b1,a2] [a1,b1] [a1,b2]
|-a-*
-----------------------------------------------------
40 *-a-| b error a
-b-|
41 *-a-| a error a
-b-|
42 *-b-| a [b2,a2] b
-a-|
-----------------------------------------------------
43 |-a-* a [a1,b1] b
|-b-*
44 |-a-* a error a
|-b-*
45 |-b-* b error a
|-a-*
-----------------------------------------------------
46 *-a-* |-b-| a error b
47 *-b-* |-a-| b error b
48 *-a-* a [b2,a2] b
-b-|
49 *-a-* a [a1,b1] b
|-b-*
50 *-b-* b error a
-a-|
51 *-b-* b error a
|-a-*
52 *-a-* a error a
-b-*
Attention: The difference operation has to be reconsidered in future concerning a discrete interpretation of the intervals.
The closure operation defines an interval which is the smallest interval containing the two operands. The method intersects_with() returns 0 in the error cases of the intersection operation and 1 otherwise.