00001 // This file is part of QuadProg++: a C++ library implementing 00002 // the algorithm of Goldfarb and Idnani for the solution of a (convex) 00003 // Quadratic Programming problem by means of an active-set dual method. 00004 // Copyright (C) 2007-2009 Luca Di Gaspero. 00005 // Copyright (C) 2009 Eric Moyer. 00006 // 00007 // QuadProg++ is free software: you can redistribute it and/or modify 00008 // it under the terms of the GNU Lesser General Public License as published by 00009 // the Free Software Foundation, either version 3 of the License, or 00010 // (at your option) any later version. 00011 // 00012 // QuadProg++ is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU Lesser General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU Lesser General Public License 00018 // along with QuadProg++. If not, see <http://www.gnu.org/licenses/>. 00019 00020 #include "Array.h" 00021 00025 namespace QuadProgPP{ 00026 00027 std::set<unsigned int> seq(unsigned int s, unsigned int e) 00028 { 00029 std::set<unsigned int> tmp; 00030 for (unsigned int i = s; i <= e; i++) 00031 tmp.insert(i); 00032 00033 return tmp; 00034 } 00035 00036 std::set<unsigned int> singleton(unsigned int i) 00037 { 00038 std::set<unsigned int> tmp; 00039 tmp.insert(i); 00040 00041 return tmp; 00042 } 00043 00044 }