CAFE
Computational Analysis of gene Family Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tree.c File Reference
#include "tree.h"
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include "memalloc.h"

Functions

void tree_new_fill (pTree ptree, tree_func_node_new nfunc)
 
pTree tree_new (tree_func_node_new nfunc, int size)
 
void tree_free (pTree ptree)
 
pTreeNode tree_new_empty_node (pTree ptree)
 
int tree_is_leaf (pTreeNode pnode)
 
int tree_is_root (pTree ptree, pTreeNode pnode)
 
void tree_add_child_to_node (pTreeNode parent, pTreeNode child)
 
void * tree_get_child (pTreeNode ptnode, int idx)
 
int tree_get_child_index (pTree ptree, pTreeNode ptnode)
 
void tree_traveral_prefix (pTree ptree, tree_func_node func,...)
 
void tree_traveral_postfix (pTree ptree, tree_func_node func,...)
 
void __tree_clear_reg (pTree ptree, pTreeNode pnode, va_list ap1)
 
void tree_clear_reg (pTree ptree)
 
void __tree_copy (pTree psrc, pTreeNode pnode, va_list ap1)
 
pTree tree_copy (pTree psrc, tree_func_node_new new_node_func, tree_func_node_copy copy)
 

Function Documentation

void __tree_clear_reg ( pTree  ptree,
pTreeNode  pnode,
va_list  ap1 
)
void __tree_copy ( pTree  psrc,
pTreeNode  pnode,
va_list  ap1 
)
void tree_add_child_to_node ( pTreeNode  parent,
pTreeNode  child 
)
void tree_clear_reg ( pTree  ptree)
pTree tree_copy ( pTree  psrc,
tree_func_node_new  new_node_func,
tree_func_node_copy  copy 
)
void tree_free ( pTree  ptree)
void* tree_get_child ( pTreeNode  ptnode,
int  idx 
)
int tree_get_child_index ( pTree  ptree,
pTreeNode  ptnode 
)
int tree_is_leaf ( pTreeNode  pnode)
int tree_is_root ( pTree  ptree,
pTreeNode  pnode 
)
pTree tree_new ( tree_func_node_new  nfunc,
int  size 
)
pTreeNode tree_new_empty_node ( pTree  ptree)
void tree_new_fill ( pTree  ptree,
tree_func_node_new  nfunc 
)
void tree_traveral_postfix ( pTree  ptree,
tree_func_node  func,
  ... 
)
void tree_traveral_prefix ( pTree  ptree,
tree_func_node  func,
  ... 
)