グラフのアルゴリズムとは? わかりやすく解説

Weblio 辞書 > 辞書・百科事典 > ウィキペディア小見出し辞書 > グラフのアルゴリズムの意味・解説 

グラフのアルゴリズム

出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2022/02/15 16:52 UTC 版)

Boost C++ライブラリ」の記事における「グラフのアルゴリズム」の解説

Boost.Graph - グラフ理論複数視点および多数アルゴリズムの形で、グラフ概念柔軟かつ効果的な実装提供するアルゴリズムの例トポロジカルソート #include #include #include #include #include #include #include int main(){ using namespace boost; // Type of graph typedef adjacency_list > Graph; // Handle vertices typedef boost::graph_traits::vertex_descriptor Vertex; // Container for the chain of vertices typedef std::vector container; // Type of representation of arcs typedef std::pair Pair; // Edges of the graph Pair edges[6] = { Pair(0,1), Pair(2,4), Pair(2,5), Pair(0,3), Pair(1,4), Pair(4,3) }; // Count Graph G(edges, edges + 6, 6); // Dictionary to get a handle on the numbers of vertices vertices boost::property_map::type id = get(vertex_index, G); // Container for storing the sorted vertices container c; // Execute algorithm topological_sort(G, std::back_inserter(c)); // Output results: sorting descriptors of the graph in the container, // Get the serial number of vertices std::cout << "Topological check:"; for (container::reverse_iterator ii = c.rbegin(); ii != c.rend(); ++ii) std::cout << id[*ii] << " "; std::cout << std::endl; return 0;} 詳細は The Boost Graph Library を参照。

※この「グラフのアルゴリズム」の解説は、「Boost C++ライブラリ」の解説の一部です。
「グラフのアルゴリズム」を含む「Boost C++ライブラリ」の記事については、「Boost C++ライブラリ」の概要参照ください

ウィキペディア小見出し辞書の「グラフのアルゴリズム」の項目はプログラムで機械的に意味や本文を生成しているため、不適切な項目が含まれていることもあります。ご了承くださいませ。 お問い合わせ



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「グラフのアルゴリズム」の関連用語

グラフのアルゴリズムのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



グラフのアルゴリズムのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
ウィキペディアウィキペディア
Text is available under GNU Free Documentation License (GFDL).
Weblio辞書に掲載されている「ウィキペディア小見出し辞書」の記事は、WikipediaのBoost C++ライブラリ (改訂履歴)の記事を複製、再配布したものにあたり、GNU Free Documentation Licenseというライセンスの下で提供されています。

©2025 GRAS Group, Inc.RSS