21 #ifndef IMAGE_CLASSIFICATION_NODE_H
22 #define IMAGE_CLASSIFICATION_NODE_H
52 bool should_stop_recursion(
void);
53 void end_recursion(
void);
55 void premature_end_recursion(
void);
57 bool is_leaf(
void)
const;
58 int leaves_number(
void);
59 int node_number(
void);
60 int subtree_depth(
void);
61 void set_Dot(
int image_width,
int image_height);
62 void set_Dot(
int _du1,
int _dv1,
int _du2,
int _dv2,
int image_width,
int image_height);
67 void reestimate_probabilities_recursive(
float * weights = 0);
68 void restore_occurances_recursive(
float * weights = 0);
69 void reset_class_occurances_recursive(
int class_index);
70 void save_probability_sums_recursive(std::ofstream& wfs);
71 void load_probability_sums_recursive(std::ifstream& wfs);
75 void change_class_number_and_reset_probabilities(
int new_class_number);
77 int represented_class_number(
void)
const;
79 void print_name(
void);
80 ostream& name(ostream& o)
const;
82 int nb_examples() {
if (examples == 0)
return 0;
else return int(examples->size()); }
85 int d1, d2, du1, dv1, du2,
dv2;
115 #endif // IMAGE_CLASSIFICATION_NODE_H