Robotsystem of the Robot Group Leipzig: abstractmeasure.h Source File

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

- File List
- File Members

# abstractmeasure.h

Go to the documentation of this file.

    00001 /***************************************************************************
    00002  *   Copyright (C) 2005 by Robot Group Leipzig                             *
    00003  *    martius@informatik.uni-leipzig.de                                    *
    00004  *    fhesse@informatik.uni-leipzig.de                                     *
    00005  *    der@informatik.uni-leipzig.de                                        *
    00006  *    frankguettler@gmx.de                                                 *
    00007  *                                                                         *
    00008  *   This program is free software; you can redistribute it and/or modify  *
    00009  *   it under the terms of the GNU General Public License as published by  *
    00010  *   the Free Software Foundation; either version 2 of the License, or     *
    00011  *   (at your option) any later version.                                   *
    00012  *                                                                         *
    00013  *   This program is distributed in the hope that it will be useful,       *
    00014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
    00015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
    00016  *   GNU General Public License for more details.                          *
    00017  *                                                                         *
    00018  *   You should have received a copy of the GNU General Public License     *
    00019  *   along with this program; if not, write to the                         *
    00020  *   Free Software Foundation, Inc.,                                       *
    00021  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
    00022  ***************************************************************************
    00023  *                                                                         *
    00024  *  DESCRIPTION                                                            *
    00025  *                                                                         *
    00026  *   $Log: abstractmeasure.h,v $
    00027  *   Revision 1.3  2008/04/29 08:51:54  guettler
    00028  *   -cosmetic changes of StatisticTools
    00029  *   -StatisticTools now uses new function addInspectableValue of the
    00030  *   interface Inspectable, not overloading getInternalParams and
    00031  *   getInternalParamNames anymore
    00032  *
    00033  *   Revision 1.2  2008/01/14 09:09:23  der
    00034  *   added stepSize. An abstractmeasure can now be calculated every stepSize
    00035  *   steps.
    00036  *
    00037  *   Revision 1.1  2007/12/06 10:18:10  der
    00038  *   AbstractMeasure is now a abstract type for Measures,
    00039  *   StatisticTools now supports AbstractMeasures,
    00040  *   StatisticalMeasure, ComplexMeasure  now derived from
    00041  *   AbstractMeasure,
    00042  *   ComplexMeasure provides support for calculation e.g. entropy,
    00043  *   uses Discretisizer,
    00044  *   Discretisizer is a stand-alone class for support of discretisizing values
    00045  *   TrackableMeasure derived from ComplexMeasure and provides support for calculating complex measures for Trackable objects
    00046  *
    00047  *   Revision 1.3  2007/09/28 08:48:21  robot3
    00048  *   corrected some minor bugs, files are still in develop status
    00049  *
    00050  *   Revision 1.2  2007/09/27 10:49:39  robot3
    00051  *   removed some minor bugs,
    00052  *   added CONVergence test
    00053  *   changed little things for support of the new WSM
    00054  *
    00055  *   Revision 1.1  2007/05/07 21:01:31  robot3
    00056  *   statistictools is a class for easy visualization of measurements of observed values
    00057  *   it is possible to add the observed value itself with mode ID
    00058  *
    00059  *                                                                         *
    00060  ***************************************************************************/
    00061 #ifndef _ABSTRACT_MEASURE_H
    00062 #define _ABSTRACT_MEASURE_H
    00063
    00064 #import <iostream>
    00065 class AbstractMeasure
    00066 {
    00067
    00068 public:
    00069   AbstractMeasure(const char* measureName) : name(measureName), value(0.0), actualStep(0), stepSize(1) {}
    00070
    00071   virtual ~AbstractMeasure() {}
    00072
    00073   virtual void step()=0;
    00074
    00075   virtual std::string getName() const { return name; }
    00076
    00077   virtual double getValue() const { return value; }
    00078
    00079   virtual double& getValueAddress()  { return value; }
    00080
    00081   virtual void setStepSize(int newStepSize) { stepSize=newStepSize; }
    00082
    00083   virtual int getStepSize() const { return stepSize; }
    00084
    00085   virtual long getActualStep() const { return actualStep; }
    00086
    00087
    00088 protected:
    00089   std::string name;
    00090   double value;  // this is the value which is determined, e.g. in AVG MeasureMode, it's the average!
    00091
    00092   long actualStep; // actual step
    00093   int stepSize;
    00094 };
    00095
    00096 #endif