-
Notifications
You must be signed in to change notification settings - Fork 12
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
Feature Request: Defined access to GraphData #58
Comments
Inside ND.jl there was a last function which depended on a specific field of function (sef::StaticEdgeFunction)(x, p, t)
gd = sef.nd_ODE_Static(x, p, t, GetGD)
(gd.e_s_v, gd.e_d_v)
end I got rid of it by introducing allocations. Would be good to know whether this function is used by PD.jl in a way which can't be done via the new accessors. |
Okay it is used at least in
at least these are the ones which can be found easily. I think it would be now problem to change the calls there. They don't need the full |
As mentioned in #54 (comment) I'd like to propose a clearly defined set of accessors to get the underlying data of a graph. I think this is a major need for #49. Since it defines a new set of functions for the end users this interface should be designed very carefully though.
From my understanding the main accessors are
These are the ones used in the core loop. Replacing this would already help decoupling the
NetworkStructures
with the rest of the package, for example one could change to Julias build-inviews
without changing another file. It also simplifies testing of different implementations.These accessors could be overloaded, for example to get multiple edges at once. One could also think of other useful accesors, for example to get access based on the symbols. Right now, this is done via
which uses the
GraphStruct
. I think methods like this should be available for the user without even knowing about the existence ofGraphStruct
. Once theGraphDataBuffer
is in place one should consider whyGraphStruct
andGraphData
are even separate types since they strongly depend on each other.further thoughts:
GraphData
up to date with changes to the non-static part (i.e. don't recalculate static edges if the vertex data hasn't changed).NetworkStructures
serves the purpose of caching (i.e. all possible queries like the outgoing edges for every vertex are precomputed during setup). Once one allows access to graph data based on symbols in callbacks it is not possible to compute all of the 'answers' during setup. Maybe one could look into a more automatic approach of Memoization based on the arguments of each accessor function.The text was updated successfully, but these errors were encountered: