552extern std::ostream &
operator<<(std::ostream &s,
const std::vector<r_Minterval> &d);
553extern std::ostream &
operator<<(std::ostream &s,
const std::vector<double> &doubleVec);
The spatial domain of an MDD is represented by an object of class r_Minterval.
Definition minterval.hh:226
const r_Sinterval & at_unsafe(r_Dimension dim) const
r_Minterval & operator=(const r_Minterval &other)=default
copy assignment
bool operator!=(const r_Minterval &) const
non equal operator - negation of equal operator
bool operator==(const r_Minterval &) const
Two domains are equal if they have the same number of dimensions and each dimension has the same lowe...
void constructorinit(char *)
initialization for constructors which take chars
r_Area cell_offset(const r_Point &) const
calculate offset in cells for one dimensional access (dimension ordering is high first)
std::string to_string() const
Returns a string representation of this minterval as a string object.
const r_Sinterval & at(r_Dimension) const
read access the i-th interval with bound checking
void delete_dimension(r_Dimension)
delete the specified dimension
r_Minterval project_along_dims(const std::vector< r_Dimension > &) const
the vector of projection dimensions can have more values than this->dimensionality
bool covers(const r_Point &pnt) const
Does this interval cover the given point.
r_Point get_high() const
Returns a point with the maximum coordinates in all dimensions.
bool axis_names_match(const r_Minterval &o) const
std::vector< r_Sinterval > intervals
axis intervals, intervals.size() == dimension()
Definition minterval.hh:535
r_Minterval create_difference(const r_Minterval &) const
Same as difference_with but return a new minterval instead of modifying this one.
r_Minterval & intersection_with(const r_Minterval &)
Intersection of argument with this minterval.
r_Area AreaType
Definition minterval.hh:229
void validateDomainExtents(const r_Minterval &b) const
throw error if domains differ in the extents of any axis.
r_Minterval create_reverse_translation(const r_Point &) const
Returns new interval as translation of this by a point.
bool is_origin_fixed() const noexcept
Returns true if all lower bounds are fixed, otherwise false.
r_Area cell_offset_unsafe(const r_Point &) const
as above, but without error checking, for performance
r_Minterval & closure_with(const r_Minterval &)
Closure of argument with this minterval.
r_Dimension DimType
Definition minterval.hh:228
r_Minterval computeDomainOfResult(const r_Minterval &b) const
bool is_fixed() const noexcept
Returns true if all intervals are fixed.
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 ca...
r_Dimension get_trim_count() const
r_Dimension streamInitCnt
The minterval can be initialized in all dimensions as follows: minterval << sinterval1 << sinterval2 ...
Definition minterval.hh:541
bool is_high_fixed() const noexcept
Returns true if all upper bounds are fixed, otherwise false.
bool intersects_with(const r_Minterval &) const
Determines if the self minterval intersects with the argument one.
r_Minterval & difference_of(const r_Minterval &, const r_Minterval &)
Return new minterval as difference of the argument mintervals.
r_Sinterval::OffsetType OffsetType
Definition minterval.hh:230
bool is_scalar() const noexcept
r_Minterval create_translation(const r_Point &) const
Returns new interval as translation of this by a point.
bool inside_of(const r_Minterval &) const
Check whether one interval is within another.
r_Minterval create_intersection(const r_Minterval &) const
Same as intersection_with but return a new minterval instead of modifying this one.
r_Minterval(r_Dimension)
constructor getting dimensionality for stream initializing
bool is_point() const noexcept
r_Minterval(std::vector< r_Sinterval > intervals)
construct from interval axes
r_Point cell_point(r_Area) const
calculate point index out of offset
bool equal_extents(const r_Minterval &other) const
Return true if the extents of each dimension are equal, otherwise false.
std::vector< r_Minterval > extension_of(const r_Minterval &big) const
r_Minterval & operator<<(r_Range)
for stream initializing with point intervals
bool is_mergeable(const r_Minterval &other) const
This method checks if two r_Mintervals are "mergeable" side by side.
void delete_non_trims(const std::vector< bool > &trims)
delete slices (false values in trims); does nothing if trims size != dimension
r_Minterval & scale(const double &)
Scales all extents by factor.
r_Minterval & intersection_of(const r_Minterval &, const r_Minterval &)
Return new minterval as intersection of the argument mintervals.
r_Sinterval & operator[](r_Dimension)
write access the i-th interval
const r_Sinterval & operator[](r_Dimension) const
read access the i-th interval
r_Bytes get_storage_size() const
calculate the size of the storage space occupied
static r_Minterval fromPoint(const r_Point &p)
construct minterval of slices from the given point p
char * get_string_representation() const
Returns a string representation of this minterval as a pointer that should eventually be deallocated ...
r_Minterval & operator=(r_Minterval &&other)=default
move assignment
bool has_axis_names() const
r_Minterval create_scale(const double &) const
Returns new interval as scaled from this by factor.
bool covers(const r_Minterval &inter) const
Does this interval cover the given interval.
r_Minterval & operator<<(const r_Sinterval &)
for stream initializing with intervals
r_Minterval & union_with(const r_Minterval &)
Union of argument with this minterval.
r_Minterval & union_of(const r_Minterval &, const r_Minterval &)
Return new minterval as union of the argument mintervals.
void delete_slices()
delete intervals which are slices (i.e. interval.is_slice() is true)
std::vector< double > scale_of(const r_Minterval &op) const
r_Minterval create_union(const r_Minterval &) const
Same as union_with but return a new minterval instead of modifying this one.
r_Dimension dimension() const
get dimensionality
bool touches(const r_Minterval &o) const
Determines if this minterval touches given minterval.
void swap_dimensions(r_Dimension d1, r_Dimension d2)
swap dimensions
bool compareDomainExtents(const r_Minterval &b) const
~r_Minterval()=default
default destructor
r_Minterval & translate(const r_Point &)
Translates this by a point.
r_Minterval(const r_Point &low, const r_Point &high)
constructor getting a low, high pair
void add_dimension()
add dimension with open bounds
r_Minterval create_closure(const r_Minterval &) const
Same as closure_with but return a new minterval instead of modifying this one.
std::vector< std::string > get_axis_names() const
r_Point get_extent() const
Get size of minterval as point.
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 dim...
r_Point get_origin() const
Returns a point with the minimum coordinates in all dimensions.
r_Minterval(const char *)
constructor taking string representation (e.g. [ 1:255, *:200, *:* ])
r_Sinterval & at(r_Dimension)
write access the i-th interval with bound checking
r_Minterval & reverse_translate(const r_Point &)
Subtracts respective coordinate of a point to the lower bounds of an interval.
r_Minterval(char *)
constructor taking string representation (e.g. [ 1:255, *:200, *:* ])
r_Minterval()=default
default constructor
r_Minterval(r_Minterval &&other)=default
move constructor
r_Sinterval & at_unsafe(r_Dimension dim)
r_Minterval & difference_with(const r_Minterval &)
Difference of argument with this minterval.
std::vector< r_Minterval > split_equal(int n)
Split into n smaller mintervals.
void append_axes(const r_Minterval &mint)
append mint's intervals to the end of this minterval, resulting in [ ..., mint[0],...
r_Minterval & closure_of(const r_Minterval &, const r_Minterval &)
Return new minterval as closure of the argument mintervals.
r_Area cell_count() const
calculate number of cells
void print_status(std::ostream &s) const
Serialize the object to the specified stream.
r_Minterval(const r_Minterval &other)=default
copy constructor
Class r_Point represents an n-dimensional point vector.
Definition point.hh:43
The class represents an interval with lower and upper bound.
Definition sinterval.hh:214
size_t OffsetType
Definition sinterval.hh:217
std::int64_t r_Range
for axis indexing, e.g.
Definition mddtypes.hh:53
std::uint32_t r_Dimension
number of dimensions in r_Point and r_Minterval.
Definition mddtypes.hh:56
size_t r_Bytes
number of bytes in an tile or mdd or type.
Definition mddtypes.hh:43
std::uint64_t r_Area
number of cells in an mdd object or tile.
Definition mddtypes.hh:49
std::ostream & operator<<(std::ostream &s, const r_Minterval &d)
Output stream operator for objects of type const r_Minterval.