• Parameters

    • graph: FOLD

      a FOLD object

    • vertex: number

      an index of a vertex in the graph

    • Optional epsilon: number = EPSILON

      an optional epsilon

    Returns boolean

    true if the vertex is collinear and can be removed.

    Description

    determine if a vertex exists between two and only two edges, and those edges are both parallel and on opposite ends of the vertex. In a lot of cases, this vertex can be removed and the graph would function the same. O(1) if vertices_edges exists, if not, O(n) where n=edges