Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[PENDING] GSOC 2025: New function minDegreeOrdering to be added in pgRouting Functionality/experimental GSoC ordering

オープン
#2,962 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@wifiBlack がすでに取り組んでいます。

2025年8月28日 から。

  • #2963 @wifiBlack による — オープン

評価

この issue はまだ評価されていません。

説明

Functionality/experimental GSoC ordering

pgr_minDegreeOrdering():

minDegreeOrdering(): In numerical linear algebra, the MinDegree ordering is a heuristic used to reduce the amount of fill-in during sparse matrix factorization, such as Cholesky decomposition for symmetric matrices. When eliminating variables in a sparse system, new nonzero entries—called fill-ins—can appear in positions that were originally zero, increasing storage and computation costs. The minimum degree approach attempts to reorder the vertices (or equivalently, the rows and columns of the matrix) so that, at each elimination step, the vertex with the smallest degree is removed first, thereby reducing potential fill-in.

Main characteristics of the function:
  • The implementation targets undirected graphs.
  • The algorithm is a heuristic; finding the true optimal ordering is NP-complete.
  • The time complexity is: (O(|V| log |V| + |E|))
    • where (|V|) is the number of vertices,
    • (|E|) is the number of edges.
Signature:
  • minDegreeOrdering()
pgr_minDegreeOrdering(Edges SQL)

Returns set of (seq, node)
OR EMPTY SET
Parameters:
Parameter Type Description
Edges SQL TEXT Inner SQL query, as described below.
Inner Query:

Edges SQL: It should be an SQL query which should return a set of rows with the following columns:

Column Type Default Description
id ANY-INTEGER Identifier of the edge
source ANY-INTEGER Identifier of the first end point vertex of the edge
target ANY-INTEGER Identifier of the second end point vertex of the edge
cost ANY-NUMERICAL Weight of the edge (source, target). When negative: edge (source, target) does not exist on the graph.
reverse_cost ANY-NUMERICAL -1 Weight of the edge (target, source). When negative: edge (target, source) does not exist on the graph.

Where:
ANY-INTEGER = SMALLINT, INTEGER, BIGINT
ANY-NUMERICAL = SMALLINT, INTEGER, BIGINT, REAL, FLOAT

Result Columns:

Returns SET OF (seq, node)

Column Type Description
seq BIGINT Sequence of the order starting from 1.
node BIGINT New ordering in reverse order.
主要言語
C++
スター
1.4k
フォーク
397
平均マージ
2日 2時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pgRouting/pgrouting のほかの issue

pgRouting/pgrouting の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。