Commit 37e2992c by Gaspard Ducamp

[PyAgrum/doc] Potential doc added; misc impr.

parent 69476614
Pipeline #13370671 passed with stage
in 5 minutes 6 seconds
......@@ -56,7 +56,7 @@ bool
"
Parameters
----------
str
label : str
a label
Returns
......@@ -69,7 +69,7 @@ int
"
Parameters
----------
int
i : int
the index of the label we wish to return
Returns
......@@ -94,7 +94,7 @@ tuple
"
Parameters
----------
int
indice : int
an index
Returns
......@@ -131,6 +131,7 @@ Returns
-------
pyAgrum.RangeVariable
the range variable
Warnings
-------
RuntimeError raised if the variable is not a RangeVariable
......@@ -146,7 +147,10 @@ str
%feature("docstring") gum::DiscreteVariable::varType
"
Warnings
returns the type of variable
Returns
-------
à faire
int :
the type of the variable, 0: DiscretizedVariable, 1: LabelizedVariable, 2: RangeVariable
"
......@@ -55,3 +55,65 @@ Returns
pyAgrum.DiscretizedVariable
a copy of the DiscretizedVariable
"
%feature("docstring") gum::DiscretizedVariable::addTick
"
Parameters
----------
aTick : double
the Tick to be added
Returns
-------
pyAgrum.DiscretizedVariable
the discretized variable
Warnings
--------
DefaultInLabel raised if the Tick is already defined
"
%feature("docstring") gum::DiscretizedVariable::eraseTicks
"
erase all the Ticks
"
%feature("docstring") gum::DiscretizedVariable::isTick
"
Parameters
----------
aTick : double
the Tick to be tested
Returns
-------
bool :
True if the Tick already exists
"
%feature("docstring") gum::DiscretizedVariable::tick
"
Indicate the index of the Tick
Parameters
----------
i : int
the index of the Tick
Returns
-------
aTick : double
the index-th Tick
Warnings
--------
NotFound raised if the index is greater than the number of Ticks
"
%feature("docstring") gum::DiscretizedVariable::ticks
"
Returns
-------
tuple :
a tuple containing all the Ticks
"
\ No newline at end of file
%ignore gum::Instantiation::actAsSlave;
%ignore gum::Instantiation::addWithMaster;
%ignore gum::Instantiation::eraseWithMaster;
%ignore gum::Instantiation::forgetMaster;
%ignore gum::Instantiation::isMaster;
%ignore gum::Instantiation::isSlave;
%ignore gum::Instantiation::synchronizeWithMaster;
%ignore gum::Instantiation::valFromPtr;
%feature("docstring") gum::Instantiation
"
Warnings
--------
A faire
"
%feature("docstring") gum::Instantiation::add
"
Adds a new variable in the Instantiation.
Parameters
----------
v : pyAgrum.DiscreteVariable
The new variable added to the Instantiation
Warnings
--------
DuplicateElement Raised if the variable is already in this Instantiation
"
%feature("docstring") gum::Instantiation::chgVal
"
Assign newval to v (or to the variable at position varPos) in the Instantiation.
Parameters
----------
v : pyAgrum.DiscreteVariable
The variable whose value is assigned
newval : pyAgrum.DiscreteVariable
The index of the value assigned
varPos : int
The index of the variable whose value is assigned in the tuple of variables of the Instantiation
Returns
-------
pyAgrum.Instantiation
The modified instantiation
Warnings
--------
NotFound Raised if variable v does not belong to the instantiation.
Warnings
--------
OutOfBound Raised if newval is not a possible value for the variable.
"
%feature("docstring") gum::Instantiation::clear
"
Erase all variables from an Instantiation.
Warnings
--------
?
"
%feature("docstring") gum::Instantiation::contains
"
Indicates whether a given variable belongs to the Instantiation.
Parameters
----------
v : pyAgrum.DiscreteVariable
The variable for which the test is made.
Returns
-------
bool :
True if the variable is in the Instantiation.
"
%feature("docstring") gum::Instantiation::dec
"
Operator –.
"
%feature("docstring") gum::Instantiation::decIn
"
Operator – for the variables in i.
Parameters
----------
i : pyAgrum.Instantiation
The set of variables to decrement in this Instantiation
"
%feature("docstring") gum::Instantiation::decNotVar
"
Operator – for vars which are not v.
Parameters
----------
v : pyAgrum.DiscreteVariable
The varaible not to decrement in this Instantiation.
"
%feature("docstring") gum::Instantiation::decOut
"
Operator – for the variables not in i.
Parameters
----------
i : pyAgrum.Instantiation
The set of variables to not decrement in this Instantiation.
"
%feature("docstring") gum::Instantiation::decVar
"
Operator – for variable v only.
Parameters
----------
v : pyAgrum.DiscreteVariable
The variable to decrement in this Instantiation.
Warnings
--------
NotFound raised if variable v does not belong to the Instantiation.
"
%feature("docstring") gum::Instantiation::domainSize
"
Returns
-------
int
The product of the variable's domain size in the Instantiation.
"
%feature("docstring") gum::Instantiation::empty
"
Returns
-------
bool
True if the instantiation is empty.
"
%feature("docstring") gum::Instantiation::end
"
Returns
-------
bool
True if the Instantiation reached the end.
"
%feature("docstring") gum::Instantiation::erase
"
Parameters
----------
v : pyAgrum.DiscreteVariable
The variable to be removed from this Instantiation.
Warnings
--------
NotFound raised if v does not belong to this Instantiation.
"
%feature("docstring") gum::Instantiation::hamming
"
Returns
-------
int
the hamming distance of this instantiation.
"
%feature("docstring") gum::Instantiation::inOverflow
"
Returns
-------
bool
True if the current value of the tuple is correct
"
%feature("docstring") gum::Instantiation::inc
"
Operator ++.
"
%feature("docstring") gum::Instantiation::incIn
"
Operator ++ for the variables in i.
Parameters
----------
i : pyAgrum.Instantiation
The set of variables to increment in this Instantiation.
"
%feature("docstring") gum::Instantiation::incNotVar
"
Operator ++ for vars which are not v.
Parameters
----------
v : pyAgrum.DiscreteVariable
The variable not to increment in this Instantiation.
"
%feature("docstring") gum::Instantiation::incOut
"
Operator ++ for the variables not in i.
Parameters
----------
i : Instantiation
The set of variable to not increment in this Instantiation.
"
%feature("docstring") gum::Instantiation::incVar
"
Operator ++ for variable v only.
Parameters
----------
v : pyAgrum.DiscreteVariable
The variable to increment in this Instantiation.
Warnings
--------
NotFound raised if variable v does not belong to the Instantiation.
"
%feature("docstring") gum::Instantiation::nbrDim
"
Returns
-------
int
The number of variables in the Instantiation.
"
%feature("docstring") gum::Instantiation::pos
"
Returns
-------
int
the position of the variable v.
Parameters
----------
v : pyAgrum.DiscreteVariable
the variable for which its position is return.
Warnings
--------
NotFound raised if v does not belong to the instantiation.
"
%feature("docstring") gum::Instantiation::rend
"
Returns
-------
bool:
True if the Instantiation reached the rend.
"
%feature("docstring") gum::Instantiation::reorder
"
Reorder vars of this instantiation giving the order in v (or i).
Parameters
----------
i : pyAgrum.Instantiation
The sequence of variables with which to reorder this Instantiation.
v : ?
The new order of variables for this Instantiation.
"
%feature("docstring") gum::Instantiation::setFirst
"
Assign the first values to the tuple of the Instantiation.
"
%feature("docstring") gum::Instantiation::setFirstIn
"
Assign the first values in the Instantiation for the variables in i.
Parameters
----------
i : pyAgrum.Instantiation
The variables to which their first value is assigned in this Instantiation.
"
%feature("docstring") gum::Instantiation::setFirstNotVar
"
Assign the first values to variables different of v.
Parameters
----------
v : pyAgrum.DiscreteVariable
The variable that will not be set to its first value in this Instantiation.
"
%feature("docstring") gum::Instantiation::setFirstOut
"
Assign the first values in the Instantiation for the variables not in i.
Parameters
----------
i : pyAgrum.Instantiation
The variable that will not be set to their first value in this Instantiation.
"
%feature("docstring") gum::Instantiation::setFirstVar
"
Assign the first value in the Instantiation for var v.
Parameters
----------
v : pyAgrum.DiscreteVariable
The variable that will be set to its first value in this Instantiation.
"
%feature("docstring") gum::Instantiation::setLast
"
Assign the last values in the Instantiation.
"
%feature("docstring") gum::Instantiation::setLastIn
"
Assign the last values in the Instantiation for the variables in i.
Parameters
----------
i : pyAgrum.Instantiation
The variables to which their last value is assigned in this Instantiation.
"
%feature("docstring") gum::Instantiation::setLastNotVar
"
Assign the last values to variables different of v.
Parameters
----------
v : pyAgrum.DiscreteVariable
The variable that will not be set to its last value in this Instantiation.
"
%feature("docstring") gum::Instantiation::setLastOut
"
Assign the last values in the Instantiation for the variables not in i.
Parameters
----------
i : pyAgrum.Instantiation
The variables that will not be set to their last value in this Instantiation.
"
%feature("docstring") gum::Instantiation::setLastVar
"
Assign the last value in the Instantiation for var v.
Parameters
----------
v : pyAgrum.DiscreteVariable
The variable that will be set to its last value in this Instantiation.
"
%feature("docstring") gum::Instantiation::setVals
"
Assign the values from i in the Instantiation.
Parameters
----------
i : pyAgrum.Instantiation
An Instantiation in which the new values are searched
Returns
-------
pyAgrum.Instantiation
a reference to the instantiation
"
%feature("docstring") gum::Instantiation::unsetEnd
"
Alias for unsetOverflow().
"
%feature("docstring") gum::Instantiation::unsetOverflow
"
Removes the flag overflow.
"
%feature("docstring") gum::Instantiation::val
"
Returns the current value of the variable at position i.
"
%feature("docstring") gum::Instantiation::variable
"
Parameters
----------
i : int
The index of the variable
Returns
-------
pyAgrum.DiscreteVariable
the variable at position i in the tuple.
Warnings
--------
NotFound raised if the element cannot be found.
"
%feature("docstring") gum::Instantiation::variablesSequence
"
Returns
-------
List
the sequence of DiscreteVariable of this instantiation.
"
\ No newline at end of file
%ignore gum::DisceteVariable::clone;
%ignore gum::DisceteVariable::label;
%ignore gum::DisceteVariable::index;
%feature("docstring") gum::LabelizedVariable
"
......@@ -54,6 +57,45 @@ Examples
>>> ## 'B'
"
%feature("docstring") gum::LabelizedVariable::changeLabel
"
Change the label at the specified index
Parameters
----------
pos : int
the index of the label to be changed
aLabel : str
the label to be added to the labelized variable
Warnings
--------
DuplicatedElement raised if the variable already contains the new label
Warnings
--------
OutOfBounds raised if the index is greater than the size of the variable
"
%feature("docstring") gum::LabelizedVariable::eraseLabels
"
Erase all the labels from the variable.
"
%feature("docstring") gum::LabelizedVariable::isLabel
"
Indicates whether the variable already has the label passed in argument
Parameters
----------
aLabel : str
the label to be tested
Returns
-------
bool
True if the label already exists
"
%feature("docstring") gum::LabelizedVariable::domain
"
......
%ignore gum::DisceteVariable::clone;
%ignore gum::DisceteVariable::label;
%ignore gum::DisceteVariable::index;
%feature("docstring") gum::RangeVariable
"
......@@ -55,4 +57,91 @@ Returns
-------
pyAgrum.RangeVariable
a copy of the RangeVariable
"
%feature("docstring") gum::RangeVariable::belongs
"
Parameters
----------
val : long
the value to be tested
Returns
-------
bool:
True if the value in parameters belongs to the variable's interval.
"
%feature("docstring") gum::RangeVariable::minVal
"
Returns
-------
long :
the lower bound of the variable
"
%feature("docstring") gum::RangeVariable::maxVal
"
Returns
-------
long :
the upper bound of the variable.
"
%feature("docstring") gum::RangeVariable::setMaxVal
"
Set a new value of the upper bound
Parameters
----------
maxVal : long
The new value of the upper bound
Warnings
--------
An error should be raised if the value is lower than the lower bound.
"
%feature("docstring") gum::RangeVariable::setMinVal
"
Set a new value of the lower bound
Parameters
----------
minVal : long
The new value of the lower bound
Warnings
--------
An error should be raised if the value is higher than the upper bound.
"
%feature("docstring") gum::RangeVariable::index
"
Parameters
----------
arg2 : str
a label
Returns
-------
int
the indice of the label
"
%feature("docstring") gum::RangeVariable::label
"
Parameters
----------
indice : int
the index of the label we wish to return
Returns
-------
str
the indice-th label
Warnings
--------
OutOfBound raised if the variable does not contain the label
"
\ No newline at end of file
......@@ -20,7 +20,7 @@ set the description of the variable.
Parameters
----------
str
theValue : str
the new description of the variable
"
......@@ -30,6 +30,6 @@ sets the name of the variable.
Parameters
----------
str
theValue : str
the new description of the variable
"
\ No newline at end of file
......@@ -5,12 +5,10 @@ Instantiation
-------------
.. autoclass:: pyAgrum.Instantiation
:members:
Potential
---------
.. autoclass:: pyAgrum.Potential
.. autoclass:: pyAgrum.pyAgrum.Potential_double
:members:
.. autoclass:: pyAgrum.pyAgrum.Potential_double
\ No newline at end of file
......@@ -12,4 +12,6 @@
%include "doc_DiscretizedVariable.i"
%include "doc_RangeVariable.i"
%include "doc_Instantiation.i"
%include "doc_BayesNet.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