DiscreteVariable.tick
- DiscreteVariable.tick(x)
Returns the x-th tick of the variable (if the variable is a
pyagrum.DiscretizedVariable)- Parameters:
x (
int) – the index of the tick we want to get- Raises:
NotImplementedError – If the variable is not a
pyagrum.DiscretizedVariablepyagrum.OutOfBounds – If x is not a valid index for the ticks of the variable
- Returns:
- float
the x-th tick of the variable
Example
import pyagrum as gum
v = gum.fastVariable("x[0:10:5]") # a DiscretizedVariable
v.tick(1)
# 2.0
Used by
DiscreteVariable, IntegerVariable, LabelizedVariable, NumericalDiscreteVariable, RangeVariable

Overridden in