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:
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

Inheritance diagram of pyagrum.DiscreteVariable, pyagrum.IntegerVariable, pyagrum.LabelizedVariable, pyagrum.NumericalDiscreteVariable, pyagrum.RangeVariable

Overridden in

DiscretizedVariable.tick