NumericalDiscreteVariable.toFast

NumericalDiscreteVariable.toFast()

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

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'{0.5|1.5}.

Returns:

fast-syntax string representation

Return type:

str

Example

import pyagrum as gum

x = gum.NumericalDiscreteVariable("x", "x", [0.5, 1.5, 4])
x.toFast()
# 'x{0.5|1.5|4}'

Class

NumericalDiscreteVariable