Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ot::test Namespace Reference


Functions

bool isBalanced (unsigned int dim, unsigned int maxDepth, char *failFileName, const std::vector< ot::TreeNode > &nodes, bool incCorn, unsigned int maxLevDiff)
bool isBalancedInternal (unsigned int dim, unsigned int maxDepth, char *failFileName, const std::vector< ot::TreeNode > &nodes, ot::TreeNode holder, bool incCorn, unsigned int maxLevDiff)
bool isComplete (const std::vector< ot::TreeNode > &nodes)
bool isLinear (const std::vector< ot::TreeNode > &nodes)


Function Documentation

bool ot::test::isBalanced unsigned int  dim,
unsigned int  maxDepth,
char *  failFileName,
const std::vector< TreeNode > &  nodes,
bool  incCorn,
unsigned int  maxLevDiff = 1
 

Parameters:
dim[in] The dimension of the tree.
maxDepth[in] The maximum depth of the tree.
nodes[in] The vector of nodes that have to be tested.
Returns:
true if for every element in the vector, all the neighbours that balanced it are also present in the vector and false otherwise.
Remarks:
The function uses Binary Search and hence expects the vector of nodes to be sorted.

Definition at line 76 of file testUtils.C.

References isBalancedInternal().

Referenced by main().

bool ot::test::isBalancedInternal unsigned int  dim,
unsigned int  maxDepth,
char *  failFileName,
const std::vector< ot::TreeNode > &  nodes,
ot::TreeNode  holder,
bool  incCorn,
unsigned int  maxLevDiff = 1
 

Definition at line 82 of file testUtils.C.

References ot::TreeNode::getAnchor(), ot::TreeNode::getDFD(), ot::TreeNode::isAncestor(), seq::makeVectorUnique(), seq::maxLowerBound(), and ot::writeNodesToFile().

Referenced by isBalanced().

bool ot::test::isComplete const std::vector< TreeNode > &  nodes  ) 
 

Parameters:
nodes[in] The vector of nodes that have to be tested.
Returns:
true if the sum of the volumes of the nodes in the vector equals the volume of the domain and false otherwise.
Remarks:
The vector of nodes is expected to be unique and linear.

Definition at line 27 of file testUtils.C.

References sort().

Referenced by main().

bool ot::test::isLinear const std::vector< TreeNode > &  nodes  ) 
 

Parameters:
nodes[in] The vector of nodes that have to be tested.
Returns:
false if any ancestor of any element in the vector is also present in the vector and true otherwise.
Remarks:
The function uses Binary Search and hence expects the vector of nodes to be sorted.

Definition at line 17 of file testUtils.C.

Referenced by main().


Generated on Tue Mar 24 16:14:26 2009 for DENDRO by  doxygen 1.3.9.1