DiscreteVariable.empty

DiscreteVariable.empty()
Returns:

True if the domain size < 2

Return type:

bool

Example

import pyagrum as gum

gum.fastVariable("c{red|green}").empty()
# False
gum.fastVariable("c{red}", 1).empty()  # domain size < 2 (allowed by the minimal domain size 1)
# True

Used by

DiscreteVariable, DiscretizedVariable, IntegerVariable, LabelizedVariable, NumericalDiscreteVariable, RangeVariable

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