DP3
Public Member Functions | List of all members
dp3::parmdb::RegularAxis Class Reference

Regularly strided cell centered axis. More...

#include <Axis.h>

Inheritance diagram for dp3::parmdb::RegularAxis:
dp3::parmdb::Axis dp3::blob::BlobStreamable

Public Member Functions

 RegularAxis ()
 Default constructor creates one cell from -1e30 till 1e30. More...
 
 RegularAxis (double begin, double cellWidth, unsigned int count, bool asStartEnd=false)
 Construct giving the beginning of the axis and the width of each cell. More...
 
 ~RegularAxis () override
 
const std::string & classType () const override
 Return the type of *this as a string. More...
 
Axis::ShPtr clone () const override
 Clone the object. More...
 
Axis::ShPtr compress (size_t factor) const override
 Compress the axis. More...
 
Axis::ShPtr doSubset (size_t start, size_t end) const override
 
void read (blob::BlobIStream &bis) override
 Read the contents from the blob input stream bis into *this. More...
 
void write (blob::BlobOStream &bos) const override
 Write the contents of *this into the blob output stream bos. More...
 
- Public Member Functions inherited from dp3::parmdb::Axis
 Axis ()
 The constructor sets the unique id. More...
 
 ~Axis () override
 
bool checkIntervals (const Axis &that) const
 Check if the corresponding intervals in this and that axis are the same. More...
 
Axis::ShPtr combine (const Axis &that, int &s1, int &e1, int &s2, int &e2) const
 
std::pair< size_t, bool > find (double x, bool biasRight=true, size_t start=0) const
 
unsigned int getId () const
 Get the unique axis id. More...
 
bool isRegular () const
 Is the axis regular? More...
 
size_t locate (double x, bool biasRight=true, size_t start=0) const
 Get the cellnr as above, but throw an exception if not found. More...
 
std::pair< double, double > range () const
 Get the total range of the axis. More...
 
size_t size () const
 Get nr of cells. More...
 
Axis::ShPtr subset (size_t start, size_t end) const
 Make a subset of the axis for the given start/end index. More...
 
bool operator== (const Axis &that) const
 
bool operator!= (const Axis &that) const
 
double center (size_t n) const
 
double width (size_t n) const
 
double upper (size_t n) const
 
double lower (size_t n) const
 
const std::vector< double > & centers () const
 
const std::vector< double > & widths () const
 
const std::vector< double > & uppers () const
 
const std::vector< double > & lowers () const
 
double start () const
 
double end () const
 
Axis::ShPtr subset (double start, double end, size_t &index) const
 
Axis::ShPtr subset (double start, double end) const
 
- Public Member Functions inherited from dp3::blob::BlobStreamable
virtual ~BlobStreamable ()
 Destructor. More...
 
void serialize (BlobOStream &bos) const
 

Additional Inherited Members

- Public Types inherited from dp3::parmdb::Axis
typedef std::shared_ptr< AxisShPtr
 Define a shared_ptr for this class. More...
 
- Static Public Member Functions inherited from dp3::parmdb::Axis
static Axis::ShPtr makeAxis (const std::vector< double > &low, const std::vector< double > &high)
 
- Static Public Member Functions inherited from dp3::blob::BlobStreamable
static BlobStreamabledeserialize (BlobIStream &bis)
 
- Protected Member Functions inherited from dp3::parmdb::Axis
void setup (const std::vector< double > &v1, const std::vector< double > &v2, bool asStartEnd)
 Set up the object for an irregular axis. More...
 
void setup (double start, double width, unsigned int count)
 Set up the object for a regular axis. More...
 
- Protected Attributes inherited from dp3::parmdb::Axis
std::vector< double > itsCenter
 
unsigned int itsId
 
bool itsIsRegular
 
std::vector< double > itsLower
 
std::vector< double > itsUpper
 
std::vector< double > itsWidth
 
- Static Protected Attributes inherited from dp3::parmdb::Axis
static unsigned int theirId
 Unique seqnr of an Axis object. Used in class AxisMapping. More...
 

Detailed Description

Regularly strided cell centered axis.

Constructor & Destructor Documentation

◆ RegularAxis() [1/2]

dp3::parmdb::RegularAxis::RegularAxis ( )

Default constructor creates one cell from -1e30 till 1e30.

◆ RegularAxis() [2/2]

dp3::parmdb::RegularAxis::RegularAxis ( double  begin,
double  cellWidth,
unsigned int  count,
bool  asStartEnd = false 
)

Construct giving the beginning of the axis and the width of each cell.

◆ ~RegularAxis()

dp3::parmdb::RegularAxis::~RegularAxis ( )
override

Member Function Documentation

◆ classType()

const std::string& dp3::parmdb::RegularAxis::classType ( ) const
overridevirtual

Return the type of *this as a string.

Implements dp3::parmdb::Axis.

◆ clone()

Axis::ShPtr dp3::parmdb::RegularAxis::clone ( ) const
overridevirtual

Clone the object.

Implements dp3::parmdb::Axis.

◆ compress()

Axis::ShPtr dp3::parmdb::RegularAxis::compress ( size_t  factor) const
overridevirtual

Compress the axis.

Implements dp3::parmdb::Axis.

◆ doSubset()

Axis::ShPtr dp3::parmdb::RegularAxis::doSubset ( size_t  start,
size_t  end 
) const
overridevirtual

Implements dp3::parmdb::Axis.

◆ read()

void dp3::parmdb::RegularAxis::read ( blob::BlobIStream bis)
overridevirtual

Read the contents from the blob input stream bis into *this.

Implements dp3::parmdb::Axis.

◆ write()

void dp3::parmdb::RegularAxis::write ( blob::BlobOStream bos) const
overridevirtual

Write the contents of *this into the blob output stream bos.

Implements dp3::parmdb::Axis.


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