• Parameters

    • graph: FOLD

      a FOLD object

    Returns number[]

    an array where the redundant edges are the indices, and the values are the indices of the first occurence of the duplicate.

    Description

    Get the indices of all duplicate edges by marking the second/third/... as duplicate (not the first of the duplicates). The result is given as an array with holes, where:

    • the indices are the indices of the duplicate edges.
    • the values are the indices of the first occurence of the duplicate. Under this system, many edges can be duplicates of the same edge. Order is not important. [5,9] and [9,5] are still duplicate.

    Example

    {number[]} array, [4:3, 7:5, 8:3, 12:3, 14:9] where indices
    (3, 4, 8, 12) are all duplicates. (5,7), (9,14) are also duplicates.