HLIBpro  2.7
TCoordinate Class Reference

stores coordinate information for indices More...

#include <TCoordinate.hh>

Public Member Functions

 TCoordinate (const std::vector< double * > &acoord, const uint adim, const coord_data_t coord_data=copy_coord_data)
 
 TCoordinate (const std::vector< double * > &acoord, const uint adim, const std::vector< double * > &abbmin, const std::vector< double * > &abbmax, const coord_data_t coord_data=copy_coord_data)
 
 TCoordinate (const std::vector< TPoint > &acoord)
 special versions for TPoint (always copy data)
 
 TCoordinate (const std::vector< T2Point > &acoord)
 special versions for T2Point (always copy data)
 
 TCoordinate (const std::vector< T3Point > &acoord)
 special versions for T3Point (always copy data)
 
size_t ncoord () const
 return number of stored coordinates
 
uint dim () const
 return dimension of stored coordinates
 
const double * coord (const idx_t i) const
 return coordinate i
 
const double * bbmin (const idx_t i) const
 return minimal coordinate of i'th bounding box
 
const double * bbmax (const idx_t i) const
 return maximal coordinate of i'th bounding box
 
bool has_bbox () const
 return true if bounding box data is present
 
TBBox bounding_box () const
 return boundning box of coordinate set
 
void set_periodicity (const TPoint &p)
 set periodicity to p
 
const TPoint & periodicity () const
 return periodicity vector
 
size_t byte_size () const
 return memory consumption
 

Detailed Description

  • geometrical vectors are stored as double pointers
  • data can be externally defined, e.g. memory managed by user

Constructor & Destructor Documentation

◆ TCoordinate() [1/2]

TCoordinate ( const std::vector< double * > &  acoord,
const uint  adim,
const coord_data_t  coord_data = copy_coord_data 
)

construct coordinate object with acord holding the coordinate vectors, each of dimension adim; if ext is true, memory is handled externally

◆ TCoordinate() [2/2]

TCoordinate ( const std::vector< double * > &  acoord,
const uint  adim,
const std::vector< double * > &  abbmin,
const std::vector< double * > &  abbmax,
const coord_data_t  coord_data = copy_coord_data 
)

construct coordinate object with acord holding the coordinate vectors, each of dimension adim with additional bounding box information in abbmin and abbmax; if ext is true, memory is handled externally