COIN-OR::LEMON - Graph Library

Changes in / [779:c160bf9f18ef:777:5764dd9b6e18] in lemon-1.2


Ignore:
Location:
lemon
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/graph_extender.h

    r778 r685  
    5757    }
    5858
    59     static Node fromId(int id, Node) {
     59    Node fromId(int id, Node) const {
    6060      return Parent::nodeFromId(id);
    6161    }
    6262
    63     static Arc fromId(int id, Arc) {
     63    Arc fromId(int id, Arc) const {
    6464      return Parent::arcFromId(id);
    6565    }
     
    356356    }
    357357
    358     static Node fromId(int id, Node) {
     358    Node fromId(int id, Node) const {
    359359      return Parent::nodeFromId(id);
    360360    }
    361361
    362     static Arc fromId(int id, Arc) {
     362    Arc fromId(int id, Arc) const {
    363363      return Parent::arcFromId(id);
    364364    }
    365365
    366     static Edge fromId(int id, Edge) {
     366    Edge fromId(int id, Edge) const {
    367367      return Parent::edgeFromId(id);
    368368    }
  • lemon/edge_set.h

    r778 r670  
    868868    }
    869869
    870     static void next(Arc& arc) {
     870    void next(Arc& arc) const {
    871871      --arc.id;
    872872    }
     
    11741174    }
    11751175
    1176     static void next(Arc& arc) {
     1176    void next(Arc& arc) const {
    11771177      --arc.id;
    11781178    }
     
    11821182    }
    11831183
    1184     static void next(Edge& arc) {
     1184    void next(Edge& arc) const {
    11851185      --arc.id;
    11861186    }
  • lemon/full_graph.h

    r778 r617  
    5252
    5353    Node operator()(int ix) const { return Node(ix); }
    54     static int index(const Node& node) { return node._id; }
     54    int index(const Node& node) const { return node._id; }
    5555
    5656    Arc arc(const Node& s, const Node& t) const {
     
    210210    /// <tt>[0..nodeNum()-1]</tt>.
    211211    /// \sa operator()
    212     static int index(const Node& node) { return Parent::index(node); }
     212    int index(const Node& node) const { return Parent::index(node); }
    213213
    214214    /// \brief Returns the arc connecting the given nodes.
     
    284284
    285285    Node operator()(int ix) const { return Node(ix); }
    286     static int index(const Node& node) { return node._id; }
     286    int index(const Node& node) const { return node._id; }
    287287
    288288    Edge edge(const Node& u, const Node& v) const {
     
    581581    /// <tt>[0..nodeNum()-1]</tt>.
    582582    /// \sa operator()
    583     static int index(const Node& node) { return Parent::index(node); }
     583    int index(const Node& node) const { return Parent::index(node); }
    584584
    585585    /// \brief Returns the arc connecting the given nodes.
  • lemon/hypercube_graph.h

    r778 r617  
    263263    }
    264264
    265     static int index(Node node) {
     265    int index(Node node) const {
    266266      return node._id;
    267267    }
     
    338338    /// Gives back the index of the given node.
    339339    /// The lower bits of the integer describes the node.
    340     static int index(Node node) {
     340    int index(Node node) const {
    341341      return Parent::index(node);
    342342    }
  • lemon/smart_graph.h

    r778 r617  
    509509    }
    510510
    511     static void next(Node& node) {
     511    void next(Node& node) const {
    512512      --node._id;
    513513    }
     
    517517    }
    518518
    519     static void next(Arc& arc) {
     519    void next(Arc& arc) const {
    520520      --arc._id;
    521521    }
     
    525525    }
    526526
    527     static void next(Edge& arc) {
     527    void next(Edge& arc) const {
    528528      --arc._id;
    529529    }
  • lemon/static_graph.h

    r779 r777  
    9393    void nextIn(Arc& e) const { e.id = arc_next_in[e.id]; }
    9494
    95     static int id(const Node& n) { return n.id; }
    96     static Node nodeFromId(int id) { return Node(id); }
     95    int id(const Node& n) const { return n.id; }
     96    Node nodeFromId(int id) const { return Node(id); }
    9797    int maxNodeId() const { return node_num - 1; }
    9898
    99     static int id(const Arc& e) { return e.id; }
    100     static Arc arcFromId(int id) { return Arc(id); }
     99    int id(const Arc& e) const { return e.id; }
     100    Arc arcFromId(int id) const { return Arc(id); }
    101101    int maxArcId() const { return arc_num - 1; }
    102102
     
    310310    /// This function returns the node with the given index.
    311311    /// \sa index()
    312     static Node node(int ix) { return Parent::nodeFromId(ix); }
     312    Node node(int ix) const { return Parent::nodeFromId(ix); }
    313313
    314314    /// \brief The arc with the given index.
     
    316316    /// This function returns the arc with the given index.
    317317    /// \sa index()
    318     static Arc arc(int ix) { return Parent::arcFromId(ix); }
     318    Arc arc(int ix) const { return Parent::arcFromId(ix); }
    319319
    320320    /// \brief The index of the given node.
     
    322322    /// This function returns the index of the the given node.
    323323    /// \sa node()
    324     static int index(Node node) { return Parent::id(node); }
     324    int index(Node node) const { return Parent::id(node); }
    325325
    326326    /// \brief The index of the given arc.
     
    328328    /// This function returns the index of the the given arc.
    329329    /// \sa arc()
    330     static int index(Arc arc) { return Parent::id(arc); }
     330    int index(Arc arc) const { return Parent::id(arc); }
    331331
    332332    /// \brief Number of nodes.
Note: See TracChangeset for help on using the changeset viewer.