aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
Graph representation

Classes

class  gum::DAGCycleDetector
 A class for detecting directed cycles in DAGs when trying to apply many changes to the graph. More...
class  gum::DAGCycleDetector::ArcAdd
 the class to indicate that we wish to add a new arc More...
class  gum::DAGCycleDetector::ArcDel
 the class to indicate that we wish to remove an arc More...
class  gum::DAGCycleDetector::ArcReverse
 the class to indicate that we wish to reverse an arc More...
class  gum::SimplicialSet
 Class enabling fast retrieval of simplicial, quasi and almost simplicial nodes. More...
class  gum::DefaultTriangulation
 The default triangulation algorithm used by aGrUM. More...
class  gum::DefaultEliminationSequenceStrategy
 An efficient unconstrained elimination sequence algorithm. More...
class  gum::DefaultPartialOrderedEliminationSequenceStrategy
 An Elimination sequence algorithm that imposes a given partial ordering on the nodes elimination sequence. More...
class  gum::EliminationSequenceStrategy
 The base class for all elimination sequence algorithms used by triangulation algorithms. More...
class  gum::OrderedEliminationSequenceStrategy
 An Elimination sequence algorithm that imposes a given complete ordering on the nodes elimination sequence. More...
class  gum::PartialOrderedEliminationSequenceStrategy
 Base class for all elimination sequence algorithm that impose a given partial ordering on the nodes elimination sequence, that is, the set of all the nodes is divided into several subsets. More...
class  gum::UnconstrainedEliminationSequenceStrategy
 The base class for all elimination sequence algorithms that require only the graph to be triangulated and the nodes' domain sizes to produce the node elimination ordering. More...
class  gum::DefaultJunctionTreeStrategy
 An algorithm producing a junction given the elimination tree produced by a triangulation algorithm. More...
class  gum::JunctionTreeStrategy
 Base Class for all the algorithms producing a junction given a set of cliques/subcliques resulting from a triangulation. More...
class  gum::OrderedTriangulation
 class for graph triangulations for which we enforce a given complete ordering on the nodes eliminations. More...
class  gum::PartialOrderedTriangulation
 class for graph triangulations for which we enforce a given partial ordering on the nodes eliminations, that is, the set of all the nodes is divided into several subsets. More...
class  gum::StaticTriangulation
 base class for all non-incremental triangulation methods More...
class  gum::Triangulation
 Interface for all the triangulation methods. More...
class  gum::UnconstrainedTriangulation
 Interface for all triangulation methods without constraints on node elimination orderings. More...
class  gum::CliqueGraph
 Basic graph of cliques. More...
class  gum::DAG
 Base class for dag. More...
class  gum::DiGraph
 Base class for all oriented graphs. More...
class  gum::Edge
 The base class for all undirected edges. More...
class  gum::Arc
 The base class for all directed edges. More...
class  gum::MixedGraph
 Base class for mixed graphs. More...
class  gum::ArcGraphPart
 Classes for directed edge sets. More...
class  gum::EdgeGraphPart
 Classes for undirected edge sets. More...
class  gum::DiGraphListener
 Abstract Base class for all diGraph Listener. More...
class  gum::MixedGraphListener
 Abstract Base class for all mixed Graph Listener. More...
class  gum::UndiGraphListener
 Abstract Base class for all undiGraph Listener. More...
class  gum::NodeGraphPart
 Class for node sets in graph. More...
class  gum::PDAG
 Base class for partially directed acyclic graphs. More...
class  gum::UndiGraph
 Base class for undirected graphs. More...

Typedefs

using gum::NodeId = Size
 Type for node ids.
using gum::EdgeSet = Set< Edge >
 Some typdefs and define for shortcuts ...
using gum::NodeSet = Set< NodeId >
 Some typdefs and define for shortcuts ...
using gum::ArcSet = Set< Arc >
 Some typdefs and define for shortcuts ...
using gum::ArcSetIterator = ArcSet::const_iterator
 Some typdefs and define for shortcuts ...
using gum::EdgeSetIterator = EdgeSet::const_iterator
 Some typdefs and define for shortcuts ...
using gum::NodeSetIterator = NodeSet::const_iterator
 Some typdefs and define for shortcuts ...
const NodeSet gum::emptyNodeSet
 Some typdefs and define for shortcuts ...
template<class VAL>
using gum::NodeProperty = HashTable< NodeId, VAL >
 Property on graph elements.
template<class VAL>
using gum::EdgeProperty = HashTable< Edge, VAL >
 Property on graph elements.
template<class VAL>
using gum::ArcProperty = HashTable< Arc, VAL >
 Property on graph elements.

Detailed Description

Example: Search of a directed path in a DiGraph

g from n1 to n2

// mark[node] contains 0 if not visited
// mark[node]=predecessor if visited
gum::NodeProperty<gum::NodeId> mark=g.nodesPropertyFromVal((gum::NodeId) 0 );
gum::NodeId current;
mark[n1]=n1;
nodeFIFO.pushBack( n1 );
while ( ! nodeFIFO.empty() ) {
current=nodeFIFO.front();nodeFIFO.popFront();
const gum::NodeSet& set=;
for ( const auto new_one : g.children( current )) {
if ( mark[new_one]!=0 ) continue; // if this node is already marked,
continue
mark[new_one]=current;
if ( new_one==n2 ) break; // if we reach n2, stop.
nodeFIFO.pushBack( new_one );
}
}
if ( mark[n2] ==0 ) GUM_ERROR( gum::NotFound,"no path found" );
Generic doubly linked lists.
Definition list.h:379
Val & front() const
Returns a reference to first element of a list, if any.
Definition list_tpl.h:1703
bool empty() const noexcept
Returns a boolean indicating whether the chained list is empty.
Definition list_tpl.h:1831
void popFront()
Removes the first element of a List, if any.
Definition list_tpl.h:1825
Val & pushBack(const Val &val)
Inserts a new element (a copy) at the end of the chained list.
Definition list_tpl.h:1488
#define GUM_ERROR(type, msg)
Definition exceptions.h:72
Size NodeId
Type for node ids.
HashTable< NodeId, VAL > NodeProperty
Property on graph elements.
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...

Typedef Documentation

◆ ArcProperty

template<class VAL>
using gum::ArcProperty = HashTable< Arc, VAL >

Property on graph elements.

Definition at line 399 of file graphElements.h.

◆ ArcSet

using gum::ArcSet = Set< Arc >

Some typdefs and define for shortcuts ...

Definition at line 381 of file graphElements.h.

◆ ArcSetIterator

Some typdefs and define for shortcuts ...

Definition at line 383 of file graphElements.h.

◆ EdgeProperty

template<class VAL>
using gum::EdgeProperty = HashTable< Edge, VAL >

Property on graph elements.

Definition at line 397 of file graphElements.h.

◆ EdgeSet

using gum::EdgeSet = Set< Edge >

Some typdefs and define for shortcuts ...

Definition at line 379 of file graphElements.h.

◆ EdgeSetIterator

Some typdefs and define for shortcuts ...

Definition at line 384 of file graphElements.h.

◆ NodeId

using gum::NodeId = Size

Type for node ids.

Definition at line 117 of file graphElements.h.

◆ NodeProperty

template<class VAL>
using gum::NodeProperty = HashTable< NodeId, VAL >

Property on graph elements.

Definition at line 395 of file graphElements.h.

◆ NodeSet

using gum::NodeSet = Set< NodeId >

Some typdefs and define for shortcuts ...

Definition at line 380 of file graphElements.h.

◆ NodeSetIterator

Some typdefs and define for shortcuts ...

Definition at line 385 of file graphElements.h.

Variable Documentation

◆ emptyNodeSet

const NodeSet gum::emptyNodeSet
inline

Some typdefs and define for shortcuts ...

Definition at line 387 of file graphElements.h.

Referenced by gum::ArcGraphPart::children(), gum::EdgeGraphPart::neighbours(), and gum::ArcGraphPart::parents().