Observation.h

Go to the documentation of this file.
00001 /************************************************************************
00002 * Verve                                                                 *
00003 * Copyright (C) 2004-2006                                               *
00004 * Tyler Streeter  tylerstreeter@gmail.com                               *
00005 * All rights reserved.                                                  *
00006 * Web: http://verve-agents.sourceforge.net                              *
00007 *                                                                       *
00008 * This library is free software; you can redistribute it and/or         *
00009 * modify it under the terms of EITHER:                                  *
00010 *   (1) The GNU Lesser General Public License as published by the Free  *
00011 *       Software Foundation; either version 2.1 of the License, or (at  *
00012 *       your option) any later version. The text of the GNU Lesser      *
00013 *       General Public License is included with this library in the     *
00014 *       file license-LGPL.txt.                                          *
00015 *   (2) The BSD-style license that is included with this library in     *
00016 *       the file license-BSD.txt.                                       *
00017 *                                                                       *
00018 * This library is distributed in the hope that it will be useful,       *
00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files    *
00021 * license-LGPL.txt and license-BSD.txt for more details.                *
00022 ************************************************************************/
00023 
00024 #ifndef VERVE_OBSERVATION_H
00025 #define VERVE_OBSERVATION_H
00026 
00027 #include "Globals.h"
00028 
00029 namespace verve
00030 {
00031         class Agent;
00032 
00037         class Observation
00038         {
00039         public:
00040                 VERVE_DECL Observation();
00041 
00042                 VERVE_DECL virtual ~Observation();
00043 
00045                 VERVE_DECL virtual void VERVE_CALL init(const Agent& a);
00046 
00049                 VERVE_DECL virtual void VERVE_CALL init(const Observation& obs);
00050 
00052                 VERVE_DECL virtual void VERVE_CALL zeroInputData();
00053 
00055                 VERVE_DECL virtual void VERVE_CALL copyInputData(
00056                         const Observation& obs);
00057 
00059                 VERVE_DECL virtual unsigned int VERVE_CALL 
00060                         getNumDiscreteInputs()const;
00061 
00063                 VERVE_DECL virtual unsigned int VERVE_CALL 
00064                         getNumContinuousInputs()const;
00065 
00068                 VERVE_DECL virtual void VERVE_CALL setDiscreteValue(
00069                         unsigned int index, unsigned int value);
00070 
00073                 VERVE_DECL virtual unsigned int VERVE_CALL getDiscreteValue(
00074                         unsigned int index)const;
00075 
00077                 VERVE_DECL virtual const unsigned int* VERVE_CALL 
00078                         getDiscreteInputData()const;
00079 
00082                 VERVE_DECL virtual const unsigned int* VERVE_CALL 
00083                         getDiscreteNumOptionsData()const;
00084 
00087                 VERVE_DECL virtual void VERVE_CALL setContinuousValue(
00088                         unsigned int index, real value);
00089 
00092                 VERVE_DECL virtual real VERVE_CALL getContinuousValue(
00093                         unsigned int index)const;
00094 
00096                 VERVE_DECL virtual const real* VERVE_CALL 
00097                         getContinuousInputData()const;
00098 
00101                 VERVE_DECL virtual const bool* VERVE_CALL 
00102                         getContinuousCircularData()const;
00103 
00106                 VERVE_DECL virtual unsigned int VERVE_CALL 
00107                         getDiscreteInputNumOptions(unsigned int i)const;
00108 
00111                 VERVE_DECL virtual bool VERVE_CALL 
00112                         getContinuousInputIsCircular(unsigned int i)const;
00113 
00115                 VERVE_DECL virtual unsigned int VERVE_CALL 
00116                         getContinuousResolution()const;
00117 
00118         protected:
00120                 unsigned int mNumDiscreteDimensions;
00121 
00123                 unsigned int mNumContinuousDimensions;
00124 
00126                 unsigned int* mDiscreteInputData;
00127 
00130                 unsigned int* mDiscreteNumOptionsData;
00131 
00133                 real* mContinuousInputData;
00134 
00137                 bool* mContinuousCircularData;
00138 
00140                 unsigned mContinuousResolution;
00141         };
00142 }
00143 
00144 #endif

Generated on Tue Jan 24 21:46:37 2006 for Verve by  doxygen 1.4.6-NO