Trace
Generated from the engine's own definition: compute-engine's symbol, which we neither extend nor document by hand.
Trace of a matrix or pair of tensor axes.
✓ checked against that system · ! checked, with disagreements (hover a chip)FindStat
St001919via PlanePartition✓Wolfram LanguageTr!Trace(list<number> | number, axis1: integer?, axis2: integer?) -> list<number> | numberTrace of a matrix or pair of tensor axes.Typed signatures
| Type | Package | Applies |
|---|---|---|
((plane_partition) -> number) & ((number | tensor, axis1: integer?, axis2: integer?) -> number | tensor) | combinatoricsreplaces compute-engine | always |
(number | tensor, axis1: integer?, axis2: integer?) -> number | tensor | compute-engine | always |
Definition
Epsil, as the implementation runs it.
on PlanePartition, over _x
0 if Length(Flatten(_x)) < 1 else Apply((reading: list<integer>) => Apply(
(lengths: list<integer>) => Apply(
(rowIds: list<integer>) => Apply(
(columnIds: list<integer>) => Max(Sum(Map(Function(reading[u] if rowIds[u] == columnIds[u] else 0, u), Range(1, Length(reading), 1))), 0),
Flatten(Map(Function(Range(1, lengths[i], 1), i), Range(1, Length(_x)))),
),
Flatten(Map(
Function(Map(Function(i, j), Range(1, lengths[i], 1)), i),
Range(1, Length(_x)),
)),
),
Map(
Function(Length(r), r),
_x,
),
), Flatten(_x))Examples
About
| Examples | 7 |
|---|---|
| Checked against | Wolfram Language 4 agree1 differSageMath 2 agree |
| Crosswalk | FindStatWolfram LanguageSageMath |
Implementation
mapped
sagepackages/oracle/src/mappings.ts