# HG changeset patch # User marci # Date 1074252009 0 # Node ID e41c71268807f17915b055316bee9928635177ef # Parent 99014d576aeddfc6556742559b9ad18e558c802c new method for making invalid iterators: make_invalid() diff -r 99014d576aed -r e41c71268807 src/work/marci_graph_concept.txt --- a/src/work/marci_graph_concept.txt Mon Jan 12 11:50:52 2004 +0000 +++ b/src/work/marci_graph_concept.txt Fri Jan 16 11:20:09 2004 +0000 @@ -22,32 +22,32 @@ marci_property_vector.hh //property vector megvalosites indexelt grafokhoz graf es iterator tipusok: -class list_graph +class list_graph; -class node_iterator +class node_iterator; trivialis node iterator, csak cimezni lehet vele, pl property vectort -class each_node_iterator +class each_node_iterator; node iterator a graf pontjainak bejarasara, node_iterator-a konvertalhato -class edge_iterator +class edge_iterator; trivialis edge iterator, csak cimezni lehet vele, pl property vectort -class each_edge_iterator +class each_edge_iterator; edge iterator a graf osszes elenek bejarasara -class out_edge_iterator +class out_edge_iterator; edge iterator 1 pont ki eleinek bejarasara, edge_iterator-a konvertalhato -class in_edge_iterator +class in_edge_iterator; edge iterator 1 pont be eleinek bejarasara, edge_iterator-a konvertalhato -class sym_edge_iterator +class sym_edge_iterator; edge iterator 1 pont be es ki eleinek bejarasara, edge_iterator-a konvertalhato default constructor: -list_graph() +list_graph(); A graf osztaly fobb publikus metodusai, az alapveto hasznalathoz: Hasonlo funkciok megvalosithatok 1 kesobb leirt modon, illetve @@ -58,30 +58,30 @@ out_edge_iterator(const node_iterator&) hasznalata nem javasolt, esetleg majd szamuzzuk a concept-bol, s akkor nem nesz baj. -each_node_iterator first_node() -each_edge_iterator first_edge() -out_edge_iterator first_out_edge(const node_iterator&) -in_edge_iterator first_in_edge(const node_iterator&) -sym_edge_iterator first_sym_edge(const node_iterator&) +each_node_iterator first_node(); +each_edge_iterator first_edge(); +out_edge_iterator first_out_edge(const node_iterator&); +in_edge_iterator first_in_edge(const node_iterator&); +sym_edge_iterator first_sym_edge(const node_iterator&); -node_iterator tail(const edge_iterator&) -node_iterator head(const edge_iterator&) +node_iterator tail(const edge_iterator&); +node_iterator head(const edge_iterator&); -node_iterator a_node(const out_edge_iterator&) -node_iterator a_node(const in_edge_iterator&) -node_iterator a_node(const sym_edge_iterator&) +node_iterator a_node(const out_edge_iterator&); +node_iterator a_node(const in_edge_iterator&); +node_iterator a_node(const sym_edge_iterator&); //az out, in or sym edge iterator rogzitett pontjara ad 1 node_iterator-t -node_iterator b_node(const out_edge_iterator&) -node_iterator b_node(const in_edge_iterator&) -node_iterator b_node(const sym_edge_iterator&) +node_iterator b_node(const out_edge_iterator&); +node_iterator b_node(const in_edge_iterator&); +node_iterator b_node(const sym_edge_iterator&); //az out, in or sym edge iterator nem rogzitett pontjara ad 1 node_iterator-t -node_iterator invalid_node() -edge_iterator invalid_edge() -out_edge_iterator invalid_out_edge() -in_edge_iterator invalid_in_edge() -sym_edge_iterator invalid_sym_edge() +//node_iterator invalid_node(); +//edge_iterator invalid_edge(); +//out_edge_iterator invalid_out_edge(); +//in_edge_iterator invalid_in_edge(); +//sym_edge_iterator invalid_sym_edge(); //az iteratorok ures konstruktorai meghatarozatlan tartalmu konstruktort adnak vissza, ezekkel a matodusokkal @@ -90,121 +90,119 @@ Kiserleti cellal ugyanezen fv-ek mas stilusu megvalositasai: -void get_first(each_node_iterator&) -void get_first(each_edge_iterator&) -void get_first(out_edge_iterator&, const node_iterator&) -void get_first(in_edge_iterator&, const node_iterator&) -void get_first(sym_edge_iterator&, const node_iterator&) +void get_first(each_node_iterator&); +void get_first(each_edge_iterator&); +void get_first(out_edge_iterator&, const node_iterator&); +void get_first(in_edge_iterator&, const node_iterator&); +void get_first(sym_edge_iterator&, const node_iterator&); -void get_tail(node_iterator&, const edge_iterator&) -void get_head(node_iterator&, const edge_iterator&) +void get_tail(node_iterator&, const edge_iterator&); +void get_head(node_iterator&, const edge_iterator&); -void get_a_node(node_iterator&, const out_edge_iterator&) -void get_a_node(node_iterator&, const in_edge_iterator&) -void get_a_node(node_iterator&, const sym_edge_iterator&) +void get_a_node(node_iterator&, const out_edge_iterator&); +void get_a_node(node_iterator&, const in_edge_iterator&); +void get_a_node(node_iterator&, const sym_edge_iterator&); -void get_b_node(node_iterator&, const out_edge_iterator&) -void get_b_node(node_iterator&, const in_edge_iterator&) -void get_b_node(node_iterator&, const sym_edge_iterator&) +void get_b_node(node_iterator&, const out_edge_iterator&); +void get_b_node(node_iterator&, const in_edge_iterator&); +void get_b_node(node_iterator&, const sym_edge_iterator&); -void get_invalid(node_iterator&) -void get_invalid(edge_iterator&) -void get_invalid(out_edge_iterator&) -void get_invalid(in_edge_iterator&) -void get_invalid(sym_edge_iterator&) +//void get_invalid(node_iterator&); +//void get_invalid(edge_iterator&); +//void get_invalid(out_edge_iterator&); +//void get_invalid(in_edge_iterator&); +//void get_invalid(sym_edge_iterator&); Pontok azonositasara de meginkabb property vectorokhoz: -int id(const node_iterator&) -int id(const edge_iterator&) +int id(const node_iterator&); +int id(const edge_iterator&); Pontok es elek hozzaadasanak metodusai: -node_iterator add_node() -edge_iterator add_edge(const node_iterator&, const node_iterator&) +node_iterator add_node(); +edge_iterator add_edge(const node_iterator&, const node_iterator&); Hogy konnyebb legyen a progikat tesztelni, nehany stream utasitas: ezek nem a list_graph metodusai -friend std::ostream& operator<<(std::ostream&, const node_iterator&) -friend std::ostream& operator<<(std::ostream&, const edge_iterator&) +friend std::ostream& operator<<(std::ostream&, const node_iterator&); +friend std::ostream& operator<<(std::ostream&, const edge_iterator&); node_iterator metodusai: -node_iterator() -bool is_valid() +node_iterator(); +bool is_valid(); +void make_invalid(); ezek nem tagfuggvenyek: -friend bool operator==(const node_iterator&, const node_iterator&) -friend bool operator!=(const node_iterator& u, const node_iterator& v) +friend bool operator==(const node_iterator&, const node_iterator&); +friend bool operator!=(const node_iterator& u, const node_iterator& v); each_node_iterator metodusai: ez publikusan szarmazik a node_iterator-bol, tehat a fentiek is. -each_node_iterator() -each_node_iterator& operator++() +each_node_iterator(); +each_node_iterator& operator++(); edge_iterator metodusai: -edge_iterator() -bool is_valid() +edge_iterator(); +bool is_valid(); +void make_invalid(); ezek nem tagfvek: -friend bool operator==(const edge_iterator&, const edge_iterator&) -friend bool operator!=(const edge_iterator&, const edge_iterator&) +friend bool operator==(const edge_iterator&, const edge_iterator&); +friend bool operator!=(const edge_iterator&, const edge_iterator&); ujra tagfv-ek. -//node_iterator tail_node() const nem javasolt -//node_iterator head_node() const nem javasolt +//node_iterator tail_node() const; nem javasolt +//node_iterator head_node() const; nem javasolt each_edge_iterator metodusai: edge_iterator-bol szarmazik -each_edge_iterator() -each_edge_iterator& operator++() +each_edge_iterator(); +each_edge_iterator& operator++(); out_edge_iterator metodusai: edge_iterator-bol szarmazik -out_edge_iterator() -//out_edge_iterator(const node_iterator&) nem javasolt -out_edge_iterator& operator++() -//node_iterator a_node() const nem javasolt -//node_iterator b_node() const +out_edge_iterator(); +//out_edge_iterator(const node_iterator&); nem javasolt +out_edge_iterator& operator++(); +//node_iterator a_node() const; nem javasolt +//node_iterator b_node() const; in_edge_iterator metodusai: edge_iterator-bol szarmazik -in_edge_iterator() -//in_edge_iterator(const node_iterator&) nem javasolt -in_edge_iterator& operator++() -//node_iterator a_node() const nem javasolt -//node_iterator b_node() const +in_edge_iterator(); +//in_edge_iterator(const node_iterator&); nem javasolt +in_edge_iterator& operator++(); +//node_iterator a_node() const; nem javasolt +//node_iterator b_node() const; sym_edge_iterator metodusai: edge_iterator-bol szarmazik -sym_edge_iterator() -//sym_edge_iterator(const node_iterator&) nem javasolt -sym_edge_iterator& operator++() -//node_iterator a_node() const nem javasolt -//node_iterator b_node() const +sym_edge_iterator(); +//sym_edge_iterator(const node_iterator&); nem javasolt +sym_edge_iterator& operator++(); +//node_iterator a_node() const; nem javasolt +//node_iterator b_node() const; Node propery array-okrol: template -class node_property_vector +class node_property_vector; metodusok: -node_property_vector(graph_type&) -node_property_vector(graph_type&, T a) -fill constructor, a-val kitolt -void put(graph_traits::node_iterator, const T&) -T get(graph_traits::node_iterator) +node_property_vector(graph_type&); +void put(graph_traits::node_iterator, const T&); +T get(graph_traits::node_iterator); Ugyanez edge_property_array-okkal template -class edge_property_vector +class edge_property_vector; -edge_property_vector(graph_type&) -edge_property_vector(graph_type&, T a) -fill constructor, a-val kitolt -void put(graph_traits::edge_iterator, const T&) -get(graph_traits::edge_iterator) +edge_property_vector(graph_type&); +void put(graph_traits::edge_iterator, const T&); +get(graph_traits::edge_iterator); Ennyi nem javasolas utan, meg nehany szo. Alparral ugy gondoltuk, hogy az iterator 1 olyan egyszeru objetum legyen @@ -216,7 +214,4 @@ at a propertyket az algoritmusoknak, algoritmus-objektumoknak. Errol majd kesobb. -marci@cs.elte.hu - - - +marci@cs.elte.hu \ No newline at end of file