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

Class r_Point represents an n-dimensional point vector. More...

#include <point.hh>

Public Types

using value_type = r_Range
 
using DimType = r_Dimension
 

Public Member Functions

 r_Point ()=default
 default constructor More...
 
 r_Point (r_Dimension)
 constructor getting dimensionality for stream initializing More...
 
 r_Point (char *)
 constructor taking string representation (e.g. [ 1, 2, 3]) More...
 
 r_Point (r_Range)
 
 r_Point (r_Range, r_Range)
 
 r_Point (r_Range, r_Range, r_Range)
 
 r_Point (r_Range, r_Range, r_Range, r_Range)
 
 r_Point (r_Range, r_Range, r_Range, r_Range, r_Range)
 
 r_Point (std::vector< r_Range > pointArg)
 
 ~r_Point ()=default
 destructor: cleanup dynamic memory More...
 
r_Pointoperator<< (r_Range)
 stream-input operator for stream initializing More...
 
r_Range operator[] (r_Dimension) const
 subscriptor for read access More...
 
r_Rangeoperator[] (r_Dimension)
 subscriptor for write access More...
 
r_Range at (r_Dimension) const
 subscriptor for read access with bound-checking More...
 
r_Rangeat (r_Dimension)
 subscriptor for write access with bound-checking More...
 
r_Pointoperator= (const r_Point &)=default
 assignment: cleanup + copy More...
 
int compare_with (const r_Point &p) const
 compares this point with the given point. More...
 
bool operator== (const r_Point &) const
 Returns 0 if this == p, -1 if this < p, 1 if this > p (considering the coordinates in decreasing order of magnitude). More...
 
bool operator!= (const r_Point &) const
 Two points are equal if they have the same number of dimensions and the same values. More...
 
bool operator< (const r_Point &) const
 
bool operator> (const r_Point &) const
 
bool operator<= (const r_Point &) const
 
bool operator>= (const r_Point &) const
 
r_Point operator+ (const r_Point &) const
 vector addition More...
 
r_Point operator- (const r_Point &) const
 vector subtraction More...
 
r_Point operator* (const r_Point &) const
 vector multiplication More...
 
r_Point operator* (const r_Range newElement) const
 vector multiplication with a scalar More...
 
r_Dimension dimension () const
 get dimensionality More...
 
std::vector< r_Rangeget_coordinates () const
 get vectorized version of the stored point More...
 
void print_status (std::ostream &s) const
 writes the state of the object to the specified stream More...
 
char * get_string_representation () const
 gives back the string representation More...
 
std::string to_string (bool wkt=false) const
 The string representation delivered by this method is allocated using malloc() and has to be free using free() in the end. More...
 

Detailed Description

Class r_Point represents an n-dimensional point vector.

Member Typedef Documentation

◆ DimType

◆ value_type

Constructor & Destructor Documentation

◆ r_Point() [1/9]

r_Point::r_Point ( )
default

default constructor

◆ r_Point() [2/9]

r_Point::r_Point ( r_Dimension  )
explicit

constructor getting dimensionality for stream initializing

◆ r_Point() [3/9]

r_Point::r_Point ( char *  )
explicit

constructor taking string representation (e.g. [ 1, 2, 3])

◆ r_Point() [4/9]

r_Point::r_Point ( r_Range  )
explicit

◆ r_Point() [5/9]

r_Point::r_Point ( r_Range  ,
r_Range   
)

◆ r_Point() [6/9]

r_Point::r_Point ( r_Range  ,
r_Range  ,
r_Range   
)

◆ r_Point() [7/9]

r_Point::r_Point ( r_Range  ,
r_Range  ,
r_Range  ,
r_Range   
)

◆ r_Point() [8/9]

r_Point::r_Point ( r_Range  ,
r_Range  ,
r_Range  ,
r_Range  ,
r_Range   
)

◆ r_Point() [9/9]

r_Point::r_Point ( std::vector< r_Range pointArg)
explicit

◆ ~r_Point()

r_Point::~r_Point ( )
default

destructor: cleanup dynamic memory

Member Function Documentation

◆ at() [1/2]

r_Range& r_Point::at ( r_Dimension  )

subscriptor for write access with bound-checking

◆ at() [2/2]

r_Range r_Point::at ( r_Dimension  ) const

subscriptor for read access with bound-checking

◆ compare_with()

int r_Point::compare_with ( const r_Point p) const

compares this point with the given point.

Returns
-2 if dimensions do not match, -1 if this point is smaller, 0 if equal, 1 if greater than p.

◆ dimension()

r_Dimension r_Point::dimension ( ) const

get dimensionality

◆ get_coordinates()

std::vector<r_Range> r_Point::get_coordinates ( ) const

get vectorized version of the stored point

◆ get_string_representation()

char* r_Point::get_string_representation ( ) const

gives back the string representation

◆ operator!=()

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

Two points are equal if they have the same number of dimensions and the same values.

non equal operator - negation of equal operator

◆ operator*() [1/2]

r_Point r_Point::operator* ( const r_Point ) const

vector multiplication

◆ operator*() [2/2]

r_Point r_Point::operator* ( const r_Range  newElement) const

vector multiplication with a scalar

◆ operator+()

r_Point r_Point::operator+ ( const r_Point ) const

vector addition

◆ operator-()

r_Point r_Point::operator- ( const r_Point ) const

vector subtraction

◆ operator<()

bool r_Point::operator< ( const r_Point ) const

◆ operator<<()

r_Point& r_Point::operator<< ( r_Range  )

stream-input operator for stream initializing

◆ operator<=()

bool r_Point::operator<= ( const r_Point ) const

◆ operator=()

r_Point& r_Point::operator= ( const r_Point )
default

assignment: cleanup + copy

◆ operator==()

bool r_Point::operator== ( const r_Point ) const

Returns 0 if this == p, -1 if this < p, 1 if this > p (considering the coordinates in decreasing order of magnitude).

equal operator

◆ operator>()

bool r_Point::operator> ( const r_Point ) const

◆ operator>=()

bool r_Point::operator>= ( const r_Point ) const

◆ operator[]() [1/2]

r_Range& r_Point::operator[] ( r_Dimension  )

subscriptor for write access

◆ operator[]() [2/2]

r_Range r_Point::operator[] ( r_Dimension  ) const

subscriptor for read access

◆ print_status()

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

writes the state of the object to the specified stream

◆ to_string()

std::string r_Point::to_string ( bool  wkt = false) const

The string representation delivered by this method is allocated using malloc() and has to be free using free() in the end.

It can be used to construct a r_Point again with a special constructor provided. The string representation is build using print_status(). If you want the output of get_string_representation(), but you do not want to worry about memory allocation/deallocation.


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