Gadget
Public Member Functions | Protected Attributes | List of all members
ConversionIndex Class Reference

This is the class used to convert information from one LengthGroupDivision length structure to a second LengthGroupDivision length structure. More...

#include <conversionindex.h>

Collaboration diagram for ConversionIndex:
Collaboration graph

Public Member Functions

 ConversionIndex (const LengthGroupDivision *const L1, const LengthGroupDivision *const L2, int interp=0)
 This is the ConversionIndex constructor. More...
 
 ~ConversionIndex ()
 This is the default ConversionIndex destructor. More...
 
int Error () const
 This function will return the flag denoting whether an error has occured or not. More...
 
int minLength () const
 This function will return the minimum length group that is contained in both LengthGroupDivision objects. More...
 
int maxLength () const
 This function will return the maximum length group that is contained in both LengthGroupDivision objects. More...
 
int isSameDl () const
 This function will return the flag denoting whether the 2 LengthGroupDivision objects have the same length group structure or not. More...
 
int getOffset () const
 This function will return the offset that specifies the different starting points for 2 LengthGroupDivision objects that have the same length group structure. More...
 
int isFiner () const
 This function will return the flag denoting whether the target LengthGroupDivision object has a finer length group structure or not. More...
 
int getPos (int i) const
 This function will return the index in the coarser length group for an entry in the finer length group. More...
 
int getNumPos (int i) const
 This function will return the number of finer length groups in the coarser length group for an entry in the finer length group. More...
 
int minPos (int i) const
 This function will return the minimum index in the finer length group for an entry in the coarser length group. More...
 
int maxPos (int i) const
 This function will return the maximum index in the finer length group for an entry in the coarser length group. More...
 
void interpolateLengths (DoubleVector &Vf, const DoubleVector &Vc)
 This function will interpolate values defined for a coarser length division onto a finer length division. More...
 

Protected Attributes

int error
 This is the flag to denote whether an error has occured or not. More...
 
int samedl
 This is the flag to denote whether the 2 LengthGroupDivision objects have the same length group structure. More...
 
int offset
 This is the difference in the minimum lengths if the 2 LengthGroupDivision objects have the same length group structure. More...
 
int isfiner
 This is the flag to denote whether the target (L2) LengthGroupDivision object has a finer or coarser length group structure. More...
 
int minlength
 This is the minimum length group that is contained in both LengthGroupDivision objects. More...
 
int maxlength
 This is the maximum length group that is contained in both LengthGroupDivision objects. More...
 
int interpolate
 This is the flag to denote whether the ConversionIndex will be used to interpolate between the 2 LengthGroupDivision objects. More...
 
IntVector pos
 This is the IntVector of the indices used to convert between the length groups. More...
 
IntVector numpos
 This is the IntVector of the number of finer length groups in each coarser length group. More...
 
IntVector minpos
 This is the IntVector of minimum index in the finer length group for each coarser length group. More...
 
IntVector maxpos
 This is the IntVector of maximum index in the finer length group for each coarser length group. More...
 
DoubleVector iratio
 This is the DoubleVector of the ratios used when interpolating between the length groups. More...
 
IntVector ipos
 This is the IntVector of the indices used when interpolating between the length groups. More...
 

Detailed Description

This is the class used to convert information from one LengthGroupDivision length structure to a second LengthGroupDivision length structure.

Constructor & Destructor Documentation

◆ ConversionIndex()

ConversionIndex::ConversionIndex ( const LengthGroupDivision *const  L1,
const LengthGroupDivision *const  L2,
int  interp = 0 
)

This is the ConversionIndex constructor.

Parameters
L1is the first LengthGroupDivision
L2is the second LengthGroupDivision
interpis the flag to denote whether the ConversionIndex will be used to interpolate between the 2 LengthGroupDivision objects (default value 0)

◆ ~ConversionIndex()

ConversionIndex::~ConversionIndex ( )
inline

This is the default ConversionIndex destructor.

Member Function Documentation

◆ Error()

int ConversionIndex::Error ( ) const
inline

This function will return the flag denoting whether an error has occured or not.

Returns
error

◆ getNumPos()

int ConversionIndex::getNumPos ( int  i) const
inline

This function will return the number of finer length groups in the coarser length group for an entry in the finer length group.

Parameters
iis the index in the finer length group
Returns
numpos for finer length group i

◆ getOffset()

int ConversionIndex::getOffset ( ) const
inline

This function will return the offset that specifies the different starting points for 2 LengthGroupDivision objects that have the same length group structure.

Returns
offset

◆ getPos()

int ConversionIndex::getPos ( int  i) const
inline

This function will return the index in the coarser length group for an entry in the finer length group.

Parameters
iis the index in the finer length group
Returns
pos for finer length group i

◆ interpolateLengths()

void ConversionIndex::interpolateLengths ( DoubleVector Vf,
const DoubleVector Vc 
)

This function will interpolate values defined for a coarser length division onto a finer length division.

Parameters
Vfis the DoubleVector that will contain the finer values after the interpolation
Vcis the DoubleVector of the coarser values to interpolate from

◆ isFiner()

int ConversionIndex::isFiner ( ) const
inline

This function will return the flag denoting whether the target LengthGroupDivision object has a finer length group structure or not.

Returns
isfiner

◆ isSameDl()

int ConversionIndex::isSameDl ( ) const
inline

This function will return the flag denoting whether the 2 LengthGroupDivision objects have the same length group structure or not.

Returns
samedl

◆ maxLength()

int ConversionIndex::maxLength ( ) const
inline

This function will return the maximum length group that is contained in both LengthGroupDivision objects.

Returns
maxlength

◆ maxPos()

int ConversionIndex::maxPos ( int  i) const
inline

This function will return the maximum index in the finer length group for an entry in the coarser length group.

Parameters
iis the index in the coarser length group
Returns
maxpos for coarser length group i

◆ minLength()

int ConversionIndex::minLength ( ) const
inline

This function will return the minimum length group that is contained in both LengthGroupDivision objects.

Returns
minlength

◆ minPos()

int ConversionIndex::minPos ( int  i) const
inline

This function will return the minimum index in the finer length group for an entry in the coarser length group.

Parameters
iis the index in the coarser length group
Returns
minpos for coarser length group i

Member Data Documentation

◆ error

int ConversionIndex::error
protected

This is the flag to denote whether an error has occured or not.

◆ interpolate

int ConversionIndex::interpolate
protected

This is the flag to denote whether the ConversionIndex will be used to interpolate between the 2 LengthGroupDivision objects.

◆ ipos

IntVector ConversionIndex::ipos
protected

This is the IntVector of the indices used when interpolating between the length groups.

Note
This vector is resized to be the same length as the finer LengthGroupDivision object and is only used if the interpolate flag has been set

◆ iratio

DoubleVector ConversionIndex::iratio
protected

This is the DoubleVector of the ratios used when interpolating between the length groups.

Note
This vector is resized to be the same length as the finer LengthGroupDivision object and is only used if the interpolate flag has been set

◆ isfiner

int ConversionIndex::isfiner
protected

This is the flag to denote whether the target (L2) LengthGroupDivision object has a finer or coarser length group structure.

◆ maxlength

int ConversionIndex::maxlength
protected

This is the maximum length group that is contained in both LengthGroupDivision objects.

◆ maxpos

IntVector ConversionIndex::maxpos
protected

This is the IntVector of maximum index in the finer length group for each coarser length group.

Note
This vector is resized to be the same length as the coarser LengthGroupDivision object

◆ minlength

int ConversionIndex::minlength
protected

This is the minimum length group that is contained in both LengthGroupDivision objects.

◆ minpos

IntVector ConversionIndex::minpos
protected

This is the IntVector of minimum index in the finer length group for each coarser length group.

Note
This vector is resized to be the same length as the coarser LengthGroupDivision object

◆ numpos

IntVector ConversionIndex::numpos
protected

This is the IntVector of the number of finer length groups in each coarser length group.

Note
This vector is resized to be the same length as the finer LengthGroupDivision object and is only used if the isfiner flag has been set

◆ offset

int ConversionIndex::offset
protected

This is the difference in the minimum lengths if the 2 LengthGroupDivision objects have the same length group structure.

◆ pos

IntVector ConversionIndex::pos
protected

This is the IntVector of the indices used to convert between the length groups.

Note
This vector is resized to be the same length as the finer LengthGroupDivision object

◆ samedl

int ConversionIndex::samedl
protected

This is the flag to denote whether the 2 LengthGroupDivision objects have the same length group structure.


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