roles.traceLineage

Where chosen elements of a value came from, followed back through the lineage of the values a host keeps.

GeometricSince 0.15.0

Usage

TypeScript
Roles.traceLineage(value: VerbValue, elements: number[], options?: LineageTraceOptions): Result<LineageTrace>

Parameters

  • valueVerbValue

    A value a construct verb returned; it carries its lineage.

    Required

  • elementsnumber[]

    The indices traced, 1–1000. Required. In index.

  • options.domain'point' | 'primitive' | 'face' | 'edge'

    The elements’ domain. Default 'point'.

  • options.throughRecord<string, VerbValue>

    Earlier values by their ref, to follow back through.

    Required

  • options.depthnumber

    How many steps back, 1–16. Default 8. In count.

Returns

Ok with { domain, items, truncated? }: per element its sources { term, rel, ref, domain, index, sources? }, rows of one term used jointly and terms alternatives.

Errors

Guarantees

  • each source names the input value by its ref, its domain and its index there
  • the same values and elements give the same answer
  • The same result on every machine.

Example

TypeScript
Roles.traceLineage(Mesh.box().value, [0]) // → CAPABILITY_UNAVAILABLE here; a scatter's VerbValue traces each sample to its face

See also