some minor extensions + add some first range transform code
This commit is contained in:
parent
2fa89e75e3
commit
d5c8ec7c9d
4 changed files with 33 additions and 1 deletions
|
@ -27,6 +27,7 @@ namespace MultiArrayTools
|
||||||
typedef SingleIndex<size_t,RangeType::LORENTZ> LorentzI;
|
typedef SingleIndex<size_t,RangeType::LORENTZ> LorentzI;
|
||||||
typedef SingleIndex<int,RangeType::SPACE> Space1dNI;
|
typedef SingleIndex<int,RangeType::SPACE> Space1dNI;
|
||||||
typedef SingleIndex<int,RangeType::MOMENTUM> Mom1dNI;
|
typedef SingleIndex<int,RangeType::MOMENTUM> Mom1dNI;
|
||||||
|
typedef SingleIndex<size_t,RangeType::ENSEMBLE> EnsI;
|
||||||
// ...
|
// ...
|
||||||
|
|
||||||
// ===== Range Types =====
|
// ===== Range Types =====
|
||||||
|
@ -36,6 +37,7 @@ namespace MultiArrayTools
|
||||||
typedef SingleRange<size_t,RangeType::LORENTZ> LorentzR;
|
typedef SingleRange<size_t,RangeType::LORENTZ> LorentzR;
|
||||||
typedef SingleRange<int,RangeType::SPACE> Space1dNR;
|
typedef SingleRange<int,RangeType::SPACE> Space1dNR;
|
||||||
typedef SingleRange<int,RangeType::MOMENTUM> Mom1dNR;
|
typedef SingleRange<int,RangeType::MOMENTUM> Mom1dNR;
|
||||||
|
typedef SingleRange<size_t, RangeType::ENSEMBLE> EnsR;
|
||||||
typedef MultiRange<Space1dNR,Space1dNR,Space1dNR> Space3dNR;
|
typedef MultiRange<Space1dNR,Space1dNR,Space1dNR> Space3dNR;
|
||||||
typedef MultiRange<Mom1dNR,Mom1dNR,Mom1dNR> Mom3dNR;
|
typedef MultiRange<Mom1dNR,Mom1dNR,Mom1dNR> Mom3dNR;
|
||||||
// ...
|
// ...
|
||||||
|
|
|
@ -19,7 +19,8 @@ namespace MultiArrayTools
|
||||||
SPACE = 2,
|
SPACE = 2,
|
||||||
MOMENTUM = 3,
|
MOMENTUM = 3,
|
||||||
LORENTZ = 4,
|
LORENTZ = 4,
|
||||||
SPIN = 5
|
SPIN = 5,
|
||||||
|
ENSEMBLE = 6
|
||||||
};
|
};
|
||||||
|
|
||||||
class MultiRangeType
|
class MultiRangeType
|
||||||
|
|
9
src/range_transformer.cc
Normal file
9
src/range_transformer.cc
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
// -*- C++ -*-
|
||||||
|
|
||||||
|
#include "range_transformer.h"
|
||||||
|
|
||||||
|
namespace MultiArrayTools
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
20
src/range_transformer.h
Normal file
20
src/range_transformer.h
Normal 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
|
Loading…
Reference in a new issue