FastSyntaxCheck.isValid

FastSyntaxCheck.isValid(syntax)

Tell whether the description is valid for a syntax.

Parameters:

syntax (pyagrum.FastSyntax) – the syntax

Returns:

True if the description is valid for this syntax

Return type:

bool

Example

import pyagrum as gum

check = gum.checkFastSyntax("A[3]->B")
check.isValid(gum.FastSyntax.BayesNet)
# True
check.isValid(gum.FastSyntax.MarkovRandomField)  # no arc in a Markov random field
# False

Class

FastSyntaxCheck