rasdaman API
|
#include <minterval.hh>
Public Member Functions | |
r_Minterval (r_Dimension) | |
constructor getting dimensionality for stream initializing More... | |
r_Minterval (const char *) throw (r_Eno_interval) | |
constructor taking string representation (e.g. [ 1:255, *:200, *:* ]) More... | |
r_Minterval (char *) throw (r_Eno_interval) | |
constructor taking string representation (e.g. [ 1:255, *:200, *:* ]) More... | |
r_Minterval & | operator<< (const r_Sinterval &) throw ( r_Einit_overflow ) |
for stream initializing with intervals More... | |
r_Minterval & | operator<< (r_Range) throw ( r_Einit_overflow ) |
for stream initializing with point intervals More... | |
r_Minterval () | |
default constructor More... | |
r_Minterval (const r_Minterval &) | |
copy constructor More... | |
~r_Minterval () | |
destructor: cleanup dynamic memory More... | |
void | r_deactivate () |
it is called when an object leaves transient memory More... | |
bool | intersects_with (const r_Minterval &) const |
determines if the self minterval intersects with the delivered one More... | |
r_Sinterval | operator[] (r_Dimension) const |
read access the i-th interval More... | |
r_Sinterval & | operator[] (r_Dimension) |
write access the i-th interval More... | |
const r_Minterval & | operator= (const r_Minterval &) |
assignment: cleanup + copy More... | |
bool | operator== (const r_Minterval &) const |
equal operator More... | |
bool | operator!= (const r_Minterval &) const |
non equal operator - negation of equal operator More... | |
const bool | covers (const r_Point &pnt) const |
does this interval cover the given point More... | |
const bool | covers (const r_Minterval &inter) const |
does this interval cover the given interval More... | |
r_Dimension | dimension () const |
get dimensionality More... | |
const bool | is_origin_fixed () const |
checks if all lower bounds are fixed More... | |
r_Point | get_origin () const throw (r_Error) |
get lower left corner of minterval. More... | |
const bool | is_high_fixed () const |
checks if all upper bounds are fixed More... | |
r_Point | get_high () const throw (r_Error) |
get highest corner of tile. More... | |
r_Point | get_extent () const throw (r_Error) |
get size of minterval as point. More... | |
bool | is_mergeable (const r_Minterval &other) const |
Checks if this block is mergeable with another block (interval) More... | |
void | print_status (std::ostream &s=std::cout) const |
writes the state of the object to the specified stream More... | |
char * | get_string_representation () const |
gives back the string representation More... | |
r_Minterval & | reverse_translate (const r_Point &) throw ( r_Error, r_Edim_mismatch, r_Eno_interval ) |
translates this by a point. More... | |
r_Minterval | create_reverse_translation (const r_Point &) const throw ( r_Error, r_Edim_mismatch, r_Eno_interval ) |
returns new interval as translation of this by a point. More... | |
r_Minterval & | translate (const r_Point &) throw ( r_Error, r_Edim_mismatch, r_Eno_interval ) |
translates this by a point. More... | |
r_Minterval | create_translation (const r_Point &) const throw ( r_Error, r_Edim_mismatch, r_Eno_interval ) |
returns new interval as translation of this by a point. More... | |
r_Minterval & | scale (const double &) throw ( r_Eno_interval ) |
scales this by a factor. More... | |
r_Minterval & | scale (const vector< double > &) throw ( r_Eno_interval ) |
scales this by a factor. More... | |
r_Minterval | create_scale (const double &) const throw ( r_Eno_interval ) |
returns new interval as scaled from this by a point. More... | |
r_Minterval | create_scale (const vector< double > &) const throw ( r_Eno_interval ) |
returns new interval as scaled from this by a point. More... | |
r_Minterval & | union_of (const r_Minterval &, const r_Minterval &) throw ( r_Edim_mismatch, r_Eno_interval ) |
r_Minterval & | union_with (const r_Minterval &) throw ( r_Edim_mismatch, r_Eno_interval ) |
r_Minterval & | operator+= (const r_Minterval &) throw ( r_Edim_mismatch, r_Eno_interval ) |
r_Minterval | create_union (const r_Minterval &) const throw ( r_Edim_mismatch, r_Eno_interval ) |
r_Minterval | operator+ (const r_Minterval &) const throw ( r_Edim_mismatch, r_Eno_interval ) |
r_Minterval & | difference_of (const r_Minterval &, const r_Minterval &) throw ( r_Edim_mismatch, r_Eno_interval ) |
r_Minterval & | difference_with (const r_Minterval &) throw ( r_Edim_mismatch, r_Eno_interval ) |
r_Minterval & | operator-= (const r_Minterval &) throw ( r_Edim_mismatch, r_Eno_interval ) |
r_Minterval | create_difference (const r_Minterval &) const throw ( r_Edim_mismatch, r_Eno_interval ) |
r_Minterval | operator- (const r_Minterval &) const throw ( r_Edim_mismatch, r_Eno_interval ) |
r_Minterval & | intersection_of (const r_Minterval &, const r_Minterval &) throw ( r_Edim_mismatch, r_Eno_interval ) |
r_Minterval & | intersection_with (const r_Minterval &) throw ( r_Edim_mismatch, r_Eno_interval ) |
r_Minterval & | operator*= (const r_Minterval &) throw ( r_Edim_mismatch, r_Eno_interval) |
r_Minterval | create_intersection (const r_Minterval &) const throw ( r_Edim_mismatch, r_Eno_interval ) |
r_Minterval | operator* (const r_Minterval &) const throw ( r_Edim_mismatch, r_Eno_interval ) |
r_Minterval & | closure_of (const r_Minterval &, const r_Minterval &) throw ( r_Edim_mismatch, r_Eno_interval ) |
r_Minterval & | closure_with (const r_Minterval &) throw ( r_Edim_mismatch, r_Eno_interval ) |
r_Minterval | create_closure (const r_Minterval &) const throw ( r_Edim_mismatch, r_Eno_interval ) |
r_Area | cell_count () const throw (r_Error) |
calculate number of cells More... | |
r_Area | cell_offset (const r_Point &) const throw ( r_Eindex_violation, r_Error ) |
calculate offset in cells for one dimensional access (dimension ordering is high first) More... | |
r_Point | cell_point (r_Area) const throw ( r_Eno_cell, r_Error ) |
calculate point index out of offset More... | |
void | delete_dimension (r_Dimension) throw ( r_Eindex_violation ) |
delete the specified dimension More... | |
r_Bytes | get_storage_size () const |
calculate the size of the storage space occupied More... | |
Protected Member Functions | |
void | constructorinit (char *) throw (r_Eno_interval) |
initialization for constructors which take chars More... | |
Protected Attributes | |
r_Sinterval * | intervals |
array for storing the intervals More... | |
r_Dimension | dimensionality |
dimensionality of the domain More... | |
r_Dimension | streamInitCnt |
number of components initialized already More... | |
r_Minterval::r_Minterval | ( | r_Dimension | ) |
constructor getting dimensionality for stream initializing
r_Minterval::r_Minterval | ( | const char * | ) | ||
throw | ( | r_Eno_interval | |||
) |
constructor taking string representation (e.g. [ 1:255, *:200, *:* ])
r_Minterval::r_Minterval | ( | char * | ) | ||
throw | ( | r_Eno_interval | |||
) |
constructor taking string representation (e.g. [ 1:255, *:200, *:* ])
r_Minterval::r_Minterval | ( | ) |
default constructor
r_Minterval::r_Minterval | ( | const r_Minterval & | ) |
copy constructor
r_Minterval::~r_Minterval | ( | ) |
destructor: cleanup dynamic memory
calculate number of cells
The string representation delivered by this method is allocated using { malloc()} and has to be free unsing { free()} in the end. It can be used to construct a { r_Minterval} again with a special constructor provided. The string representation is build using { print_status()}.
r_Area r_Minterval::cell_offset | ( | const r_Point & | ) | const | |
throw | ( | r_Eindex_violation, | |||
r_Error | |||||
) |
calculate offset in cells for one dimensional access (dimension ordering is high first)
r_Point r_Minterval::cell_point | ( | r_Area | ) | const | |
throw | ( | r_Eno_cell, | |||
r_Error | |||||
) |
calculate point index out of offset
r_Minterval& r_Minterval::closure_of | ( | const r_Minterval & | , |
const r_Minterval & | |||
) | |||
throw | ( | r_Edim_mismatch, | |
r_Eno_interval | |||
) |
r_Minterval& r_Minterval::closure_with | ( | const r_Minterval & | ) | ||
throw | ( | r_Edim_mismatch, | |||
r_Eno_interval | |||||
) |
|
protected |
initialization for constructors which take chars
|
inline |
does this interval cover the given point
|
inline |
does this interval cover the given interval
throws r_Edim_mismatch when dimensions do not match
r_Minterval r_Minterval::create_closure | ( | const r_Minterval & | ) | const | |
throw | ( | r_Edim_mismatch, | |||
r_Eno_interval | |||||
) |
r_Minterval r_Minterval::create_difference | ( | const r_Minterval & | ) | const | |
throw | ( | r_Edim_mismatch, | |||
r_Eno_interval | |||||
) |
r_Minterval r_Minterval::create_intersection | ( | const r_Minterval & | ) | const | |
throw | ( | r_Edim_mismatch, | |||
r_Eno_interval | |||||
) |
r_Minterval r_Minterval::create_reverse_translation | ( | const r_Point & | ) | const | |
throw | ( | r_Error, | |||
r_Edim_mismatch, | |||||
r_Eno_interval | |||||
) |
returns new interval as translation of this by a point.
r_Minterval r_Minterval::create_scale | ( | const double & | ) | const | |
throw | ( | r_Eno_interval | |||
) |
returns new interval as scaled from this by a point.
r_Minterval r_Minterval::create_scale | ( | const vector< double > & | ) | const | |
throw | ( | r_Eno_interval | |||
) |
returns new interval as scaled from this by a point.
r_Minterval r_Minterval::create_translation | ( | const r_Point & | ) | const | |
throw | ( | r_Error, | |||
r_Edim_mismatch, | |||||
r_Eno_interval | |||||
) |
returns new interval as translation of this by a point.
r_Minterval r_Minterval::create_union | ( | const r_Minterval & | ) | const | |
throw | ( | r_Edim_mismatch, | |||
r_Eno_interval | |||||
) |
void r_Minterval::delete_dimension | ( | r_Dimension | ) | ||
throw | ( | r_Eindex_violation | |||
) |
delete the specified dimension
r_Minterval& r_Minterval::difference_of | ( | const r_Minterval & | , |
const r_Minterval & | |||
) | |||
throw | ( | r_Edim_mismatch, | |
r_Eno_interval | |||
) |
r_Minterval& r_Minterval::difference_with | ( | const r_Minterval & | ) | ||
throw | ( | r_Edim_mismatch, | |||
r_Eno_interval | |||||
) |
|
inline |
get dimensionality
throws r_Edim_mismatch when dimensions do not match
r_Bytes r_Minterval::get_storage_size | ( | ) | const |
calculate the size of the storage space occupied
char* r_Minterval::get_string_representation | ( | ) | const |
gives back the string representation
r_Minterval& r_Minterval::intersection_of | ( | const r_Minterval & | , |
const r_Minterval & | |||
) | |||
throw | ( | r_Edim_mismatch, | |
r_Eno_interval | |||
) |
r_Minterval& r_Minterval::intersection_with | ( | const r_Minterval & | ) | ||
throw | ( | r_Edim_mismatch, | |||
r_Eno_interval | |||||
) |
bool r_Minterval::intersects_with | ( | const r_Minterval & | ) | const |
determines if the self minterval intersects with the delivered one
|
inline |
checks if all upper bounds are fixed
bool r_Minterval::is_mergeable | ( | const r_Minterval & | other | ) | const |
Checks if this block is mergeable with another block (interval)
|
inline |
checks if all lower bounds are fixed
bool r_Minterval::operator!= | ( | const r_Minterval & | ) | const |
non equal operator - negation of equal operator
Two domains are equal if they have the same number of dimensions and each dimension has the same lower and upper bounds.
r_Minterval r_Minterval::operator* | ( | const r_Minterval & | ) | const | |
throw | ( | r_Edim_mismatch, | |||
r_Eno_interval | |||||
) |
r_Minterval& r_Minterval::operator*= | ( | const r_Minterval & | ) | ||
throw | ( | r_Edim_mismatch, | |||
r_Eno_interval | |||||
) |
r_Minterval r_Minterval::operator+ | ( | const r_Minterval & | ) | const | |
throw | ( | r_Edim_mismatch, | |||
r_Eno_interval | |||||
) |
r_Minterval& r_Minterval::operator+= | ( | const r_Minterval & | ) | ||
throw | ( | r_Edim_mismatch, | |||
r_Eno_interval | |||||
) |
r_Minterval r_Minterval::operator- | ( | const r_Minterval & | ) | const | |
throw | ( | r_Edim_mismatch, | |||
r_Eno_interval | |||||
) |
r_Minterval& r_Minterval::operator-= | ( | const r_Minterval & | ) | ||
throw | ( | r_Edim_mismatch, | |||
r_Eno_interval | |||||
) |
r_Minterval& r_Minterval::operator<< | ( | const r_Sinterval & | ) | ||
throw | ( | r_Einit_overflow | |||
) |
for stream initializing with intervals
r_Minterval& r_Minterval::operator<< | ( | r_Range | ) | ||
throw | ( | r_Einit_overflow | |||
) |
for stream initializing with point intervals
const r_Minterval& r_Minterval::operator= | ( | const r_Minterval & | ) |
assignment: cleanup + copy
bool r_Minterval::operator== | ( | const r_Minterval & | ) | const |
equal operator
|
inline |
read access the i-th interval
|
inline |
write access the i-th interval
void r_Minterval::print_status | ( | std::ostream & | s = std::cout | ) | const |
writes the state of the object to the specified stream
void r_Minterval::r_deactivate | ( | ) |
it is called when an object leaves transient memory
r_Minterval& r_Minterval::reverse_translate | ( | const r_Point & | ) | ||
throw | ( | r_Error, | |||
r_Edim_mismatch, | |||||
r_Eno_interval | |||||
) |
translates this by a point.
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 +-------------------——+ +-------——+
r_Minterval& r_Minterval::scale | ( | const double & | ) | ||
throw | ( | r_Eno_interval | |||
) |
scales this by a factor.
r_Minterval& r_Minterval::scale | ( | const vector< double > & | ) | ||
throw | ( | r_Eno_interval | |||
) |
scales this by a factor.
r_Minterval& r_Minterval::translate | ( | const r_Point & | ) | ||
throw | ( | r_Error, | |||
r_Edim_mismatch, | |||||
r_Eno_interval | |||||
) |
translates this by a point.
r_Minterval& r_Minterval::union_of | ( | const r_Minterval & | , |
const r_Minterval & | |||
) | |||
throw | ( | r_Edim_mismatch, | |
r_Eno_interval | |||
) |
r_Minterval& r_Minterval::union_with | ( | const r_Minterval & | ) | ||
throw | ( | r_Edim_mismatch, | |||
r_Eno_interval | |||||
) |
|
protected |
dimensionality of the domain
|
protected |
array for storing the intervals
|
protected |
number of components initialized already