SynAPSE  0.6.0
Synergistic Analysis of Phase Space Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Private Attributes
Bin Class Reference

Defines the most general n-dimensional bin. More...

#include <Bin.hh>

Public Member Functions

 Bin ()
 Default constructor, initilizes everything to 0. More...
 
 Bin (const std::vector< size_t > &indices, const std::vector< double > &lower, const std::vector< double > &upper, const double &content)
 Constant constructor, sets the indices and boundaries of the bin and its content. More...
 
 Bin (const Bin &bin)
 Copy constructor. More...
 
Bin & operator= (const Bin &bin)
 Equality operator. More...
 
 ~Bin ()
 Destructor. More...
 
const size_t & GetDimension () const
 Returns the dimension of the space in which the bin lies. More...
 
const std::vector< size_t > & GetIndices () const
 Returns the bin indices. More...
 
const size_t & GetIndex (const size_t i) const
 Returns the bin index in dimension i. More...
 
const std::vector< double > & GetLowerBoundArray () const
 Returns the array of lower bounds in each dimension. More...
 
const double & GetLowerBound (const size_t i) const
 Returns the lower bound in dimension i. More...
 
const std::vector< double > & GetUpperBoundArray () const
 Returns the array of upper bounds in each dimension. More...
 
const double & GetUpperBound (const size_t i) const
 Returns the upper bound in dimension i. More...
 
const double & GetContent () const
 Returns the content of the bin. More...
 
std::vector< double > GetBarycentre () const
 Returns the barycentre of the bin. More...
 
double GetCentre (const size_t i) const
 Returns the centre of the bin on the ith axis. More...
 
double GetVolume () const
 Returns the volume of the bin. More...
 
double GetWidth (const size_t i) const
 Returns the width of the bin in a particular dimension. More...
 

Private Attributes

size_t _dim
 Dimension of the space. More...
 
std::vector< size_t > _indices
 Indices of the bin in the histogram. More...
 
std::vector< double > _lower
 Lower boundaries of the bin. More...
 
std::vector< double > _upper
 Upper boundaries of the bin. More...
 
double _content
 Content of the bin. More...
 

Detailed Description

Defines the most general n-dimensional bin.

It includes the histogram indices of the bin, the boundaries of an n-orthotope and its content.

Constructor & Destructor Documentation

Bin::Bin ( )

Default constructor, initilizes everything to 0.

Bin::Bin ( const std::vector< size_t > &  indices,
const std::vector< double > &  lower,
const std::vector< double > &  upper,
const double &  content 
)

Constant constructor, sets the indices and boundaries of the bin and its content.

Parameters
indicesIndices of the bin within the histogram it is part of
lowerArray of lower bounds of the bin
upperArray of upper bounds of the bin
contentContent of the bin
Bin::Bin ( const Bin &  bin)

Copy constructor.

Bin::~Bin ( )

Destructor.

Member Function Documentation

std::vector< double > Bin::GetBarycentre ( ) const

Returns the barycentre of the bin.

double Bin::GetCentre ( const size_t  i) const

Returns the centre of the bin on the ith axis.

const double& Bin::GetContent ( ) const
inline

Returns the content of the bin.

const size_t& Bin::GetDimension ( ) const
inline

Returns the dimension of the space in which the bin lies.

const size_t& Bin::GetIndex ( const size_t  i) const
inline

Returns the bin index in dimension i.

const std::vector<size_t>& Bin::GetIndices ( ) const
inline

Returns the bin indices.

const double& Bin::GetLowerBound ( const size_t  i) const
inline

Returns the lower bound in dimension i.

const std::vector<double>& Bin::GetLowerBoundArray ( ) const
inline

Returns the array of lower bounds in each dimension.

const double& Bin::GetUpperBound ( const size_t  i) const
inline

Returns the upper bound in dimension i.

const std::vector<double>& Bin::GetUpperBoundArray ( ) const
inline

Returns the array of upper bounds in each dimension.

double Bin::GetVolume ( ) const

Returns the volume of the bin.

double Bin::GetWidth ( const size_t  i) const

Returns the width of the bin in a particular dimension.

Bin & Bin::operator= ( const Bin &  bin)

Equality operator.

Field Documentation

double Bin::_content
private

Content of the bin.

size_t Bin::_dim
private

Dimension of the space.

std::vector<size_t> Bin::_indices
private

Indices of the bin in the histogram.

std::vector<double> Bin::_lower
private

Lower boundaries of the bin.

std::vector<double> Bin::_upper
private

Upper boundaries of the bin.


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