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

testUtils.h

Go to the documentation of this file.
00001 
00008 #ifndef _TESTUTILS_H_
00009 #define _TESTUTILS_H_
00010 
00011 #include <mpi.h>
00012 #include <vector>
00013 
00014 namespace seq {
00015 
00021   namespace test {
00022 
00028     template<typename T>
00029       bool isSorted(const std::vector<T >& nodes);
00030 
00031     template<typename T>
00032       bool isSorted(T * nodes, unsigned int sz);
00033 
00039     template<typename T>
00040       bool isUniqueAndSorted(const std::vector<T >& nodes);
00041 
00042     template<typename T>
00043       bool isUniqueAndSorted(T * nodes, unsigned int sz);
00044 
00045   }//end namespace
00046 }//end namespace
00047 
00048 namespace par {
00049 
00055   namespace test {
00056 
00057     template<typename T>
00058       bool isSorted(const std::vector<T>& nodes, MPI_Comm comm);
00059 
00060     template<typename T>
00061       bool isUniqueAndSorted(const std::vector<T >& nodes,MPI_Comm comm) ;
00062 
00063   }//end namespace
00064 }//end namespace
00065 
00066 namespace ot { 
00067 
00068   class TreeNode;
00069 
00070   namespace test {
00077     bool isLinear(const std::vector<TreeNode >& nodes) ;
00078 
00085     bool isComplete(const std::vector<TreeNode >& nodes) ;
00086 
00095     bool isBalanced(unsigned int dim, unsigned int maxDepth, char* failFileName,
00096         const std::vector<TreeNode >& nodes, bool incCorn, unsigned int maxLevDiff = 1) ;
00097 
00098     bool isBalancedInternal(unsigned int dim, unsigned int maxDepth,
00099         char*failFileName,      const std::vector<TreeNode > & nodes,
00100         TreeNode holder, bool incCorn, unsigned int maxLevDiff = 1) ;
00101 
00102   }//end namespace
00103 }//end namespace
00104 
00105 #include "testUtils.txx"
00106 
00107 #endif
00108 

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