C++ Boost

MutablePropertyGraph

MutablePropertyGraph は頂点と辺に内部的に付け加えられたプロパティを持つ MutableGraph である。 頂点と辺を追加する時にプロパティの値を与える事ができる。

Refinement of

MutableGraphPropertyGraph

Notation

G Graph のモデルの型。
g 型が G のオブジェクト。
e 型が boost::graph_traits<G>::edge_descriptor のオブジェクト。
u,v 型が boost::graph_traits<G>::vertex_descriptor のオブジェクト。
ep型が G::edge_property_type のオブジェクト。
vp型が G::vertex_property_type のオブジェクト。

Associated Types

辺プロパティ型 graph_traits<G>::edge_property_type
頂点プロパティ型 graph_traits<G>::vertex_property_type

Valid Expressions

add_edge(u, v, ep, g) (u,v) をグラフ中に挿入し、オブジェクト ep を その辺のプロパティにコピーする。
返却値型: std::pair<edge_descriptor, bool>
add_vertex(vp, g) グラフに新しい頂点を追加し、vp を新しい頂点のプロパティにコピーする。 新しい頂点のための vertex_descriptor が返される。
返却値型: vertex_descriptor

Models

Concept Checking Class

  template <class G>
  struct MutablePropertyGraphConcept
  {
    typedef typename boost::graph_traits<G>::edge_descriptor edge_descriptor;
    void constraints() {
      function_requires< MutableGraphConcept<G> >();
      v = add_vertex(vp, g);
      p = add_edge(u, v, ep, g);
    }
    G g;
    std::pair<edge_descriptor, bool> p;
    typename boost::graph_traits<G>::vertex_descriptor u, v;
    typename boost::graph_traits<G>::vertex_property_type vp;
    typename boost::graph_traits<G>::edge_property_type ep;
  };


Copyright © 2000-2001 Jeremy Siek, Indiana University (jsiek@osl.iu.edu)

Japanese Translation Copyright © 2003 Takashi Itou
オリジナルの、及びこの著作権表示が全ての複製の中に現れる限り、この文書の複製、利用、変更、販売そして配布を認める。このドキュメントは「あるがまま」に提供されており、いかなる明示的、暗黙的保証も行わない。また、いかなる目的に対しても、その利用が適していることを関知しない。

このドキュメントの対象: Boost Version 1.29.0
最新版ドキュメント (英語)