Computational Topology - Vietoris-Rips Complex
Write code for the function RipsComplex(P,d).
- Inputs:
- P : a set of points P belonging to R2 given as a k x 2 numpy matrix
- d : a diameter d >= 0
- Output:
- The boundary matrix representing the 3-skeleton of VR(P, d).
Note: I have little to no programming skills, so I'm just learning. Please bear with me. Also, this question is very similar to the previous question I posted. However, a graph does not need to be generated.. rather a 3-skeleton boundary matrix in python.
Here's my work so far (same as previous question):
import numpy as np
import networkx as nx
P = np.random.random((15,2)) #each point is row in matrix
from scipy.spatial import distance-matrix
plt.matshow(distance-matrix(P,P))
row,col = np.where(D<???) #must find point with distance <???... not sure what distance to use
print(row[:10],'\n',col[:10]) - slicing matrix
#Next, I must remove duplicates and any point where col>row.. by slicing the matrix with specific parameters..
Any help is greatly appreciated. Thanks!