Skip to content

@graphty/graphty-element / format / gatherArray

Function: gatherArray() ​

gatherArray<T>(data, indexMap, components?): T

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

Gather rows through a NEW -> OLD index map: out[i] = data[indexMap[i]] (DerivedGraph.nodeOrigin / edgeOrigin).

Type Parameters ​

T ​

T extends TypedArrayData

Parameters ​

data ​

T

the source array, oldRows * components long

indexMap ​

U32

new index -> old index, every entry in range

components? ​

number

values per row (default 1)

Returns ​

T

a new array of indexMap.length * components values