LabelizedVariable.toFast

LabelizedVariable.toFast()

Return the variable description in fast syntax (e.g. name{val1|val2|...}).

The name is written between single quotes if it would not be read back as is otherwise (see pyagrum.quoteFastName, and its warning about the saved files): 'X-ray'{yes|no}.

Returns:

fast-syntax string representation

Return type:

str

Example

import pyagrum as gum

c = gum.LabelizedVariable("c", "color", ["red", "green", "blue"])
c.toFast()
# 'c{red|green|blue}'

Class

LabelizedVariable