Skip to content

@graphty/graphty-element / format / scatterArray

Function: scatterArray() ​

scatterArray<T>(out, values, indexMap, components?): T

Defined in: graph-format/dist/src/columns/remap.d.ts:51

Scatter values computed on a derived graph back into the parent's index space: out[indexMap[i]] = values[i] (through nodeOrigin / edgeOrigin). Rows of out no value maps to are untouched.

Type Parameters ​

T ​

T extends TypedArrayData

Parameters ​

out ​

T

the destination in the parent's index space

values ​

T

the values in the derived index space, indexMap.length * components long

indexMap ​

U32

derived index -> parent index, every entry in range

components? ​

number

values per row (default 1)

Returns ​

T

out