Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

range feature suggestion for persistent graph #1792

Open
narnolddd opened this issue Sep 26, 2024 · 0 comments
Open

range feature suggestion for persistent graph #1792

narnolddd opened this issue Sep 26, 2024 · 0 comments
Labels
Enhancement New feature of request Semantics/API Changes to the way we interact with Raphtory or the results which are returned

Comments

@narnolddd
Copy link
Collaborator

Since the at function on a persistent graph returns all active edges which were created before and deleted after a reference point (i.e. without a window) it might be nice to have a range function to complement the expanding and rolling. It might look something like

G = rp.PersistentGraph()

# insert some code adding and deleting edges...

# just specified by step size
for view in G.range(step="1 day"):
   # do some graphy thing

# with a start and end point
for view in G.range(start=G.earliest_time, step="1 day", end = G.latest_time):
   # do some graphy thing

but would be equivalent to

times = [ G.earliest_date_time + i*dt.timedelta("1 day") for i in range( some_number ) ]

for t in times:
   G_view = G.at(t)
   # do some graphy thing
@narnolddd narnolddd added Semantics/API Changes to the way we interact with Raphtory or the results which are returned Enhancement New feature of request labels Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature of request Semantics/API Changes to the way we interact with Raphtory or the results which are returned
Projects
None yet
Development

No branches or pull requests

1 participant