ArraySampleGenerator.h

Go to the documentation of this file.
00001 #ifndef ARRAYSAMPLEGENERATOR_H_
00002 #define ARRAYSAMPLEGENERATOR_H_
00003 #include "VecMat.h"
00004 
00005 /** \addtogroup statistics Statistical methods */
00006 /* @{ */
00007 //! Sequentially returns the elements of an array
00008 class ArraySampleGenerator
00009 {
00010 private:
00011         int index;
00012         gplib::rvec samples;
00013 public:
00014         double operator()(){index = (index +1) % samples.size(); return samples(index);}
00015         ArraySampleGenerator(const gplib::rvec &s):index(-1),samples(s){};
00016         virtual ~ArraySampleGenerator(){};
00017 };
00018 /* @} */
00019 #endif /*ARRAYSAMPLEGENERATOR_H_*/

Generated on Fri Jul 4 15:30:20 2008 for GPLIB++ by  doxygen 1.5.5