minor changes and enhancements in docs

parent ee718841
......@@ -3,9 +3,9 @@
pyAgrum.Arc is the representation of an arc between two nodes represented by `int`s : the head and the tail.
Available constructors:
`Arc(tail, head) -> Arc`
``Arc(tail, head) -> Arc``
`Arc(src) -> Arc`
``Arc(src) -> Arc``
Parameters
----------
......
......@@ -3,9 +3,9 @@
BayesNet represents a Bayesian Network.
Available constructors:
`BayesNet(name='') -> BayesNet`
``BayesNet(name='') -> BayesNet``
`BayesNet(source) -> BayesNet`
``BayesNet(source) -> BayesNet``
Parameters
----------
......
......@@ -3,9 +3,9 @@
DiGraph represents a Directed Graph.
Available constructors:
`DiGraph() -> DiGraph`
``DiGraph() -> DiGraph``
`DiGraph(src) -> DiGraph`
``DiGraph(src) -> DiGraph``
Parameters
----------
......
%feature("docstring") gum::DiscretizedVariable
"
DiscretizedVariable is a discrete random variable with a set of ``ticks`` defining intervalls.
Available constructors:
``DiscretizedVariable(aName, aDesc='') -> DiscretizedVariable``
``DiscretizedVariable(aDDRV) -> DiscretizedVariable``
Parameters
----------
aName: str
The name of the variable
aDesc: str
The (optional) description of the variable
aDDRV: pyAgrum.DiscretizedVariable
Another `DiscretizedVariable` that will be copied
Examples
--------
>>> import pyAgrum as gum
>>> v=gum.DiscretizedVariable('v','a descr')
>>> print(v)
v<>
>>> v.addTick(1).addTick(3.14).addTick(0.4).addTick(0.2)
>>> print(w)
a<[0.2;0.4[,[0.4;1[,[1;3.14]>
"
%feature("docstring") gum::DiscretizedVariable::domain
"
Returns
-------
str
the domain of the variable as a string
"
......@@ -3,9 +3,9 @@
pyAgrum.Edge is the representation of an arc between two nodes represented by `int`s : the first and the second.
Available constructors :
`Edge(aN1,aN2) -> Edge`
``Edge(aN1,aN2) -> Edge``
`Edge(src) -> Edge`
``Edge(src) -> Edge``
Parameters
----------
......
......@@ -4,9 +4,9 @@ LabelizedVariable is a discrete random variable with a customizable sequence of
Available constructors:
`LabelizedVariable(aName, aDesc='', nbrLabel=2) -> LabelizedVariable`
``LabelizedVariable(aName, aDesc='', nbrLabel=2) -> LabelizedVariable``
`LabelizedVariable(aLDRV) -> LabelizedVariable`
``LabelizedVariable(aLDRV) -> LabelizedVariable``
Parameters
----------
......@@ -29,3 +29,12 @@ v<0,1>
>>> print(w)
w<0,1,2,3>
"
%feature("docstring") gum::LabelizedVariable::domain
"
Returns
-------
str
the domain of the variable as a string
"
%include "doc_Arc.i"
%include "doc_Edge.i"
%include "doc_BayesNet.i"
%include "doc_LabelizedVariable.i"
%include "doc_DiGraph.i"
%include "doc_LabelizedVariable.i"
%include "doc_DiscretizedVariable.i"
%include "doc_BayesNet.i"
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.0
# Version 3.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
......@@ -2813,9 +2813,9 @@ class LabelizedVariable(DiscreteVariable):
Available constructors:
`LabelizedVariable(aName, aDesc='', nbrLabel=2) -> LabelizedVariable`
``LabelizedVariable(aName, aDesc='', nbrLabel=2) -> LabelizedVariable``
`LabelizedVariable(aLDRV) -> LabelizedVariable`
``LabelizedVariable(aLDRV) -> LabelizedVariable``
Parameters
----------
......@@ -3020,9 +3020,9 @@ class Edge(_object):
pyAgrum.Edge is the representation of an arc between two nodes represented by `int`s : the first and the second.
Available constructors :
`Edge(aN1,aN2) -> Edge`
``Edge(aN1,aN2) -> Edge``
`Edge(src) -> Edge`
``Edge(src) -> Edge``
Parameters
----------
......@@ -3120,9 +3120,9 @@ class Arc(_object):
pyAgrum.Arc is the representation of an arc between two nodes represented by `int`s : the head and the tail.
Available constructors:
`Arc(tail, head) -> Arc`
``Arc(tail, head) -> Arc``
`Arc(src) -> Arc`
``Arc(src) -> Arc``
Parameters
----------
......@@ -3249,9 +3249,9 @@ class DiGraph(_object):
DiGraph represents a Directed Graph.
Available constructors:
`DiGraph() -> DiGraph`
``DiGraph() -> DiGraph``
`DiGraph(src) -> DiGraph`
``DiGraph(src) -> DiGraph``
Parameters
----------
......@@ -3327,7 +3327,10 @@ class DiGraph(_object):
ids(self) -> PyObject *
CRY CRY
Returns
-------
List
the list of ids
"""
return _pyAgrum.DiGraph_ids(self)
......@@ -3353,7 +3356,12 @@ class DiGraph(_object):
addNode(self) -> gum::NodeId
PLIPPLOP
Add a node by choosing a new NodeId
Returns
-------
int
the new NodeId
"""
return _pyAgrum.DiGraph_addNode(self)
......@@ -3369,7 +3377,17 @@ class DiGraph(_object):
existsNode(self, id) -> bool
PLIPPLOPPLILPI
Check if a node with a certain id exists in the graph.
Parameters
----------
id : int
the checked id
Returns
-------
bool
True if the node exists
"""
return _pyAgrum.DiGraph_existsNode(self, id)
......@@ -4710,7 +4728,38 @@ def randomDistribution_double(n: 'gum::Size') -> "std::vector< double,std::alloc
"""randomDistribution_double(n) -> Vector_double"""
return _pyAgrum.randomDistribution_double(n)
class DiscretizedVariable_double(DiscreteVariable):
"""Proxy of C++ gum::DiscretizedVariable<(double)> class."""
"""
DiscretizedVariable is a discrete random variable with a customizable sequence of labels.
Available constructors:
``DiscretizedVariable(aName, aDesc='', nbrLabel=2) -> DiscretizedVariable``
``DiscretizedVariable(aLDRV) -> DiscretizedVariable``
Parameters
----------
aName: str
The name of the variable
aDesc: str
The (optional) description of the variable
nbrLabel: int
The number of labels to create. By default , the value start from '0' to 'nbrLabel-1'
aLDRV: pyAgrum.DiscretizedVariable
Another `DiscretizedVariable` that will be copied
Examples
--------
>>> import pyAgrum as gum
>>> v=gum.DiscretizedVariable('v')
>>> print(v)
v<0,1>
>>> w=gum.DiscretizedVariable('w','',4)
>>> print(w)
w<0,1,2,3>
"""
__swig_setmethods__ = {}
for _s in [DiscreteVariable]:
......@@ -5784,9 +5833,9 @@ class BayesNet_double(IBayesNet_double):
BayesNet represents a Bayesian Network.
Available constructors:
`BayesNet(name='') -> BayesNet`
``BayesNet(name='') -> BayesNet``
`BayesNet(source) -> BayesNet`
``BayesNet(source) -> BayesNet``
Parameters
----------
......
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
* Version 3.0.12
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
......
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