curve.hpp
Go to the documentation of this file.
00001 /*
00002  *    This file is part of ACADO Toolkit.
00003  *
00004  *    ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
00005  *    Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
00006  *    Milan Vukov, Rien Quirynen, KU Leuven.
00007  *    Developed within the Optimization in Engineering Center (OPTEC)
00008  *    under supervision of Moritz Diehl. All rights reserved.
00009  *
00010  *    ACADO Toolkit is free software; you can redistribute it and/or
00011  *    modify it under the terms of the GNU Lesser General Public
00012  *    License as published by the Free Software Foundation; either
00013  *    version 3 of the License, or (at your option) any later version.
00014  *
00015  *    ACADO Toolkit is distributed in the hope that it will be useful,
00016  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  *    Lesser General Public License for more details.
00019  *
00020  *    You should have received a copy of the GNU Lesser General Public
00021  *    License along with ACADO Toolkit; if not, write to the Free Software
00022  *    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00023  *
00024  */
00025 
00026 
00033 #ifndef ACADO_TOOLKIT_CURVE_HPP
00034 #define ACADO_TOOLKIT_CURVE_HPP
00035 
00036 #include <acado/variables_grid/variables_grid.hpp>
00037 #include <acado/function/function.hpp>
00038 
00039 BEGIN_NAMESPACE_ACADO
00040 
00041 
00052 class Curve{
00053 
00054     //
00055     // PUBLIC MEMBER FUNCTIONS:
00056     //
00057     public:
00058 
00060         Curve();
00061 
00063         Curve( const Curve& arg );
00064 
00066         ~Curve( );
00067 
00069         Curve& operator=( const Curve& arg );
00070 
00071                 
00072                 Curve operator()(       uint idx
00073                                                         ) const;
00074 
00092         returnValue add( double tStart,
00093                          double tEnd,
00094                          const DVector constant );
00095 
00096 
00115         returnValue add( const VariablesGrid& sampledData, InterpolationMode mode = IM_LINEAR );
00116 
00117 
00135         returnValue add( double tStart,
00136                          double tEnd,
00137                          const Function& parameterization_ );
00138 
00139 
00145         inline int getDim( ) const;
00146 
00147 
00153         inline BooleanType isEmpty( ) const;
00154 
00155 
00156 
00162         inline BooleanType isContinuous( ) const;
00163 
00164 
00165 
00171         inline int getNumIntervals( ) const;
00172 
00173 
00174 
00198         returnValue evaluate( double t, double *result ) const;
00199 
00200 
00212          returnValue evaluate( double t, DVector &result ) const;
00213 
00214 
00232          returnValue evaluate( double tStart, double tEnd, VariablesGrid &result ) const;
00233 
00234 
00235 
00249          returnValue discretize( const Grid &discretizationGrid, VariablesGrid &result ) const;
00250 
00251 
00252 
00259          returnValue getTimeDomain( double tStart, double tEnd ) const;
00260 
00261 
00273          returnValue getTimeDomain( const uint &idx, double tStart, double tEnd ) const;
00274 
00275 
00276 
00283          BooleanType isInTimeDomain(    double t
00284                                                                                 ) const;
00285 
00286 
00287 
00288 
00289 
00290     //
00291     // PROTECTED MEMBER FUNCTIONS:
00292     //
00293     protected:
00294 
00295 
00296     //
00297     // DATA MEMBERS:
00298     //
00299     protected:
00300 
00301         uint                 nIntervals      ;   // number of intervals of the curve.
00302         uint                 dim             ;   // the dimension of the curve.
00303         Function           **parameterization;   // the parameterizations of the curve pieces
00304         Grid                *grid            ;   // the grid points associated with the intervals of the curve.
00305 };
00306 
00307 
00308 CLOSE_NAMESPACE_ACADO
00309 
00310 
00311 #include <acado/curve/curve.ipp>
00312 
00313 
00314 #endif  // ACADO_TOOLKIT_CURVE_HPP
00315 
00316 /*
00317  *    end of file
00318  */


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 11:58:04