You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
616 B
24 lines
616 B
#ifndef __CORTEX_BASIC_TREE_HEADER__
|
|
#define __CORTEX_BASIC_TREE_HEADER__
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef struct S_TREE{
|
|
uint32_t *leaf;
|
|
uint32_t n;
|
|
uint32_t *parent;
|
|
uint32_t *child;
|
|
uint32_t *group;
|
|
char **name;
|
|
|
|
uint32_t groups;
|
|
uint32_t *group_size;
|
|
uint32_t *group_offset;
|
|
} cortexTREE;
|
|
|
|
cortexTREE * read_tree( char * filename);
|
|
void hierarchy_predictions( float * predictions, uint32_t n, cortexTREE *hier, bool only_leaves);
|
|
void change_leaves( cortexTREE * t, char *leaf_list);
|
|
float get_hierarchy_probability( float * x, cortexTREE *hier, uint32_t c);
|
|
|
|
#endif
|