some minor extensions + add some first range transform code

This commit is contained in:
Christian Zimmermann 2017-03-02 19:27:46 +01:00
parent 2fa89e75e3
commit d5c8ec7c9d
4 changed files with 33 additions and 1 deletions

View file

@ -27,6 +27,7 @@ namespace MultiArrayTools
typedef SingleIndex<size_t,RangeType::LORENTZ> LorentzI;
typedef SingleIndex<int,RangeType::SPACE> Space1dNI;
typedef SingleIndex<int,RangeType::MOMENTUM> Mom1dNI;
typedef SingleIndex<size_t,RangeType::ENSEMBLE> EnsI;
// ...
// ===== Range Types =====
@ -36,6 +37,7 @@ namespace MultiArrayTools
typedef SingleRange<size_t,RangeType::LORENTZ> LorentzR;
typedef SingleRange<int,RangeType::SPACE> Space1dNR;
typedef SingleRange<int,RangeType::MOMENTUM> Mom1dNR;
typedef SingleRange<size_t, RangeType::ENSEMBLE> EnsR;
typedef MultiRange<Space1dNR,Space1dNR,Space1dNR> Space3dNR;
typedef MultiRange<Mom1dNR,Mom1dNR,Mom1dNR> Mom3dNR;
// ...

View file

@ -19,7 +19,8 @@ namespace MultiArrayTools
SPACE = 2,
MOMENTUM = 3,
LORENTZ = 4,
SPIN = 5
SPIN = 5,
ENSEMBLE = 6
};
class MultiRangeType

9
src/range_transformer.cc Normal file
View file

@ -0,0 +1,9 @@
// -*- C++ -*-
#include "range_transformer.h"
namespace MultiArrayTools
{
}

20
src/range_transformer.h Normal file
View file

@ -0,0 +1,20 @@
// -*- C++ -*-
#ifndef __range_transformer_h__
#define __range_transformer_h__
#include <cstdlib>
#include "base_def.h"
namespace MultiArrayTools
{
// init 'MultiRange' with 'new'
template <class... Ranges>
shared_ptr<MultiRange<Ranges...> > combine(const Ranges&... ranges);
}
#include "range_transformer.cc"
#endif