DiscreteVariable.minVal

DiscreteVariable.minVal()

returns the minimum value of the variable domain (if the variable is a pyagrum.RangeVariable)

Raises:

NotImplementedError – If the variable is not a pyagrum.RangeVariable

Return type:

int

Returns:

int

the minimum value of the variable domain

Example

import pyagrum as gum

v = gum.fastVariable("r[1,4]")  # a RangeVariable
v.minVal()
# 1

Used by

DiscreteVariable, DiscretizedVariable, IntegerVariable, LabelizedVariable, NumericalDiscreteVariable

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

Overridden in

RangeVariable.minVal