1 #ifndef RNAPUZZLER_CONFIGTREE_STRUCT_H 2 #define RNAPUZZLER_CONFIGTREE_STRUCT_H 3 4 #include "AABB_struct.h" 5 #include "config_struct.h" 6 7 /** 8 * @brief The configtree struct. 9 * This struct keeps your configurations (config) in a tree structure. 10 * The nodes of that tree are configurations for every loop in the given RNA. 11 * The main purpose of this struct is its usage for intersection detection. 12 * The whole RNA has a tree-like structure. 13 * The intention for intersection detection is to clean up intersections 14 * beginning at small subtrees (e.g. leafs) and going up in that tree 15 * level by level until the root is reached and any intersection is gone. 16 */ 17 typedef struct configtree { 18 // node name 19 int id; 20 21 // tree information 22 struct configtree *parent; 23 struct configtree **children; 24 int childCount; 25 26 // RNA data 27 config *cfg; 28 int loop_start; 29 int stem_start; 30 31 // for intersection handling 32 struct boundingboxLoop *lBox; // bounding box for this loop first base at loop_start 33 struct boundingboxStem *sBox; // bounding box for the prior stem first base at stem_start 34 35 // AABB 36 AABB aabb; 37 } treeNode; 38 39 #endif 40