AliRoot Core  da88d91 (da88d91)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Test of AliFMDIndex and AliFMDObjIndex
Collaboration diagram for Test of AliFMDIndex and AliFMDObjIndex:

Functions

std::ostream & operator<< (std::ostream &o, const AliFMDIndex &i)
 
bool cmp (const AliFMDIndex &lhs, const AliFMDIndex &rhs)
 
bool equiv (const AliFMDIndex &lhs, const AliFMDIndex &rhs)
 
bool self (const AliFMDIndex &x)
 
bool imply (bool a, bool b, bool c)
 
bool trans (const AliFMDIndex &x, const AliFMDIndex &y, const AliFMDIndex &z)
 
bool equiv (const AliFMDIndex &x, const AliFMDIndex &y, const AliFMDIndex &z)
 
void TestIndex ()
 
void TestObjIndex ()
 
void SortIndex ()
 

Detailed Description

Function Documentation

bool cmp ( const AliFMDIndex lhs,
const AliFMDIndex rhs 
)

Do the comparision, and print to standard out

Parameters
lhsLeft hand side
rhsRight hand side
Returns
\( lhs < rhs \)

Definition at line 35 of file TestIndex.C.

Referenced by equiv(), self(), and trans().

bool equiv ( const AliFMDIndex lhs,
const AliFMDIndex rhs 
)

Test if two index objects are equivilant (are the same). Equivilance is defined as

\[ lhs \equiv rhs: \not (lhs < rhs \vee rhs < lhs) \]

Parameters
lhsLeft hand side
rhsRight hand side
Returns
true if lhs and rhs are equivilant

Definition at line 52 of file TestIndex.C.

Referenced by equiv(), TestIndex(), and TestObjIndex().

bool equiv ( const AliFMDIndex x,
const AliFMDIndex y,
const AliFMDIndex z 
)

Check that the comparison operator preserves equivilance, that is

\[ (x \equiv y \wedge y \equiv z) \Rightarrow (x \equiv z) \]

Parameters
xFirst object
ySecond argument
zThird object
Returns
true if the implication holds.

Definition at line 114 of file TestIndex.C.

bool imply ( bool  a,
bool  b,
bool  c 
)

Check if \( a \wedge b \Rightarrow c\)

Parameters
aFirst condition
bSecond condition
cImplication
Returns
true if the implication is valid

Definition at line 78 of file TestIndex.C.

Referenced by equiv(), and trans().

std::ostream& operator<< ( std::ostream &  o,
const AliFMDIndex i 
)

Write an AliFMDIndex object to output stream

Parameters
oStream
iIndex object
Returns
o

Definition at line 24 of file TestIndex.C.

bool self ( const AliFMDIndex x)

Check that \( \not (x < x)\)

Parameters
xObject to test
Returns
true if x is not less than itself

Definition at line 64 of file TestIndex.C.

void SortIndex ( )

Check that we can sort an array of index objects

Definition at line 225 of file TestIndex.C.

void TestIndex ( )

Check if the comparison operator is a strictly weak ordering

Definition at line 128 of file TestIndex.C.

void TestObjIndex ( )

Check if the comparison operator is a strictly weak ordering

Definition at line 177 of file TestIndex.C.

bool trans ( const AliFMDIndex x,
const AliFMDIndex y,
const AliFMDIndex z 
)

Check if the comparison operator is transitive, that is

\[ (x < y \wedge y < z) \Rightarrow x < z \]

Parameters
xFirst object
ySecond object
zThird object
Returns
true if the implication is met.

Definition at line 94 of file TestIndex.C.

Referenced by AliTPCv1::CreateGeometry(), AliFMDSurveyToAlignObjs::DoFMD1(), AliFMDSurveyToAlignObjs::DoFMD2(), AliFMDGeometryBuilder::FMD1Geometry(), AliFMDGeometryBuilder::FMD2Geometry(), AliFMDGeometryBuilder::FMD3Geometry(), AliFMDDetector::InitTransformations(), PrintAlignment(), AliTPCParam::ReadGeoMatrices(), AliFMDGeometryBuilder::RingGeometry(), TestIndex(), and TestObjIndex().