AtomTree

Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.

AtomTree

AtomTree()

A Python representation of a Symbolica expression. The type of the atom is provided in atom_type.

The head contains the string representation of:

  • a number if the type is Num
  • the variable if the type is Var
  • the function name if the type is Fn
  • otherwise it is None.

The tail contains the child atoms:

  • the summand for type Add
  • the factors for type Mul
  • the base and exponent for type Pow
  • the function arguments for type Fn

Attributes

Name Description
atom_type The type of this atom.
head The string data of this atom.
tail The list of child atoms of this atom.

atom_type

atom_type: AtomType

The type of this atom.

head

head: str | None

The string data of this atom.

tail

tail: list[AtomTree]

The list of child atoms of this atom.