grasp
All Data Structures Namespaces Functions Modules
helpers.h
1 /* Copyright: (C) 2014 iCub Facility - Istituto Italiano di Tecnologia
2  * Authors: Ilaria Gori
3  * email: ilaria.gori@iit.it
4  * Permission is granted to copy, distribute, and/or modify this program
5  * under the terms of the GNU General Public License, version 2 or any
6  * later version published by the Free Software Foundation.
7  *
8  * A copy of the license can be found in the file LICENSE located in the
9  * root directory.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14  * Public License for more details
15 */
16 
17 #ifndef __HELPERS_H__
18 #define __HELPERS_H__
19 
20 #include <string>
21 #include <cmath>
22 #include <yarp/sig/Vector.h>
23 #include <yarp/math/Math.h>
24 
25 class Helpers
26 {
27 public:
28  static double sign(const double value);
29  static void min(const yarp::sig::Matrix &mat, yarp::sig::Vector &out);
30  static void max(const yarp::sig::Matrix &mat, yarp::sig::Vector &out);
31  static double mod(const double a, const double b);
32  static yarp::sig::Vector extractSubVector(const yarp::sig::Vector &vect, const int i, const int j);
33 };
34 
35 #endif