MvcDigestDb/dexperimentresultrecord.h

Go to the documentation of this file.
00001 /*  -*- c++ -*-  (for Emacs)
00002  *
00003  *  dexperimentresultrecord.h
00004  *  Digest
00005  * 
00006  *  Created by Aidan Lane on Sun Mar 26 2006.
00007  *  Copyright (c) 2006 Optimisation and Constraint Solving Group,
00008  *  Monash University. All rights reserved.
00009  *
00010  *  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version.
00014  *
00015  *  This program 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
00018  *  GNU General Public License for more details.
00019  *
00020  *  You should have received a copy of the GNU General Public License
00021  *  along with this program; if not, write to the Free Software
00022  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00023  */
00024 
00025 #ifndef DEXPERIMENTRESULTRECORD_H
00026 #define DEXPERIMENTRESULTRECORD_H
00027 
00028 
00029 #include <QHash>
00030 
00031 
00032 /*
00033  * Note: For each Class index, the probability value should range between
00034  *       0.0 and 1.0 (inclusive).
00035  *
00036  *       We use DOUBLE (vs. float), as we use ClassProbabilityT in our calcs,
00037  *       as to keep the precision consistent, which in turn to minimises error.
00038  */
00039 typedef double                                        ClassProbabilityT;
00040 typedef QHash<int, ClassProbabilityT>                 ClassProbabilities;
00041 typedef QHashIterator<int, ClassProbabilityT>         ClassProbabilitiesIterator;
00042 typedef QMutableHashIterator<int, ClassProbabilityT>  MutableClassProbabilitiesIterator;
00043 
00044 
00045 #if 0 // update this to reflect the new system
00046 
00073 class DExperimentResultRecord {
00074 public:
00075   DExperimentResultRecord( int experimentId   = -1,
00076                            int testGestureId  = -1,
00077                            int testClassId    = -1,
00078                            int resultClassId  = -1,
00079                            ClassProbabilityT resultClassProb = -1.0 )
00080     : experimentId(experimentId),
00081       testGestureId(testGestureId),
00082       testClassId(testClassId),
00083       resultClassId(resultClassId),
00084       resultClassProb(resultClassProb) {}
00085   int                experimentId;
00086   int                testGestureId;
00087   int                testClassId;
00088   int                resultClassId;
00089   ClassProbabilityT  resultClassProb;
00090 };
00091 #endif
00092 
00093 
00094 #endif  // ! DEXPERIMENTRESULTRECORD_H

Generated on Mon Jul 30 09:46:50 2007 for Digest by  doxygen 1.5.2