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.

23 lines
616 B

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __CORTEX_BASIC_TREE_HEADER__
  2. #define __CORTEX_BASIC_TREE_HEADER__
  3. #include <stdint.h>
  4. typedef struct S_TREE{
  5. uint32_t *leaf;
  6. uint32_t n;
  7. uint32_t *parent;
  8. uint32_t *child;
  9. uint32_t *group;
  10. char **name;
  11. uint32_t groups;
  12. uint32_t *group_size;
  13. uint32_t *group_offset;
  14. } cortexTREE;
  15. cortexTREE * read_tree( char * filename);
  16. void hierarchy_predictions( float * predictions, uint32_t n, cortexTREE *hier, bool only_leaves);
  17. void change_leaves( cortexTREE * t, char *leaf_list);
  18. float get_hierarchy_probability( float * x, cortexTREE *hier, uint32_t c);
  19. #endif