[Lemon-commits] [lemon_svn] alpar: r253 - hugo/trunk/src/work/alpar
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:38:22 CET 2006
Author: alpar
Date: Fri Mar 12 16:42:51 2004
New Revision: 253
Modified:
hugo/trunk/src/work/alpar/smart_graph.h
Log:
Marci's changes accepted.
Modified: hugo/trunk/src/work/alpar/smart_graph.h
==============================================================================
--- hugo/trunk/src/work/alpar/smart_graph.h (original)
+++ hugo/trunk/src/work/alpar/smart_graph.h Fri Mar 12 16:42:51 2004
@@ -12,9 +12,6 @@
class SmartGraph {
-// static const int INVALID=-1;
-// static const int INVALID_NODE=INT_MAX;
-
struct NodeT
{
int first_in,first_out;
@@ -116,23 +113,12 @@
e=InEdgeIt(*this,v); return e; }
template< typename It >
- It first() const {
- It e;
- //Marci
- /*getF*/first(e);
- return e;
- }
+ It first() const { It e; first(e); return e; }
template< typename It >
- It first(Node v) const {
- It e;
- //Marci
- /*getF*/first(e, v);
- return e;
- }
+ It first(Node v) const { It e; first(e,v); return e; }
bool valid(Edge e) const { return e.n!=-1; }
- // bool valid(EdgeIt e) const { return e.n<int(edges.size()); }
bool valid(Node n) const { return n.n!=-1; }
void setInvalid(Edge &e) { e.n=-1; }
@@ -140,10 +126,7 @@
template <typename It> It getNext(It it) const
{ It tmp(it); return next(tmp); }
- //{ It tmp; tmp.n=it.n+1; return tmp; }
- //FIXME correction Marci: I changed to NodeIt from Node
- //NodeIt& next(NodeIt& it) const { it.n=(it.n+2)%nodes.size()-1; return it; }
NodeIt& next(NodeIt& it) const {
it.n=(it.n+2)%(nodes.size()+1)-1;
return it;
@@ -225,7 +208,6 @@
Edge(int nn) {n=nn;}
public:
Edge() { }
- // Marci: kiszedtem az Invalid i-bol az i-t
Edge (Invalid) { n=-1; }
bool operator==(const Edge i) const {return n==i.n;}
bool operator!=(const Edge i) const {return n!=i.n;}
@@ -330,6 +312,7 @@
{
if(k.n>=container.size()) container.resize(k.n+1);
}
+
// void erase(const Node k)
// {
// //FIXME: Please implement me.
More information about the Lemon-commits
mailing list