COIN-OR::LEMON - Graph Library

Changeset 713:57c0b110b31e in lemon-0.x for src/hugo


Ignore:
Timestamp:
07/20/04 12:58:11 (20 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@965
Message:

Oops: "static" and "const" does not like each other.

Location:
src/hugo
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/hugo/full_graph.h

    r710 r713  
    7878      e=InEdgeIt(*this,v); return e; }
    7979
    80     static bool valid(Edge e) const { return e.n!=-1; }
    81     static bool valid(Node n) const { return n.n!=-1; }
     80    static bool valid(Edge e) { return e.n!=-1; }
     81    static bool valid(Node n) { return n.n!=-1; }
    8282   
    8383    template <typename It> It getNext(It it) const
     
    9292    InEdgeIt& next(InEdgeIt& it) const
    9393    { if(!((++it.n)%NodeNum)) it.n=-1; return it; }
    94     static EdgeIt& next(EdgeIt& it) const { --it.n; return it; }
    95 
    96     static int id(Node v) const { return v.n; }
    97     static int id(Edge e) const { return e.n; }
     94    static EdgeIt& next(EdgeIt& it) { --it.n; return it; }
     95
     96    static int id(Node v) { return v.n; }
     97    static int id(Edge e) { return e.n; }
    9898
    9999    class Node {
  • src/hugo/list_graph.h

    r710 r713  
    138138    Node bNode(InEdgeIt e) const { return edges[e.n].tail; }
    139139
    140     static NodeIt& first(NodeIt& v) const {
     140    NodeIt& first(NodeIt& v) const {
    141141      v=NodeIt(*this); return v; }
    142     static EdgeIt& first(EdgeIt& e) const {
     142    EdgeIt& first(EdgeIt& e) const {
    143143      e=EdgeIt(*this); return e; }
    144     static OutEdgeIt& first(OutEdgeIt& e, const Node v) const {
     144    OutEdgeIt& first(OutEdgeIt& e, const Node v) const {
    145145      e=OutEdgeIt(*this,v); return e; }
    146     static InEdgeIt& first(InEdgeIt& e, const Node v) const {
     146    InEdgeIt& first(InEdgeIt& e, const Node v) const {
    147147      e=InEdgeIt(*this,v); return e; }
    148148
     
    153153//     It first(Node v) const { It e; first(e,v); return e; }
    154154
    155     static bool valid(Edge e) const { return e.n!=-1; }
    156     static bool valid(Node n) const { return n.n!=-1; }
     155    static bool valid(Edge e) { return e.n!=-1; }
     156    static bool valid(Node n) { return n.n!=-1; }
    157157   
    158158    static void setInvalid(Edge &e) { e.n=-1; }
    159159    static void setInvalid(Node &n) { n.n=-1; }
    160160   
    161     template <typename It> static It getNext(It it) const
     161    template <typename It> static It getNext(It it)
    162162    { It tmp(it); return next(tmp); }
    163163
     
    184184    }
    185185
    186     static int id(Node v) const { return v.n; }
    187     static int id(Edge e) const { return e.n; }
     186    static int id(Node v) { return v.n; }
     187    static int id(Edge e) { return e.n; }
    188188
    189189    /// Adds a new node to the graph.
     
    628628    ///Returns the oppositely directed
    629629    ///pair of the edge \c e.
    630     static Edge opposite(Edge e) const
     630    static Edge opposite(Edge e)
    631631    {
    632632      Edge f;
  • src/hugo/smart_graph.h

    r706 r713  
    137137//     It first(Node v) const { It e; first(e,v); return e; }
    138138
    139     bool valid(Edge e) const { return e.n!=-1; }
    140     bool valid(Node n) const { return n.n!=-1; }
     139    static bool valid(Edge e) { return e.n!=-1; }
     140    static bool valid(Node n) { return n.n!=-1; }
    141141   
    142142    ///\deprecated Use
     
    145145    ///\endcode
    146146    ///instead.
    147     void setInvalid(Edge &e) { e.n=-1; }
     147    static void setInvalid(Edge &e) { e.n=-1; }
    148148    ///\deprecated Use
    149149    ///\code
     
    151151    ///\endcode
    152152    ///instead.
    153     void setInvalid(Node &n) { n.n=-1; }
     153    static void setInvalid(Node &n) { n.n=-1; }
    154154   
    155155    template <typename It> It getNext(It it) const
     
    166166    EdgeIt& next(EdgeIt& it) const { --it.n; return it; }
    167167
    168     int id(Node v) const { return v.n; }
    169     int id(Edge e) const { return e.n; }
     168    static int id(Node v) { return v.n; }
     169    static int id(Edge e) { return e.n; }
    170170
    171171    Node addNode() {
     
    504504    ///Returns the oppositely directed
    505505    ///pair of the edge \c e.
    506     Edge opposite(Edge e) const
     506    static Edge opposite(Edge e)
    507507    {
    508508      Edge f;
Note: See TracChangeset for help on using the changeset viewer.