COIN-OR::LEMON - Graph Library

Changeset 515:a7eeb8af6b34 in lemon-0.x for src


Ignore:
Timestamp:
05/03/04 19:06:38 (20 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@675
Message:

To be compatible with gcc-3.4.0 ...

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/include/skeletons/graph.h

    r503 r515  
    8888      NodeIt(Invalid) {}
    8989      /// Sets the iterator to the first node of \c G.
    90       NodeIt(const GraphSkeleton &G) {}
     90      NodeIt(const GraphSkeleton &) {}
    9191      /// @warning The default constructor sets the iterator
    9292      /// to an undefined value.
     
    135135      ///@param n the node
    136136      ///@param G the graph
    137       OutEdgeIt(const GraphSkeleton & G, Node n) {}
     137      OutEdgeIt(const GraphSkeleton &, Node) {}
    138138    };
    139139
     
    286286      typedef Node KeyType;
    287287
    288       NodeMap(const GraphSkeleton &G) {}
    289       NodeMap(const GraphSkeleton &G, T t) {}
    290 
    291       template<typename TT> NodeMap(const NodeMap<TT> &m) {}
     288      NodeMap(const GraphSkeleton &) {}
     289      NodeMap(const GraphSkeleton &, T) {}
     290
     291      template<typename TT> NodeMap(const NodeMap<TT> &) {}
    292292
    293293      /// Sets the value of a node.
     
    324324      typedef Edge KeyType;
    325325
    326       EdgeMap(const GraphSkeleton &G) {}
    327       EdgeMap(const GraphSkeleton &G, T t) {}
     326      EdgeMap(const GraphSkeleton &) {}
     327      EdgeMap(const GraphSkeleton &, T ) {}
    328328   
    329329      ///\todo It can copy between different types.
    330330      ///
    331       template<typename TT> EdgeMap(const EdgeMap<TT> &m) {}
     331      template<typename TT> EdgeMap(const EdgeMap<TT> &) {}
    332332
    333333      void set(Edge, T) {}
  • src/test/graph_test.cc

    r504 r515  
    109109  {
    110110    Node k;
    111     typename Graph::NodeMap<int> m(G);
    112     typename Graph::NodeMap<int> const &cm = m;  //Const map
    113     typename Graph::NodeMap<int> mdef(G,12); //Inicialize with default value
    114     typename Graph::NodeMap<int> mm(cm);   //Copy
    115     typename Graph::NodeMap<double> dm(cm); //Copy from another type
     111    typename Graph::template NodeMap<int> m(G);
     112    typename Graph::template NodeMap<int> const &cm = m;  //Const map
     113    //Inicialize with default value
     114    typename Graph::template NodeMap<int> mdef(G,12);
     115    typename Graph::template NodeMap<int> mm(cm);   //Copy
     116    typename Graph::template NodeMap<double> dm(cm); //Copy from another type
    116117    int v;
    117118    v=m[k]; m[k]=v; m.set(k,v);
     
    123124  { //bool NodeMap
    124125    Node k;
    125     typename Graph::NodeMap<bool> m(G);
    126     typename Graph::NodeMap<bool> const &cm = m;  //Const map
    127     typename Graph::NodeMap<bool> mdef(G,12); //Inicialize with default value
    128     typename Graph::NodeMap<bool> mm(cm);   //Copy
    129     typename Graph::NodeMap<int> dm(cm); //Copy from another type
     126    typename Graph::template NodeMap<bool> m(G);
     127    typename Graph::template NodeMap<bool> const &cm = m;  //Const map
     128    //Inicialize with default value
     129    typename Graph::template NodeMap<bool> mdef(G,12);
     130    typename Graph::template NodeMap<bool> mm(cm);   //Copy
     131    typename Graph::template NodeMap<int> dm(cm); //Copy from another type
    130132    bool v;
    131133    v=m[k]; m[k]=v; m.set(k,v);
     
    139141  {
    140142    Edge k;
    141     typename Graph::EdgeMap<int> m(G);
    142     typename Graph::EdgeMap<int> const &cm = m;  //Const map
    143     typename Graph::EdgeMap<int> mdef(G,12); //Inicialize with default value
    144     typename Graph::EdgeMap<int> mm(cm);   //Copy
    145     typename Graph::EdgeMap<double> dm(cm); //Copy from another type
     143    typename Graph::template EdgeMap<int> m(G);
     144    typename Graph::template EdgeMap<int> const &cm = m;  //Const map
     145    //Inicialize with default value
     146    typename Graph::template EdgeMap<int> mdef(G,12);
     147    typename Graph::template EdgeMap<int> mm(cm);   //Copy
     148    typename Graph::template EdgeMap<double> dm(cm); //Copy from another type
    146149    int v;
    147150    v=m[k]; m[k]=v; m.set(k,v);
     
    153156  { //bool EdgeMap
    154157    Edge k;
    155     typename Graph::EdgeMap<bool> m(G);
    156     typename Graph::EdgeMap<bool> const &cm = m;  //Const map
    157     typename Graph::EdgeMap<bool> mdef(G,12); //Inicialize with default value
    158     typename Graph::EdgeMap<bool> mm(cm);   //Copy
    159     typename Graph::EdgeMap<int> dm(cm); //Copy from another type
     158    typename Graph::template EdgeMap<bool> m(G);
     159    typename Graph::template EdgeMap<bool> const &cm = m;  //Const map
     160    //Inicialize with default value
     161    typename Graph::template EdgeMap<bool> mdef(G,12);
     162    typename Graph::template EdgeMap<bool> mm(cm);   //Copy
     163    typename Graph::template EdgeMap<int> dm(cm); //Copy from another type
    160164    bool v;
    161165    v=m[k]; m[k]=v; m.set(k,v);
  • src/work/alpar/list_graph.h

    r508 r515  
    6464      const ListGraph* G;
    6565    public:
    66       virtual void add(const Key k) = NULL;
    67       virtual void erase(const Key k) = NULL;
     66      virtual void add(const Key k) = 0;
     67      virtual void erase(const Key k) = 0;
    6868      DynMapBase(const ListGraph &_G) : G(&_G) {}
    6969      virtual ~DynMapBase() {}
     
    764764      const NodeSet* G;
    765765    public:
    766       virtual void add(const Key k) = NULL;
    767       virtual void erase(const Key k) = NULL;
     766      virtual void add(const Key k) = 0;
     767      virtual void erase(const Key k) = 0;
    768768      DynMapBase(const NodeSet &_G) : G(&_G) {}
    769769      virtual ~DynMapBase() {}
     
    11531153    NodeGraphType &G;
    11541154
     1155  public:
    11551156    class Node;
    1156    
     1157
     1158  private:
    11571159    //Edges are double linked.
    11581160    //The free edges are only single linked using the "next_in" field.
     
    11711173
    11721174   
    1173     typename NodeGraphType::NodeMap<NodeT> nodes;
     1175    typename NodeGraphType::template NodeMap<NodeT> nodes;
    11741176   
    11751177    std::vector<EdgeT> edges;
     
    11841186      const EdgeSet* G;
    11851187    public:
    1186       virtual void add(const Key k) = NULL;
    1187       virtual void erase(const Key k) = NULL;
     1188      virtual void add(const Key k) = 0;
     1189      virtual void erase(const Key k) = 0;
    11881190      DynMapBase(const EdgeSet &_G) : G(&_G) {}
    11891191      virtual ~DynMapBase() {}
     
    14501452        for(G.first(m);
    14511453            G.valid(m) && G.nodes[m].first_in == -1;  G.next(m));
    1452         n = G.valid(m)?-1:G.nodes[m].first_in;
     1454        //AJJAJ! This is a non sense!!!!!!!
     1455        this->n = G.valid(m)?-1:G.nodes[m].first_in;
    14531456      }
    14541457      EdgeIt (Invalid i) : Edge(i) { }
     
    14561459      ///\bug This is a workaround until somebody tells me how to
    14571460      ///make class \c SymEdgeSet::SymEdgeMap friend of Edge
    1458       int &idref() {return n;}
     1461      int &idref() {return this->n;}
    14591462    };
    14601463   
     
    14761479    };
    14771480
    1478     template <typename T> class NodeMap : public NodeGraphType::NodeMap<T>
     1481    template <typename T> class NodeMap :
     1482      public NodeGraphType::template NodeMap<T>
    14791483    {
    14801484    public:
    14811485      NodeMap(const EdgeSet &_G) :
    1482         NodeGraphType::NodeMap<T>(_G.G) { }
     1486        NodeGraphType::NodeMap(_G.G) { } //AJAJJ <T> would be wrong!!!
    14831487      NodeMap(const EdgeSet &_G,const T &t) :
    1484         NodeGraphType::NodeMap<T>(_G.G,t) { }
     1488        NodeGraphType::NodeMap(_G.G,t) { }
    14851489      //It is unnecessary
    1486       NodeMap(const typename NodeGraphType::NodeMap<T> &m)
    1487         : NodeGraphType::NodeMap<T>(m) { }
     1490      NodeMap(const typename NodeGraphType::template NodeMap<T> &m) :
     1491        NodeGraphType::NodeMap(m) { }
    14881492
    14891493      ///\todo It can copy between different types.
    14901494      ///
    14911495      template<typename TT>
    1492       NodeMap(const typename NodeGraphType::NodeMap<TT> &m)
    1493         : NodeGraphType::NodeMap<T>(m) { }
     1496      NodeMap(const typename NodeGraphType::template NodeMap<TT> &m)
     1497        : NodeGraphType::NodeMap(m) { }
    14941498    };
    14951499   
Note: See TracChangeset for help on using the changeset viewer.