doc_DAG.i 1.02 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
%ignore gum::DAG::emptyArcs;
%ignore gum::DAG::eraseArc;
%ignore gum::DAG::eraseChildren;
%ignore gum::DAG::eraseParents;
%ignore gum::DAG::existsArc;
%ignore gum::DAG::ids;
%ignore gum::DAG::sizeArcs;

%feature("docstring") gum::DAG
"
DAG represents a Directed Acyclic Graph.

Available constructors:
    ``DAG() -> DAG``

    ``DAG(src) -> DAG``

Parameters
----------
src : :class: DAG
  the DAG to copy
"

%feature("docstring") gum::DAG::addArc
"
Add an arc from tail to head.

Parameters
----------
tail : int
  the id of the tail node
head : int
  the id of the head node

Warnings
--------
	InvalidDirectedCircle raised if any (directed) cycle is created by this arc.
	
Warnings
--------
	InvalidNode raised if head or tail does not belong to the graph nodes.
"

%feature("docstring") gum::DAG::toDot
"
Returns
-------
str
49
    a friendly display of the graph in DOT format 
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64

Examples
--------
>>> import pyAgrum as gum
>>> bn = gum.DAG()
>>> a = bn.addNode()
>>> b = bn.addNode()
>>> bn.addArc(a,b)
>>> bn.toDot()
DAG {
	0;
	1;
	0 -> 1;
}
"