#include "Problem.hpp" #include using namespace pcsvm; void testfull() { ClassificationProblem p; Vector v1(10); v1[0]=-1; v1[2]=+1; p.push_back(v1, true); p.push_back(v1, false); std::cout << p << std::endl; for (ClassificationProblem::const_iterator it=p.begin(); it != p.end(); ++it) { std::cout << *it << " oder : " ; std::cout << it->vector << " is " ; std::cout << it->label << std::endl; } p.swap(0,1); std::cout<< "after swap(0,1):" << std::endl; for (ClassificationProblem::iterator it=p.begin(); it != p.end(); ++it) std::cout << *it << std::endl; std::cout << "via operator[]: " << std::endl; for (int i=0; ivector << " is " ; std::cout << it->label << std::endl; } p.swap(0,1); std::cout<< "after swap(0,1):" << std::endl; for (SparseClassificationProblem::iterator it=p.begin(); it != p.end(); ++it) std::cout << *it << std::endl; std::cout << "via operator[]: " << std::endl; for (int i=0; i