HCB with MPC

Dependencies:   mbed Eigen FastPWM

Committer:
jsoh91
Date:
Mon Oct 14 10:08:13 2019 +0000
Revision:
25:f83396e3d25c
withMPC

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jsoh91 25:f83396e3d25c 1 // $Id: Array.cc 201 2008-05-18 19:47:38Z digasper $
jsoh91 25:f83396e3d25c 2 // This file is part of QuadProg++:
jsoh91 25:f83396e3d25c 3 // Copyright (C) 2006--2009 Luca Di Gaspero.
jsoh91 25:f83396e3d25c 4 //
jsoh91 25:f83396e3d25c 5 // This software may be modified and distributed under the terms
jsoh91 25:f83396e3d25c 6 // of the MIT license. See the LICENSE file for details.
jsoh91 25:f83396e3d25c 7
jsoh91 25:f83396e3d25c 8 #include "Array.h"
jsoh91 25:f83396e3d25c 9
jsoh91 25:f83396e3d25c 10 /**
jsoh91 25:f83396e3d25c 11 Index utilities
jsoh91 25:f83396e3d25c 12 */
jsoh91 25:f83396e3d25c 13
jsoh91 25:f83396e3d25c 14 namespace quadprogpp {
jsoh91 25:f83396e3d25c 15
jsoh91 25:f83396e3d25c 16 std::set<unsigned int> seq(unsigned int s, unsigned int e)
jsoh91 25:f83396e3d25c 17 {
jsoh91 25:f83396e3d25c 18 std::set<unsigned int> tmp;
jsoh91 25:f83396e3d25c 19 for (unsigned int i = s; i <= e; i++)
jsoh91 25:f83396e3d25c 20 tmp.insert(i);
jsoh91 25:f83396e3d25c 21
jsoh91 25:f83396e3d25c 22 return tmp;
jsoh91 25:f83396e3d25c 23 }
jsoh91 25:f83396e3d25c 24
jsoh91 25:f83396e3d25c 25 std::set<unsigned int> singleton(unsigned int i)
jsoh91 25:f83396e3d25c 26 {
jsoh91 25:f83396e3d25c 27 std::set<unsigned int> tmp;
jsoh91 25:f83396e3d25c 28 tmp.insert(i);
jsoh91 25:f83396e3d25c 29
jsoh91 25:f83396e3d25c 30 return tmp;
jsoh91 25:f83396e3d25c 31 }
jsoh91 25:f83396e3d25c 32
jsoh91 25:f83396e3d25c 33 } // namespace quadprogpp