1 #ifndef MULTIINDEXFACTORY_H_
2 #define MULTIINDEXFACTORY_H_
30 static std::shared_ptr<MultiIndexSet>
CreateTotalOrder(
unsigned int const length,
31 unsigned int const maxOrder,
32 unsigned int const minOrder = 0,
33 std::shared_ptr<MultiIndexLimiter> limiter = std::make_shared<NoLimiter>());
36 static std::vector<std::shared_ptr<MultiIndexSet>>
CreateTriTotalOrder(
unsigned int const length,
37 unsigned int const maxOrder,
38 unsigned int const minOrder = 0,
39 std::shared_ptr<MultiIndexLimiter> limiter = std::make_shared<NoLimiter>());
48 static std::shared_ptr<MultiIndexSet>
CreateHyperbolic(
unsigned int const length,
49 unsigned int const maxOrder,
51 std::shared_ptr<MultiIndexLimiter> limiter = std::make_shared<NoLimiter>());
54 static std::vector<std::shared_ptr<MultiIndexSet>>
CreateTriHyperbolic(
unsigned int const length,
55 unsigned int const maxOrder,
57 std::shared_ptr<MultiIndexLimiter> limiter = std::make_shared<NoLimiter>());
65 static std::shared_ptr<MultiIndexSet>
CreateFullTensor(
unsigned int const length,
66 unsigned int const order,
67 std::shared_ptr<MultiIndexLimiter> limiter = std::make_shared<NoLimiter>());
75 static std::shared_ptr<MultiIndexSet>
CreateFullTensor(
const Eigen::RowVectorXi& orders,
76 std::shared_ptr<MultiIndexLimiter> limiter = std::make_shared<NoLimiter>());
87 static std::shared_ptr<MultiIndexSet>
CreateAnisotropic(
const Eigen::RowVectorXf& weights,
const double epsilon);
99 static std::shared_ptr<MultiIndex>
CreateSingleTerm(
int totalDim,
int nonzeroDim,
int order);
105 std::shared_ptr<MultiIndexSet> output,
106 unsigned int const currDim,
107 Eigen::RowVectorXi &base,
109 std::shared_ptr<MultiIndexLimiter> limiter);
113 unsigned int const minOrder,
114 std::shared_ptr<MultiIndexSet> output,
115 unsigned int const currDim,
116 Eigen::RowVectorXi &base,
117 std::shared_ptr<MultiIndexLimiter> limiter);
121 std::shared_ptr<MultiIndexSet> output,
122 unsigned int const currDim,
123 Eigen::RowVectorXi &base,
124 std::shared_ptr<MultiIndexLimiter> limiter,
A factory class with static methods for generating MultiIndexSets.
static std::shared_ptr< MultiIndexSet > CreateTotalOrder(unsigned int const length, unsigned int const maxOrder, unsigned int const minOrder=0, std::shared_ptr< MultiIndexLimiter > limiter=std::make_shared< NoLimiter >())
Construct a total order limited MultiIndex.
static std::vector< std::shared_ptr< MultiIndexSet > > CreateTriHyperbolic(unsigned int const length, unsigned int const maxOrder, const double q=0.5, std::shared_ptr< MultiIndexLimiter > limiter=std::make_shared< NoLimiter >())
static void RecursiveTensor(const Eigen::RowVectorXi &orders, std::shared_ptr< MultiIndexSet > output, unsigned int const currDim, Eigen::RowVectorXi &base, std::shared_ptr< MultiIndexLimiter > limiter, bool allInactive)
static std::shared_ptr< MultiIndexSet > CreateFullTensor(unsigned int const length, unsigned int const order, std::shared_ptr< MultiIndexLimiter > limiter=std::make_shared< NoLimiter >())
Construct a full tensor product multiindex set.
static std::shared_ptr< MultiIndexSet > CreateHyperbolic(unsigned int const length, unsigned int const maxOrder, const double q=0.5, std::shared_ptr< MultiIndexLimiter > limiter=std::make_shared< NoLimiter >())
Construct a general hyperbolic MultiIndex.
static std::shared_ptr< MultiIndex > CreateSingleTerm(int totalDim, int nonzeroDim, int order)
Creates a single multiindex with one nonzero term.
static std::vector< std::shared_ptr< MultiIndexSet > > CreateTriTotalOrder(unsigned int const length, unsigned int const maxOrder, unsigned int const minOrder=0, std::shared_ptr< MultiIndexLimiter > limiter=std::make_shared< NoLimiter >())
static void RecursiveTotalOrderFill(unsigned int const maxOrder, unsigned int const minOrder, std::shared_ptr< MultiIndexSet > output, unsigned int const currDim, Eigen::RowVectorXi &base, std::shared_ptr< MultiIndexLimiter > limiter)
static void RecursiveHyperbolicFill(const double maxOrderPow, std::shared_ptr< MultiIndexSet > output, unsigned int const currDim, Eigen::RowVectorXi &base, const double q, std::shared_ptr< MultiIndexLimiter > limiter)
static std::shared_ptr< MultiIndexSet > CreateAnisotropic(const Eigen::RowVectorXf &weights, const double epsilon)
Construct an anisotropic multiindex set based on a priori information on the importance of each dimen...