pomdpCassandraWrapper.h
Go to the documentation of this file.
00001 /********** tell emacs we use -*- c++ -*- style comments *******************
00002  $Revision: 2.28 $  $Author: duyanzhu $  $Date: 2009/01/07 05:10:05 $
00003    
00004  @file    pomdpCassandraWrapper.h
00005  @brief   A wrapper that provides access to the pomdp read in by
00006           Tony Cassandra's file reading code, without requiring you
00007           to (1) directly reference global variables or (2) include
00008           all of the headers like sparse-matrix.h.  Also uses notation
00009           I am more familiar with.
00010 
00011  Copyright (c) 2002-2005, Trey Smith. All rights reserved.
00012 
00013  Licensed under the Apache License, Version 2.0 (the "License"); you may
00014  not use this file except in compliance with the License.  You may
00015  obtain a copy of the License at
00016 
00017    http://www.apache.org/licenses/LICENSE-2.0
00018 
00019  Unless required by applicable law or agreed to in writing, software
00020  distributed under the License is distributed on an "AS IS" BASIS,
00021  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
00022  implied.  See the License for the specific language governing
00023  permissions and limitations under the License.
00024 
00025  ***************************************************************************/
00026 
00027 #ifndef INCpomdpCassandraWrapper_h
00028 #define INCpomdpCassandraWrapper_h
00029 
00030 using namespace std;
00031 
00032 #include <string>
00033 #include "sparse-matrix.h"
00034 
00035 // Exception class
00036 class InputError { };
00037 
00038 typedef int StateType;
00039 typedef int ActionType;
00040 typedef int ObsType;
00041 typedef REAL_VALUE ProbType;
00042 typedef REAL_VALUE ValueType;
00043 
00044 typedef Matrix CassandraMatrix;
00045 
00046 struct PomdpCassandraWrapper {
00047   ~PomdpCassandraWrapper(void);
00048 
00049   int getNumStates(void) const;
00050   int getNumActions(void) const;
00051   int getNumObservations(void) const;
00052   ValueType getDiscount(void) const;
00053   ValueType getInitialBelief(StateType s) const;
00054 
00055   // rewards
00056   CassandraMatrix getRTranspose(void) const;
00057 
00058   // transition probabilities
00059   CassandraMatrix getT(ActionType a) const;
00060 
00061   // observation probabilities
00062   CassandraMatrix getO(ActionType a) const;
00063 
00064   void readFromFile(const string& fileName);
00065 };
00066 
00067 
00068 #endif // INCpomdpCassandraWrapper_h
00069 
00070 /***************************************************************************
00071  * REVISION HISTORY:
00072  * $Log: pomdpCassandraWrapper.h,v $
00073  * Revision 2.28  2009/01/07 05:10:05  duyanzhu
00074  * added GES.h
00075  *
00076  * Revision 2.26  2009/01/07 05:06:00  duyanzhu
00077  * added evaluator_win
00078  *
00079  * Revision 2.24  2009/01/07 05:01:34  duyanzhu
00080  * add GES
00081  *
00082  * Revision 2.22  2009/01/07 04:59:01  duyanzhu
00083  * adding in UniqueBeliefHeap
00084  *
00085  * Revision 2.20  2009/01/07 04:33:56  duyanzhu
00086  * APPL 0.3, added Policy Evaluator, added Memory Limit option
00087  *
00088  * Revision 2.18  2008/09/17 14:08:37  duyanzhu
00089  * Fix: Prune now only starts 5 seconds after initialization
00090  *
00091  * Revision 2.16  2008/07/16 13:27:46  duyanzhu
00092  * Bring everything to version 2.16
00093  *
00094  * Revision 2.12  2008/07/16 08:38:16  duyanzhu
00095  * Add CPMemUtils class
00096  *
00097  * Revision 2.11  2008/07/16 08:34:49  duyanzhu
00098  * Added parser memory allocation check. Added release script
00099  *
00100  * Revision 2.10  2008/06/14 01:41:17  duyanzhu
00101  * 14 Jun 08 by Du Yanzhu. Added command line option percentageThreshold
00102  *
00103  * Revision 1.5  2007/08/17 01:44:36  duyanzhu
00104  * Change Alpha vector to DenseVector. Xan adds dump functions. Xan's bound propagation code is also included, but not added to Makefile
00105  *
00106  * Revision 1.4  2007/08/16 14:06:42  duyanzhu
00107  * Undo last commit
00108  *
00109  * Revision 1.1.1.1  2007/07/24 13:17:52  dyhsu
00110  * Approximate POMDP Planning Library (APPL)
00111  *
00112  * Revision 1.1  2007/03/25 18:02:41  elern
00113  * initial revision
00114  *
00115  * Revision 1.5  2006/05/27 19:05:27  trey
00116  * PomdpCassandraWrapper accessors now return sparse matrices instead of providing element-by-element access
00117  *
00118  * Revision 1.4  2006/04/28 17:57:41  trey
00119  * changed to use apache license
00120  *
00121  * Revision 1.3  2005/10/28 03:54:39  trey
00122  * simplified license
00123  *
00124  * Revision 1.2  2005/10/28 03:05:27  trey
00125  * added copyright header
00126  *
00127  * Revision 1.1  2005/10/27 21:27:10  trey
00128  * renamed pomdp to pomdpCassandraWrapper
00129  *
00130  * Revision 1.1.1.1  2004/11/09 16:18:56  trey
00131  * imported hsvi into new repository
00132  *
00133  * Revision 1.3  2003/07/16 16:12:44  trey
00134  * added support for terminal states
00135  *
00136  * Revision 1.2  2003/04/02 17:13:56  trey
00137  * minor changes to enable compilation under gcc 3.0.1
00138  *
00139  * Revision 1.1.1.1  2003/01/07 19:19:41  trey
00140  * Imported sources
00141  *
00142  *
00143  ***************************************************************************/


appl
Author(s): petercai
autogenerated on Tue Jan 7 2014 11:02:29