Index: src/work/marci/graph_wrapper.h
===================================================================
--- src/work/marci/graph_wrapper.h	(revision 406)
+++ src/work/marci/graph_wrapper.h	(revision 409)
@@ -924,10 +924,15 @@
 
   public:
-    static const bool S_CLASS=false;
-    static const bool T_CLASS=true;
+    //marci
+    //FIXME vhogy igy kellene, csak az en forditom nem eszi meg
+    //static const bool S_CLASS=false;
+    //static const bool T_CLASS=true;
     
+    bool S_CLASS;
+    bool T_CLASS;
+
     BipartiteGraphWrapper(Graph& _graph, SFalseTTrueMap& _s_false_t_true_map) 
-      : GraphWrapper<Graph>(_graph), s_false_t_true_map(&_s_false_t_true_map) {
-    }
+      : GraphWrapper<Graph>(_graph), s_false_t_true_map(&_s_false_t_true_map), 
+      S_CLASS(false), T_CLASS(true) { }
     typedef typename GraphWrapper<Graph>::Node Node;
     //using GraphWrapper<Graph>::NodeIt;
@@ -1103,5 +1108,5 @@
 //invalid, 3, invalid)
     template <typename T> class NodeMap;
-    template <typename T> class EdgeMap;
+    template <typename T, typename Parent> class EdgeMap;
 
 //    template <typename T> friend class NodeMap;
@@ -1142,7 +1147,9 @@
 		static_cast<typename Graph::Node>(u)!=
 		static_cast<typename Graph::Node>(v));
-      } 
+      }
+      friend std::ostream& operator<<(std::ostream& os, const Node& i);
       int getSpec() const { return spec; }
     };
+
     class NodeIt { 
       friend class GraphWrapper<Graph>;
@@ -1156,12 +1163,13 @@
       NodeIt(const Invalid& i) : n(i), spec(3) { }
       NodeIt(const stGraphWrapper<Graph>& _G) : n(*(_G.graph)), spec(0) { 
-	if (!_G->valid(n)) spec=1;
+	if (!_G.graph->valid(n)) spec=1;
       }
       operator Node() const { return Node(n, spec); }
     };
+
     class Edge : public Graph::Edge {
       friend class GraphWrapper<Graph>;
       friend class stGraphWrapper<Graph>;
-      template <typename T> friend class EdgeMap;
+      template <typename T, typename Parent> friend class EdgeMap;
       int spec;
       typename Graph::Node n;
@@ -1185,6 +1193,8 @@
 		u.n!=v.n);
       } 
+      friend std::ostream& operator<<(std::ostream& os, const Edge& i);
       int getSpec() const { return spec; }
     };
+
     class OutEdgeIt { 
       friend class GraphWrapper<Graph>;
@@ -1230,4 +1240,5 @@
       operator Edge() const { return Edge(e, spec, n); }
     };
+
     class InEdgeIt { 
       friend class GraphWrapper<Graph>;
@@ -1262,7 +1273,8 @@
 	    spec=3;
 	    n=INVALID;
+	    break;
 	  case 2:
 	    e=INVALID;
-	    spec=1;
+	    spec=2;
 	    _G.graph->first(n, T_CLASS); //vmi->t;
 	    if (!_G.graph->valid(n)) spec=3; //Ha T ures
@@ -1272,4 +1284,5 @@
       operator Edge() const { return Edge(e, spec, n); }
     };
+
     class EdgeIt { 
       friend class GraphWrapper<Graph>;
@@ -1335,5 +1348,5 @@
       switch (i.spec) {
 	case 0: //normal edge
-	  this->graph->aNode(i.e);
+	  v=this->graph->aNode(i.e);
 	  this->graph->next(i.e);
 	  if (!this->graph->valid(i.e)) { //Az igazi elek vegere ertunk
@@ -1448,6 +1461,8 @@
     bool valid(const Edge& e) const { return (e.spec<3); }
 
-//    int nodeNum() const { return this->graph->nodeNum(); }
-//    int edgeNum() const { return this->graph->edgeNum(); }
+    int nodeNum() const { return this->graph->nodeNum()+2; }
+    int edgeNum() const { 
+      return this->graph->edgeNum()+this->graph->nodeNum(); 
+    }
   
     Node aNode(const OutEdgeIt& e) const { return tail(e); }
@@ -1455,5 +1470,8 @@
     Node bNode(const OutEdgeIt& e) const { return head(e); }
     Node bNode(const InEdgeIt& e) const { return tail(e); }
-  
+
+    void addNode() const { }
+    void addEdge() const { }
+    
 //    Node addNode() const { return Node(this->graph->addNode()); }
 //    Edge addEdge(const Node& tail, const Node& head) const { 
@@ -1469,5 +1487,7 @@
       T s_value, t_value;
     public:
-      NodeMap(const stGraphWrapper<Graph>& _G) :  Parent(_G) { }
+      NodeMap(const stGraphWrapper<Graph>& _G) :  Parent(_G), 
+						  s_value(), 
+						  t_value() { }
       NodeMap(const stGraphWrapper<Graph>& _G, T a) : Parent(_G, a), 
 						      s_value(a), 
@@ -1503,6 +1523,9 @@
     };
 
-    template<typename T> class EdgeMap : public GraphWrapper<Graph>::template EdgeMap<T> { 
-      typedef typename GraphWrapper<Graph>::template EdgeMap<T> Parent;
+    template<typename T, 
+	     typename Parent=
+	     typename GraphWrapper<Graph>::template EdgeMap<T> > 
+    class EdgeMap : public Parent { 
+      //typedef typename GraphWrapper<Graph>::template EdgeMap<T> Parent;
       typename GraphWrapper<Graph>::template NodeMap<T> node_value;
     public:
@@ -1528,5 +1551,5 @@
 	switch (e.spec) {
 	case 0: 
-	  GraphWrapper<Graph>::template EdgeMap<T>::set(e, t);
+	  Parent::set(e, t);
 	  break;
 	case 1:
@@ -1540,4 +1563,53 @@
       }
     };
+
+//     template<typename T> class EdgeMap : public GraphWrapper<Graph>::template EdgeMap<T> { 
+//       typedef typename GraphWrapper<Graph>::template EdgeMap<T> Parent;
+//       typename GraphWrapper<Graph>::template NodeMap<T> node_value;
+//     public:
+//       EdgeMap(const stGraphWrapper<Graph>& _G) : Parent(_G), 
+// 						 node_value(_G) { }
+//       EdgeMap(const stGraphWrapper<Graph>& _G, T a) : Parent(_G, a), 
+// 						      node_value(_G, a) { }
+//       T operator[](const Edge& e) const { 
+// 	switch (e.spec) {
+// 	case 0: 
+// 	  return Parent::operator[](e);
+// 	  break;
+// 	case 1:
+// 	  return node_value[e.n];
+// 	  break;
+// 	case 2:
+// 	default:
+// 	  return node_value[e.n];
+// 	  break;
+// 	}
+//       }
+//       void set(const Edge& e, T t) { 
+// 	switch (e.spec) {
+// 	case 0: 
+// 	  GraphWrapper<Graph>::template EdgeMap<T>::set(e, t);
+// 	  break;
+// 	case 1:
+// 	  node_value.set(e.n, t);
+// 	  break;
+// 	case 2:
+// 	default:
+// 	  node_value.set(e.n, t);
+// 	  break;
+// 	}
+//       }
+//     };
+
+    friend std::ostream& operator<<(std::ostream& os, const Node& i) { 
+      os << "(node: " << typename Graph::Node(i) << " spec: " << i.spec <<")"; 
+      return os; 
+    }
+    friend std::ostream& operator<<(std::ostream& os, const Edge& i) { 
+      os << "(edge: " << typename Graph::Edge(i) << " spec: " << i.spec << 
+	" node: " << i.n << ")"; 
+      return os; 
+    }
+
   };
 
