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