multidim.PointCloud.sever — GDA Toolbox v1.0 Manual

# multidim.PointCloud.sever

`PointCloud.` `sever`()

  Subdivide a SimplicialComplex or PointCloud into several smaller partitions, using the known 0-dimensional persistence diagram. This is an iterator (it _yields_ the terms).

  Two points end up in the same partition if and only if they are connected by a sequence of edges of length < cutoff.

  Yields: | pairs (indices, subpointcloud) of persistently connected SimplicialComplexes/PointClouds. The first term gives indices of the these points from the original `PointCloud` The second term gives a new `PointCloud` with its own sequential index.

  See also

  `make_pers0()`
    func:`reset`

  Notes

  This uses the 0-dimensional Persistence Diagram; therefore, you should run self.reset() and self.make_pers0(cutoff) first.

  Examples

      >>> pc = PointCloud(np.array([[0.,0.],[0.,0.5],[1.,0.],[5.,0.],[6.,0.],[5.,-0.6]]), max_length=-1.0)
      >>> pc.make_pers0(cutoff=1.9)
      >>> for indices,sub_pc in pc.sever():
      ...     print(indices)
      ...     print(sub_pc)
      ...     print(sub_pc.coords)
      [0 1 2]
      A SimplicialComplex with 3 points, 0 edges, and 0 faces.
           0    1
      0  0.0  0.0
      1  0.0  0.5
      2  1.0  0.0
      [3 4 5]
      A SimplicialComplex with 3 points, 0 edges, and 0 faces.
           0    1
      0  5.0  0.0
      1  6.0  0.0
      2  5.0 -0.6

#### Previous topic

multidim.PointCloud.reset

#### Next topic

multidim.PointCloud.unique_with_multiplicity