![]() |
Version: 1.0 |
Go to the source code of this file.
Classes | |
struct | Save |
struct | Load |
Functions | |
bool | LoadConactTree (BinaryDrag< conact > &t, const std::string &filename) |
Loads a tree from file. More... | |
bool | WriteConactTree (const BinaryDrag< conact > &t, const std::string &filename) |
Saves a tree into a file structured as described in the LoadConactTree() More... | |
bool | equivalent_trees (const BinaryDrag< conact >::node *n1, const BinaryDrag< conact >::node *n2) |
void | intersect_leaves (BinaryDrag< conact >::node *n1, BinaryDrag< conact >::node *n2) |
bool | EqualTrees (const BinaryDrag< conact >::node *n1, const BinaryDrag< conact >::node *n2) |
Checks whether two (sub)trees 'n1' and 'n2' are equal or nor. More... | |
void | IntersectTrees (BinaryDrag< conact >::node *n1, BinaryDrag< conact >::node *n2) |
bool | LoadConactDrag (BinaryDrag< conact > &t, const std::string &filename) |
bool | WriteConactDrag (BinaryDrag< conact > &t, const std::string &filename) |
bool EqualTrees | ( | const BinaryDrag< conact >::node * | n1, |
const BinaryDrag< conact >::node * | n2 | ||
) |
Checks whether two (sub)trees 'n1' and 'n2' are equal or nor.
[in] | n1 | Pointer to the root of the first subtree to be checked |
[in] | n2 | Pointer to the root of the second subtree to be checked |
Definition at line 107 of file conact_tree.cpp.
bool equivalent_trees | ( | const BinaryDrag< conact >::node * | n1, |
const BinaryDrag< conact >::node * | n2 | ||
) |
Definition at line 86 of file conact_tree.cpp.
void intersect_leaves | ( | BinaryDrag< conact >::node * | n1, |
BinaryDrag< conact >::node * | n2 | ||
) |
Definition at line 96 of file conact_tree.cpp.
void IntersectTrees | ( | BinaryDrag< conact >::node * | n1, |
BinaryDrag< conact >::node * | n2 | ||
) |
Definition at line 118 of file conact_tree.cpp.
bool LoadConactDrag | ( | BinaryDrag< conact > & | t, |
const std::string & | filename | ||
) |
bool LoadConactTree | ( | BinaryDrag< conact > & | t, |
const std::string & | filename | ||
) |
Loads a tree from file.
The tree must be saved in a file with the following structure:
x a (left son of x) c . 2 . 3 . 1,3,4 (list of actions) b (right son of x) c . 2 . 3 . 4
[out] | t | Loaded tree saved into a BinaryDrag |
[in] | filename | Name of the file (path) from which load the tree |
bool WriteConactDrag | ( | BinaryDrag< conact > & | t, |
const std::string & | filename | ||
) |
bool WriteConactTree | ( | const BinaryDrag< conact > & | t, |
const std::string & | filename | ||
) |
Saves a tree into a file structured as described in the LoadConactTree()