COIN-OR::LEMON - Graph Library

Changeset 107:8d62f0072ff0 in lemon-0.x


Ignore:
Timestamp:
02/20/04 22:59:34 (20 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@142
Message:

marci -> hugo
resize -> update

Location:
src/work
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • src/work/edmonds_karp.hh

    r100 r107  
    99#include <time_measure.h>
    1010
    11 namespace marci {
     11namespace hugo {
    1212
    1313  template<typename Graph, typename Number, typename FlowMap, typename CapacityMap>
     
    541541    void set(NodeIt nit, T a) { container[G.id(nit)]=a; }
    542542    T get(NodeIt nit) const { return container[G.id(nit)]; }
    543     //void resize() { container.resize(G.node_id); }
    544     //void resize(T a) { container.resize(G.node_id, a); }
     543    //void update() { container.resize(G.node_id); }
     544    //void update(T a) { container.resize(G.node_id, a); }
    545545  };
    546546*/
     
    647647
    648648
    649 } // namespace marci
     649} // namespace hugo
    650650
    651651#endif //EDMONDS_KARP_HH
  • src/work/flow_test.cc

    r33 r107  
    1111#include <dijkstra.hh>
    1212
    13 using namespace marci;
     13using namespace hugo;
    1414
    1515
  • src/work/iterator_bfs_demo.cc

    r99 r107  
    77#include <graph_wrapper.h>
    88
    9 using namespace marci;
     9using namespace hugo;
    1010
    1111int main (int, char*[])
  • src/work/iterator_bfs_dfs_demo.cc

    r59 r107  
    66#include <bfs_iterator.hh>
    77
    8 using namespace marci;
     8using namespace hugo;
    99
    1010int main (int, char*[])
  • src/work/list_graph.hh

    r94 r107  
    55#include <vector>
    66
    7 namespace marci {
     7namespace hugo {
    88
    99  template <typename It>
     
    5050      T& operator[](NodeIt n) { return container[/*G.id(n)*/n.node->id]; }
    5151      const T& operator[](NodeIt n) const { return container[/*G.id(n)*/n.node->id]; }
    52       void resize() { container.resize(G.node_id); }
    53       void resize(T a) { container.resize(G.node_id, a); }
     52      void update() { container.resize(G.node_id); }
     53      void update(T a) { container.resize(G.node_id, a); }
    5454    };
    5555
     
    6868      T& operator[](EdgeIt e) { return container[/*G.id(e)*/e.edge->id]; }
    6969      const T& operator[](EdgeIt e) const { return container[/*G.id(e)*/e.edge->id]; }
    70       void resize() { container.resize(G.edge_id); }
    71       void resize(T a) { container.resize(G.edge_id, a); }
     70      void update() { container.resize(G.edge_id); }
     71      void update(T a) { container.resize(G.edge_id, a); }
    7272    };
    7373
     
    307307   
    308308    template <typename It> It next(It it) const {
    309       It tmp(it); return goNext(it); }
     309      It tmp(it); return goNext(tmp); }
    310310    template <typename It> It& goNext(It& it) const { return ++it; }
    311311   
     
    509509  };
    510510
    511   /*
    512   template< typename T >
    513   T ListGraph::first() const {
    514     std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>();" << std::endl;
    515     return T();
    516   }
    517 
    518   template<>
    519   ListGraph::EachNodeIt ListGraph::first<ListGraph::EachNodeIt>() const {
    520     return firstNode();
    521   }
    522 
    523   template<>
    524   ListGraph::EachEdgeIt ListGraph::first<ListGraph::EachEdgeIt>() const {
    525     return firstEdge();
    526   }
    527 
    528   template< typename T >
    529   T ListGraph::first(ListGraph::NodeIt v) const {
    530     std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>(ListGRaph::NodeIt);" << std::endl;
    531     return T();
    532   }
    533 
    534   template<>
    535   ListGraph::OutEdgeIt ListGraph::first<ListGraph::OutEdgeIt>(const ListGraph::NodeIt v) const {
    536     return firstOutEdge(v);
    537   }
    538 
    539   template<>
    540   ListGraph::InEdgeIt ListGraph::first<ListGraph::InEdgeIt>(const ListGraph::NodeIt v) const {
    541     return firstInEdge(v);
    542   }
    543 
    544   template<>
    545   ListGraph::SymEdgeIt ListGraph::first<ListGraph::SymEdgeIt>(const ListGraph::NodeIt v) const {
    546     return firstSymEdge(v);
    547   }
    548   */
    549 
    550 
    551 } //namespace marci
     511//   template< typename T >
     512//   T ListGraph::first() const {
     513//     std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>();" << std::endl;
     514//     return T();
     515//   }
     516
     517//   template<>
     518//   ListGraph::EachNodeIt ListGraph::first<ListGraph::EachNodeIt>() const {
     519//     return firstNode();
     520//   }
     521
     522//   template<>
     523//   ListGraph::EachEdgeIt ListGraph::first<ListGraph::EachEdgeIt>() const {
     524//     return firstEdge();
     525//   }
     526
     527//   template< typename T >
     528//   T ListGraph::first(ListGraph::NodeIt v) const {
     529//     std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>(ListGRaph::NodeIt);" << std::endl;
     530//     return T();
     531//   }
     532
     533//   template<>
     534//   ListGraph::OutEdgeIt ListGraph::first<ListGraph::OutEdgeIt>(const ListGraph::NodeIt v) const {
     535//     return firstOutEdge(v);
     536//   }
     537
     538//   template<>
     539//   ListGraph::InEdgeIt ListGraph::first<ListGraph::InEdgeIt>(const ListGraph::NodeIt v) const {
     540//     return firstInEdge(v);
     541//   }
     542
     543//   template<>
     544//   ListGraph::SymEdgeIt ListGraph::first<ListGraph::SymEdgeIt>(const ListGraph::NodeIt v) const {
     545//     return firstSymEdge(v);
     546//   }
     547
     548
     549} //namespace hugo
    552550
    553551#endif //LIST_GRAPH_HH
  • src/work/marci_bfs.hh

    r19 r107  
    66#include <marci_property_vector.hh>
    77
    8 namespace marci {
     8namespace hugo {
    99
    1010  template <typename graph_type>
     
    172172  };
    173173
    174 } // namespace marci
     174} // namespace hugo
    175175
    176176#endif //MARCI_BFS_HH
  • src/work/marci_graph_demo.cc

    r75 r107  
    77#include <edmonds_karp.hh>
    88
    9 using namespace marci;
     9using namespace hugo;
    1010
    1111int main (int, char*[])
  • src/work/marci_graph_traits.hh

    r9 r107  
    22#define MARCI_GRAPH_TRAITS_HH
    33
    4 namespace marci {
     4namespace hugo {
    55
    66  template <typename graph_type>
     
    1515  };
    1616
    17 } // namespace marci
     17} // namespace hugo
    1818
    1919#endif //MARCI_GRAPH_TRAITS_HH
  • src/work/marci_list_graph.hh

    r19 r107  
    44#include <iostream>
    55
    6 namespace marci {
     6namespace hugo {
    77
    88  class list_graph {
     
    339339
    340340
    341 } //namespace marci
     341} //namespace hugo
    342342
    343343#endif //MARCI_LIST_GRAPH_HH
  • src/work/marci_max_flow.hh

    r19 r107  
    77#include <marci_bfs.hh>
    88
    9 namespace marci {
     9namespace hugo {
    1010
    1111  template<typename graph_type, typename T>
     
    179179  };
    180180
    181 } // namespace marci
     181} // namespace hugo
    182182
    183183#endif //MARCI_MAX_FLOW_HH
  • src/work/marci_property_vector.hh

    r19 r107  
    44#include <vector>
    55
    6 namespace marci {
     6namespace hugo {
    77
    88  template <typename iterator>
     
    1515  template <typename graph_type, typename T>
    1616  class node_property_vector {
    17     typedef typename list_graph::node_iterator node_iterator;
    18     typedef typename list_graph::each_node_iterator each_node_iterator;
     17    typedef typename graph_type::node_iterator node_iterator;
     18    typedef typename graph_type::each_node_iterator each_node_iterator;
    1919    graph_type& G;
    2020    std::vector<T> container;
     
    5353  };
    5454
    55 } // namespace marci
     55} // namespace hugo
    5656
    5757#endif //MARCI_PROPERTY_VECTOR_HH
Note: See TracChangeset for help on using the changeset viewer.