Index: src/demo/lp_demo.cc
===================================================================
--- src/demo/lp_demo.cc	(revision 1309)
+++ src/demo/lp_demo.cc	(revision 1309)
@@ -0,0 +1,61 @@
+#include<lemon/lp_glpk.h>
+#include<lemon/graph_reader.h>
+#include<lemon/list_graph.h>
+
+using namespace lemon;
+
+template<class G,class C>
+double maxFlow(const G &g,const C &cap,typename G::Node s,typename G::Node t)
+{
+  LpGlpk lp;
+  
+  typedef G Graph;
+  typedef typename G::Node Node;
+  typedef typename G::NodeIt NodeIt;
+  typedef typename G::Edge Edge;
+  typedef typename G::EdgeIt EdgeIt;
+  typedef typename G::OutEdgeIt OutEdgeIt;
+  typedef typename G::InEdgeIt InEdgeIt;
+  
+  typename G::template EdgeMap<LpGlpk::Col> x(g);
+  lp.addColSet(x);
+  
+  for(EdgeIt e(g);e!=INVALID;++e) {
+    lp.colUpperBound(x[e],cap[e]);
+    lp.colLowerBound(x[e],0);
+  }
+
+  for(NodeIt n(g);n!=INVALID;++n) if(n!=s&&n!=t) {
+    LpGlpk::Expr ex;
+    for(InEdgeIt  e(g,n);e!=INVALID;++e) ex+=x[e];
+    for(OutEdgeIt e(g,n);e!=INVALID;++e) ex-=x[e];
+    lp.addRow(ex==0);
+  }
+  {
+    LpGlpk::Expr ex;
+    for(InEdgeIt  e(g,t);e!=INVALID;++e) ex+=x[e];
+    for(OutEdgeIt e(g,t);e!=INVALID;++e) ex-=x[e];
+    lp.setObj(ex);
+  }
+
+  lp.solve();
+
+  return 0;
+}
+
+int main() 
+{
+  LpGlpk lp_glpk;
+
+  ListGraph g;
+  ListGraph::Node s=g.addNode();
+  ListGraph::Node t=g.addNode();
+
+  ListGraph::EdgeMap<double> cap(g);
+  
+  GraphReader<ListGraph> reader(std::cin,g);
+  reader.addEdgeMap("capacity",cap).run();
+  
+  maxFlow(g,cap,s,t);
+
+}
Index: src/test/Makefile.am
===================================================================
--- src/test/Makefile.am	(revision 1235)
+++ src/test/Makefile.am	(revision 1309)
@@ -1,3 +1,4 @@
 AM_CPPFLAGS = -I$(top_srcdir)/src
+LDADD = $(top_builddir)/src/lemon/libemon.la -lglpk
 
 EXTRA_DIST = preflow_graph.dim dijkstra_test.lgf
@@ -18,4 +19,5 @@
 	graph_utils_test \
 	kruskal_test \
+	lp_test \
         max_matching_test \
         maps_test \
@@ -42,4 +44,5 @@
 graph_wrapper_test_SOURCES = graph_wrapper_test.cc
 kruskal_test_SOURCES = kruskal_test.cc
+lp_test_SOURCES = lp_test.cc
 maps_test_SOURCES = maps_test.cc
 min_cost_flow_test_SOURCES = min_cost_flow_test.cc
Index: src/test/lp_test.cc
===================================================================
--- src/test/lp_test.cc	(revision 1309)
+++ src/test/lp_test.cc	(revision 1309)
@@ -0,0 +1,139 @@
+#include<lemon/lp_solver_skeleton.h>
+#include<lemon/lp_glpk.h>
+
+using namespace lemon;
+
+void lpTest(LpSolverBase & lp)
+{
+  typedef LpSolverBase LP;
+
+  std::vector<LP::Col> x(10);
+  //  for(int i=0;i<10;i++) x.push_back(lp.addCol());
+  lp.addColSet(x);
+
+  std::vector<LP::Col> y(10);
+  lp.addColSet(y);
+
+  std::map<int,LP::Col> z;
+  
+  z.insert(std::make_pair(12,INVALID));
+  z.insert(std::make_pair(2,INVALID));
+  z.insert(std::make_pair(7,INVALID));
+  z.insert(std::make_pair(5,INVALID));
+  
+  lp.addColSet(z);
+
+
+  LP::Expr e,f,g;
+  LP::Col p1,p2,p3,p4,p5;
+  LP::Constr c;
+  
+  e[p1]=2;
+  e.constComp()=12;
+  e[p1]+=2;
+  e.constComp()+=12;
+  e[p1]-=2;
+  e.constComp()-=12;
+  
+  e=2;
+  e=2.2;
+  e=p1;
+  e=f;
+
+  e+=2;
+  e+=2.2;
+  e+=p1;
+  e+=f;
+
+  e-=2;
+  e-=2.2;
+  e-=p1;
+  e-=f;
+
+  e*=2;
+  e*=2.2;
+  e/=2;
+  e/=2.2;
+
+  e=((p1+p2)+(p1-p2)+(p1+12)+(12+p1)+(p1-12)+(12-p1)+
+      (f+12)+(12+f)+(p1+f)+(f+p1)+(f+g)+
+      (f-12)+(12-f)+(p1-f)+(f-p1)+(f-g)+
+      2.2*f+f*2.2+f/2.2+
+      2*f+f*2+f/2+
+      2.2*p1+p1*2.2+p1/2.2+
+      2*p1+p1*2+p1/2
+     );
+  
+
+  c = (e  <= f  );
+  c = (e  <= 2.2);
+  c = (e  <= 2  );
+  c = (e  <= p1 );
+  c = (2.2<= f  );
+  c = (2  <= f  );
+  c = (p1 <= f  );
+  c = (p1 <= p2 );
+  c = (p1 <= 2.2);
+  c = (p1 <= 2  );
+  c = (2.2<= p2 );
+  c = (2  <= p2 );
+
+  c = (e  >= f  );
+  c = (e  >= 2.2);
+  c = (e  >= 2  );
+  c = (e  >= p1 );
+  c = (2.2>= f  );
+  c = (2  >= f  );
+  c = (p1 >= f  );
+  c = (p1 >= p2 );
+  c = (p1 >= 2.2);
+  c = (p1 >= 2  );
+  c = (2.2>= p2 );
+  c = (2  >= p2 );
+
+  c = (e  == f  );
+  c = (e  == 2.2);
+  c = (e  == 2  );
+  c = (e  == p1 );
+  c = (2.2== f  );
+  c = (2  == f  );
+  c = (p1 == f  );
+  //c = (p1 == p2 );
+  c = (p1 == 2.2);
+  c = (p1 == 2  );
+  c = (2.2== p2 );
+  c = (2  == p2 );
+
+  c = (2 <= e <= 3);
+  c = (2 <= p1<= 3);
+
+  c = (2 >= e >= 3);
+  c = (2 >= p1>= 3);
+
+  e[x[3]]=2;
+  e[x[3]]=4;
+  e[x[3]]=1;
+  e.constComp()=12;
+  
+  lp.addRow(LP::INF,e,23);
+  lp.addRow(LP::INF,3.0*(x[1]+x[2]/2)-x[3],23);
+  lp.addRow(LP::INF,3.0*(x[1]+x[2]*2-5*x[3]+12-x[4]/3)+2*x[4]-4,23);
+
+  lp.addRow(x[1]+x[3]<=x[5]-3);
+  lp.addRow(-7<=x[1]+x[3]-12<=3);
+  lp.addRow(x[1]<=x[5]);
+
+
+  
+}
+
+int main() 
+{
+  LpSolverSkeleton lp_skel;
+  LpGlpk lp_glpk;
+
+  lpTest(lp_skel);
+  lpTest(lp_glpk);
+
+  return 0;
+}
Index: c/work/athos/lp/lp_test.cc
===================================================================
--- src/work/athos/lp/lp_test.cc	(revision 1295)
+++ 	(revision )
@@ -1,184 +1,0 @@
-#include"lp_solver_skeleton.h"
-#include"lp_glpk.h"
-#include<lemon/list_graph.h>
-
-using namespace lemon;
-
-void lpTest(LpSolverBase & lp)
-{
-  typedef LpSolverBase LP;
-
-  std::vector<LP::Col> x;
-  for(int i=0;i<10;i++) x.push_back(lp.addCol());
-
-  std::vector<LP::Col> y(10);
-  lp.addColSet(y);
-
-  std::map<int,LP::Col> z;
-  
-  z.insert(std::make_pair(12,INVALID));
-  z.insert(std::make_pair(2,INVALID));
-  z.insert(std::make_pair(7,INVALID));
-  z.insert(std::make_pair(5,INVALID));
-  
-  lp.addColSet(z);
-
-
-  LP::Expr e,f,g;
-  LP::Col p1,p2,p3,p4,p5;
-  LP::Constr c;
-  
-  e[p1]=2;
-  e.constComp()=12;
-  e[p1]+=2;
-  e.constComp()+=12;
-  e[p1]-=2;
-  e.constComp()-=12;
-  
-  e=2;
-  e=2.2;
-  e=p1;
-  e=f;
-
-  e+=2;
-  e+=2.2;
-  e+=p1;
-  e+=f;
-
-  e-=2;
-  e-=2.2;
-  e-=p1;
-  e-=f;
-
-  e*=2;
-  e*=2.2;
-  e/=2;
-  e/=2.2;
-
-  e=((p1+p2)+(p1-p2)+(p1+12)+(12+p1)+(p1-12)+(12-p1)+
-      (f+12)+(12+f)+(p1+f)+(f+p1)+(f+g)+
-      (f-12)+(12-f)+(p1-f)+(f-p1)+(f-g)+
-      2.2*f+f*2.2+f/2.2+
-      2*f+f*2+f/2+
-      2.2*p1+p1*2.2+p1/2.2+
-      2*p1+p1*2+p1/2
-     );
-  
-
-  c = (e  <= f  );
-  c = (e  <= 2.2);
-  c = (e  <= 2  );
-  c = (e  <= p1 );
-  c = (2.2<= f  );
-  c = (2  <= f  );
-  c = (p1 <= f  );
-  c = (p1 <= p2 );
-  c = (p1 <= 2.2);
-  c = (p1 <= 2  );
-  c = (2.2<= p2 );
-  c = (2  <= p2 );
-
-  c = (e  >= f  );
-  c = (e  >= 2.2);
-  c = (e  >= 2  );
-  c = (e  >= p1 );
-  c = (2.2>= f  );
-  c = (2  >= f  );
-  c = (p1 >= f  );
-  c = (p1 >= p2 );
-  c = (p1 >= 2.2);
-  c = (p1 >= 2  );
-  c = (2.2>= p2 );
-  c = (2  >= p2 );
-
-  c = (e  == f  );
-  c = (e  == 2.2);
-  c = (e  == 2  );
-  c = (e  == p1 );
-  c = (2.2== f  );
-  c = (2  == f  );
-  c = (p1 == f  );
-  //c = (p1 == p2 );
-  c = (p1 == 2.2);
-  c = (p1 == 2  );
-  c = (2.2== p2 );
-  c = (2  == p2 );
-
-  c = (2 <= e <= 3);
-  c = (2 <= p1<= 3);
-
-  c = (2 >= e >= 3);
-  c = (2 >= p1>= 3);
-
-  e[x[3]]=2;
-  e[x[3]]=4;
-  e[x[3]]=1;
-  e.constComp()=12;
-  
-  lp.addRow(LP::INF,e,23);
-  lp.addRow(LP::INF,3.0*(x[1]+x[2]/2)-x[3],23);
-  lp.addRow(LP::INF,3.0*(x[1]+x[2]*2-5*x[3]+12-x[4]/3)+2*x[4]-4,23);
-
-  lp.addRow(x[1]+x[3]<=x[5]-3);
-  lp.addRow(-7<=x[1]+x[3]-12<=3);
-  lp.addRow(x[1]<=x[5]);
-
-}
-
-
-template<class G,class C>
-double maxFlow(const G &g,const C &cap,typename G::Node s,typename G::Node t)
-{
-  LpGlpk lp;
-  
-  typedef G Graph;
-  typedef typename G::Node Node;
-  typedef typename G::NodeIt NodeIt;
-  typedef typename G::Edge Edge;
-  typedef typename G::EdgeIt EdgeIt;
-  typedef typename G::OutEdgeIt OutEdgeIt;
-  typedef typename G::InEdgeIt InEdgeIt;
-  
-  typename G::template EdgeMap<LpGlpk::Col> x(g);
-  lp.addColSet(x);
-  
-  for(EdgeIt e(g);e!=INVALID;++e) {
-    lp.colUpperBound(x[e],cap[e]);
-    lp.colLowerBound(x[e],0);
-  }
-
-  for(NodeIt n(g);n!=INVALID;++n) if(n!=s&&n!=t) {
-    LpGlpk::Expr ex;
-    for(InEdgeIt  e(g,n);e!=INVALID;++e) ex+=x[e];
-    for(OutEdgeIt e(g,n);e!=INVALID;++e) ex-=x[e];
-    lp.addRow(ex==0);
-  }
-  {
-    LpGlpk::Expr ex;
-    for(InEdgeIt  e(g,t);e!=INVALID;++e) ex+=x[e];
-    for(OutEdgeIt e(g,t);e!=INVALID;++e) ex-=x[e];
-    lp.setObj(ex);
-  }
-
-  lp.solve();
-
-  return 0;
-}
-
-int main() 
-{
-  LpSolverSkeleton lp_skel;
-  LpGlpk lp_glpk;
-
-  lpTest(lp_skel);
-  lpTest(lp_glpk);
-
-  ListGraph g;
-  ListGraph::Node s=g.addNode();
-  ListGraph::Node t=g.addNode();
-
-  ListGraph::EdgeMap<double> cap(g);
-  
-  maxFlow(g,cap,s,t);
-
-}
