A C++ data structure (essentially a standard tree, but with features needed for state systems)
- Add / Delete Nodes
- Trim Duplicate subtrees
- Breadth First Search
- Iterative Deepening Depth First Search
- Hamming distance between data points
- Include header file in project
- Initialise State tree with type
- Add nodes
Which should result in output as follows:
- Different search options BFS, DFS, IDDFS for tree (BFS done, IDDFS done, only DFS left)
when using struct data types make sure to include an operator overload for " == " i.e. A state tree of type struct st (see below for structure type)
Will need a overload operator like this in order for the library to function:
This also applies to the hamming distance function, if you are using structs you must overload the ^ operator and return the data value of struct1 ^ struct2 in order for the function to work correctly, standard data types will work fine;