40 template<std::
size_t N>
43 Index ndim = nsams.size();
44 for (
Index idim=0; idim<ndim; ++idim ) {
45 Index nsam = nsams[idim];
88 if ( idim >
rank() )
return 0;
103 if (
rank() != 2 )
return false;
105 if (
size() == 0 )
return false;
112 double bad = std::numeric_limits<Float>::quiet_NaN();
123 if ( data.size() !=
m_data.size() )
return 2;
134 for (
Index idat=0; idat<ndat; ++idat ) {
135 m_data[idat] = pdat[idat];
146 for (
Index idat=0; idat<ndat; ++idat ) {
147 pdat[idat] =
m_data[idat];
156 if ( pchk !=
nullptr ) *pchk = 1;
159 if ( isams.size() !=
rank() ) {
160 if ( pchk !=
nullptr ) *pchk = 2;
163 if ( pchk !=
nullptr ) {
164 for (
Index idim=0; idim<
rank(); ++idim ) {
165 if ( !
inRange(idim, isams[idim]) ) {
172 Index idat = isams[0];
173 for (
Index idim=1; idim<
rank(); ++idim ) {
199 if ( pchk !=
nullptr && *pchk > 0 )
return size();
200 if ( idat >=
size() )
return size();
209 for ( idats[0]=0; idats[0]<
size(0); ++idats[0] ) {
210 for ( idats[1]=0; idats[1]<
size(1); ++idats[1] ) {
const std::vector< F > & data() const
bool isZero(Index idat) const
const IndexArray & nSamples() const
Index globalIndex(const IndexArray &isams, Index *pchk=nullptr) const
std::complex< Float > Complex
virtual ~Real2dData()=default
int copyDataOut(T *pdat) const
std::array< Index, 2 > IndexArray
Index size(Index idim) const
void reset(const IndexArray &nsams)
int copyDataIn(const T *pdat)
static Index dataSize(const std::array< Index, N > &nsams)
Float value(const IndexArray &isams, Index *pchk=nullptr) const
Real2dData(const IndexArray &nsams, const DataVector &data)
bool inRange(Index idim, Index idat) const
Index nSamples(Index idim) const
Real2dData(const IndexArray &nsams)
int copyDataIn(const DataVector &data)
Index setValue(const IndexArray &isams, Float val, Index *pchk=nullptr)
std::vector< float > DataVector