1.1 --- a/src/work/marci_graph_concept.txt Mon Jan 12 11:50:52 2004 +0000
1.2 +++ b/src/work/marci_graph_concept.txt Fri Jan 16 11:20:09 2004 +0000
1.3 @@ -22,32 +22,32 @@
1.4 marci_property_vector.hh //property vector megvalosites indexelt grafokhoz
1.5 graf es iterator tipusok:
1.6
1.7 -class list_graph
1.8 +class list_graph;
1.9
1.10 -class node_iterator
1.11 +class node_iterator;
1.12 trivialis node iterator, csak cimezni lehet vele, pl property vectort
1.13
1.14 -class each_node_iterator
1.15 +class each_node_iterator;
1.16 node iterator a graf pontjainak bejarasara, node_iterator-a konvertalhato
1.17
1.18 -class edge_iterator
1.19 +class edge_iterator;
1.20 trivialis edge iterator, csak cimezni lehet vele, pl property vectort
1.21
1.22 -class each_edge_iterator
1.23 +class each_edge_iterator;
1.24 edge iterator a graf osszes elenek bejarasara
1.25
1.26 -class out_edge_iterator
1.27 +class out_edge_iterator;
1.28 edge iterator 1 pont ki eleinek bejarasara, edge_iterator-a konvertalhato
1.29
1.30 -class in_edge_iterator
1.31 +class in_edge_iterator;
1.32 edge iterator 1 pont be eleinek bejarasara, edge_iterator-a konvertalhato
1.33
1.34 -class sym_edge_iterator
1.35 +class sym_edge_iterator;
1.36 edge iterator 1 pont be es ki eleinek bejarasara, edge_iterator-a konvertalhato
1.37
1.38 default constructor:
1.39
1.40 -list_graph()
1.41 +list_graph();
1.42
1.43 A graf osztaly fobb publikus metodusai, az alapveto hasznalathoz:
1.44 Hasonlo funkciok megvalosithatok 1 kesobb leirt modon, illetve
1.45 @@ -58,30 +58,30 @@
1.46 out_edge_iterator(const node_iterator&) hasznalata nem javasolt,
1.47 esetleg majd szamuzzuk a concept-bol, s akkor nem nesz baj.
1.48
1.49 -each_node_iterator first_node()
1.50 -each_edge_iterator first_edge()
1.51 -out_edge_iterator first_out_edge(const node_iterator&)
1.52 -in_edge_iterator first_in_edge(const node_iterator&)
1.53 -sym_edge_iterator first_sym_edge(const node_iterator&)
1.54 +each_node_iterator first_node();
1.55 +each_edge_iterator first_edge();
1.56 +out_edge_iterator first_out_edge(const node_iterator&);
1.57 +in_edge_iterator first_in_edge(const node_iterator&);
1.58 +sym_edge_iterator first_sym_edge(const node_iterator&);
1.59
1.60 -node_iterator tail(const edge_iterator&)
1.61 -node_iterator head(const edge_iterator&)
1.62 +node_iterator tail(const edge_iterator&);
1.63 +node_iterator head(const edge_iterator&);
1.64
1.65 -node_iterator a_node(const out_edge_iterator&)
1.66 -node_iterator a_node(const in_edge_iterator&)
1.67 -node_iterator a_node(const sym_edge_iterator&)
1.68 +node_iterator a_node(const out_edge_iterator&);
1.69 +node_iterator a_node(const in_edge_iterator&);
1.70 +node_iterator a_node(const sym_edge_iterator&);
1.71 //az out, in or sym edge iterator rogzitett pontjara ad 1 node_iterator-t
1.72
1.73 -node_iterator b_node(const out_edge_iterator&)
1.74 -node_iterator b_node(const in_edge_iterator&)
1.75 -node_iterator b_node(const sym_edge_iterator&)
1.76 +node_iterator b_node(const out_edge_iterator&);
1.77 +node_iterator b_node(const in_edge_iterator&);
1.78 +node_iterator b_node(const sym_edge_iterator&);
1.79 //az out, in or sym edge iterator nem rogzitett pontjara ad 1 node_iterator-t
1.80
1.81 -node_iterator invalid_node()
1.82 -edge_iterator invalid_edge()
1.83 -out_edge_iterator invalid_out_edge()
1.84 -in_edge_iterator invalid_in_edge()
1.85 -sym_edge_iterator invalid_sym_edge()
1.86 +//node_iterator invalid_node();
1.87 +//edge_iterator invalid_edge();
1.88 +//out_edge_iterator invalid_out_edge();
1.89 +//in_edge_iterator invalid_in_edge();
1.90 +//sym_edge_iterator invalid_sym_edge();
1.91
1.92 //az iteratorok ures konstruktorai meghatarozatlan
1.93 tartalmu konstruktort adnak vissza, ezekkel a matodusokkal
1.94 @@ -90,121 +90,119 @@
1.95
1.96 Kiserleti cellal ugyanezen fv-ek mas stilusu megvalositasai:
1.97
1.98 -void get_first(each_node_iterator&)
1.99 -void get_first(each_edge_iterator&)
1.100 -void get_first(out_edge_iterator&, const node_iterator&)
1.101 -void get_first(in_edge_iterator&, const node_iterator&)
1.102 -void get_first(sym_edge_iterator&, const node_iterator&)
1.103 +void get_first(each_node_iterator&);
1.104 +void get_first(each_edge_iterator&);
1.105 +void get_first(out_edge_iterator&, const node_iterator&);
1.106 +void get_first(in_edge_iterator&, const node_iterator&);
1.107 +void get_first(sym_edge_iterator&, const node_iterator&);
1.108
1.109 -void get_tail(node_iterator&, const edge_iterator&)
1.110 -void get_head(node_iterator&, const edge_iterator&)
1.111 +void get_tail(node_iterator&, const edge_iterator&);
1.112 +void get_head(node_iterator&, const edge_iterator&);
1.113
1.114 -void get_a_node(node_iterator&, const out_edge_iterator&)
1.115 -void get_a_node(node_iterator&, const in_edge_iterator&)
1.116 -void get_a_node(node_iterator&, const sym_edge_iterator&)
1.117 +void get_a_node(node_iterator&, const out_edge_iterator&);
1.118 +void get_a_node(node_iterator&, const in_edge_iterator&);
1.119 +void get_a_node(node_iterator&, const sym_edge_iterator&);
1.120
1.121 -void get_b_node(node_iterator&, const out_edge_iterator&)
1.122 -void get_b_node(node_iterator&, const in_edge_iterator&)
1.123 -void get_b_node(node_iterator&, const sym_edge_iterator&)
1.124 +void get_b_node(node_iterator&, const out_edge_iterator&);
1.125 +void get_b_node(node_iterator&, const in_edge_iterator&);
1.126 +void get_b_node(node_iterator&, const sym_edge_iterator&);
1.127
1.128 -void get_invalid(node_iterator&)
1.129 -void get_invalid(edge_iterator&)
1.130 -void get_invalid(out_edge_iterator&)
1.131 -void get_invalid(in_edge_iterator&)
1.132 -void get_invalid(sym_edge_iterator&)
1.133 +//void get_invalid(node_iterator&);
1.134 +//void get_invalid(edge_iterator&);
1.135 +//void get_invalid(out_edge_iterator&);
1.136 +//void get_invalid(in_edge_iterator&);
1.137 +//void get_invalid(sym_edge_iterator&);
1.138
1.139 Pontok azonositasara de meginkabb property vectorokhoz:
1.140
1.141 -int id(const node_iterator&)
1.142 -int id(const edge_iterator&)
1.143 +int id(const node_iterator&);
1.144 +int id(const edge_iterator&);
1.145
1.146 Pontok es elek hozzaadasanak metodusai:
1.147
1.148 -node_iterator add_node()
1.149 -edge_iterator add_edge(const node_iterator&, const node_iterator&)
1.150 +node_iterator add_node();
1.151 +edge_iterator add_edge(const node_iterator&, const node_iterator&);
1.152
1.153 Hogy konnyebb legyen a progikat tesztelni, nehany stream utasitas:
1.154 ezek nem a list_graph metodusai
1.155
1.156 -friend std::ostream& operator<<(std::ostream&, const node_iterator&)
1.157 -friend std::ostream& operator<<(std::ostream&, const edge_iterator&)
1.158 +friend std::ostream& operator<<(std::ostream&, const node_iterator&);
1.159 +friend std::ostream& operator<<(std::ostream&, const edge_iterator&);
1.160
1.161 node_iterator metodusai:
1.162 -node_iterator()
1.163 -bool is_valid()
1.164 +node_iterator();
1.165 +bool is_valid();
1.166 +void make_invalid();
1.167 ezek nem tagfuggvenyek:
1.168 -friend bool operator==(const node_iterator&, const node_iterator&)
1.169 -friend bool operator!=(const node_iterator& u, const node_iterator& v)
1.170 +friend bool operator==(const node_iterator&, const node_iterator&);
1.171 +friend bool operator!=(const node_iterator& u, const node_iterator& v);
1.172
1.173 each_node_iterator metodusai:
1.174 ez publikusan szarmazik a node_iterator-bol, tehat a fentiek is.
1.175 -each_node_iterator()
1.176 -each_node_iterator& operator++()
1.177 +each_node_iterator();
1.178 +each_node_iterator& operator++();
1.179
1.180 edge_iterator metodusai:
1.181 -edge_iterator()
1.182 -bool is_valid()
1.183 +edge_iterator();
1.184 +bool is_valid();
1.185 +void make_invalid();
1.186 ezek nem tagfvek:
1.187 -friend bool operator==(const edge_iterator&, const edge_iterator&)
1.188 -friend bool operator!=(const edge_iterator&, const edge_iterator&)
1.189 +friend bool operator==(const edge_iterator&, const edge_iterator&);
1.190 +friend bool operator!=(const edge_iterator&, const edge_iterator&);
1.191 ujra tagfv-ek.
1.192 -//node_iterator tail_node() const nem javasolt
1.193 -//node_iterator head_node() const nem javasolt
1.194 +//node_iterator tail_node() const; nem javasolt
1.195 +//node_iterator head_node() const; nem javasolt
1.196
1.197 each_edge_iterator metodusai:
1.198 edge_iterator-bol szarmazik
1.199 -each_edge_iterator()
1.200 -each_edge_iterator& operator++()
1.201 +each_edge_iterator();
1.202 +each_edge_iterator& operator++();
1.203
1.204 out_edge_iterator metodusai:
1.205 edge_iterator-bol szarmazik
1.206 -out_edge_iterator()
1.207 -//out_edge_iterator(const node_iterator&) nem javasolt
1.208 -out_edge_iterator& operator++()
1.209 -//node_iterator a_node() const nem javasolt
1.210 -//node_iterator b_node() const
1.211 +out_edge_iterator();
1.212 +//out_edge_iterator(const node_iterator&); nem javasolt
1.213 +out_edge_iterator& operator++();
1.214 +//node_iterator a_node() const; nem javasolt
1.215 +//node_iterator b_node() const;
1.216
1.217
1.218 in_edge_iterator metodusai:
1.219 edge_iterator-bol szarmazik
1.220 -in_edge_iterator()
1.221 -//in_edge_iterator(const node_iterator&) nem javasolt
1.222 -in_edge_iterator& operator++()
1.223 -//node_iterator a_node() const nem javasolt
1.224 -//node_iterator b_node() const
1.225 +in_edge_iterator();
1.226 +//in_edge_iterator(const node_iterator&); nem javasolt
1.227 +in_edge_iterator& operator++();
1.228 +//node_iterator a_node() const; nem javasolt
1.229 +//node_iterator b_node() const;
1.230
1.231
1.232 sym_edge_iterator metodusai:
1.233 edge_iterator-bol szarmazik
1.234 -sym_edge_iterator()
1.235 -//sym_edge_iterator(const node_iterator&) nem javasolt
1.236 -sym_edge_iterator& operator++()
1.237 -//node_iterator a_node() const nem javasolt
1.238 -//node_iterator b_node() const
1.239 +sym_edge_iterator();
1.240 +//sym_edge_iterator(const node_iterator&); nem javasolt
1.241 +sym_edge_iterator& operator++();
1.242 +//node_iterator a_node() const; nem javasolt
1.243 +//node_iterator b_node() const;
1.244
1.245 Node propery array-okrol:
1.246
1.247 template <typename graph_type, typename T>
1.248 -class node_property_vector
1.249 +class node_property_vector;
1.250
1.251 metodusok:
1.252
1.253 -node_property_vector(graph_type&)
1.254 -node_property_vector(graph_type&, T a)
1.255 -fill constructor, a-val kitolt
1.256 -void put(graph_traits<graph_type>::node_iterator, const T&)
1.257 -T get(graph_traits<graph_type>::node_iterator)
1.258 +node_property_vector(graph_type&);
1.259 +void put(graph_traits<graph_type>::node_iterator, const T&);
1.260 +T get(graph_traits<graph_type>::node_iterator);
1.261
1.262 Ugyanez edge_property_array-okkal
1.263
1.264 template <typename graph_type, typename T>
1.265 -class edge_property_vector
1.266 +class edge_property_vector;
1.267
1.268 -edge_property_vector(graph_type&)
1.269 -edge_property_vector(graph_type&, T a)
1.270 -fill constructor, a-val kitolt
1.271 -void put(graph_traits<graph_type>::edge_iterator, const T&)
1.272 -get(graph_traits<graph_type>::edge_iterator)
1.273 +edge_property_vector(graph_type&);
1.274 +void put(graph_traits<graph_type>::edge_iterator, const T&);
1.275 +get(graph_traits<graph_type>::edge_iterator);
1.276
1.277 Ennyi nem javasolas utan, meg nehany szo.
1.278 Alparral ugy gondoltuk, hogy az iterator 1 olyan egyszeru objetum legyen
1.279 @@ -216,7 +214,4 @@
1.280 at a propertyket az algoritmusoknak, algoritmus-objektumoknak.
1.281 Errol majd kesobb.
1.282
1.283 -marci@cs.elte.hu
1.284 -
1.285 -
1.286 -
1.287 +marci@cs.elte.hu
1.288 \ No newline at end of file