kmean_tree::node_t Class Reference

#include <kmeantree.h>

Collaboration diagram for kmean_tree::node_t:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 node_t ()
bool is_leaf ()
unsigned count_leafs ()
void recursive_split (int max_level, int min_elem, int level=0)
bool run_and_split ()
bool save (const char *filename)
unsigned get_id (descriptor_t *d, node_t **node=0, int depth=0)
void print_summary (int depth=0)
void cmp_scores (std::multimap< double, int > &scores, descriptor_t *data)
bool load (FILE *f)
bool save (FILE *f)
bool save_to_database (const char *fn)
 open a sqlite3 database to store the node and its children.
void assign_leaf_ids (unsigned *id_ptr)

Public Attributes

mean_t mean
unsigned id
node_tclusters [nb_branches]
descriptor_array data

Protected Member Functions

void run_kmean (int nb_iter=32)
bool save (sqlite3 *db, sqlite3_stmt *insert_node, sqlite3_stmt *insert_child)


Detailed Description

Definition at line 61 of file kmeantree.h.


Constructor & Destructor Documentation

node_t::node_t (  ) 

Definition at line 58 of file kmeantree.cpp.

References clusters, and kmean_tree::nb_branches.


Member Function Documentation

void node_t::assign_leaf_ids ( unsigned *  id_ptr  ) 

void node_t::cmp_scores ( std::multimap< double, int > &  scores,
descriptor_t data 
)

Definition at line 152 of file kmeantree.cpp.

References clusters, kmean_tree::mean_t::distance(), mean, and kmean_tree::nb_branches.

Referenced by get_id(), and run_kmean().

unsigned kmean_tree::node_t::count_leafs (  )  [inline]

Definition at line 79 of file kmeantree.h.

References clusters, count_leafs(), and kmean_tree::nb_branches.

Referenced by count_leafs().

unsigned node_t::get_id ( descriptor_t d,
node_t **  node = 0,
int  depth = 0 
)

Definition at line 106 of file kmeantree.cpp.

References clusters, cmp_scores(), get_id(), id, and is_leaf().

Referenced by get_id(), load_patch_track(), and kpt_tracker::traverse_tree().

bool kmean_tree::node_t::is_leaf (  )  [inline]

Definition at line 73 of file kmeantree.h.

References clusters, and kmean_tree::nb_branches.

Referenced by assign_leaf_ids(), get_id(), print_summary(), recursive_split(), and run_and_split().

bool node_t::load ( FILE *  f  ) 

Definition at line 589 of file kmeantree.cpp.

References clusters, mean, and kmean_tree::nb_branches.

Referenced by kmean_tree::load().

void node_t::print_summary ( int  depth = 0  ) 

void node_t::recursive_split ( int  max_level,
int  min_elem,
int  level = 0 
)

bool node_t::run_and_split (  ) 

Definition at line 121 of file kmeantree.cpp.

References clusters, data, is_leaf(), kmean_tree::nb_branches, and run_kmean().

Referenced by recursive_split().

void node_t::run_kmean ( int  nb_iter = 32  )  [protected]

bool node_t::save ( sqlite3 *  db,
sqlite3_stmt *  insert_node,
sqlite3_stmt *  insert_child 
) [protected]

Definition at line 622 of file kmeantree.cpp.

References clusters, mean, kmean_tree::nb_branches, and save().

bool node_t::save ( FILE *  f  ) 

Definition at line 650 of file kmeantree.cpp.

References clusters, mean, kmean_tree::nb_branches, and save().

bool node_t::save ( const char *  filename  ) 

Definition at line 304 of file kmeantree.cpp.

Referenced by main(), save(), and save_to_database().

bool node_t::save_to_database ( const char *  fn  ) 

open a sqlite3 database to store the node and its children.

Clears previously stored tree.

Definition at line 327 of file kmeantree.cpp.

References save().

Referenced by main().


Member Data Documentation

Definition at line 65 of file kmeantree.h.

Referenced by assign_leaf_ids(), get_id(), and kmean_tree::load().


The documentation for this class was generated from the following files:

Generated on Tue Mar 30 15:53:30 2010 for Polyora by  doxygen 1.5.9