GPLIB++
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
Statistics
ArraySampleGenerator.h
Go to the documentation of this file.
1
#ifndef ARRAYSAMPLEGENERATOR_H_
2
#define ARRAYSAMPLEGENERATOR_H_
3
#include "VecMat.h"
4
5
namespace
gplib
6
{
7
8
/** \addtogroup statistics Statistical methods */
9
/* @{ */
10
//! Sequentially returns the elements of an array
11
class
ArraySampleGenerator
12
{
13
private
:
14
int
index;
15
gplib::rvec samples;
16
public
:
17
double
operator()
()
18
{
19
index = (index + 1) % samples.size();
20
return
samples(index);
21
}
22
ArraySampleGenerator
(
const
gplib::rvec &s) :
23
index(-1), samples(s)
24
{
25
}
26
;
27
virtual
~ArraySampleGenerator
()
28
{
29
}
30
;
31
};
32
/* @} */
33
}
34
#endif
/*ARRAYSAMPLEGENERATOR_H_*/
gplib::ArraySampleGenerator::operator()
double operator()()
Definition:
ArraySampleGenerator.h:17
gplib::ArraySampleGenerator::ArraySampleGenerator
ArraySampleGenerator(const gplib::rvec &s)
Definition:
ArraySampleGenerator.h:22
gplib::ArraySampleGenerator::~ArraySampleGenerator
virtual ~ArraySampleGenerator()
Definition:
ArraySampleGenerator.h:27
gplib::ArraySampleGenerator
Sequentially returns the elements of an array.
Definition:
ArraySampleGenerator.h:11
Generated on Wed May 25 2016 14:21:06 for GPLIB++ by
1.8.6