Open bramtayl opened 1 year ago
Here's one option for making working with labels easier:
Right now we have for example Graphs.outneighbors(meta_graph::MetaGraph, code::Integer) and outneighbor_labels(meta_graph::MetaGraph, label).
Graphs.outneighbors(meta_graph::MetaGraph, code::Integer)
outneighbor_labels(meta_graph::MetaGraph, label)
Maybe we could have a general pattern where we add a _labels suffix to a Graphs function to make it work with labels instead of code?
_labels
Graphs
We could then have a @labels macro that attaches the _label suffix to all surface-level Graphs function calls?
@labels
_label
Not bad! Related: https://github.com/JuliaGraphs/MetaGraphsNext.jl/issues/59
Here's one option for making working with labels easier:
Right now we have for example
Graphs.outneighbors(meta_graph::MetaGraph, code::Integer)
andoutneighbor_labels(meta_graph::MetaGraph, label)
.Maybe we could have a general pattern where we add a
_labels
suffix to aGraphs
function to make it work with labels instead of code?We could then have a
@labels
macro that attaches the_label
suffix to all surface-levelGraphs
function calls?