jacopy.packages.metric_affine.MetricValue

class jacopy.packages.metric_affine.MetricValue(metric_name, X, Y)

Bases: Atom

g(X, Y) — a metric evaluation, a scalar C^∞ function (degree-0 atom, NOT a derivation; slot protocol on X, Y).

Parameters:
__init__(metric_name, X, Y)
Parameters:
Return type:

None

Methods

__init__(metric_name, X, Y)

clone()

Return self.

find(predicate)

Yield descendants (including self) satisfying predicate.

replace_at(path, new)

Return a new tree with new spliced at path.

substitute_atom(dummy, target)

Slot-walking substitution (the base Atom walk sees no children; the metric's arguments live in slots — needed for index renaming under an IndexedSum).

walk()

Pre-order traversal yielding self followed by descendants through children only.

with_slots(X, Y)

Attributes

X

Y

children

Tuple of immediate children.

degree

A metric evaluation is a scalar function.

is_atom

metric_name

rewritable_slots

property degree: Degree

A metric evaluation is a scalar function.

substitute_atom(dummy, target)

Slot-walking substitution (the base Atom walk sees no children; the metric’s arguments live in slots — needed for index renaming under an IndexedSum).

Parameters:
Return type:

Expr