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

tree_util.h

Go to the documentation of this file.
00001 /***
00002  * Copyright (c) 2005, SkeTo Project
00003  * All rights reserved.
00004  */
00011 #ifndef __TREE_UTIL_H__
00012 #define __TREE_UTIL_H__
00013 
00014 #include "node.h"
00015 
00019 namespace tree_util {
00020 
00028   template< typename A >
00029   node< A >*
00030   read_tree_from_file( const char* filename );
00031 
00040   template< typename A >
00041   node< A >*
00042   construct_tree_from_array( const int* flags,
00043                  const A* values );
00044   
00050   template< typename A >
00051   void
00052   free_all_tree( node< A >* root );
00053 
00062   template< typename A >
00063   bool
00064   check_perfect_binary_tree( const node< A >* tree );
00065 
00075   template< typename A >
00076   bool
00077   dist_and_write_to_file( const node< A >* tree,
00078               const int nprocs,
00079               const char *filename );
00080 
00087   template< typename A >
00088   bool
00089   write_to_file( const node< A >* tree,
00090          const char *filename );
00091 
00097   template< typename A >
00098   int
00099   get_size_rec( const node< A >* tree );
00100   
00101    
00102 }
00103 
00104 #include "tree_util.tpp"
00105 
00106 #endif /* __TREE_UTIL_H__ */

Generated on Wed Jan 18 22:19:29 2006 for SkeTo -- Skeleton Library in Tokyo by  doxygen 1.4.4