47#ifndef GUM_CLIQUE_GRAPH_H
48#define GUM_CLIQUE_GRAPH_H
91 bool nodes_resize_policy =
true,
93 bool edges_resize_policy =
true);
243 const std::string& colorClique =
"burlywood",
244 const std::string& colorSep =
"palegreen")
const;
const NodeSet & separator(const Edge &edge) const
returns the separator included in a given edge
CliqueGraph(const CliqueGraph &from)
copy constructor
const NodeSet & separator(const NodeId clique1, const NodeId clique) const
returns the separator included in an edge specified by its extremities
virtual ~CliqueGraph()
destructor
bool hasRunningIntersection() const
indicates whether the running intersection property holds
void _updateSeparators_(const NodeId clique1)
function used to update the separators when a clique is modified
virtual std::string mapToDot(double scaleClique, double scaleSep, double lenEdge, const std::string &colorClique="burlywood", const std::string &colorSep="palegreen") const
friendly displays the content of the map of the CliqueGraph in DOT format
virtual void addEdge(NodeId first, NodeId second)
inserts a new edge between two cliques
virtual void eraseFromClique(const NodeId clique_id, const NodeId node_id)
remove a node from a clique
virtual void addNodeWithId(const NodeId id, const NodeSet &clique)
try to add a new clique to the graph
virtual void addNodeWithId(const NodeId id)
try to add a new clique to the graph
NodeId addNode(const NodeSet &clique)
adds a new clique to the graph
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 void clear()
removes all the cliques and separators from the graph (as well as their adjacent edges)
virtual NodeId addNode()
adds a new clique to the graph
virtual std::string toDot() const
friendly displays the content of the CliqueGraph in DOT format
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
virtual std::string toString() const
friendly displays the content of the CliqueGraph
virtual void eraseEdge(const Edge &edge)
removes an edge (and its separator) from the clique graph
bool _runningIntersectionDFS_(const NodeId clique, const NodeId from, _RunningIntersect_ &infos_DFS) const
function used for the computation of the running intersection property
virtual void eraseNode(const NodeId node)
removes a given clique from the clique graph
NodeId container(const NodeId idNode) const
returns the id of a clique containing the node the id of which is in argument
EdgeProperty< NodeSet > _separators_
the set of nodes contained into the separators
bool operator==(const CliqueGraph &from) const
checks whether two clique graphs are equal
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
NodeProperty< NodeSet > _cliques_
the set of nodes contained into the cliques
const NodeSet & clique(const NodeId idClique) const
returns the set of nodes included into a given clique
virtual void clearEdges()
removes all edges and their separators
std::vector< NodeId > containerPath(const NodeId node1, const NodeId node2) const
returns a path from a clique containing node1 to a clique containing node2
CliqueGraph & operator=(const CliqueGraph &from)
copy operator
bool isJoinTree() const
indicates whether the graph is a join tree
The base class for all undirected edges.
UndiGraph(Size nodes_size=HashTableConst::default_size, bool nodes_resize_policy=true, Size edges_size=HashTableConst::default_size, bool edges_resize_policy=true)
default constructor
inline source of basic clique graphs
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size NodeId
Type for node ids.
HashTable< Edge, VAL > EdgeProperty
Property on graph elements.
HashTable< NodeId, VAL > NodeProperty
Property on graph elements.
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
gum is the global namespace for all aGrUM entities
std::ostream & operator<<(std::ostream &stream, const AVLTree< Val, Cmp > &tree)
display the content of a tree
CliqueGraph JoinTree
a join tree is a clique graph satisfying the running intersection property (but some cliques may be i...
CliqueGraph JunctionTree
a junction tree is a clique graph satisfying the running intersection property and such that no cliqu...
structure used for the computation of the running intersection property
NodeSet nodes_DFS_seen
set of the nodes examined during the current DFS
NodeSet nodes_other_components
structure indicating the nodes that belong to other connected components
NodeSet nodes_DFS_forbidden
the nodes that are currently forbidden by separators in the DFS
NodeSet visited_cliques
structure indicating for each clique whether it has been examined by a DFS (Depth First Search)
NodeProperty< NodeSet > cliques_DFS_chain
for each clique, the list of its nodes that require accessing the clique through a chain
static constexpr Size default_size
The default number of slots in hashtables.
Base classes for undirected graphs.