VariableNode#
- class cuqi.experimental.algebra.VariableNode(name)[source]#
Node that represents a generic variable, e.g. “x” or “y”.
- Parameters:
name (str) – Name of the variable. Used for printing and to retrieve the given input value of the variable in the kwargs dictionary when evaluating the tree.
Methods
__init__(name)condition(**kwargs)Conditions the tree by replacing any VariableNode with a ValueNode if the variable is in the kwargs dictionary.
get_variables([variables])Returns a set with the names of all variables in the sub-tree originated at this node.