6 for(
auto pair = multi->GetNzBegin(); pair!=multi->GetNzEnd(); ++pair){
16 for(
int i = 0; i <
weights.size(); ++i){
18 throw std::invalid_argument(
"AnisotropicLimiter requires all weights have to be in [0,1]. Got weight " +
std::to_string(
weights[i]));
22 throw std::invalid_argument(
"AnisotropicLimiter requires epsilon to be in (0,1). Got epsilon = " +
std::to_string(
epsilon));
28 for(
auto pair = multi->GetNzBegin(); pair!=multi->GetNzEnd(); ++pair){
29 if(pair->first >= weights.size())
31 prod *= std::pow(weights(pair->first),(
int)pair->second);
33 return prod >= epsilon;
38 if(maxOrders.size()==0){
39 return (multi->Max() <= maxOrder);
41 assert(multi->GetLength()<=maxOrders.size());
43 if(multi->Max() <= vectorMin)
46 for(
auto nzIter = multi->GetNzBegin(); nzIter!=multi->GetNzEnd(); ++nzIter){
47 if(nzIter->second>maxOrders(nzIter->first)){
const Eigen::RowVectorXf & weights
virtual bool IsFeasible(std::shared_ptr< MultiIndex > multi) const override
AnisotropicLimiter(const Eigen::RowVectorXf &weightsIn, const double epsilonIn)
virtual bool IsFeasible(std::shared_ptr< MultiIndex > multi) const override
virtual bool IsFeasible(std::shared_ptr< MultiIndex > multi) const override
NLOHMANN_BASIC_JSON_TPL_DECLARATION std::string to_string(const NLOHMANN_BASIC_JSON_TPL &j)
user-defined to_string function for JSON values