Add `inedges`, `outedges` and `edges(g, v)`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia esaminando l’interfaccia AbstractEdge e gli entry point esistenti inneighbors, outneighbors, neighbors, all_neighbors ed edges menzionati nell’issue. Determina se gli iteratori degli archi specifici per vertice debbano appartenere all’interfaccia e come debbano essere costruiti i tipi di arco specifici del grafo; il lavoro è completato quando il design dell’API è concordato e sono definiti il suo impatto sull’interfaccia e sulla sua adozione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Since the AbstractEdge type is part of the graphs interface, I think it would make sense to have something similar to inneighbors, outneighbors and neighbors, which behaves in pretty much the same way, but returns the appropriate edges, starting/ending at the given vertex.
Something like:
inedges(g,v) = Edge.(inneighbors(g,v), v)
outedges(g,v) = Edge.(v, outneighbors(g,v))
edges(g,v) = outedges(g,v)
(with appropriate types and all that of course)
- The last definition would overload the
edgesfunction used to get an iterator over ALL edges, when called without a vertex, which seems sufficiently different to maybe find a different name for that function? - We seem to have
all_neighbors, which could similarly be extended toall_edges(g, v)(If done, havingedges(g, v)andall_edges(g, v)but notall_edges(g)would be very strange and confusing)
Since every graph type can come with its own edge type(s), I guess these functions would need to go into the interface and every subsequent package would need to define their own version, calling their own edge constructors. Is that right? Or is there any way around that? (Since most packages seem to use the SimpleGraphs edge anyway, this might not be too big of a problem in terms of adoption?)
If this proposal seems sensible , I would build a PR for it, but, since changing the interface seems quite fundamental, I would like to first get some feedback and suggestions on this.
- Lingua principale
- Julia
- Stelle
- 540
- Fork
- 130
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di JuliaGraphs/Graphs.jl
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
JuliaGraphs/Graphs.jl#521 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 42/100
JuliaGraphs/Graphs.jl#504 · 4 commenti ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 55/100
JuliaGraphs/Graphs.jl#498 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
JuliaGraphs/Graphs.jl#497 · 1 commento ·
-
good first issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
JuliaGraphs/Graphs.jl#483 · 3 commenti ·
Tutte le issue di JuliaGraphs/Graphs.jl
Issue simili
-
`ShallowWaterModel` allocates ~9 KiB per grid point per RK3 stage on the CPUForse già presa @ali-ramadhan l’ha presa oggi. Apertaperformance 🏍️
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
CliMA/Oceananigans.jl#6421 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
`AMSGrad` state starts at `epsilon` instead of zero, so zero gradients move parameters and small gradients are dampedForse già presa @parth-patel010 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
FluxML/Optimisers.jl#247 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
OpenFUSIONToolkit/GPEC#644 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
SciML/DataDrivenDiffEq.jl#694 ·