jacopy.MultiEval¶
- class jacopy.MultiEval(head, *args, alternating=True, slot_kind='vector')¶
Bases:
ExprMultilinear evaluation
head(arg_1, …, arg_p).- Parameters:
head (Expr) – The form or multivector being evaluated.
*args (Expr) – Vector fields (for
slot_kind="vector") or 1-forms (forslot_kind="covector"). At least one arg is required, a zero-arg “evaluation” is justheaditself; constructing aMultiEvalwith no args is a category error.alternating (bool) – When
True(default), the node is graded-antisymmetric in its argument slots. Thejacopy.calculus.multi_eval_axiomsengine rules use this flag to decide whether repeat-arg zeroing fires.slot_kind (str) –
"vector"(default) when args are vector fields, or"covector"when args are 1-forms. Documentation only, does not affect structural algebra.
- __init__(head, *args, alternating=True, slot_kind='vector')¶
Methods
__init__(head, *args[, alternating, slot_kind])clone()Return
self.find(predicate)Yield descendants (including self) satisfying
predicate.replace_at(path, new)Return a new tree with
newspliced atpath.substitute_atom(dummy, target)Return
selfwith every occurrence ofdummyreplaced bytarget.swapped(i, j)Return
(new_node, sign)for a swap of argsiandj.walk()Pre-order traversal yielding
selffollowed by descendants throughchildrenonly.with_args(*new_args)Return a copy with the same head/flags but new argument tuple.
Attributes
alternatingargsarityTuple of immediate children.
headis_atomslot_kind- with_args(*new_args)¶
Return a copy with the same head/flags but new argument tuple.
- swapped(i, j)¶
Return
(new_node, sign)for a swap of argsiandj.For
alternating=Truethe sign is-1wheni != jand+1wheni == j. Foralternating=Falsethe sign is always+1(slot-linear with no symmetry).Out-of-range indices raise
IndexError.