1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-11-10 08:55:37 +00:00
LatAnalyze/latan/Sample.cpp

31 lines
549 B
C++
Raw Normal View History

#include <latan/Sample.hpp>
#include <latan/includes.hpp>
2013-05-01 14:35:30 +01:00
using namespace Latan;
2013-05-01 14:35:30 +01:00
DSample::DSample(void)
: DSampleBase(static_cast<Index>(0))
2013-05-01 14:35:30 +01: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
{
for (int s = 0; s < size(); ++s)
2013-05-01 14:35:30 +01:00
{
(*this)(s).resize(nRow, nCol);
2013-05-01 14:35:30 +01:00
}
}
DMat& DSample::operator()(const int s)
2013-05-01 14:35:30 +01:00
{
if (s >= 0)
{
return (*this)(s + 1);
2013-05-01 14:35:30 +01:00
}
else
{
return (*this)(0);
2013-05-01 14:35:30 +01:00
}
}