LabelizedVariable.isLabel

LabelizedVariable.isLabel(aLabel)

Indicates whether the variable already has the label passed in argument

Parameters:

aLabel (str) – the label to be tested

Returns:

True if the label already exists

Return type:

bool

Example

import pyagrum as gum

c = gum.LabelizedVariable("c", "color", ["red", "green", "blue"])
c.isLabel("red")
# True
c.isLabel("pink")
# False

Class

LabelizedVariable