Make objects behave like graphs without plugging them into type hierarchy
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 22/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- julia
調査の方向性
ファイル、テスト、実装のエントリポイントは指定されていません。まず Tables.jl の着想と、提案されている GraphsBase の traits および iterator メソッドを確認し、その後、既存の GraphsBase インターフェースを調査してください。グラフアルゴリズムで外部オブジェクトを利用可能にするための合意済みの設計ができれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I'm writing this at a request of @gdalle to pool random design ideas ;)
Aim
I'd be great if we could make other objects behave like graphs, cheaply without plugging into type hierarchy.
This idea is inspired by the design of Tables.jl which is exemplified by this discourse post.
TLDR: It's very easy to make things behave like row/column based Tables without plugging into any type system.
Usecase
I have my separate type-system where I implement graph-like structures, but focusing on other aspects (deterministic? complete/regular? etc.) It would be very convenient to define just a bunch of methods (like iterators ;)) to make my structures behave like graphs and work with graphs algorithms.
Example (?)
I have a dfsa (deterministic finite state automaton = directed, labeled graph); I'd like to find shortest loop in it. Run a backtrack search on it.
here is (it's just an example, not a proposal!) a rough way one could think in terms of code about this:
const GB = GraphsBase
GB.isgraph(x::Any) = fale # the default
GB.Directness(::Type{...}) # GB.Directed()/GB.Undirected()/...
GB.Simplicity(::Type{...}) # GB.IsSimpleGraph()/GB.IsMultiGraph()/GB.IsHypergraph()/...
GB.Eagerness(::Type{...}) # GB.Eager()/GB.Lazy() # if vertices edges are given only locally
GB.vertex_type(::Type{...})
GB.edge_type(::Type{...})
.... # and (many?) more
and (based on those traits) a separate sets of interface functions
GB.vertices(graph) = GB.vertices(graph) # an iterator over vertices
GB.neighbours(graph, vertex) # required if GB.Undirected()
GB.out_neighbours(graph, vertex) # which is different from
GB.in_neighbours(graph, vertex) # these two are only required for GB.Directed()
GB.hasedge(graph, vertex, edge) # if graph is GB.Lazy(), otherwise
GB.hasedge(graph, edge)
... # and so on, these are just examples, not a fixed proposal
This way graph can stay un-typed and it'd be easy to "turn anything into a graph"™, including e.g. BitMatrix (hopefully without committing type piracy).
Cons:
- potentially hard/complex "dispatch" path (but JuMP is an example that even more complex designs are possible ;);
- explosion of different methods (signatures);
- no clear type structure that we all love...
- 主要言語
- Julia
- スター
- 11
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
JuliaGraphs/GraphsBase.jl のほかの issue
-
Constructors for 2.0オープンquestion
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
JuliaGraphs/GraphsBase.jl#34 ·
-
question
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
JuliaGraphs/GraphsBase.jl#28 ·
-
question
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
JuliaGraphs/GraphsBase.jl#27 · コメント 1 件 · リアクション 1 件 ·
-
question
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
JuliaGraphs/GraphsBase.jl#25 · コメント 3 件 · リアクション 1 件 ·
-
question
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
JuliaGraphs/GraphsBase.jl#24 ·
JuliaGraphs/GraphsBase.jl の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
JuliaLang/LinearAlgebra.jl#1834 ·
メンテナーはふだん 1 日以内に返信
-
`RawAcquisitionData(acqData)` writes the repetition into the `average` counter対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
MagneticResonanceImaging/MRIReco.jl#332 ·
メンテナーはふだん 1 日以内に返信
-
Docstrings show df:DataFrame and an undefined function is exported対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
chalk-lab/Mooncake.jl#1423 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信