28 #ifndef GUM_CLIQUE_GRAPH_H 29 #define GUM_CLIQUE_GRAPH_H 72 bool nodes_resize_policy =
true,
74 bool edges_resize_policy =
true);
141 virtual void clear();
200 const NodeId node2)
const;
213 virtual const std::string
toString()
const;
217 virtual const std::string
toDot()
const;
314 #ifndef GUM_NO_INLINE 316 #endif // GUM_NOINLINE bool operator==(const CliqueGraph &from) const
checks whether two clique graphs are equal
bool operator!=(const CliqueGraph &from) const
checks whether two clique graphs are different
bool isJoinTree() const
indicates whether the graph is a join tree
virtual void eraseNode(const NodeId node)
removes a given clique from the clique graph
const NodeSet & separator(const Edge &edge) const
returns the separator included in a given edge
virtual void setClique(const NodeId idClique, const NodeSet &new_clique)
changes the set of nodes included into a given clique and returns the new set
virtual const std::string toDot() const
friendly displays the content of the CliqueGraph in DOT format
static constexpr Size default_size
The default number of slots in hashtables.
virtual void clear()
removes all the cliques and separators from the graph (as well as their adjacent edges) ...
structure used for the computation of the running intersection property
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
NodeProperty< NodeSet > cliques_DFS_chain
for each clique, the list of its nodes that require accessing the clique through a chain ...
NodeSet nodes_DFS_seen
set of the nodes examined during the current DFS
The class for generic Hash Tables.
Representation of a setA Set is a structure that contains arbitrary elements.
bool __runningIntersectionDFS(const NodeId clique, const NodeId from, __RunningIntersect &infos_DFS) const
function used for the computation of the running intersection property
NodeProperty< NodeSet > __cliques
the set of nodes contained into the cliques
virtual ~CliqueGraph()
destructor
std::ostream & operator<<(std::ostream &output, const BayesNet< GUM_SCALAR > &bn)
Prints map's DAG in output using the Graphviz-dot format.
void __updateSeparators(const NodeId clique1)
function used to update the separators when a clique is modified
virtual void addToClique(const NodeId clique_id, const NodeId node_id)
changes the set of nodes included into a given clique and returns the new set
NodeSet visited_cliques
structure indicating for each clique whether it has been examined by a DFS (Depth First Search) ...
CliqueGraph JoinTree
a join tree is a clique graph satisfying the running intersection property (but some cliques may be i...
virtual void eraseEdge(const Edge &edge)
removes an edge (and its separator) from the clique graph
virtual const std::string toString() const
friendly displays the content of the CliqueGraph
virtual void addEdge(const NodeId first, const NodeId second)
inserts a new edge between two cliques
const NodeSet & clique(const NodeId idClique) const
returns the set of nodes included into a given clique
NodeSet nodes_other_components
structure indicating the nodes that belong to other connected components
NodeId container(const NodeId idNode) const
returns the id of a clique containing the node the id of which is in argument
CliqueGraph JunctionTree
a junction tree is a clique graph satisfying the running intersection property and such that no cliqu...
The base class for all undirected edges.
std::vector< NodeId > containerPath(const NodeId node1, const NodeId node2) const
returns a path from a clique containing node1 to a clique containing node2
NodeSet nodes_DFS_forbidden
the nodes that are currently forbidden by separators in the DFS
Base class for undirected graphs.
EdgeProperty< NodeSet > __separators
the set of nodes contained into the separators
CliqueGraph & operator=(const CliqueGraph &from)
copy operator
virtual NodeId addNode()
adds a new clique to the graph
CliqueGraph(Size nodes_size=HashTableConst::default_size, bool nodes_resize_policy=true, Size edges_size=HashTableConst::default_size, bool edges_resize_policy=true)
basic constructor: creates an empty clique graph
std::size_t Size
In aGrUM, hashed values are unsigned long int.
virtual void eraseFromClique(const NodeId clique_id, const NodeId node_id)
remove a node from a clique
virtual void clearEdges()
removes all edges and their separators
Size NodeId
Type for node ids.
bool hasRunningIntersection() const
indicates whether the running intersection property holds
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.