13#ifndef BRANCHANDBOUND1TREE_MFSET_H
14#define BRANCHANDBOUND1TREE_MFSET_H
The data structures to model the Graph.
void merge(Set *set1, Set *set2)
Merge two Sets in the Forest if they are not already in the same Set.
Set * find(Set *set)
Find the root of a Set.
void create_forest(Forest *forest, const Node *nodes, unsigned short num_nodes)
Create a new Forest with n Sets, each Set containing a Node, without constraints.
void create_forest_constrained(Forest *forest, const Node *nodes, unsigned short num_nodes, unsigned short candidateId)
Create a new Forest with n Sets, each Set containing a Node, with constraints.
void print_forest(const Forest *forest)
Print all the Forest.
A Forest is a list of Sets.
Set sets[MAX_VERTEX_NUM]
Array of Sets.
unsigned short num_sets
Number of Sets in the Forest.
A Set is a node in the Forest.
struct Set * parentSet
Pointer to the parent Set in a tree representation of the Forest.
unsigned short num_in_forest
Number of the position of the Set in the Forest.
unsigned short rango
Rank of the Set, used to optimize the find operation.