rasdaman client API 10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
r_Minterval Class Reference

The spatial domain of an MDD is represented by an object of class r_Minterval. More...

#include <minterval.hh>

Public Types

using DimType = r_Dimension
 
using AreaType = r_Area
 
using OffsetType = r_Sinterval::OffsetType
 

Public Member Functions

 r_Minterval (const r_Point &low, const r_Point &high)
 constructor getting a low, high pair
 
 r_Minterval (r_Dimension)
 constructor getting dimensionality for stream initializing
 
 r_Minterval (const char *)
 constructor taking string representation (e.g. [ 1:255, *:200, *:* ])
 
 r_Minterval (char *)
 constructor taking string representation (e.g. [ 1:255, *:200, *:* ])
 
 r_Minterval (std::vector< r_Sinterval > intervals)
 construct from interval axes
 
r_Mintervaloperator<< (const r_Sinterval &)
 for stream initializing with intervals
 
r_Mintervaloperator<< (r_Range)
 for stream initializing with point intervals
 
 r_Minterval ()=default
 default constructor
 
 ~r_Minterval ()=default
 default destructor
 
 r_Minterval (r_Minterval &&other)=default
 move constructor
 
r_Mintervaloperator= (r_Minterval &&other)=default
 move assignment
 
 r_Minterval (const r_Minterval &other)=default
 copy constructor
 
r_Mintervaloperator= (const r_Minterval &other)=default
 copy assignment
 
const r_Sintervaloperator[] (r_Dimension) const
 read access the i-th interval
 
const r_Sintervalat (r_Dimension) const
 read access the i-th interval with bound checking
 
r_Sintervaloperator[] (r_Dimension)
 write access the i-th interval
 
r_Sintervalat (r_Dimension)
 write access the i-th interval with bound checking
 
const r_Sintervalat_unsafe (r_Dimension dim) const
 
r_Sintervalat_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.
 
bool operator!= (const r_Minterval &) const
 non equal operator - negation of equal operator
 
bool equal_extents (const r_Minterval &other) const
 Return true if the extents of each dimension are equal, otherwise false.
 
bool covers (const r_Point &pnt) const
 Does this interval cover the given point.
 
bool covers (const r_Minterval &inter) const
 Does this interval cover the given interval.
 
bool inside_of (const r_Minterval &) const
 Check whether one interval is within another.
 
std::vector< r_Mintervalsplit_equal (int n)
 Split into n smaller mintervals.
 
r_Dimension dimension () const
 get dimensionality
 
bool is_scalar () const noexcept
 
r_Point get_origin () const
 Returns a point with the minimum coordinates in all dimensions.
 
r_Point get_high () const
 Returns a point with the maximum coordinates in all dimensions.
 
r_Point get_extent () const
 Get size of minterval as point.
 
bool is_origin_fixed () const noexcept
 Returns true if all lower bounds are fixed, otherwise false.
 
bool is_high_fixed () const noexcept
 Returns true if all upper bounds are fixed, otherwise false.
 
bool is_fixed () const noexcept
 Returns true if all intervals are fixed.
 
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.
 
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.
 
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.
 
r_Mintervalreverse_translate (const r_Point &)
 Subtracts respective coordinate of a point to the lower bounds of an interval.
 
r_Minterval create_reverse_translation (const r_Point &) const
 Returns new interval as translation of this by a point.
 
r_Mintervaltranslate (const r_Point &)
 Translates this by a point.
 
r_Minterval create_translation (const r_Point &) const
 Returns new interval as translation of this by a point.
 
r_Mintervalscale (const double &)
 Scales all extents by factor.
 
r_Mintervalscale (const std::vector< double > &)
 Scales respective extents by vector of factors.
 
r_Minterval create_scale (const double &) const
 Returns new interval as scaled from this by factor.
 
r_Minterval create_scale (const std::vector< double > &) const
 Returns new interval as scaled from this by vector of factors.
 
std::vector< double > scale_of (const r_Minterval &op) const
 
r_Mintervalunion_of (const r_Minterval &, const r_Minterval &)
 Return new minterval as union of the argument mintervals.
 
r_Mintervalunion_with (const r_Minterval &)
 Union of argument with this minterval.
 
r_Mintervaloperator+= (const r_Minterval &)
 Operator for union_with.
 
r_Minterval create_union (const r_Minterval &) const
 Same as union_with but return a new minterval instead of modifying this one.
 
r_Minterval operator+ (const r_Minterval &) const
 Operator for create_union.
 
r_Mintervaldifference_of (const r_Minterval &, const r_Minterval &)
 Return new minterval as difference of the argument mintervals.
 
r_Mintervaldifference_with (const r_Minterval &)
 Difference of argument with this minterval.
 
r_Mintervaloperator-= (const r_Minterval &)
 Operator for difference_with.
 
r_Minterval create_difference (const r_Minterval &) const
 Same as difference_with but return a new minterval instead of modifying this one.
 
r_Minterval operator- (const r_Minterval &) const
 Operator for difference_with.
 
r_Mintervalintersection_of (const r_Minterval &, const r_Minterval &)
 Return new minterval as intersection of the argument mintervals.
 
r_Mintervalintersection_with (const r_Minterval &)
 Intersection of argument with this minterval.
 
r_Mintervaloperator*= (const r_Minterval &)
 Operator for intersection_with.
 
r_Minterval create_intersection (const r_Minterval &) const
 Same as intersection_with but return a new minterval instead of modifying this one.
 
r_Minterval operator* (const r_Minterval &) const
 Operator for intersection_with.
 
bool intersects_with (const r_Minterval &) const
 Determines if the self minterval intersects with the argument one.
 
bool touches (const r_Minterval &o) const
 Determines if this minterval touches given minterval.
 
r_Mintervalclosure_of (const r_Minterval &, const r_Minterval &)
 Return new minterval as closure of the argument mintervals.
 
r_Mintervalclosure_with (const r_Minterval &)
 Closure of argument with this minterval.
 
r_Minterval create_closure (const r_Minterval &) const
 Same as closure_with but return a new minterval instead of modifying this one.
 
std::vector< r_Mintervalextension_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()
 
r_Minterval project_along_dims (const std::vector< r_Dimension > &) const
 the vector of projection dimensions can have more values than this->dimensionality
 
void print_status (std::ostream &s) const
 Serialize the object to the specified stream.
 
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().
 
std::string to_string () const
 Returns a string representation of this minterval as a string object.
 
r_Area cell_count () const
 calculate number of cells
 
r_Area cell_offset (const r_Point &) const
 calculate offset in cells for one dimensional access (dimension ordering is high first)
 
r_Area cell_offset_unsafe (const r_Point &) const
 as above, but without error checking, for performance
 
r_Point cell_point (r_Area) const
 calculate point index out of offset
 
void add_dimension ()
 add dimension with open bounds
 
void delete_dimension (r_Dimension)
 delete the specified dimension
 
void swap_dimensions (r_Dimension d1, r_Dimension d2)
 swap dimensions
 
void delete_non_trims (const std::vector< bool > &trims)
 delete slices (false values in trims); does nothing if trims size != dimension
 
void delete_slices ()
 delete intervals which are slices (i.e. interval.is_slice() is true)
 
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] ]
 
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]]
 
bool is_point () const noexcept
 
r_Bytes get_storage_size () const
 calculate the size of the storage space occupied
 
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.
 
r_Minterval computeDomainOfResult (const r_Minterval &b) const
 

Static Public Member Functions

static r_Minterval fromPoint (const r_Point &p)
 construct minterval of slices from the given point p
 

Protected Member Functions

void constructorinit (char *)
 initialization for constructors which take chars
 

Protected Attributes

std::vector< r_Sintervalintervals
 axis intervals, intervals.size() == dimension()
 
r_Dimension streamInitCnt {}
 The minterval can be initialized in all dimensions as follows: minterval << sinterval1 << sinterval2 << ... where number of sintervals cannot be more than dimension().
 

Detailed Description

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.

Member Typedef Documentation

◆ AreaType

◆ DimType

◆ OffsetType

Constructor & Destructor Documentation

◆ r_Minterval() [1/8]

r_Minterval::r_Minterval ( const r_Point low,
const r_Point high 
)

constructor getting a low, high pair

◆ r_Minterval() [2/8]

r_Minterval::r_Minterval ( r_Dimension  )
explicit

constructor getting dimensionality for stream initializing

◆ r_Minterval() [3/8]

r_Minterval::r_Minterval ( const char *  )
explicit

constructor taking string representation (e.g. [ 1:255, *:200, *:* ])

◆ r_Minterval() [4/8]

r_Minterval::r_Minterval ( char *  )
explicit

constructor taking string representation (e.g. [ 1:255, *:200, *:* ])

◆ r_Minterval() [5/8]

r_Minterval::r_Minterval ( std::vector< r_Sinterval intervals)
explicit

construct from interval axes

◆ r_Minterval() [6/8]

r_Minterval::r_Minterval ( )
default

default constructor

◆ ~r_Minterval()

r_Minterval::~r_Minterval ( )
default

default destructor

◆ r_Minterval() [7/8]

r_Minterval::r_Minterval ( r_Minterval &&  other)
default

move constructor

◆ r_Minterval() [8/8]

r_Minterval::r_Minterval ( const r_Minterval other)
default

copy constructor

Member Function Documentation

◆ add_dimension()

void r_Minterval::add_dimension ( )

add dimension with open bounds

◆ append_axes() [1/2]

void r_Minterval::append_axes ( const r_Minterval mint)

append mint's intervals to the end of this minterval, resulting in [ ..., mint[0], ..., mint[mint.dimension()-1] ]

◆ append_axes() [2/2]

void r_Minterval::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]]

◆ at() [1/2]

r_Sinterval & r_Minterval::at ( r_Dimension  )

write access the i-th interval with bound checking

◆ at() [2/2]

const r_Sinterval & r_Minterval::at ( r_Dimension  ) const

read access the i-th interval with bound checking

◆ at_unsafe() [1/2]

r_Sinterval & r_Minterval::at_unsafe ( r_Dimension  dim)

◆ at_unsafe() [2/2]

const r_Sinterval & r_Minterval::at_unsafe ( r_Dimension  dim) const

◆ axis_names_match()

bool r_Minterval::axis_names_match ( const r_Minterval o) const
Returns
true if the axis names of this minterval match the axis names of the other interval o.

◆ cell_count()

r_Area r_Minterval::cell_count ( ) const

calculate number of cells

◆ cell_offset()

r_Area r_Minterval::cell_offset ( const r_Point ) const

calculate offset in cells for one dimensional access (dimension ordering is high first)

◆ cell_offset_unsafe()

r_Area r_Minterval::cell_offset_unsafe ( const r_Point ) const

as above, but without error checking, for performance

◆ cell_point()

r_Point r_Minterval::cell_point ( r_Area  ) const

calculate point index out of offset

◆ closure_of()

r_Minterval & r_Minterval::closure_of ( const r_Minterval ,
const r_Minterval  
)

Return new minterval as closure of the argument mintervals.

◆ closure_with()

r_Minterval & r_Minterval::closure_with ( const r_Minterval )

Closure of argument with this minterval.

◆ compareDomainExtents()

bool r_Minterval::compareDomainExtents ( const r_Minterval b) const
Returns
true if domains are same after normalization to zero origin.

◆ computeDomainOfResult()

r_Minterval r_Minterval::computeDomainOfResult ( const r_Minterval b) const
Returns
a if a == b, otherwise normalize the result to [0, 0, ..].

◆ constructorinit()

void r_Minterval::constructorinit ( char *  )
protected

initialization for constructors which take chars

◆ covers() [1/2]

bool r_Minterval::covers ( const r_Minterval inter) const

Does this interval cover the given interval.

Throws r_Edim_mismatch when dimensions do not match.

◆ covers() [2/2]

bool r_Minterval::covers ( const r_Point pnt) const

Does this interval cover the given point.

Throws r_Edim_mismatch when dimensions do not match.

◆ create_closure()

r_Minterval r_Minterval::create_closure ( const r_Minterval ) const

Same as closure_with but return a new minterval instead of modifying this one.

◆ create_difference()

r_Minterval r_Minterval::create_difference ( const r_Minterval ) const

Same as difference_with but return a new minterval instead of modifying this one.

◆ create_intersection()

r_Minterval r_Minterval::create_intersection ( const r_Minterval ) const

Same as intersection_with but return a new minterval instead of modifying this one.

◆ create_reverse_translation()

r_Minterval r_Minterval::create_reverse_translation ( const r_Point ) const

Returns new interval as translation of this by a point.

Subtracts respective coordinate of a point to the lower bounds of an interval. This operation is only legal if all bounds are fixed!

◆ create_scale() [1/2]

r_Minterval r_Minterval::create_scale ( const double &  ) const

Returns new interval as scaled from this by factor.

◆ create_scale() [2/2]

r_Minterval r_Minterval::create_scale ( const std::vector< double > &  ) const

Returns new interval as scaled from this by vector of factors.

◆ create_translation()

r_Minterval r_Minterval::create_translation ( const r_Point ) const

Returns new interval as translation of this by a point.

Adds respective coordinate of a point to the lower bounds of an interval. This operation is only legal if all lower bounds are fixed!

◆ create_union()

r_Minterval r_Minterval::create_union ( const r_Minterval ) const

Same as union_with but return a new minterval instead of modifying this one.

◆ delete_dimension()

void r_Minterval::delete_dimension ( r_Dimension  )

delete the specified dimension

◆ delete_non_trims()

void r_Minterval::delete_non_trims ( const std::vector< bool > &  trims)

delete slices (false values in trims); does nothing if trims size != dimension

◆ delete_slices()

void r_Minterval::delete_slices ( )

delete intervals which are slices (i.e. interval.is_slice() is true)

◆ difference_of()

r_Minterval & r_Minterval::difference_of ( const r_Minterval ,
const r_Minterval  
)

Return new minterval as difference of the argument mintervals.

◆ difference_with()

r_Minterval & r_Minterval::difference_with ( const r_Minterval )

Difference of argument with this minterval.

◆ dimension()

r_Dimension r_Minterval::dimension ( ) const

get dimensionality

◆ equal_extents()

bool r_Minterval::equal_extents ( const r_Minterval other) const

Return true if the extents of each dimension are equal, otherwise false.

◆ extension_of()

std::vector< r_Minterval > r_Minterval::extension_of ( const r_Minterval big) const
Returns
vector of domains so that the disjoint union of this and returned domains is big. preconditions: big must cover this domain (this.covers(big) == true).

◆ fromPoint()

static r_Minterval r_Minterval::fromPoint ( const r_Point p)
static

construct minterval of slices from the given point p

◆ get_axis_names()

std::vector< std::string > r_Minterval::get_axis_names ( ) const
Returns
the axis names of the underlying sintervals; this may be a vector of empty strings if no sinterval has an axis name.

◆ get_extent()

r_Point r_Minterval::get_extent ( ) const

Get size of minterval as point.

Returns a point with high() - low() + 1 in each dimension when all bounds are fixed.

◆ get_high()

r_Point r_Minterval::get_high ( ) const

Returns a point with the maximum coordinates in all dimensions.

This is operation is only legal if all upper bounds are fixed!

◆ get_origin()

r_Point r_Minterval::get_origin ( ) const

Returns a point with the minimum coordinates in all dimensions.

This is operation is only legal if all lower bounds are fixed!

◆ get_storage_size()

r_Bytes r_Minterval::get_storage_size ( ) const

calculate the size of the storage space occupied

◆ get_string_representation()

char * r_Minterval::get_string_representation ( ) const

Returns a string representation of this minterval as a pointer that should eventually be deallocated by the caller with free().

◆ get_trim_count()

r_Dimension r_Minterval::get_trim_count ( ) const
Returns
the number of axes which are trims (i.e. dimension() - slices) if is_point() is true, then this method will return 0.

◆ has_axis_names()

bool r_Minterval::has_axis_names ( ) const
Returns
true if this minterval has axis names, false otherwise.

◆ has_slices()

bool r_Minterval::has_slices ( ) const
Returns
true if any axes are slices rather than trims.

◆ inside_of()

bool r_Minterval::inside_of ( const r_Minterval ) const

Check whether one interval is within another.

◆ intersection_of()

r_Minterval & r_Minterval::intersection_of ( const r_Minterval ,
const r_Minterval  
)

Return new minterval as intersection of the argument mintervals.

◆ intersection_with()

r_Minterval & r_Minterval::intersection_with ( const r_Minterval )

Intersection of argument with this minterval.

◆ intersects_with()

bool r_Minterval::intersects_with ( const r_Minterval ) const

Determines if the self minterval intersects with the argument one.

◆ is_fixed()

bool r_Minterval::is_fixed ( ) const
noexcept

Returns true if all intervals are fixed.

◆ is_high_fixed()

bool r_Minterval::is_high_fixed ( ) const
noexcept

Returns true if all upper bounds are fixed, otherwise false.

◆ is_mergeable()

bool r_Minterval::is_mergeable ( const r_Minterval other) const

This method checks if two r_Mintervals are "mergeable" side by side.

For this to be possible, they have to have the same low() and high() values in all dimensions except in one where they differ by one point, this is, a.low()==b.high()+1 or b.low()==a.high()+1. For instance, the following two blocks are mergeable:

+----------—+------------------------------------—+ | A | B | +----------—|------------------------------------—|

and the following two are not:

+----------—+----------------------—+ | | B | | A +----------------------—+ +----------—+

◆ is_origin_fixed()

bool r_Minterval::is_origin_fixed ( ) const
noexcept

Returns true if all lower bounds are fixed, otherwise false.

◆ is_point()

bool r_Minterval::is_point ( ) const
noexcept
Returns
true if all intervals are slices

◆ is_scalar()

bool r_Minterval::is_scalar ( ) const
noexcept
Returns
true if the interval is empty

◆ operator!=()

bool r_Minterval::operator!= ( const r_Minterval ) const

non equal operator - negation of equal operator

◆ operator*()

r_Minterval r_Minterval::operator* ( const r_Minterval ) const

Operator for intersection_with.

◆ operator*=()

r_Minterval & r_Minterval::operator*= ( const r_Minterval )

Operator for intersection_with.

◆ operator+()

r_Minterval r_Minterval::operator+ ( const r_Minterval ) const

Operator for create_union.

◆ operator+=()

r_Minterval & r_Minterval::operator+= ( const r_Minterval )

Operator for union_with.

◆ operator-()

r_Minterval r_Minterval::operator- ( const r_Minterval ) const

Operator for difference_with.

◆ operator-=()

r_Minterval & r_Minterval::operator-= ( const r_Minterval )

Operator for difference_with.

◆ operator<<() [1/2]

r_Minterval & r_Minterval::operator<< ( const r_Sinterval )

for stream initializing with intervals

◆ operator<<() [2/2]

r_Minterval & r_Minterval::operator<< ( r_Range  )

for stream initializing with point intervals

◆ operator=() [1/2]

r_Minterval & r_Minterval::operator= ( const r_Minterval other)
default

copy assignment

◆ operator=() [2/2]

r_Minterval & r_Minterval::operator= ( r_Minterval &&  other)
default

move assignment

◆ operator==()

bool r_Minterval::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.

◆ operator[]() [1/2]

r_Sinterval & r_Minterval::operator[] ( r_Dimension  )

write access the i-th interval

◆ operator[]() [2/2]

const r_Sinterval & r_Minterval::operator[] ( r_Dimension  ) const

read access the i-th interval

◆ print_status()

void r_Minterval::print_status ( std::ostream &  s) const

Serialize the object to the specified stream.

◆ project_along_dims()

r_Minterval r_Minterval::project_along_dims ( const std::vector< r_Dimension > &  ) const

the vector of projection dimensions can have more values than this->dimensionality

◆ reverse_translate()

r_Minterval & r_Minterval::reverse_translate ( const r_Point )

Subtracts respective coordinate of a point to the lower bounds of an interval.

This operation is only legal if all bounds are fixed!

◆ scale() [1/2]

r_Minterval & r_Minterval::scale ( const double &  )

Scales all extents by factor.

◆ scale() [2/2]

r_Minterval & r_Minterval::scale ( const std::vector< double > &  )

Scales respective extents by vector of factors.

◆ scale_of()

std::vector< double > r_Minterval::scale_of ( const r_Minterval op) const
Returns
vector of each dimension's best-approximated scaling factor

◆ set_axis_names() [1/2]

void r_Minterval::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.

◆ set_axis_names() [2/2]

void r_Minterval::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.

◆ split_equal()

std::vector< r_Minterval > r_Minterval::split_equal ( int  n)

Split into n smaller mintervals.

◆ swap_dimensions()

void r_Minterval::swap_dimensions ( r_Dimension  d1,
r_Dimension  d2 
)

swap dimensions

◆ to_string()

std::string r_Minterval::to_string ( ) const

Returns a string representation of this minterval as a string object.

◆ touches()

bool r_Minterval::touches ( const r_Minterval o) const

Determines if this minterval touches given minterval.

◆ translate()

r_Minterval & r_Minterval::translate ( const r_Point )

Translates this by a point.

Adds respective coordinate of a point to the lower bounds of an interval. This operation is only legal if all bounds are fixed!

◆ trim_along_slice()

r_Minterval 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()

◆ union_of()

r_Minterval & r_Minterval::union_of ( const r_Minterval ,
const r_Minterval  
)

Return new minterval as union of the argument mintervals.

◆ union_with()

r_Minterval & r_Minterval::union_with ( const r_Minterval )

Union of argument with this minterval.

◆ validateDomainExtents()

void r_Minterval::validateDomainExtents ( const r_Minterval b) const

throw error if domains differ in the extents of any axis.

Member Data Documentation

◆ intervals

std::vector<r_Sinterval> r_Minterval::intervals
protected

axis intervals, intervals.size() == dimension()

◆ streamInitCnt

r_Dimension r_Minterval::streamInitCnt {}
protected

The minterval can be initialized in all dimensions as follows: minterval << sinterval1 << sinterval2 << ... where number of sintervals cannot be more than dimension().

This variable tracks how many sintervals have been set so far with the stream operator.


The documentation for this class was generated from the following file: