-
Notifications
You must be signed in to change notification settings - Fork 17
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
iterating elements #32
Comments
Locally I create a function which returns all the node-data like following: julia> get_vertices(x) = getindex.(values(x.vertex_properties), 2)
julia> get_vertices(colors)
3-element Vector{String}:
"warm"
"warm"
"cool" |
Well, you can use the fields of the objects directly, but that's not really a public interface. I agree, a public interface would be nice. Maybe something like
and
? ` |
Probably you meant it the other way around, but yes, something like that would prevent boilerplate code. |
This sounds good, gonna take a look |
#45 added a |
We should also add |
And make sure that the order is coherent with the iterators |
thanks @thchr |
Solved by #50 |
I find iterating through the elements of a
MetaGraph
hard.For the docs example:
I would do
which is a little bit tedious to write and I would love some syntactic sugar like:
The iteration of edges is even more tedious to write:
Ofc it's also ridiculously simple to write such functions alone, but I think such functionality should be provided from the library.
Or is there another easier to way to iterate
MetaGraph
elements already ?The text was updated successfully, but these errors were encountered: