QVariable

class QVariable(name: str, star: bool | None = None, parents: frozenset[Variable] = <factory>)[source]

Bases: Variable

A variable, extended with a list of parents.

Attributes Summary

name

The name of the variable

parents

star

The star status of the variable.

Methods Summary

get_all()

Get the union of the left-hand side and right-hand side.

get_lhs()

Get the left-hand side (i.e., child).

parse_str(s)

Return the subunit variables of the input Q variable, separated by the conditional.

pgv_str()

Get a string compatible with the V1 implementation.

to_latex()

Get latex for the q-variable.

to_text()

Get text.

to_y0()

Get a string that can be parsed by Y0.

Attributes Documentation

name: str = <dataclasses._MISSING_TYPE object>

The name of the variable

parents: frozenset[Variable] = <dataclasses._MISSING_TYPE object>
star: bool | None = None

The star status of the variable. None means it’s a variable, False means it’s the same as the value for the variable, and True means it’s a different value from the variable.

Methods Documentation

get_all() frozenset[Variable][source]

Get the union of the left-hand side and right-hand side.

get_lhs() Variable[source]

Get the left-hand side (i.e., child).

classmethod parse_str(s: str) QVariable[source]

Return the subunit variables of the input Q variable, separated by the conditional.

pgv_str() str[source]

Get a string compatible with the V1 implementation.

to_latex() str[source]

Get latex for the q-variable.

to_text() str[source]

Get text.

to_y0() str[source]

Get a string that can be parsed by Y0.