2013-05-21 18:02:42 +01:00
|
|
|
#include <latan/Sample.hpp>
|
|
|
|
#include <latan/includes.hpp>
|
2013-05-01 14:35:30 +01:00
|
|
|
|
2013-05-21 18:02:42 +01:00
|
|
|
using namespace Latan;
|
2013-05-01 14:35:30 +01:00
|
|
|
|
2014-01-22 15:57:47 +00:00
|
|
|
DSample::DSample(void)
|
|
|
|
: DSampleBase(static_cast<Index>(0))
|
2013-05-01 14:35:30 +01:00
|
|
|
{}
|
|
|
|
|
2014-01-22 15:57:47 +00:00
|
|
|
DSample::DSample(const unsigned int nSample, const unsigned int nRow,
|
|
|
|
const unsigned int nCol)
|
|
|
|
: DSampleBase(static_cast<Index>(nSample + 1))
|
2013-05-01 14:35:30 +01:00
|
|
|
{
|
2014-01-22 15:57:47 +00:00
|
|
|
for (int s = 0; s < size(); ++s)
|
2013-05-01 14:35:30 +01:00
|
|
|
{
|
2014-01-22 15:57:47 +00:00
|
|
|
(*this)(s).resize(nRow, nCol);
|
2013-05-01 14:35:30 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-01-22 15:57:47 +00:00
|
|
|
DMat& DSample::operator()(const int s)
|
2013-05-01 14:35:30 +01:00
|
|
|
{
|
|
|
|
if (s >= 0)
|
|
|
|
{
|
2014-01-22 15:57:47 +00:00
|
|
|
return (*this)(s + 1);
|
2013-05-01 14:35:30 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-01-22 15:57:47 +00:00
|
|
|
return (*this)(0);
|
2013-05-01 14:35:30 +01:00
|
|
|
}
|
|
|
|
}
|