@graphty/graphty-element / format / remapArray
Function: remapArray() ​
remapArray<
T>(data,remap,newLength,fill,components?):T
Defined in: graph-format/dist/src/columns/remap.d.ts:32
Move rows of an index-aligned array from an old index space to a new one through an OLD -> NEW remap (FreezeReport.nodeRemap / edgeRemap, DerivedGraph.nodeRemap / edgeRemap): row i lands at remap[i], rows mapped to INVALID_INDEX are dropped, and rows of the new space no old row maps to hold fill.
Type Parameters ​
T ​
T extends TypedArrayData
Parameters ​
data ​
T
the old array, oldRows * components long
remap ​
old index -> new index or INVALID_INDEX; rows beyond remap.length are dropped
newLength ​
number
the row count of the new space
fill ​
number
the value of rows no old row maps to
components? ​
number
values per row (default 1)
Returns ​
T
a new array of newLength * components values