[pyAgrum] regenerating wrappers + NotebookTestSuite only with python3

parent 6ab7693c
......@@ -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
----------
......@@ -2917,7 +2917,16 @@ class LabelizedVariable(DiscreteVariable):
def domain(self):
"""domain(self) -> std::string const"""
"""
domain(self) -> std::string const
Returns
-------
str
the domain of the variable as a string
"""
return _pyAgrum.LabelizedVariable_domain(self)
LabelizedVariable_swigregister = _pyAgrum.LabelizedVariable_swigregister
......@@ -3020,9 +3029,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 +3129,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 +3258,9 @@ class DiGraph(_object):
DiGraph represents a Directed Graph.
Available constructors:
`DiGraph() -> DiGraph`
``DiGraph() -> DiGraph``
`DiGraph(src) -> DiGraph`
``DiGraph(src) -> DiGraph``
Parameters
----------
......@@ -3327,7 +3336,10 @@ class DiGraph(_object):
ids(self) -> PyObject *
CRY CRY
Returns
-------
List
the list of ids
"""
return _pyAgrum.DiGraph_ids(self)
......@@ -3353,7 +3365,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 +3386,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 +4737,36 @@ def randomDistribution_double(n):
"""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 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]>
"""
__swig_setmethods__ = {}
for _s in [DiscreteVariable]:
......@@ -4782,7 +4838,16 @@ class DiscretizedVariable_double(DiscreteVariable):
def domain(self):
"""domain(self) -> std::string const"""
"""
domain(self) -> std::string const
Returns
-------
str
the domain of the variable as a string
"""
return _pyAgrum.DiscretizedVariable_double_domain(self)
......@@ -5784,9 +5849,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
----------
......
......@@ -85698,7 +85698,16 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"LabelizedVariable_numerical", _wrap_LabelizedVariable_numerical, METH_VARARGS, (char *)"LabelizedVariable_numerical(self, indice) -> double"},
{ (char *)"LabelizedVariable_domainSize", _wrap_LabelizedVariable_domainSize, METH_VARARGS, (char *)"LabelizedVariable_domainSize(self) -> gum::Size"},
{ (char *)"LabelizedVariable_varType", _wrap_LabelizedVariable_varType, METH_VARARGS, (char *)"LabelizedVariable_varType(self) -> gum::DiscreteVariable::VarType"},
{ (char *)"LabelizedVariable_domain", _wrap_LabelizedVariable_domain, METH_VARARGS, (char *)"LabelizedVariable_domain(self) -> std::string const"},
{ (char *)"LabelizedVariable_domain", _wrap_LabelizedVariable_domain, METH_VARARGS, (char *)"\n"
"LabelizedVariable_domain(self) -> std::string const\n"
"\n"
"\n"
"Returns\n"
"-------\n"
"str\n"
" the domain of the variable as a string\n"
"\n"
""},
{ (char *)"LabelizedVariable_swigregister", LabelizedVariable_swigregister, METH_VARARGS, NULL},
{ (char *)"new_RangeVariable", _wrap_new_RangeVariable, METH_VARARGS, (char *)"\n"
"RangeVariable(aName, aDesc, minVal=0, maxVal=1)\n"
......@@ -85851,7 +85860,10 @@ static PyMethodDef SwigMethods[] = {
"DiGraph_ids(self) -> PyObject *\n"
"\n"
"\n"
"CRY CRY\n"
"Returns\n"
"-------\n"
"List\n"
" the list of ids\n"
"\n"
""},
{ (char *)"DiGraph_arcs", _wrap_DiGraph_arcs, METH_VARARGS, (char *)"DiGraph_arcs(self) -> PyObject *"},
......@@ -85861,7 +85873,12 @@ static PyMethodDef SwigMethods[] = {
"DiGraph_addNode(self) -> gum::NodeId\n"
"\n"
"\n"
"PLIPPLOP\n"
"Add a node by choosing a new NodeId\n"
"\n"
"Returns\n"
"-------\n"
"int\n"
" the new NodeId\n"
"\n"
""},
{ (char *)"DiGraph_addNodeWithId", _wrap_DiGraph_addNodeWithId, METH_VARARGS, (char *)"DiGraph_addNodeWithId(self, id)"},
......@@ -85869,7 +85886,17 @@ static PyMethodDef SwigMethods[] = {
"DiGraph_existsNode(self, id) -> bool\n"
"\n"
"\n"
"PLIPPLOPPLILPI\n"
"Check if a node with a certain id exists in the graph.\n"
"\n"
"Parameters\n"
"----------\n"
"id : int\n"
" the checked id\n"
"\n"
"Returns\n"
"-------\n"
"bool\n"
" True if the node exists\n"
"\n"
""},
{ (char *)"DiGraph_size", _wrap_DiGraph_size, METH_VARARGS, (char *)"DiGraph_size(self) -> gum::Size"},
......@@ -86199,7 +86226,16 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"DiscretizedVariable_double_numerical", _wrap_DiscretizedVariable_double_numerical, METH_VARARGS, (char *)"DiscretizedVariable_double_numerical(self, indice) -> double"},
{ (char *)"DiscretizedVariable_double_index", _wrap_DiscretizedVariable_double_index, METH_VARARGS, (char *)"DiscretizedVariable_double_index(self, label) -> gum::Idx"},
{ (char *)"DiscretizedVariable_double_domainSize", _wrap_DiscretizedVariable_double_domainSize, METH_VARARGS, (char *)"DiscretizedVariable_double_domainSize(self) -> gum::Size"},
{ (char *)"DiscretizedVariable_double_domain", _wrap_DiscretizedVariable_double_domain, METH_VARARGS, (char *)"DiscretizedVariable_double_domain(self) -> std::string const"},
{ (char *)"DiscretizedVariable_double_domain", _wrap_DiscretizedVariable_double_domain, METH_VARARGS, (char *)"\n"
"DiscretizedVariable_double_domain(self) -> std::string const\n"
"\n"
"\n"
"Returns\n"
"-------\n"
"str\n"
" the domain of the variable as a string\n"
"\n"
""},
{ (char *)"DiscretizedVariable_double_tick", _wrap_DiscretizedVariable_double_tick, METH_VARARGS, (char *)"DiscretizedVariable_double_tick(self, i) -> double const &"},
{ (char *)"DiscretizedVariable_double_swigregister", DiscretizedVariable_double_swigregister, METH_VARARGS, NULL},
{ (char *)"delete_MultiDimContainer_double", _wrap_delete_MultiDimContainer_double, METH_VARARGS, (char *)"delete_MultiDimContainer_double(self)"},
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
# Version 4.0.0
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
......@@ -2917,7 +2917,16 @@ class LabelizedVariable(DiscreteVariable):
def domain(self) -> "std::string const":
"""domain(self) -> std::string const"""
"""
domain(self) -> std::string const
Returns
-------
str
the domain of the variable as a string
"""
return _pyAgrum.LabelizedVariable_domain(self)
LabelizedVariable_swigregister = _pyAgrum.LabelizedVariable_swigregister
......@@ -4730,13 +4739,13 @@ def randomDistribution_double(n: 'gum::Size') -> "std::vector< double,std::alloc
class DiscretizedVariable_double(DiscreteVariable):
"""
DiscretizedVariable is a discrete random variable with a customizable sequence of labels.
DiscretizedVariable is a discrete random variable with a set of ``ticks`` defining intervalls.
Available constructors:
``DiscretizedVariable(aName, aDesc='', nbrLabel=2) -> DiscretizedVariable``
``DiscretizedVariable(aName, aDesc='') -> DiscretizedVariable``
``DiscretizedVariable(aLDRV) -> DiscretizedVariable``
``DiscretizedVariable(aDDRV) -> DiscretizedVariable``
Parameters
----------
......@@ -4744,20 +4753,18 @@ class DiscretizedVariable_double(DiscreteVariable):
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
aDDRV: pyAgrum.DiscretizedVariable
Another `DiscretizedVariable` that will be copied
Examples
--------
>>> import pyAgrum as gum
>>> v=gum.DiscretizedVariable('v')
>>> v=gum.DiscretizedVariable('v','a descr')
>>> print(v)
v<0,1>
>>> w=gum.DiscretizedVariable('w','',4)
v<>
>>> v.addTick(1).addTick(3.14).addTick(0.4).addTick(0.2)
>>> print(w)
w<0,1,2,3>
a<[0.2;0.4[,[0.4;1[,[1;3.14]>
"""
......@@ -4831,7 +4838,16 @@ class DiscretizedVariable_double(DiscreteVariable):
def domain(self) -> "std::string const":
"""domain(self) -> std::string const"""
"""
domain(self) -> std::string const
Returns
-------
str
the domain of the variable as a string
"""
return _pyAgrum.DiscretizedVariable_double_domain(self)
......
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
* Version 4.0.0
*
* 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
......
......@@ -2,13 +2,15 @@
# -*- coding: utf-8 -*-
# -*- encoding: UTF-8 -*-
from __future__ import print_function
import sys
if sys.version_info >= (3,0):
import concurrent
import glob
import os
import sys
import traceback
import time
import concurrent
import nbformat
......@@ -46,6 +48,10 @@ def processeNotebook(notebook_filename):
def runNotebooks():
if sys.version_info < (3,0):
print("No notebook tests in python2")
return 0
errs = 0
list = []
......@@ -53,7 +59,9 @@ def runNotebooks():
list.append(filename)
startTime = time.time()
## sequential
# sequential
#for notebook_filename in sorted(list):
# errs+=processeNotebook(notebook_filename)
......
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