any

fun <T : Comparable<T>> BinaryDecisionDiagram<T>.any(predicate: (T) -> Boolean): Boolean

Returns true if the BinaryDecisionDiagram has at least one Variable element matching the given predicate. Used e.g. by it.unibo.tuprolog.solve.problog.lib.knowledge.impl.BinaryDecisionDiagramExplanation.containsAnyNotGroundTerm as diagram.any { !it.isGround }, to detect explanations that still contain unbound Prolog terms.

Return

true if at least one variable value satisfies predicate.

Parameters

predicate

tested against every variable value in the diagram.

Throws


Returns true if the BinaryDecisionDiagram has at least one variable element, i.e. it is not just a Terminal.

Return

true if the diagram contains at least one variable node.

Throws