Ask Experts Questions for FREE Help !
    moh533's Avatar
    moh533 Posts: 5, Reputation: 1
    New Member

    Sep 14, 2017, 09:09 PM
    Computational Topology - Vietoris-Rips Complex Graph
    Write code in Python for the function RipsGraph(P,d) as follows.

    - Inputs:

    - P : a set of points P belonging to R2 given as a k x 2 numpy matrix
    - d : a diameter d >= 0


    - a networkx graph which is the 1-skeleton of the Rips complex VR(P, d).

    Create a point set of 15 random points in the box [0, 1]x[0, 1]. Draw this graph as an overlay on the points.

    Note: I have little to no programming skills, so I'm just learning. Please bear with me.

    Here's my work so far:

    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
    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..
    #Then, I must tell networkx where I want the vertices, so it can produce the edges for the 1-skeleton

    Any help is greatly appreciated. Thanks!
    smoothy's Avatar
    smoothy Posts: 25,495, Reputation: 2853
    Uber Member

    Sep 14, 2017, 09:36 PM
    Homework rules on this site REQUIRE you provide your works AND what you think the answer is. You forgot to cut and paste those.
    moh533's Avatar
    moh533 Posts: 5, Reputation: 1
    New Member

    Sep 15, 2017, 06:55 AM
    Woops, sorry about that. Just edited it.

Not your question? Ask your question View similar questions


Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.

Check out some similar questions!

Computational Topology - Order Complex [ 1 Answers ]

Please delete this post

Why graph curves after yield point in stress-strain graph. [ 5 Answers ]

I understand these things: Stress is the internal force that neighbouring particles exert on one another. Strain is a measure of deformation of an object. Strain equals extension÷original length. Are they right? And also I don't get why strain reduces after the yield point. My point is,...

Carrier in computational seismology [ 1 Answers ]

Hi Wishing u a very very good evening. I have completed Master of computer Application.I have completed Master of Computational seismology I am interested to know how computer programming will be help be full in the field of seismology. What are the jobs for computational seismolgy people. ...

Computational Engineering [ 1 Answers ]

I am asking for more information about Computational Engineering. What is it all about ( career opportunities, working conditions, demand, backround to be a good computational engineer, etc )

View more questions Search