﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	revision
441	LpBase::clear() bug	Alpar Juttner	Alpar Juttner	"From: athos

    There is something I don't understand: I add columns to an lp, then I say lp.clear(), then again I add columns, and it seems that it does not add the columns again. Can you explain this to me?

    See the attached code.
        
{{{
#include <lemon/list_graph.h>
#include <lemon/glpk.h>
using namespace lemon;

typedef GlpkLp Lp;

  ///Query function about the LP
  int numberOfCols(Lp & lp) {
    int count=0;
    for (Lp::ColIt c(lp); c!=lemon::INVALID; ++c) ++count;
    return count;
  }

int main(){
  typedef lemon::ListGraph Graph;
  Graph g;
  Graph::Node a=g.addNode();
  Graph::Node b=g.addNode();
  g.addEdge(a,b);
  Graph::EdgeMap< Lp::Col > x(g);
  
  Lp lp;
  lp.clear();
  std::cout << ""The number of columns=""<<numberOfCols(lp)<< std::endl;
  lp.addColSet(x);
  std::cout << ""The number of columns=""<<numberOfCols(lp)<< std::endl;
  lp.clear();
  std::cout << ""The number of columns=""<<numberOfCols(lp)<< std::endl;
  lp.addColSet(x);
  std::cout << ""The number of columns=""<<numberOfCols(lp)<< std::endl;

  
}
}}}"	defect	closed	major	LEMON 1.3 release	core	hg main	fixed		athos@…	
