19 #ifndef DECODER_TREE_H
20 #define DECODER_TREE_H
struct decoderTree ** children
List of pointers to all the children of this node.
Uint totalCount
< Total number of symbols occuring at this state.
struct decoderTree * decoderTree_t
Decoder context tree structure.
Uchar ** text
< Flag that indicates if this node is an internal node of the FSM closure of T(x) ...
void freeDecoderTree(decoderTree_t tree, BOOL deleteText)
Deletes a decoder tree structure instance.
BOOL * traversed
List of flags indicating an attempt was made to traverse each child edge.
struct decoderTree * tail
Pointer to the node whose label is the tail of this one.
struct decoderTree * parent
Pointer to the parent of this node.
unsigned char Uchar
Unsigned char type.
Uint right
Index of the rightmost character of the label of this node.
BOOL internalFSM
< Flag that indicates if this node is an internal node of T(x)
struct decoderTree * origin
Pointer to the original node this one descends from.
Uint left
Index of the leftmost character of the label of this node.
BOOL isRootDecoderTree(decoderTree_t tree)
Indicates if the parameter node is the root of the tree.
unsigned long Uint
Unsigned int type.
#define BOOL
Boolean data type.
void verifyDecoder(const decoderTree_t root, decoderTree_t node)
Verify*, only called by the decoder routine.
BOOL used
Flag that indicates if this node has been used to decode eny symbols.
void makeDecoderFsm(decoderTree_t tree)
Calculates the FSM closure of this tree.
struct decoderTree ** transitions
List of FSM transitions from this state.
void initDecoderTreeStack()
decoderTree_t initDecoderTree(BOOL useMalloc)
Creates and initializes a new decoder tree structure instance.
Uint * count
Counts of the number of occurrences of each symbol in this state.
Decoder context tree structure.
decoderTree_t readDecoderTree(FILE *file)
Creates a new decoder tree reading it from a file.