Commit 51ae5b1c by Gaspard Ducamp

[pyAgrum/Doc] serveral doc added, conf file modified to exclude return from signature

parent ec6b6a18
Pipeline #13189357 passed with stage
in 1 minute 52 seconds
%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
a description of the graph
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;
}
"
\ No newline at end of file
......@@ -24,6 +24,10 @@ tail : int
the id of the tail node
head : int
the id of the head node
Warnings
--------
InvalidNode raised if head or tail does not belong to the graph nodes.
"
%feature("docstring") gum::DiGraph::addNode
......@@ -59,7 +63,7 @@ Set
%feature("docstring") gum::DiGraph::clear
"
Clear the DiGraph of all nodes and arcs.
Remove all the nodes and arcs from the graph.
"
%feature("docstring") gum::DiGraph::empty
......@@ -203,9 +207,9 @@ Examples
--------
>>> import pyAgrum as gum
>>> bn = gum.DiGraph()
>>> bn.addNode()
>>> bn.addNode()
>>> bn.addArc(0,1)
>>> a = bn.addNode()
>>> b = bn.addNode()
>>> bn.addArc(a,b)
>>> bn.toDot()
digraph {
0;
......@@ -220,4 +224,8 @@ Returns
-------
List
the list of the nodes Ids in a topological order
Warnings
--------
InvalidDirectedCycle raised if this graph contains cycles
"
\ No newline at end of file
%feature("docstring") gum::UndiGraph
"
UndiGraph represents a Directed Graph.
Available constructors:
``UndiGraph() -> UndiGraph``
``UndiGraph(src) -> UndiGraph``
Parameters
----------
src : :class: UndiGraph
the UndiGraph to copy
"
%feature("docstring") gum::UndiGraph::addEdge
"
Insert a new edge into the graph.
Parameters
----------
n1 : int
the id of one node of the new inserted edge
n2 : int
the id of the other node of the new inserted edge
Warnings
--------
InvalidNode raised if n1 or n2 does not belong to the graph nodes.
"
\ No newline at end of file
......@@ -457,17 +457,9 @@ epub_exclude_files = ['search.html']
#
# epub_use_index = True
autodoc_member_order = 'alphabetically'
autoclass_content = 'class'
autodoc_default_flags = ['members',
#'private-members',
#'special-members',
#'undoc-members',
#'show-inheritance',
]
############################ TRANSLATER SWIG type #############
import re
......@@ -511,7 +503,8 @@ def process_docstring(app, what, name, obj, options, lines):
def process_signature(app, what, name, obj, options, signature, return_annotation):
signature = substitution4swigautodoc(signature)
return_annotation = substitution4swigautodoc(return_annotation)
#return_annotation = substitution4swigautodoc(return_annotation)
return_annotation = None
return signature, return_annotation
......@@ -528,8 +521,9 @@ def skip(app, what, name, obj, skip, options):
return True
return None
autodoc_default_flags = ['members',
autodoc_default_flags = [#'members',
#'private-members', 'special-members',
'inherited-members',
#'undoc-members','show-inheritance'
]
def setup(app):
......
......@@ -12,13 +12,11 @@ Arc
^^^
.. autoclass:: pyAgrum.Arc
:members:
Edge
^^^^
.. autoclass:: pyAgrum.Edge
:members:
Directed Graphs
---------------
......@@ -27,12 +25,11 @@ Digraph
^^^^^^^
.. autoclass:: pyAgrum.DiGraph
:members:
Directed Acyclic Graph
^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: pyAgrum.DAG
:members:
Undirected Graphs
-----------------
......@@ -41,15 +38,13 @@ UndiGraph
^^^^^^^^^
.. autoclass:: pyAgrum.UndiGraph
:members:
Clique Graph
^^^^^^^^^^^^
.. autoclass:: pyAgrum.CliqueGraph
:members:
Mixed Graph
-----------
.. autoclass:: pyAgrum.MixedGraph
:members:
.. autoclass:: pyAgrum.MixedGraph
%include "doc_Arc.i"
%include "doc_Edge.i"
%include "doc_DiGraph.i"
%include "doc_DAG.i"
%include "doc_UndiGraph.i"
%include "doc_LabelizedVariable.i"
%include "doc_DiscretizedVariable.i"
......
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