Commit ec6b6a18 by Gaspard Ducamp

[pyAgrum/Doc] DiGraph documentation completed

parent 419fe06f
Pipeline #13136167 passed with stage
in 6 minutes 6 seconds
......@@ -14,9 +14,21 @@ src : :class: DiGraph
"
%feature("docstring") gum::DiGraph::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
"
%feature("docstring") gum::DiGraph::addNode
"
Add a node by choosing a new NodeId
Add a node by choosing a new NodeId.
Returns
-------
......@@ -24,6 +36,110 @@ int
the new NodeId
"
%feature("docstring") gum::DiGraph::arcs
"
Returns
-------
List
the list of the arcs
"
%feature("docstring") gum::DiGraph::children
"
Parameters
----------
id : int
the id of the parent
Returns
-------
Set
the set of all the children
"
%feature("docstring") gum::DiGraph::clear
"
Clear the DiGraph of all nodes and arcs.
"
%feature("docstring") gum::DiGraph::empty
"
Check if the graph is empty.
Returns
-------
bool
True if the graph is empty
"
%feature("docstring") gum::DiGraph::emptyArcs
"
Check if the graph doesn't contains arcs.
Returns
-------
bool
True if the graph doesn't contains arcs
"
%feature("docstring") gum::DiGraph::eraseArc
"
Erase the arc between n1 and n2.
Parameters
----------
n1 : int
the id of the tail node
n2 : int
the id of the head node
"
%feature("docstring") gum::DiGraph::eraseChildren
"
Erase the arcs heading through the node's children.
Parameters
----------
n : int
the id of the parent node
"
%feature("docstring") gum::DiGraph::eraseNode
"
Erase the node and all the related arcs.
Parameters
----------
id : int
the id of the node
"
%feature("docstring") gum::DiGraph::eraseParents
"
Erase the arcs coming to the node.
Parameters
----------
n : int
the id of the child node
"
%feature("docstring") gum::DiGraph::existsArc
"
Check if an arc exists bewteen n1 and n2.
Parameters
----------
n1 : int
the id of the tail node
n2 : int
the id of the head node
Returns
-------
bool
True if the arc exists
"
%feature("docstring") gum::DiGraph::existsNode
"
Check if a node with a certain id exists in the graph.
......@@ -47,3 +163,61 @@ List
the list of ids
"
%feature("docstring") gum::DiGraph::parents
"
Parameters
----------
id :
The id of the child node
Returns
-------
Set
the set of the parents ids.
"
%feature("docstring") gum::DiGraph::size
"
Returns
-------
int
the number of nodes in the graph
"
%feature("docstring") gum::DiGraph::sizeArcs
"
Returns
-------
int
the number of arcs in the graph
"
%feature("docstring") gum::DiGraph::toDot
"
Returns
-------
str
a description of the graph
Examples
--------
>>> import pyAgrum as gum
>>> bn = gum.DiGraph()
>>> bn.addNode()
>>> bn.addNode()
>>> bn.addArc(0,1)
>>> bn.toDot()
digraph {
0;
1;
0 -> 1;
}
"
%feature("docstring") gum::DiGraph::topologicalOrder
"
Returns
-------
List
the list of the nodes Ids in a topological order
"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment