• Parameters

    • graph: FOLD

      a FOLD object

    • faces: number[]

      a list of face indices which will be carried over into the subgraph.

    Returns FOLD

    a shallow copy of the graph parameter provided.

    Description

    Create a subgraph from a graph, with shallow pointers to arrays by providing a list of faces which will be carried over, and this list of faces will determine which vertices and edges get carried over as well. The subgraph component arrays will contain holes, meaning the indices are preserved, making it useful for performing operations on a subgraph, then carrying that information back to the original.