Port to C++11 override keyword

Performed using modernize-use-override from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html
time-shift
Sébastien Villemot 2019-01-09 16:26:42 +01:00
parent 9656904d41
commit 60fd92ddce
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
47 changed files with 404 additions and 404 deletions

View File

@ -93,10 +93,10 @@ class ProductQuadrature : public QuadratureImpl<prodpit>
const OneDQuadrature &uquad; const OneDQuadrature &uquad;
public: public:
ProductQuadrature(int d, const OneDQuadrature &uq); ProductQuadrature(int d, const OneDQuadrature &uq);
virtual ~ProductQuadrature() ~ProductQuadrature()
= default; override = default;
int int
numEvals(int l) const numEvals(int l) const override
{ {
int res = 1; int res = 1;
for (int i = 0; i < dimen(); i++) for (int i = 0; i < dimen(); i++)
@ -105,7 +105,7 @@ public:
} }
void designLevelForEvals(int max_eval, int &lev, int &evals) const; void designLevelForEvals(int max_eval, int &lev, int &evals) const;
protected: protected:
prodpit begin(int ti, int tn, int level) const; prodpit begin(int ti, int tn, int level) const override;
}; };
#endif #endif

View File

@ -120,7 +120,7 @@ public:
smarter. */ smarter. */
void void
operator()() operator()() override
{ {
_Tpit beg = quad.begin(ti, tn, level); _Tpit beg = quad.begin(ti, tn, level);
_Tpit end = quad.begin(ti+1, tn, level); _Tpit end = quad.begin(ti+1, tn, level);
@ -162,7 +162,7 @@ public:
/* Just fill a thread group with workes and run it. */ /* Just fill a thread group with workes and run it. */
void void
integrate(VectorFunctionSet &fs, int level, Vector &out) const integrate(VectorFunctionSet &fs, int level, Vector &out) const override
{ {
// todo: out.length()==func.outdim() // todo: out.length()==func.outdim()
// todo: dim == func.indim() // todo: dim == func.indim()
@ -177,7 +177,7 @@ public:
} }
void void
integrate(const VectorFunction &func, integrate(const VectorFunction &func,
int level, int tn, Vector &out) const int level, int tn, Vector &out) const override
{ {
VectorFunctionSet fs(func, tn); VectorFunctionSet fs(func, tn);
integrate(fs, level, out); integrate(fs, level, out);
@ -246,25 +246,25 @@ public:
{ {
calcOffsets(); calcOffsets();
} }
virtual ~OneDPrecalcQuadrature() ~OneDPrecalcQuadrature()
= default; override = default;
int int
numLevels() const numLevels() const override
{ {
return num_levels; return num_levels;
} }
int int
numPoints(int level) const numPoints(int level) const override
{ {
return num_points[level-1]; return num_points[level-1];
} }
double double
point(int level, int i) const point(int level, int i) const override
{ {
return points[offsets[level-1]+i]; return points[offsets[level-1]+i];
} }
double double
weight(int level, int i) const weight(int level, int i) const override
{ {
return weights[offsets[level-1]+i]; return weights[offsets[level-1]+i];
} }

View File

@ -206,16 +206,16 @@ public:
: QuadratureImpl<qmcpit>(d), QMCSpecification(d, l, p) : QuadratureImpl<qmcpit>(d), QMCSpecification(d, l, p)
{ {
} }
virtual ~QMCarloCubeQuadrature() ~QMCarloCubeQuadrature()
= default; override = default;
int int
numEvals(int l) const numEvals(int l) const override
{ {
return l; return l;
} }
protected: protected:
qmcpit qmcpit
begin(int ti, int tn, int lev) const begin(int ti, int tn, int lev) const override
{ {
return qmcpit(*this, ti*level()/tn + 1); return qmcpit(*this, ti*level()/tn + 1);
} }
@ -280,16 +280,16 @@ public:
: QuadratureImpl<qmcnpit>(d), QMCSpecification(d, l, p) : QuadratureImpl<qmcnpit>(d), QMCSpecification(d, l, p)
{ {
} }
virtual ~QMCarloNormalQuadrature() ~QMCarloNormalQuadrature()
= default; override = default;
int int
numEvals(int l) const numEvals(int l) const override
{ {
return l; return l;
} }
protected: protected:
qmcnpit qmcnpit
begin(int ti, int tn, int lev) const begin(int ti, int tn, int lev) const override
{ {
return qmcnpit(*this, ti*level()/tn + 1); return qmcnpit(*this, ti*level()/tn + 1);
} }
@ -299,14 +299,14 @@ protected:
class WarnockPerScheme : public PermutationScheme class WarnockPerScheme : public PermutationScheme
{ {
public: public:
int permute(int i, int base, int c) const; int permute(int i, int base, int c) const override;
}; };
/* Declares reverse permutation scheme. */ /* Declares reverse permutation scheme. */
class ReversePerScheme : public PermutationScheme class ReversePerScheme : public PermutationScheme
{ {
public: public:
int permute(int i, int base, int c) const; int permute(int i, int base, int c) const override;
}; };
/* Declares no permutation (identity) scheme. */ /* Declares no permutation (identity) scheme. */
@ -314,7 +314,7 @@ class IdentityPerScheme : public PermutationScheme
{ {
public: public:
int int
permute(int i, int base, int c) const permute(int i, int base, int c) const override
{ {
return c; return c;
} }

View File

@ -108,12 +108,12 @@ class SmolyakQuadrature : public QuadratureImpl<smolpit>
PascalTriangle psc; PascalTriangle psc;
public: public:
SmolyakQuadrature(int d, int l, const OneDQuadrature &uq); SmolyakQuadrature(int d, int l, const OneDQuadrature &uq);
virtual ~SmolyakQuadrature() ~SmolyakQuadrature()
= default; override = default;
virtual int numEvals(int level) const; int numEvals(int level) const override;
void designLevelForEvals(int max_eval, int &lev, int &evals) const; void designLevelForEvals(int max_eval, int &lev, int &evals) const;
protected: protected:
smolpit begin(int ti, int tn, int level) const; smolpit begin(int ti, int tn, int level) const override;
unsigned int unsigned int
numSummands() const numSummands() const
{ {

View File

@ -153,17 +153,17 @@ public:
GaussConverterFunction(VectorFunction &f, const GeneralMatrix &vcov); GaussConverterFunction(VectorFunction &f, const GeneralMatrix &vcov);
GaussConverterFunction(VectorFunction *f, const GeneralMatrix &vcov); GaussConverterFunction(VectorFunction *f, const GeneralMatrix &vcov);
GaussConverterFunction(const GaussConverterFunction &f); GaussConverterFunction(const GaussConverterFunction &f);
virtual ~GaussConverterFunction() ~GaussConverterFunction() override
{ {
if (delete_flag) if (delete_flag)
delete func; delete func;
} }
virtual VectorFunction * VectorFunction *
clone() const clone() const override
{ {
return new GaussConverterFunction(*this); return new GaussConverterFunction(*this);
} }
virtual void eval(const Vector &point, const ParameterSignal &sig, Vector &out); void eval(const Vector &point, const ParameterSignal &sig, Vector &out) override;
private: private:
double calcMultiplier() const; double calcMultiplier() const;
void calcCholeskyFactor(const GeneralMatrix &vcov); void calcCholeskyFactor(const GeneralMatrix &vcov);

View File

@ -37,11 +37,11 @@ public:
= default; = default;
VectorFunction * VectorFunction *
clone() const clone() const override
{ {
return new MomentFunction(*this); return new MomentFunction(*this);
} }
void eval(const Vector &point, const ParameterSignal &sig, Vector &out); void eval(const Vector &point, const ParameterSignal &sig, Vector &out) override;
}; };
void void
@ -72,11 +72,11 @@ public:
= default; = default;
VectorFunction * VectorFunction *
clone() const clone() const override
{ {
return new TensorPower(*this); return new TensorPower(*this);
} }
void eval(const Vector &point, const ParameterSignal &sig, Vector &out); void eval(const Vector &point, const ParameterSignal &sig, Vector &out) override;
}; };
void void
@ -108,11 +108,11 @@ public:
{ {
} }
VectorFunction * VectorFunction *
clone() const clone() const override
{ {
return new Function1(*this); return new Function1(*this);
} }
virtual void eval(const Vector &point, const ParameterSignal &sig, Vector &out); void eval(const Vector &point, const ParameterSignal &sig, Vector &out) override;
}; };
void void
@ -144,11 +144,11 @@ public:
= default; = default;
VectorFunction * VectorFunction *
clone() const clone() const override
{ {
return new Function1Trans(*this); return new Function1Trans(*this);
} }
virtual void eval(const Vector &point, const ParameterSignal &sig, Vector &out); void eval(const Vector &point, const ParameterSignal &sig, Vector &out) override;
}; };
void void
@ -438,7 +438,7 @@ public:
} }
bool bool
run() const run() const override
{ {
GeneralMatrix m(2, 2); GeneralMatrix m(2, 2);
m.zeros(); m.get(0, 0) = 1; m.get(1, 1) = 1; m.zeros(); m.get(0, 0) = 1; m.get(1, 1) = 1;
@ -455,7 +455,7 @@ public:
} }
bool bool
run() const run() const override
{ {
GeneralMatrix m(3, 3); GeneralMatrix m(3, 3);
m.zeros(); m.zeros();
@ -474,7 +474,7 @@ public:
} }
bool bool
run() const run() const override
{ {
GeneralMatrix m(2, 2); GeneralMatrix m(2, 2);
m.zeros(); m.get(0, 0) = 1; m.get(1, 1) = 1; m.zeros(); m.get(0, 0) = 1; m.get(1, 1) = 1;
@ -491,7 +491,7 @@ public:
} }
bool bool
run() const run() const override
{ {
GeneralMatrix m(3, 3); GeneralMatrix m(3, 3);
m.zeros(); m.zeros();
@ -510,7 +510,7 @@ public:
} }
bool bool
run() const run() const override
{ {
GeneralMatrix m(2, 2); GeneralMatrix m(2, 2);
m.zeros(); m.get(0, 0) = 1; m.get(1, 1) = 1; m.zeros(); m.get(0, 0) = 1; m.get(1, 1) = 1;
@ -527,7 +527,7 @@ public:
} }
bool bool
run() const run() const override
{ {
GeneralMatrix m(3, 3); GeneralMatrix m(3, 3);
m.zeros(); m.zeros();
@ -547,7 +547,7 @@ public:
} }
bool bool
run() const run() const override
{ {
Function1Trans f1(6); Function1Trans f1(6);
Vector res(1); res[0] = 1.0; Vector res(1); res[0] = 1.0;
@ -564,7 +564,7 @@ public:
} }
bool bool
run() const run() const override
{ {
Function1 f1(6); Function1 f1(6);
return qmc_cube(f1, 1.0, 1.e-4, 1000000); return qmc_cube(f1, 1.0, 1.e-4, 1000000);

View File

@ -73,7 +73,7 @@ public:
typedef StackContainer<FGSTensor>::_Ctype _Ctype; typedef StackContainer<FGSTensor>::_Ctype _Ctype;
typedef StackContainer<FGSTensor>::itype itype; typedef StackContainer<FGSTensor>::itype itype;
ZAuxContainer(const _Ctype *gss, int ngss, int ng, int ny, int nu); ZAuxContainer(const _Ctype *gss, int ngss, int ng, int ny, int nu);
itype getType(int i, const Symmetry &s) const; itype getType(int i, const Symmetry &s) const override;
}; };
/* This class provides an interface to approximation algorithms. The /* This class provides an interface to approximation algorithms. The

View File

@ -126,31 +126,31 @@ public:
centralize(dr); centralize(dr);
} }
const Vector & const Vector &
getSteady() const getSteady() const override
{ {
return ysteady; return ysteady;
} }
TwoDMatrix *simulate(emethod em, int np, const Vector &ystart, TwoDMatrix *simulate(emethod em, int np, const Vector &ystart,
ShockRealization &sr) const; ShockRealization &sr) const override;
void evaluate(emethod em, Vector &out, const ConstVector &ys, void evaluate(emethod em, Vector &out, const ConstVector &ys,
const ConstVector &u) const; const ConstVector &u) const override;
DecisionRule *centralizedClone(const Vector &fixpoint) const; DecisionRule *centralizedClone(const Vector &fixpoint) const override;
void writeMat(mat_t *fd, const char *prefix) const; void writeMat(mat_t *fd, const char *prefix) const override;
int int
nexog() const nexog() const override
{ {
return nu; return nu;
} }
const PartitionY & const PartitionY &
getYPart() const getYPart() const override
{ {
return ypart; return ypart;
} }
protected: protected:
void fillTensors(const _Tg &g, double sigma); void fillTensors(const _Tg &g, double sigma);
void centralize(const DecisionRuleImpl &dr); void centralize(const DecisionRuleImpl &dr);
void eval(emethod em, Vector &out, const ConstVector &v) const; void eval(emethod em, Vector &out, const ConstVector &v) const override;
}; };
/* Here we have to fill the tensor polynomial. This involves two /* Here we have to fill the tensor polynomial. This involves two
@ -495,8 +495,8 @@ public:
typedef typename DecisionRule::emethod emethod; typedef typename DecisionRule::emethod emethod;
DRFixPoint(const _Tg &g, const PartitionY &yp, DRFixPoint(const _Tg &g, const PartitionY &yp,
const Vector &ys, double sigma); const Vector &ys, double sigma);
virtual
~DRFixPoint(); ~DRFixPoint() override;
bool calcFixPoint(emethod em, Vector &out); bool calcFixPoint(emethod em, Vector &out);
@ -925,7 +925,7 @@ public:
: res(sim_res), dr(dec_rule), em(emet), np(num_per), st(start), sr(shock_r) : res(sim_res), dr(dec_rule), em(emet), np(num_per), st(start), sr(shock_r)
{ {
} }
void operator()(); void operator()() override;
}; };
/* This worker simulates a given impulse |imp| to a given shock /* This worker simulates a given impulse |imp| to a given shock
@ -951,7 +951,7 @@ public:
idata(id), ishock(ishck), imp(impulse) idata(id), ishock(ishck), imp(impulse)
{ {
} }
void operator()(); void operator()() override;
}; };
/* This class does the real time simulation job for /* This class does the real time simulation job for
@ -977,7 +977,7 @@ public:
: res(sim_res), dr(dec_rule), em(emet), np(num_per), ystart(start), sr(shock_r) : res(sim_res), dr(dec_rule), em(emet), np(num_per), ystart(start), sr(shock_r)
{ {
} }
void operator()(); void operator()() override;
}; };
/* This class generates draws from Gaussian distribution with zero mean /* This class generates draws from Gaussian distribution with zero mean
@ -999,11 +999,11 @@ public:
: mtwister(sr.mtwister), factor(sr.factor) : mtwister(sr.mtwister), factor(sr.factor)
{ {
} }
virtual ~RandomShockRealization() ~RandomShockRealization()
= default; override = default;
void get(int n, Vector &out); void get(int n, Vector &out) override;
int int
numShocks() const numShocks() const override
{ {
return factor.nrows(); return factor.nrows();
} }
@ -1032,9 +1032,9 @@ public:
{ {
} }
ExplicitShockRealization(ShockRealization &sr, int num_per); ExplicitShockRealization(ShockRealization &sr, int num_per);
void get(int n, Vector &out); void get(int n, Vector &out) override;
int int
numShocks() const numShocks() const override
{ {
return shocks.nrows(); return shocks.nrows();
} }
@ -1069,9 +1069,9 @@ public:
KORD_RAISE_IF(sh.nrows() != v.nrows() || v.nrows() != v.ncols(), KORD_RAISE_IF(sh.nrows() != v.nrows() || v.nrows() != v.ncols(),
"Wrong dimension of input matrix in GenShockRealization constructor"); "Wrong dimension of input matrix in GenShockRealization constructor");
} }
void get(int n, Vector &out); void get(int n, Vector &out) override;
int int
numShocks() const numShocks() const override
{ {
return RandomShockRealization::numShocks(); return RandomShockRealization::numShocks();
} }

View File

@ -74,14 +74,14 @@ protected:
public: public:
ResidFunction(const Approximation &app); ResidFunction(const Approximation &app);
ResidFunction(const ResidFunction &rf); ResidFunction(const ResidFunction &rf);
virtual
~ResidFunction(); ~ResidFunction() override;
virtual VectorFunction * VectorFunction *
clone() const clone() const override
{ {
return new ResidFunction(*this); return new ResidFunction(*this);
} }
virtual void eval(const Vector &point, const ParameterSignal &sig, Vector &out); void eval(const Vector &point, const ParameterSignal &sig, Vector &out) override;
void setYU(const Vector &ys, const Vector &xx); void setYU(const Vector &ys, const Vector &xx);
}; };
@ -97,10 +97,10 @@ public:
GResidFunction(const GResidFunction &rf) GResidFunction(const GResidFunction &rf)
= default; = default;
virtual ~GResidFunction() ~GResidFunction()
= default; override = default;
virtual VectorFunction * VectorFunction *
clone() const clone() const override
{ {
return new GResidFunction(*this); return new GResidFunction(*this);
} }

View File

@ -49,7 +49,7 @@ public:
{ {
printHeader(); printHeader();
} }
~Journal() ~Journal() override
{ {
flush(); flush();
} }
@ -139,7 +139,7 @@ public:
{ {
prefix_end[0] = '\0'; journal.incrementDepth(); prefix_end[0] = '\0'; journal.incrementDepth();
} }
~JournalRecordPair(); ~JournalRecordPair() override;
private: private:
void writePrefixForEnd(const SystemResourcesFlash &f); void writePrefixForEnd(const SystemResourcesFlash &f);
}; };

View File

@ -162,7 +162,7 @@ public:
{ {
} }
PLUMatrix(const PLUMatrix &plu); PLUMatrix(const PLUMatrix &plu);
virtual ~PLUMatrix() ~PLUMatrix() override
{ {
delete [] ipiv; delete [] ipiv;
} }

View File

@ -254,7 +254,7 @@ public:
: GContainer<_Ttype>(gs, ngs, nu) : GContainer<_Ttype>(gs, ngs, nu)
{ {
} }
itype getType(int i, const Symmetry &s) const; itype getType(int i, const Symmetry &s) const override;
}; };
/* This routine corresponds to this stack: /* This routine corresponds to this stack:
@ -298,7 +298,7 @@ public:
: ZContainer<_Ttype>(gss, ngss, g, ng, ny, nu) : ZContainer<_Ttype>(gss, ngss, g, ng, ny, nu)
{ {
} }
itype getType(int i, const Symmetry &s) const; itype getType(int i, const Symmetry &s) const override;
}; };
/* This |getType| method corresponds to this stack: /* This |getType| method corresponds to this stack:

View File

@ -29,7 +29,7 @@ public:
uint32 lrand(); uint32 lrand();
double drand(); double drand();
double double
uniform() uniform() override
{ {
return drand(); return drand();
} }

View File

@ -21,7 +21,7 @@ public:
class SystemRandomGenerator : public RandomGenerator class SystemRandomGenerator : public RandomGenerator
{ {
public: public:
double uniform(); double uniform() override;
void initSeed(int seed); void initSeed(int seed);
}; };

View File

@ -343,7 +343,7 @@ public:
} }
bool bool
run() const run() const override
{ {
TwoDMatrix gy(8, 4, gy_data); TwoDMatrix gy(8, 4, gy_data);
TwoDMatrix gu(8, 3, gu_data); TwoDMatrix gu(8, 3, gu_data);
@ -366,7 +366,7 @@ public:
} }
bool bool
run() const run() const override
{ {
TwoDMatrix gy(30, 20, gy_data2); TwoDMatrix gy(30, 20, gy_data2);
TwoDMatrix gu(30, 10, gu_data2); TwoDMatrix gu(30, 10, gu_data2);
@ -390,7 +390,7 @@ public:
} }
bool bool
run() const run() const override
{ {
TwoDMatrix gy(30, 20, gy_data2); TwoDMatrix gy(30, 20, gy_data2);
TwoDMatrix gu(30, 10, gu_data2); TwoDMatrix gu(30, 10, gu_data2);

View File

@ -97,14 +97,14 @@ namespace ogp
std::vector<double>(a.expr.nformulas()), aa(a) std::vector<double>(a.expr.nformulas()), aa(a)
{ {
} }
virtual ~AtomAsgnEvaluator() ~AtomAsgnEvaluator()
= default; override = default;
/** This sets all initial values to NaNs, all constants and /** This sets all initial values to NaNs, all constants and
* all values set by user by call set_value. This is called by * all values set by user by call set_value. This is called by
* FormulaEvaluator::eval() method, which is called by eval() * FormulaEvaluator::eval() method, which is called by eval()
* method passing this argument as AtomValues. So the * method passing this argument as AtomValues. So the
* ogp::EvalTree will be always this->etree. */ * ogp::EvalTree will be always this->etree. */
void setValues(EvalTree &et) const; void setValues(EvalTree &et) const override;
/** User setting of the values. For example in initval, /** User setting of the values. For example in initval,
* parameters are known and should be set to their values. In * parameters are known and should be set to their values. In
* constrast endogenous variables are set initially to NaNs by * constrast endogenous variables are set initially to NaNs by
@ -114,7 +114,7 @@ namespace ogp
* also checks whether the i-th expression is an atom. If so, * also checks whether the i-th expression is an atom. If so,
* it sets the value of the atom in ogp::EvalTree * it sets the value of the atom in ogp::EvalTree
* this->etree. */ * this->etree. */
void load(int i, double res); void load(int i, double res) override;
/** After the user values have been set, the assignments can /** After the user values have been set, the assignments can
* be evaluated. For this purpose we have eval() method. The * be evaluated. For this purpose we have eval() method. The
* result is that this object as std::vector<double> will * result is that this object as std::vector<double> will

View File

@ -131,8 +131,8 @@ namespace ogp
SAtoms(const SAtoms &sa) SAtoms(const SAtoms &sa)
= default; = default;
virtual ~SAtoms() ~SAtoms()
= default; override = default;
/** This substitutes all lags and leads for all exogenous and /** This substitutes all lags and leads for all exogenous and
* all lags and leads greater than 1 for all endogenous * all lags and leads greater than 1 for all endogenous
* variables. This is useful for perfect foresight problems * variables. This is useful for perfect foresight problems

View File

@ -100,7 +100,7 @@ namespace ogp
void import_constants(const Constants &c, OperationTree &otree, Tintintmap &tmap); void import_constants(const Constants &c, OperationTree &otree, Tintintmap &tmap);
/** Implements AtomValues interface. This sets the values to /** Implements AtomValues interface. This sets the values to
* the evaluation tree EvalTree. */ * the evaluation tree EvalTree. */
void setValues(EvalTree &et) const; void setValues(EvalTree &et) const override;
/** This adds a constant with the given tree index. The /** This adds a constant with the given tree index. The
* constant must be checked previously and asserted that it * constant must be checked previously and asserted that it
* does not exist. */ * does not exist. */
@ -169,8 +169,8 @@ namespace ogp
/** Construct empty DynamicAtoms. */ /** Construct empty DynamicAtoms. */
DynamicAtoms(); DynamicAtoms();
DynamicAtoms(const DynamicAtoms &da); DynamicAtoms(const DynamicAtoms &da);
virtual ~DynamicAtoms() ~DynamicAtoms()
= default; override = default;
/** Check the nulary term identified by its string /** Check the nulary term identified by its string
* representation. The nulary term can be either a constant or * representation. The nulary term can be either a constant or
* a variable. If constant, -1 is returned so that it could be * a variable. If constant, -1 is returned so that it could be
@ -178,19 +178,19 @@ namespace ogp
* appeared or not. If variable, then -1 is returned only if * appeared or not. If variable, then -1 is returned only if
* the variable has not been assigned an index, otherwise the * the variable has not been assigned an index, otherwise the
* assigned index is returned. */ * assigned index is returned. */
int check(const char *name) const; int check(const char *name) const override;
/** Assign the nulary term identified by its string /** Assign the nulary term identified by its string
* representation. This method should be called when check() * representation. This method should be called when check()
* returns -1. */ * returns -1. */
void assign(const char *name, int t); void assign(const char *name, int t) override;
/** Return a number of all variables. */ /** Return a number of all variables. */
int int
nvar() const nvar() const override
{ {
return nv; return nv;
} }
/** Return the vector of variable indices. */ /** Return the vector of variable indices. */
vector<int> variables() const; vector<int> variables() const override;
/** Return max lead and min lag for a variable given by the /** Return max lead and min lag for a variable given by the
* index. If a variable cannot be found, the method retursn * index. If a variable cannot be found, the method retursn
* the smallest integer as maxlead and the largest integer as * the smallest integer as maxlead and the largest integer as
@ -254,7 +254,7 @@ namespace ogp
* storage. */ * storage. */
void unassign_variable(const char *varname, int ll, int t); void unassign_variable(const char *varname, int ll, int t);
/** Debug print. */ /** Debug print. */
void print() const; void print() const override;
protected: protected:
/** Do the check for the variable. A subclass may need to /** Do the check for the variable. A subclass may need to
* reimplement this so that it could raise an error if the * reimplement this so that it could raise an error if the

View File

@ -33,12 +33,12 @@ namespace ogp
{ {
} }
VarOrdering * VarOrdering *
clone(const vector<const char *> &vnames, const DynamicAtoms &a) const clone(const vector<const char *> &vnames, const DynamicAtoms &a) const override
{ {
return new EndoVarOrdering1(*this, vnames, a); return new EndoVarOrdering1(*this, vnames, a);
} }
void void
do_ordering() do_ordering() override
{ {
do_pbspbfbf(); do_pbspbfbf();
} }
@ -61,12 +61,12 @@ namespace ogp
{ {
} }
VarOrdering * VarOrdering *
clone(const vector<const char *> &vnames, const DynamicAtoms &a) const clone(const vector<const char *> &vnames, const DynamicAtoms &a) const override
{ {
return new EndoVarOrdering2(*this, vnames, a); return new EndoVarOrdering2(*this, vnames, a);
} }
void void
do_ordering() do_ordering() override
{ {
do_bfspbfpb(); do_bfspbfpb();
} }
@ -88,12 +88,12 @@ namespace ogp
{ {
} }
VarOrdering * VarOrdering *
clone(const vector<const char *> &vnames, const DynamicAtoms &a) const clone(const vector<const char *> &vnames, const DynamicAtoms &a) const override
{ {
return new ExoVarOrdering(*this, vnames, a); return new ExoVarOrdering(*this, vnames, a);
} }
void void
do_ordering() do_ordering() override
{ {
do_increasing_time(); do_increasing_time();
} }
@ -234,7 +234,7 @@ namespace ogp
} }
FineAtoms(const FineAtoms &fa); FineAtoms(const FineAtoms &fa);
/** Deletes endo_order and exo_order. */ /** Deletes endo_order and exo_order. */
virtual ~FineAtoms() ~FineAtoms() override
{ {
if (endo_order) if (endo_order)
delete endo_order; delete endo_order;
@ -248,7 +248,7 @@ namespace ogp
* variable is declared by inserting it to * variable is declared by inserting it to
* DynamicAtoms::varnames. This is a responsibility of a * DynamicAtoms::varnames. This is a responsibility of a
* subclass. */ * subclass. */
int check_variable(const char *name) const; int check_variable(const char *name) const override;
/** This calculates min lag and max lead of endogenous variables. */ /** This calculates min lag and max lead of endogenous variables. */
void void
endovarspan(int &mlead, int &mlag) const endovarspan(int &mlead, int &mlag) const
@ -310,7 +310,7 @@ namespace ogp
/** Return the atoms with respect to which we are going to /** Return the atoms with respect to which we are going to
* differentiate. This must be called after * differentiate. This must be called after
* parsing_finished. */ * parsing_finished. */
vector<int> variables() const; vector<int> variables() const override;
/** Return the number of static. */ /** Return the number of static. */
int nstat() const; int nstat() const;
/** Return the number of predetermined. */ /** Return the number of predetermined. */
@ -412,7 +412,7 @@ namespace ogp
* action. */ * action. */
virtual void register_uniq_param(const char *name); virtual void register_uniq_param(const char *name);
/** Debug print. */ /** Debug print. */
void print() const; void print() const override;
private: private:
/** This performs the common part of parsing_finished(), which /** This performs the common part of parsing_finished(), which
* is a construction of internal orderings. */ * is a construction of internal orderings. */

View File

@ -42,8 +42,8 @@ namespace ogp
import_atoms(da, otree, tmap); import_atoms(da, otree, tmap);
} }
/* Destructor. */ /* Destructor. */
virtual ~StaticAtoms() ~StaticAtoms()
= default; override = default;
/** This imports atoms from dynamic atoms inserting the new /** This imports atoms from dynamic atoms inserting the new
* tree indices to the given tree (including constants). The * tree indices to the given tree (including constants). The
* mapping from old atoms to new atoms is traced in tmap. */ * mapping from old atoms to new atoms is traced in tmap. */
@ -53,17 +53,17 @@ namespace ogp
* constant is registered in Constants, it returns -1 * constant is registered in Constants, it returns -1
* otherwise. If the name is not constant, it returns result * otherwise. If the name is not constant, it returns result
* from check_variable, which is implemented by a subclass. */ * from check_variable, which is implemented by a subclass. */
int check(const char *name) const; int check(const char *name) const override;
/** This assigns a given tree index to the variable name. The /** This assigns a given tree index to the variable name. The
* name should have been checked before the call. */ * name should have been checked before the call. */
void assign(const char *name, int t); void assign(const char *name, int t) override;
int int
nvar() const nvar() const override
{ {
return varnames.num(); return varnames.num();
} }
/** This returns a vector of all variables. */ /** This returns a vector of all variables. */
vector<int> variables() const; vector<int> variables() const override;
/** This returns a tree index of the given variable. */ /** This returns a tree index of the given variable. */
int index(const char *name) const; int index(const char *name) const;
/** This returns a name from the given tree index. NULL is /** This returns a name from the given tree index. NULL is
@ -76,7 +76,7 @@ namespace ogp
return varorder[i]; return varorder[i];
} }
/** Debug print. */ /** Debug print. */
void print() const; void print() const override;
/** This registers a variable. A subclass can reimplement /** This registers a variable. A subclass can reimplement
* this, for example, to ensure uniqueness of the * this, for example, to ensure uniqueness of the
* name. However, this method should be always called in * name. However, this method should be always called in

View File

@ -84,8 +84,8 @@ namespace ogp
{ {
StaticFineAtoms::import_atoms(fa, otree, tmap, dummy); StaticFineAtoms::import_atoms(fa, otree, tmap, dummy);
} }
virtual ~StaticFineAtoms() ~StaticFineAtoms()
= default; override = default;
/** This adds atoms from dynamic atoms inserting new tree /** This adds atoms from dynamic atoms inserting new tree
* indices to the given tree and tracing the mapping from old * indices to the given tree and tracing the mapping from old
* atoms to new atoms in tmap. The ordering of the static * atoms to new atoms in tmap. The ordering of the static
@ -102,7 +102,7 @@ namespace ogp
* variable is declared by inserting it to * variable is declared by inserting it to
* StaticAtoms::varnames, which is done with registering * StaticAtoms::varnames, which is done with registering
* methods. This a responsibility of a subclass. */ * methods. This a responsibility of a subclass. */
int check_variable(const char *name) const; int check_variable(const char *name) const override;
/** Return an (external) ordering of parameters. */ /** Return an (external) ordering of parameters. */
const vector<const char *> & const vector<const char *> &
get_params() const get_params() const
@ -128,7 +128,7 @@ namespace ogp
/** Return the atoms with respect to which we are going to /** Return the atoms with respect to which we are going to
* differentiate. */ * differentiate. */
vector<int> vector<int>
variables() const variables() const override
{ {
return der_atoms; return der_atoms;
} }
@ -190,7 +190,7 @@ namespace ogp
* action. */ * action. */
virtual void register_uniq_param(const char *name); virtual void register_uniq_param(const char *name);
/** Debug print. */ /** Debug print. */
void print() const; void print() const override;
private: private:
/** Add endogenous variable name, which is already in the name /** Add endogenous variable name, which is already in the name
* storage. */ * storage. */

View File

@ -460,7 +460,7 @@ namespace ogp
{ {
} }
/** Format the operation with the default syntax. */ /** Format the operation with the default syntax. */
void format(const Operation &op, int t, FILE *fd); void format(const Operation &op, int t, FILE *fd) override;
/** This prints a string represenation of the given term, for /** This prints a string represenation of the given term, for
* example 'tmp10' for term 10. In this implementation it * example 'tmp10' for term 10. In this implementation it
* prints $10. */ * prints $10. */

View File

@ -24,12 +24,12 @@ class DynareNameList : public NameList
public: public:
DynareNameList(const Dynare &dynare); DynareNameList(const Dynare &dynare);
int int
getNum() const getNum() const override
{ {
return (int) names.size(); return (int) names.size();
} }
const char * const char *
getName(int i) const getName(int i) const override
{ {
return names[i]; return names[i];
} }
@ -45,12 +45,12 @@ class DynareExogNameList : public NameList
public: public:
DynareExogNameList(const Dynare &dynare); DynareExogNameList(const Dynare &dynare);
int int
getNum() const getNum() const override
{ {
return (int) names.size(); return (int) names.size();
} }
const char * const char *
getName(int i) const getName(int i) const override
{ {
return names[i]; return names[i];
} }
@ -63,12 +63,12 @@ public:
DynareStateNameList(const Dynare &dynare, const DynareNameList &dnl, DynareStateNameList(const Dynare &dynare, const DynareNameList &dnl,
const DynareExogNameList &denl); const DynareExogNameList &denl);
int int
getNum() const getNum() const override
{ {
return (int) names.size(); return (int) names.size();
} }
const char * const char *
getName(int i) const getName(int i) const override
{ {
return names[i]; return names[i];
} }
@ -106,34 +106,34 @@ public:
/** Makes a deep copy of the object. */ /** Makes a deep copy of the object. */
Dynare(const Dynare &dyn); Dynare(const Dynare &dyn);
DynamicModel * DynamicModel *
clone() const clone() const override
{ {
return new Dynare(*this); return new Dynare(*this);
} }
virtual
~Dynare(); ~Dynare() override;
int int
nstat() const nstat() const override
{ {
return model->getAtoms().nstat(); return model->getAtoms().nstat();
} }
int int
nboth() const nboth() const override
{ {
return model->getAtoms().nboth(); return model->getAtoms().nboth();
} }
int int
npred() const npred() const override
{ {
return model->getAtoms().npred(); return model->getAtoms().npred();
} }
int int
nforw() const nforw() const override
{ {
return model->getAtoms().nforw(); return model->getAtoms().nforw();
} }
int int
nexog() const nexog() const override
{ {
return model->getAtoms().nexo(); return model->getAtoms().nexo();
} }
@ -153,23 +153,23 @@ public:
return model->getAtoms().ny(); return model->getAtoms().ny();
} }
int int
order() const order() const override
{ {
return model->getOrder(); return model->getOrder();
} }
const NameList & const NameList &
getAllEndoNames() const getAllEndoNames() const override
{ {
return *dnl; return *dnl;
} }
const NameList & const NameList &
getStateNames() const getStateNames() const override
{ {
return *dsnl; return *dsnl;
} }
const NameList & const NameList &
getExogNames() const getExogNames() const override
{ {
return *denl; return *denl;
} }
@ -180,7 +180,7 @@ public:
return model->getVcov(); return model->getVcov();
} }
const TwoDMatrix & const TwoDMatrix &
getVcov() const getVcov() const override
{ {
return model->getVcov(); return model->getVcov();
} }
@ -201,17 +201,17 @@ public:
} }
const TensorContainer<FSSparseTensor> & const TensorContainer<FSSparseTensor> &
getModelDerivatives() const getModelDerivatives() const override
{ {
return md; return md;
} }
const Vector & const Vector &
getSteady() const getSteady() const override
{ {
return *ysteady; return *ysteady;
} }
Vector & Vector &
getSteady() getSteady() override
{ {
return *ysteady; return *ysteady;
} }
@ -224,15 +224,15 @@ public:
// here is true public interface // here is true public interface
void solveDeterministicSteady(Vector &steady); void solveDeterministicSteady(Vector &steady);
void void
solveDeterministicSteady() solveDeterministicSteady() override
{ {
solveDeterministicSteady(*ysteady); solveDeterministicSteady(*ysteady);
} }
void evaluateSystem(Vector &out, const Vector &yy, const Vector &xx); void evaluateSystem(Vector &out, const Vector &yy, const Vector &xx) override;
void evaluateSystem(Vector &out, const Vector &yym, const Vector &yy, void evaluateSystem(Vector &out, const Vector &yym, const Vector &yy,
const Vector &yyp, const Vector &xx); const Vector &yyp, const Vector &xx) override;
void calcDerivatives(const Vector &yy, const Vector &xx); void calcDerivatives(const Vector &yy, const Vector &xx);
void calcDerivativesAtSteady(); void calcDerivativesAtSteady() override;
void writeMat(mat_t *fd, const char *prefix) const; void writeMat(mat_t *fd, const char *prefix) const;
void writeDump(const std::string &basename) const; void writeDump(const std::string &basename) const;
@ -245,7 +245,7 @@ class DynareEvalLoader : public ogp::FormulaEvalLoader, public Vector
public: public:
DynareEvalLoader(const ogp::FineAtoms &a, Vector &out); DynareEvalLoader(const ogp::FineAtoms &a, Vector &out);
void void
load(int i, double res) load(int i, double res) override
{ {
operator[](i) = res; operator[](i) = res;
} }
@ -259,7 +259,7 @@ protected:
public: public:
DynareDerEvalLoader(const ogp::FineAtoms &a, TensorContainer<FSSparseTensor> &mod_ders, DynareDerEvalLoader(const ogp::FineAtoms &a, TensorContainer<FSSparseTensor> &mod_ders,
int order); int order);
void load(int i, int iord, const int *vars, double res); void load(int i, int iord, const int *vars, double res) override;
}; };
class DynareJacobian : public ogu::Jacobian, public ogp::FormulaDerEvalLoader class DynareJacobian : public ogu::Jacobian, public ogp::FormulaDerEvalLoader
@ -268,10 +268,10 @@ protected:
Dynare &d; Dynare &d;
public: public:
DynareJacobian(Dynare &dyn); DynareJacobian(Dynare &dyn);
virtual ~DynareJacobian() ~DynareJacobian()
= default; override = default;
void load(int i, int iord, const int *vars, double res); void load(int i, int iord, const int *vars, double res) override;
void eval(const Vector &in); void eval(const Vector &in) override;
}; };
class DynareVectorFunction : public ogu::VectorFunction class DynareVectorFunction : public ogu::VectorFunction
@ -283,19 +283,19 @@ public:
: d(dyn) : d(dyn)
{ {
} }
virtual ~DynareVectorFunction() ~DynareVectorFunction()
= default; override = default;
int int
inDim() const inDim() const override
{ {
return d.ny(); return d.ny();
} }
int int
outDim() const outDim() const override
{ {
return d.ny(); return d.ny();
} }
void eval(const ConstVector &in, Vector &out); void eval(const ConstVector &in, Vector &out) override;
}; };
#endif #endif

View File

@ -36,17 +36,17 @@ namespace ogdyn
DynareStaticAtoms(const DynareStaticAtoms &a) DynareStaticAtoms(const DynareStaticAtoms &a)
= default; = default;
virtual ~DynareStaticAtoms() ~DynareStaticAtoms()
= default; override = default;
/** This registers a unique varname identifier. It throws an /** This registers a unique varname identifier. It throws an
* exception if the variable name is duplicate. It checks the * exception if the variable name is duplicate. It checks the
* uniqueness and then it calls StaticAtoms::register_name. */ * uniqueness and then it calls StaticAtoms::register_name. */
void register_name(const char *name); void register_name(const char *name) override;
protected: protected:
/** This returns a tree index of the given variable, and if /** This returns a tree index of the given variable, and if
* the variable has not been registered, it throws an * the variable has not been registered, it throws an
* exception. */ * exception. */
int check_variable(const char *name) const; int check_variable(const char *name) const override;
}; };
class DynareDynamicAtoms : public ogp::SAtoms, public ogp::NularyStringConvertor class DynareDynamicAtoms : public ogp::SAtoms, public ogp::NularyStringConvertor
@ -63,24 +63,24 @@ namespace ogdyn
{ {
} }
DynareDynamicAtoms(const DynareDynamicAtoms &dda); DynareDynamicAtoms(const DynareDynamicAtoms &dda);
virtual ~DynareDynamicAtoms() ~DynareDynamicAtoms()
= default; override = default;
/** This parses a variable of the forms: varname(+3), /** This parses a variable of the forms: varname(+3),
* varname(3), varname, varname(-3), varname(0), varname(+0), * varname(3), varname, varname(-3), varname(0), varname(+0),
* varname(-0). */ * varname(-0). */
virtual void parse_variable(const char *in, std::string &out, int &ll) const; void parse_variable(const char *in, std::string &out, int &ll) const override;
/** Registers unique name of endogenous variable. */ /** Registers unique name of endogenous variable. */
void register_uniq_endo(const char *name); void register_uniq_endo(const char *name) override;
/** Registers unique name of exogenous variable. */ /** Registers unique name of exogenous variable. */
void register_uniq_exo(const char *name); void register_uniq_exo(const char *name) override;
/** Registers unique name of parameter. */ /** Registers unique name of parameter. */
void register_uniq_param(const char *name); void register_uniq_param(const char *name) override;
/** Return true if the name is a given type. */ /** Return true if the name is a given type. */
bool is_type(const char *name, atype tp) const; bool is_type(const char *name, atype tp) const;
/** Debug print. */ /** Debug print. */
void print() const; void print() const override;
/** Implement NularyStringConvertor::convert. */ /** Implement NularyStringConvertor::convert. */
std::string convert(int t) const; std::string convert(int t) const override;
}; };
/** This class represents the atom values for dynare, where /** This class represents the atom values for dynare, where
@ -116,7 +116,7 @@ namespace ogdyn
: atoms(a), paramvals(pvals), yym(ym), yy(y), yyp(yp), xx(x) : atoms(a), paramvals(pvals), yym(ym), yy(y), yyp(yp), xx(x)
{ {
} }
void setValues(ogp::EvalTree &et) const; void setValues(ogp::EvalTree &et) const override;
}; };
/** This class represents the atom values at the steady state. It /** This class represents the atom values at the steady state. It
@ -144,7 +144,7 @@ namespace ogdyn
xx.zeros(); xx.zeros();
} }
void void
setValues(ogp::EvalTree &et) const setValues(ogp::EvalTree &et) const override
{ {
av.setValues(et); av.setValues(et);
} }
@ -177,7 +177,7 @@ namespace ogdyn
{ {
} }
/** Set the values to the tree defined over the static atoms. */ /** Set the values to the tree defined over the static atoms. */
void setValues(ogp::EvalTree &et) const; void setValues(ogp::EvalTree &et) const override;
}; };
/** This class takes a vector of endogenous variables and a /** This class takes a vector of endogenous variables and a
@ -196,7 +196,7 @@ namespace ogdyn
DynareSteadySubstitutions(const ogp::FineAtoms &a, const ogp::OperationTree &tree, DynareSteadySubstitutions(const ogp::FineAtoms &a, const ogp::OperationTree &tree,
const Tsubstmap &subst, const Tsubstmap &subst,
const Vector &pvals, Vector &yy); const Vector &pvals, Vector &yy);
void load(int i, double res); void load(int i, double res) override;
protected: protected:
Vector &y; Vector &y;
vector<const char *> left_hand_sides; vector<const char *> left_hand_sides;
@ -219,7 +219,7 @@ namespace ogdyn
const ogp::OperationTree &tree, const ogp::OperationTree &tree,
const Tsubstmap &subst, const Tsubstmap &subst,
const Vector &pvals, Vector &yy); const Vector &pvals, Vector &yy);
void load(int i, double res); void load(int i, double res) override;
protected: protected:
Vector &y; Vector &y;
vector<const char *> left_hand_sides; vector<const char *> left_hand_sides;

View File

@ -257,10 +257,10 @@ namespace ogdyn
* in the model file. */ * in the model file. */
DynareParser(const char *str, int len, int ord); DynareParser(const char *str, int len, int ord);
DynareParser(const DynareParser &p); DynareParser(const DynareParser &p);
virtual
~DynareParser(); ~DynareParser() override;
DynareModel * DynareModel *
clone() const clone() const override
{ {
return new DynareParser(*this); return new DynareParser(*this);
} }
@ -364,9 +364,9 @@ namespace ogdyn
= default; = default;
~DynareSPModel() ~DynareSPModel()
= default; override = default;
virtual DynareModel * DynareModel *
clone() const clone() const override
{ {
return new DynareSPModel(*this); return new DynareSPModel(*this);
} }
@ -384,7 +384,7 @@ namespace ogdyn
NLSelector(const DynareModel &m) : model(m) NLSelector(const DynareModel &m) : model(m)
{ {
} }
bool operator()(int t) const; bool operator()(int t) const override;
}; };
/** This class writes a mathematical code evaluating the system of /** This class writes a mathematical code evaluating the system of
@ -426,27 +426,27 @@ namespace ogdyn
char *id; char *id;
public: public:
MatlabSSWriter(const DynareModel &dm, const char *idd); MatlabSSWriter(const DynareModel &dm, const char *idd);
virtual ~MatlabSSWriter() ~MatlabSSWriter() override
{ {
delete [] id; delete [] id;
} }
protected: protected:
// from ModelSSWriter // from ModelSSWriter
void write_der0_preamble(FILE *fd) const; void write_der0_preamble(FILE *fd) const override;
void write_der1_preamble(FILE *fd) const; void write_der1_preamble(FILE *fd) const override;
/** This writes atom assignments. We have four kinds of atoms /** This writes atom assignments. We have four kinds of atoms
* set here: endogenous vars coming from one parameter, * set here: endogenous vars coming from one parameter,
* parameter values given by the second parameter, constants, * parameter values given by the second parameter, constants,
* and the OperationTree::num_constants hardwired constants in * and the OperationTree::num_constants hardwired constants in
* ogp::OperationTree. */ * ogp::OperationTree. */
void write_atom_assignment(FILE *fd) const; void write_atom_assignment(FILE *fd) const override;
void write_der0_assignment(FILE *fd) const; void write_der0_assignment(FILE *fd) const override;
void write_der1_assignment(FILE *fd) const; void write_der1_assignment(FILE *fd) const override;
/** This prints t10 for t=10. */ /** This prints t10 for t=10. */
void format_term(int t, FILE *fd) const; void format_term(int t, FILE *fd) const override;
/** This prints a10 for t=10. The atoms a10 are supposed to be /** This prints a10 for t=10. The atoms a10 are supposed to be
* set by write_atom_assignments(). */ * set by write_atom_assignments(). */
void format_nulary(int t, FILE *fd) const; void format_nulary(int t, FILE *fd) const override;
private: private:
void write_common1_preamble(FILE *fd) const; void write_common1_preamble(FILE *fd) const;
void write_common2_preamble(FILE *fd) const; void write_common2_preamble(FILE *fd) const;
@ -465,7 +465,7 @@ namespace ogdyn
model(m) model(m)
{ {
} }
void format_nulary(int t, FILE *fd) const; void format_nulary(int t, FILE *fd) const override;
}; };
}; };

View File

@ -64,8 +64,8 @@ namespace ogu
: TwoDMatrix(n, n) : TwoDMatrix(n, n)
{ {
} }
virtual ~Jacobian() ~Jacobian()
= default; override = default;
virtual void eval(const Vector &in) = 0; virtual void eval(const Vector &in) = 0;
}; };
@ -88,8 +88,8 @@ namespace ogu
{ {
xnewton.zeros(); xcauchy.zeros(); x.zeros(); xnewton.zeros(); xcauchy.zeros(); x.zeros();
} }
virtual ~NLSolver() ~NLSolver()
= default; override = default;
/** Returns true if the problem has converged. xx as input is the /** Returns true if the problem has converged. xx as input is the
* starting value, as output it is a solution. */ * starting value, as output it is a solution. */
bool solve(Vector &xx, int &iter); bool solve(Vector &xx, int &iter);
@ -97,7 +97,7 @@ namespace ogu
* func(xx)^T*func(xx), where * func(xx)^T*func(xx), where
* xx=x+lambda*xcauchy+(1-lambda)*xnewton. It is non-const only * xx=x+lambda*xcauchy+(1-lambda)*xnewton. It is non-const only
* because it calls func, x, xnewton, xcauchy is not changed. */ * because it calls func, x, xnewton, xcauchy is not changed. */
double eval(double lambda); double eval(double lambda) override;
}; };
}; };

View File

@ -315,7 +315,7 @@ namespace ogdyn
* builder.diff_f_save have been put the the * builder.diff_f_save have been put the the
* ogp::FormulaCustomEvaluator. This is documented in the code * ogp::FormulaCustomEvaluator. This is documented in the code
* of the constructor. */ * of the constructor. */
void load(int i, double res); void load(int i, double res) override;
}; };
}; };

View File

@ -22,7 +22,7 @@ public:
GeneralMatrix::operator=(t); return *this; GeneralMatrix::operator=(t); return *this;
} }
const BlockDiagonal &operator=(const BlockDiagonal &b); const BlockDiagonal &operator=(const BlockDiagonal &b);
~BlockDiagonal() ~BlockDiagonal() override
{ {
delete [] row_len; delete [] col_len; delete [] row_len; delete [] col_len;
} }
@ -32,15 +32,15 @@ public:
int getLargestBlock() const; int getLargestBlock() const;
void printInfo() const; void printInfo() const;
void multKron(KronVector &x) const; void multKron(KronVector &x) const override;
void multKronTrans(KronVector &x) const; void multKronTrans(KronVector &x) const override;
const_col_iter col_begin(const DiagonalBlock &b) const; const_col_iter col_begin(const DiagonalBlock &b) const override;
col_iter col_begin(const DiagonalBlock &b); col_iter col_begin(const DiagonalBlock &b) override;
const_row_iter row_end(const DiagonalBlock &b) const; const_row_iter row_end(const DiagonalBlock &b) const override;
row_iter row_end(const DiagonalBlock &b); row_iter row_end(const DiagonalBlock &b) override;
QuasiTriangular * QuasiTriangular *
clone() const clone() const override
{ {
return new BlockDiagonal(*this); return new BlockDiagonal(*this);
} }

View File

@ -25,7 +25,7 @@ public:
: SylvesterSolver(kdecomp, fdecomp) : SylvesterSolver(kdecomp, fdecomp)
{ {
} }
void solve(SylvParams &pars, KronVector &x) const; void solve(SylvParams &pars, KronVector &x) const override;
private: private:
double performFirstStep(KronVector &x) const; double performFirstStep(KronVector &x) const;
static double performStep(const QuasiTriangular &k, const QuasiTriangular &f, static double performStep(const QuasiTriangular &k, const QuasiTriangular &f,

View File

@ -332,7 +332,7 @@ public:
{ {
}; };
_Self & _Self &
operator++() operator++() override
{ {
_Tparent::ptr++; row++; return *this; _Tparent::ptr++; row++; return *this;
} }
@ -367,7 +367,7 @@ public:
{ {
}; };
_Self & _Self &
operator++() operator++() override
{ {
_Tparent::ptr += _Tparent::d_size; col++; return *this; _Tparent::ptr += _Tparent::d_size; col++; return *this;
} }
@ -413,8 +413,8 @@ public:
QuasiTriangular(const SchurDecomp &decomp); QuasiTriangular(const SchurDecomp &decomp);
QuasiTriangular(const SchurDecompZero &decomp); QuasiTriangular(const SchurDecompZero &decomp);
QuasiTriangular(const QuasiTriangular &t); QuasiTriangular(const QuasiTriangular &t);
virtual
~QuasiTriangular(); ~QuasiTriangular() override;
const Diagonal & const Diagonal &
getDiagonal() const getDiagonal() const
{ {

View File

@ -20,38 +20,38 @@ public:
QuasiTriangularZero(int p, const QuasiTriangularZero &t); QuasiTriangularZero(int p, const QuasiTriangularZero &t);
QuasiTriangularZero(const QuasiTriangular &t); QuasiTriangularZero(const QuasiTriangular &t);
QuasiTriangularZero(const SchurDecompZero &decomp); QuasiTriangularZero(const SchurDecompZero &decomp);
~QuasiTriangularZero(); ~QuasiTriangularZero() override;
void solvePre(Vector &x, double &eig_min); void solvePre(Vector &x, double &eig_min) override;
void solvePreTrans(Vector &x, double &eig_min); void solvePreTrans(Vector &x, double &eig_min) override;
void multVec(Vector &x, const ConstVector &b) const; void multVec(Vector &x, const ConstVector &b) const override;
void multVecTrans(Vector &x, const ConstVector &b) const; void multVecTrans(Vector &x, const ConstVector &b) const override;
void multaVec(Vector &x, const ConstVector &b) const; void multaVec(Vector &x, const ConstVector &b) const override;
void multaVecTrans(Vector &x, const ConstVector &b) const; void multaVecTrans(Vector &x, const ConstVector &b) const override;
void multKron(KronVector &x) const; void multKron(KronVector &x) const override;
void multKronTrans(KronVector &x) const; void multKronTrans(KronVector &x) const override;
void multLeftOther(GeneralMatrix &a) const; void multLeftOther(GeneralMatrix &a) const override;
/* clone */ /* clone */
virtual QuasiTriangular * QuasiTriangular *
clone() const clone() const override
{ {
return new QuasiTriangularZero(*this); return new QuasiTriangularZero(*this);
} }
virtual QuasiTriangular * QuasiTriangular *
clone(int p, const QuasiTriangular &t) const clone(int p, const QuasiTriangular &t) const override
{ {
return new QuasiTriangularZero(p, (const QuasiTriangularZero &) t); return new QuasiTriangularZero(p, (const QuasiTriangularZero &) t);
} }
virtual QuasiTriangular * QuasiTriangular *
clone(double r) const clone(double r) const override
{ {
return new QuasiTriangularZero(r, *this); return new QuasiTriangularZero(r, *this);
} }
virtual QuasiTriangular * QuasiTriangular *
clone(double r, double rr, const QuasiTriangular &tt) const clone(double r, double rr, const QuasiTriangular &tt) const override
{ {
return new QuasiTriangularZero(r, *this, rr, (const QuasiTriangularZero &) tt); return new QuasiTriangularZero(r, *this, rr, (const QuasiTriangularZero &) tt);
} }
void print() const; void print() const override;
}; };
#endif /* QUASI_TRIANGULAR_ZERO_H */ #endif /* QUASI_TRIANGULAR_ZERO_H */

View File

@ -54,7 +54,7 @@ public:
{ {
return ru; return ru;
} }
int getDim() const; int getDim() const override;
int int
getZeroCols() const getZeroCols() const
{ {

View File

@ -26,7 +26,7 @@ class SylvExceptionMessage : public SylvException
char message[500]; char message[500];
public: public:
SylvExceptionMessage(const char *f, int l, const char *mes); SylvExceptionMessage(const char *f, int l, const char *mes);
virtual int printMessage(char *str, int maxlen) const; int printMessage(char *str, int maxlen) const override;
}; };
// define macros: // define macros:

View File

@ -19,10 +19,10 @@ public:
TriangularSylvester(const QuasiTriangular &k, const QuasiTriangular &f); TriangularSylvester(const QuasiTriangular &k, const QuasiTriangular &f);
TriangularSylvester(const SchurDecompZero &kdecomp, const SchurDecomp &fdecomp); TriangularSylvester(const SchurDecompZero &kdecomp, const SchurDecomp &fdecomp);
TriangularSylvester(const SchurDecompZero &kdecomp, const SimilarityDecomp &fdecomp); TriangularSylvester(const SchurDecompZero &kdecomp, const SimilarityDecomp &fdecomp);
virtual
~TriangularSylvester(); ~TriangularSylvester() override;
void print() const; void print() const;
void solve(SylvParams &pars, KronVector &d) const; void solve(SylvParams &pars, KronVector &d) const override;
void solvi(double r, KronVector &d, double &eig_min) const; void solvi(double r, KronVector &d, double &eig_min) const;
void solvii(double alpha, double beta1, double beta2, void solvii(double alpha, double beta1, double beta2,

View File

@ -537,7 +537,7 @@ public:
PureTriangTest() : TestRunnable("pure triangular solve (5)") PureTriangTest() : TestRunnable("pure triangular solve (5)")
{ {
} }
bool run() const; bool run() const override;
}; };
class PureTriangTransTest : public TestRunnable class PureTriangTransTest : public TestRunnable
@ -546,7 +546,7 @@ public:
PureTriangTransTest() : TestRunnable("pure triangular solve trans (5)") PureTriangTransTest() : TestRunnable("pure triangular solve trans (5)")
{ {
} }
bool run() const; bool run() const override;
}; };
class PureTrLargeTest : public TestRunnable class PureTrLargeTest : public TestRunnable
@ -555,7 +555,7 @@ public:
PureTrLargeTest() : TestRunnable("pure triangular large solve (300)") PureTrLargeTest() : TestRunnable("pure triangular large solve (300)")
{ {
} }
bool run() const; bool run() const override;
}; };
class PureTrLargeTransTest : public TestRunnable class PureTrLargeTransTest : public TestRunnable
@ -564,7 +564,7 @@ public:
PureTrLargeTransTest() : TestRunnable("pure triangular large solve trans (300)") PureTrLargeTransTest() : TestRunnable("pure triangular large solve trans (300)")
{ {
} }
bool run() const; bool run() const override;
}; };
class QuasiTriangTest : public TestRunnable class QuasiTriangTest : public TestRunnable
@ -573,7 +573,7 @@ public:
QuasiTriangTest() : TestRunnable("quasi triangular solve (7)") QuasiTriangTest() : TestRunnable("quasi triangular solve (7)")
{ {
} }
bool run() const; bool run() const override;
}; };
class QuasiTriangTransTest : public TestRunnable class QuasiTriangTransTest : public TestRunnable
@ -582,7 +582,7 @@ public:
QuasiTriangTransTest() : TestRunnable("quasi triangular solve trans (7)") QuasiTriangTransTest() : TestRunnable("quasi triangular solve trans (7)")
{ {
} }
bool run() const; bool run() const override;
}; };
class QuasiTrLargeTest : public TestRunnable class QuasiTrLargeTest : public TestRunnable
@ -591,7 +591,7 @@ public:
QuasiTrLargeTest() : TestRunnable("quasi triangular solve large (250)") QuasiTrLargeTest() : TestRunnable("quasi triangular solve large (250)")
{ {
} }
bool run() const; bool run() const override;
}; };
class QuasiTrLargeTransTest : public TestRunnable class QuasiTrLargeTransTest : public TestRunnable
@ -600,7 +600,7 @@ public:
QuasiTrLargeTransTest() : TestRunnable("quasi triangular solve large trans (250)") QuasiTrLargeTransTest() : TestRunnable("quasi triangular solve large trans (250)")
{ {
} }
bool run() const; bool run() const override;
}; };
class QuasiZeroSmallTest : public TestRunnable class QuasiZeroSmallTest : public TestRunnable
@ -609,7 +609,7 @@ public:
QuasiZeroSmallTest() : TestRunnable("quasi tr. zero small test (2x1)") QuasiZeroSmallTest() : TestRunnable("quasi tr. zero small test (2x1)")
{ {
} }
bool run() const; bool run() const override;
}; };
class MultKronSmallTest : public TestRunnable class MultKronSmallTest : public TestRunnable
@ -618,7 +618,7 @@ public:
MultKronSmallTest() : TestRunnable("kronecker small mult (2=2x1)") MultKronSmallTest() : TestRunnable("kronecker small mult (2=2x1)")
{ {
} }
bool run() const; bool run() const override;
}; };
class MultKronTest : public TestRunnable class MultKronTest : public TestRunnable
@ -627,7 +627,7 @@ public:
MultKronTest() : TestRunnable("kronecker mult (245=7x7x5)") MultKronTest() : TestRunnable("kronecker mult (245=7x7x5)")
{ {
} }
bool run() const; bool run() const override;
}; };
class MultKronSmallTransTest : public TestRunnable class MultKronSmallTransTest : public TestRunnable
@ -636,7 +636,7 @@ public:
MultKronSmallTransTest() : TestRunnable("kronecker small trans mult (2=2x1)") MultKronSmallTransTest() : TestRunnable("kronecker small trans mult (2=2x1)")
{ {
} }
bool run() const; bool run() const override;
}; };
class MultKronTransTest : public TestRunnable class MultKronTransTest : public TestRunnable
@ -645,7 +645,7 @@ public:
MultKronTransTest() : TestRunnable("kronecker trans mult (245=7x7x5)") MultKronTransTest() : TestRunnable("kronecker trans mult (245=7x7x5)")
{ {
} }
bool run() const; bool run() const override;
}; };
class LevelKronTest : public TestRunnable class LevelKronTest : public TestRunnable
@ -654,7 +654,7 @@ public:
LevelKronTest() : TestRunnable("kronecker level mult (1715=7x[7]x7x5)") LevelKronTest() : TestRunnable("kronecker level mult (1715=7x[7]x7x5)")
{ {
} }
bool run() const; bool run() const override;
}; };
class LevelKronTransTest : public TestRunnable class LevelKronTransTest : public TestRunnable
@ -663,7 +663,7 @@ public:
LevelKronTransTest() : TestRunnable("kronecker level trans mult (1715=7x[7]x7x5)") LevelKronTransTest() : TestRunnable("kronecker level trans mult (1715=7x[7]x7x5)")
{ {
} }
bool run() const; bool run() const override;
}; };
class LevelZeroKronTest : public TestRunnable class LevelZeroKronTest : public TestRunnable
@ -672,7 +672,7 @@ public:
LevelZeroKronTest() : TestRunnable("kronecker level mult (1715=7x7x7x[5])") LevelZeroKronTest() : TestRunnable("kronecker level mult (1715=7x7x7x[5])")
{ {
} }
bool run() const; bool run() const override;
}; };
class LevelZeroKronTransTest : public TestRunnable class LevelZeroKronTransTest : public TestRunnable
@ -681,7 +681,7 @@ public:
LevelZeroKronTransTest() : TestRunnable("kronecker level trans mult (1715=7x7x7x[5])") LevelZeroKronTransTest() : TestRunnable("kronecker level trans mult (1715=7x7x7x[5])")
{ {
} }
bool run() const; bool run() const override;
}; };
class KronPowerTest : public TestRunnable class KronPowerTest : public TestRunnable
@ -690,7 +690,7 @@ public:
KronPowerTest() : TestRunnable("kronecker power mult (1715=7x7x7x5)") KronPowerTest() : TestRunnable("kronecker power mult (1715=7x7x7x5)")
{ {
} }
bool run() const; bool run() const override;
}; };
class SmallLinEvalTest : public TestRunnable class SmallLinEvalTest : public TestRunnable
@ -699,7 +699,7 @@ public:
SmallLinEvalTest() : TestRunnable("lin eval (24=2 x 2x2x3)") SmallLinEvalTest() : TestRunnable("lin eval (24=2 x 2x2x3)")
{ {
} }
bool run() const; bool run() const override;
}; };
class LinEvalTest : public TestRunnable class LinEvalTest : public TestRunnable
@ -708,7 +708,7 @@ public:
LinEvalTest() : TestRunnable("lin eval (490=2 x 7x7x5)") LinEvalTest() : TestRunnable("lin eval (490=2 x 7x7x5)")
{ {
} }
bool run() const; bool run() const override;
}; };
class SmallQuaEvalTest : public TestRunnable class SmallQuaEvalTest : public TestRunnable
@ -717,7 +717,7 @@ public:
SmallQuaEvalTest() : TestRunnable("qua eval (24=2 x 2x2x3)") SmallQuaEvalTest() : TestRunnable("qua eval (24=2 x 2x2x3)")
{ {
} }
bool run() const; bool run() const override;
}; };
class QuaEvalTest : public TestRunnable class QuaEvalTest : public TestRunnable
@ -726,7 +726,7 @@ public:
QuaEvalTest() : TestRunnable("qua eval (490=2 x 7x7x5)") QuaEvalTest() : TestRunnable("qua eval (490=2 x 7x7x5)")
{ {
} }
bool run() const; bool run() const override;
}; };
class TriSylvSmallRealTest : public TestRunnable class TriSylvSmallRealTest : public TestRunnable
@ -735,7 +735,7 @@ public:
TriSylvSmallRealTest() : TestRunnable("triangular sylvester small real solve (12=2x2x3)") TriSylvSmallRealTest() : TestRunnable("triangular sylvester small real solve (12=2x2x3)")
{ {
} }
bool run() const; bool run() const override;
}; };
class TriSylvSmallComplexTest : public TestRunnable class TriSylvSmallComplexTest : public TestRunnable
@ -744,7 +744,7 @@ public:
TriSylvSmallComplexTest() : TestRunnable("triangular sylvester small complx solve (12=2x2x3)") TriSylvSmallComplexTest() : TestRunnable("triangular sylvester small complx solve (12=2x2x3)")
{ {
} }
bool run() const; bool run() const override;
}; };
class TriSylvTest : public TestRunnable class TriSylvTest : public TestRunnable
@ -753,7 +753,7 @@ public:
TriSylvTest() : TestRunnable("triangular sylvester solve (245=7x7x5)") TriSylvTest() : TestRunnable("triangular sylvester solve (245=7x7x5)")
{ {
} }
bool run() const; bool run() const override;
}; };
class TriSylvBigTest : public TestRunnable class TriSylvBigTest : public TestRunnable
@ -762,7 +762,7 @@ public:
TriSylvBigTest() : TestRunnable("triangular sylvester big solve (48000=40x40x30)") TriSylvBigTest() : TestRunnable("triangular sylvester big solve (48000=40x40x30)")
{ {
} }
bool run() const; bool run() const override;
}; };
class TriSylvLargeTest : public TestRunnable class TriSylvLargeTest : public TestRunnable
@ -771,7 +771,7 @@ public:
TriSylvLargeTest() : TestRunnable("triangular sylvester large solve (1920000=40x40x40x30)") TriSylvLargeTest() : TestRunnable("triangular sylvester large solve (1920000=40x40x40x30)")
{ {
} }
bool run() const; bool run() const override;
}; };
class IterSylvTest : public TestRunnable class IterSylvTest : public TestRunnable
@ -780,7 +780,7 @@ public:
IterSylvTest() : TestRunnable("iterative sylvester solve (245=7x7x5)") IterSylvTest() : TestRunnable("iterative sylvester solve (245=7x7x5)")
{ {
} }
bool run() const; bool run() const override;
}; };
class IterSylvLargeTest : public TestRunnable class IterSylvLargeTest : public TestRunnable
@ -789,7 +789,7 @@ public:
IterSylvLargeTest() : TestRunnable("iterative sylvester large solve (1920000=40x40x40x30)") IterSylvLargeTest() : TestRunnable("iterative sylvester large solve (1920000=40x40x40x30)")
{ {
} }
bool run() const; bool run() const override;
}; };
class GenSylvSmallTest : public TestRunnable class GenSylvSmallTest : public TestRunnable
@ -798,7 +798,7 @@ public:
GenSylvSmallTest() : TestRunnable("general sylvester small solve (18=3x3x2)") GenSylvSmallTest() : TestRunnable("general sylvester small solve (18=3x3x2)")
{ {
} }
bool run() const; bool run() const override;
}; };
class GenSylvTest : public TestRunnable class GenSylvTest : public TestRunnable
@ -807,7 +807,7 @@ public:
GenSylvTest() : TestRunnable("general sylvester solve (12000=20x20x30)") GenSylvTest() : TestRunnable("general sylvester solve (12000=20x20x30)")
{ {
} }
bool run() const; bool run() const override;
}; };
class GenSylvSingTest : public TestRunnable class GenSylvSingTest : public TestRunnable
@ -816,7 +816,7 @@ public:
GenSylvSingTest() : TestRunnable("general sylvester solve for sing. C (2500000=50x50x50x20)") GenSylvSingTest() : TestRunnable("general sylvester solve for sing. C (2500000=50x50x50x20)")
{ {
} }
bool run() const; bool run() const override;
}; };
class GenSylvLargeTest : public TestRunnable class GenSylvLargeTest : public TestRunnable
@ -825,7 +825,7 @@ public:
GenSylvLargeTest() : TestRunnable("general sylvester solve (2500000=50x50x50x20)") GenSylvLargeTest() : TestRunnable("general sylvester solve (2500000=50x50x50x20)")
{ {
} }
bool run() const; bool run() const override;
}; };
class EigBubFrankTest : public TestRunnable class EigBubFrankTest : public TestRunnable
@ -834,7 +834,7 @@ public:
EigBubFrankTest() : TestRunnable("eig. bubble frank test (12x12)") EigBubFrankTest() : TestRunnable("eig. bubble frank test (12x12)")
{ {
} }
bool run() const; bool run() const override;
}; };
class EigBubSplitTest : public TestRunnable class EigBubSplitTest : public TestRunnable
@ -844,7 +844,7 @@ public:
EigBubSplitTest() : TestRunnable("eig. bubble complex split test (3x3)") EigBubSplitTest() : TestRunnable("eig. bubble complex split test (3x3)")
{ {
} }
bool run() const; bool run() const override;
}; };
class EigBubSameTest : public TestRunnable class EigBubSameTest : public TestRunnable
@ -854,7 +854,7 @@ public:
EigBubSameTest() : TestRunnable("eig. bubble same test (5x5)") EigBubSameTest() : TestRunnable("eig. bubble same test (5x5)")
{ {
} }
bool run() const; bool run() const override;
}; };
class BlockDiagSmallTest : public TestRunnable class BlockDiagSmallTest : public TestRunnable
@ -863,7 +863,7 @@ public:
BlockDiagSmallTest() : TestRunnable("block diagonalization small test (7x7)") BlockDiagSmallTest() : TestRunnable("block diagonalization small test (7x7)")
{ {
} }
bool run() const; bool run() const override;
}; };
class BlockDiagFrankTest : public TestRunnable class BlockDiagFrankTest : public TestRunnable
@ -872,7 +872,7 @@ public:
BlockDiagFrankTest() : TestRunnable("block diagonalization of frank (12x12)") BlockDiagFrankTest() : TestRunnable("block diagonalization of frank (12x12)")
{ {
} }
bool run() const; bool run() const override;
}; };
class BlockDiagIllCondTest : public TestRunnable class BlockDiagIllCondTest : public TestRunnable
@ -881,7 +881,7 @@ public:
BlockDiagIllCondTest() : TestRunnable("block diagonalization of ill conditioned (15x15)") BlockDiagIllCondTest() : TestRunnable("block diagonalization of ill conditioned (15x15)")
{ {
} }
bool run() const; bool run() const override;
}; };
class BlockDiagBigTest : public TestRunnable class BlockDiagBigTest : public TestRunnable
@ -890,7 +890,7 @@ public:
BlockDiagBigTest() : TestRunnable("block diagonalization big test (50x50)") BlockDiagBigTest() : TestRunnable("block diagonalization big test (50x50)")
{ {
} }
bool run() const; bool run() const override;
}; };
/**********************************************************/ /**********************************************************/

View File

@ -125,14 +125,14 @@ public:
/* Here we deallocate the refined containers, and deallocate the array of /* Here we deallocate the refined containers, and deallocate the array of
refined containers. */ refined containers. */
virtual ~FineContainer() ~FineContainer() override
{ {
for (int i = 0; i < _Stype::numConts(); i++) for (int i = 0; i < _Stype::numConts(); i++)
delete ref_conts[i]; delete ref_conts[i];
delete [] ref_conts; delete [] ref_conts;
} }
itype itype
getType(int i, const Symmetry &s) const getType(int i, const Symmetry &s) const override
{ {
return stack_cont.getType(getOldIndex(i), s); return stack_cont.getType(getOldIndex(i), s);
} }

View File

@ -67,16 +67,16 @@ public:
{ {
} }
void increment(IntSequence &v) const; void increment(IntSequence &v) const override;
void decrement(IntSequence &v) const; void decrement(IntSequence &v) const override;
UTensor&unfold() const; UTensor&unfold() const override;
Symmetry Symmetry
getSym() const getSym() const
{ {
return Symmetry(dimen()); return Symmetry(dimen());
} }
int getOffset(const IntSequence &v) const; int getOffset(const IntSequence &v) const override;
void addSubTensor(const FGSTensor &t); void addSubTensor(const FGSTensor &t);
int int
nvar() const nvar() const
@ -111,16 +111,16 @@ public:
{ {
} }
void increment(IntSequence &v) const; void increment(IntSequence &v) const override;
void decrement(IntSequence &v) const; void decrement(IntSequence &v) const override;
FTensor&fold() const; FTensor&fold() const override;
Symmetry Symmetry
getSym() const getSym() const
{ {
return Symmetry(dimen()); return Symmetry(dimen());
} }
int getOffset(const IntSequence &v) const; int getOffset(const IntSequence &v) const override;
void addSubTensor(const UGSTensor &t); void addSubTensor(const UGSTensor &t);
int int
nvar() const nvar() const

View File

@ -169,16 +169,16 @@ public:
{ {
} }
virtual ~FGSTensor() ~FGSTensor()
= default; override = default;
void increment(IntSequence &v) const; void increment(IntSequence &v) const override;
void void
decrement(IntSequence &v) const decrement(IntSequence &v) const override
{ {
tdims.decrement(v); tdims.decrement(v);
} }
UTensor&unfold() const; UTensor&unfold() const override;
const TensorDimens & const TensorDimens &
getDims() const getDims() const
{ {
@ -193,7 +193,7 @@ public:
void contractAndAdd(int i, FGSTensor &out, void contractAndAdd(int i, FGSTensor &out,
const FRSingleTensor &col) const; const FRSingleTensor &col) const;
int int
getOffset(const IntSequence &v) const getOffset(const IntSequence &v) const override
{ {
return tdims.calcFoldOffset(v); return tdims.calcFoldOffset(v);
} }
@ -237,12 +237,12 @@ public:
: UTensor(0, t.nrows(), t), tdims(t.nvar(), t.dimen()) : UTensor(0, t.nrows(), t), tdims(t.nvar(), t.dimen())
{ {
} }
virtual ~UGSTensor() ~UGSTensor()
= default; override = default;
void increment(IntSequence &v) const; void increment(IntSequence &v) const override;
void decrement(IntSequence &v) const; void decrement(IntSequence &v) const override;
FTensor&fold() const; FTensor&fold() const override;
const TensorDimens & const TensorDimens &
getDims() const getDims() const
{ {
@ -256,7 +256,7 @@ public:
void contractAndAdd(int i, UGSTensor &out, void contractAndAdd(int i, UGSTensor &out,
const URSingleTensor &col) const; const URSingleTensor &col) const;
int getOffset(const IntSequence &v) const; int getOffset(const IntSequence &v) const override;
private: private:
void unfoldData(); void unfoldData();
public: public:

View File

@ -224,7 +224,7 @@ public:
: KronProd(dim), matlist(new const TwoDMatrix *[dim]) : KronProd(dim), matlist(new const TwoDMatrix *[dim])
{ {
} }
virtual ~KronProdAll() ~KronProdAll() override
{ {
delete [] matlist; delete [] matlist;
} }
@ -236,7 +236,7 @@ public:
return *(matlist[i]); return *(matlist[i]);
} }
void mult(const ConstTwoDMatrix &in, TwoDMatrix &out) const; void mult(const ConstTwoDMatrix &in, TwoDMatrix &out) const override;
Vector *multRows(const IntSequence &irows) const; Vector *multRows(const IntSequence &irows) const;
private: private:
bool isUnit() const; bool isUnit() const;
@ -301,7 +301,7 @@ public:
mat(kpa.getMat(kpa.dimen()-1)) mat(kpa.getMat(kpa.dimen()-1))
{ {
} }
void mult(const ConstTwoDMatrix &in, TwoDMatrix &out) const; void mult(const ConstTwoDMatrix &in, TwoDMatrix &out) const override;
}; };
/* This class represents $A\otimes I$. We have only one reference to /* This class represents $A\otimes I$. We have only one reference to
@ -320,7 +320,7 @@ public:
} }
KronProdAI(const KronProdIAI &kpiai); KronProdAI(const KronProdIAI &kpiai);
void mult(const ConstTwoDMatrix &in, TwoDMatrix &out) const; void mult(const ConstTwoDMatrix &in, TwoDMatrix &out) const override;
}; };
/* This class represents $I\otimes A\otimes I$. We have only one reference to /* This class represents $I\otimes A\otimes I$. We have only one reference to
@ -337,7 +337,7 @@ public:
mat(kpa.getMat(i)) mat(kpa.getMat(i))
{ {
} }
void mult(const ConstTwoDMatrix &in, TwoDMatrix &out) const; void mult(const ConstTwoDMatrix &in, TwoDMatrix &out) const override;
}; };
#endif #endif

View File

@ -204,11 +204,11 @@ public:
= default; = default;
void increment(IntSequence &v) const; void increment(IntSequence &v) const override;
void decrement(IntSequence &v) const; void decrement(IntSequence &v) const override;
FTensor&fold() const; FTensor&fold() const override;
int getOffset(const IntSequence &v) const; int getOffset(const IntSequence &v) const override;
void addTo(FGSTensor &out) const; void addTo(FGSTensor &out) const;
void addTo(UGSTensor &out) const; void addTo(UGSTensor &out) const;
@ -368,11 +368,11 @@ public:
= default; = default;
void increment(IntSequence &v) const; void increment(IntSequence &v) const override;
void decrement(IntSequence &v) const; void decrement(IntSequence &v) const override;
UTensor&unfold() const; UTensor&unfold() const override;
int getOffset(const IntSequence &v) const; int getOffset(const IntSequence &v) const override;
void addTo(FGSTensor &out) const; void addTo(FGSTensor &out) const;
}; };

View File

@ -135,17 +135,17 @@ public:
IrregTensor(const IrregTensorHeader &h); IrregTensor(const IrregTensorHeader &h);
void addTo(FRSingleTensor &out) const; void addTo(FRSingleTensor &out) const;
void void
increment(IntSequence &v) const increment(IntSequence &v) const override
{ {
header.increment(v); header.increment(v);
} }
void void
decrement(IntSequence &v) const decrement(IntSequence &v) const override
{ {
TL_RAISE("Not implemented error in IrregTensor::decrement"); TL_RAISE("Not implemented error in IrregTensor::decrement");
} }
int int
getOffset(const IntSequence &v) const getOffset(const IntSequence &v) const override
{ {
TL_RAISE("Not implemented error in IrregTensor::getOffset"); return 0; TL_RAISE("Not implemented error in IrregTensor::getOffset"); return 0;
} }

View File

@ -57,14 +57,14 @@ public:
= default; = default;
URTensor(const FRTensor &ft); URTensor(const FRTensor &ft);
virtual ~URTensor() ~URTensor()
= default; override = default;
void increment(IntSequence &v) const; void increment(IntSequence &v) const override;
void decrement(IntSequence &v) const; void decrement(IntSequence &v) const override;
FTensor&fold() const; FTensor&fold() const override;
int getOffset(const IntSequence &v) const; int getOffset(const IntSequence &v) const override;
int int
nvar() const nvar() const
{ {
@ -93,12 +93,12 @@ public:
= default; = default;
FRTensor(const URTensor &ut); FRTensor(const URTensor &ut);
virtual ~FRTensor() ~FRTensor()
= default; override = default;
void increment(IntSequence &v) const; void increment(IntSequence &v) const override;
void decrement(IntSequence &v) const; void decrement(IntSequence &v) const override;
UTensor&unfold() const; UTensor&unfold() const override;
int int
nvar() const nvar() const
@ -106,7 +106,7 @@ public:
return nv; return nv;
} }
int int
getOffset(const IntSequence &v) const getOffset(const IntSequence &v) const override
{ {
return FTensor::getOffset(v, nv); return FTensor::getOffset(v, nv);
} }
@ -136,9 +136,9 @@ public:
URSingleTensor(const URSingleTensor &ut) URSingleTensor(const URSingleTensor &ut)
= default; = default;
virtual ~URSingleTensor() ~URSingleTensor()
= default; override = default;
FTensor&fold() const; FTensor&fold() const override;
}; };
/* This class represents one column row-oriented tensor. The only way /* This class represents one column row-oriented tensor. The only way
@ -158,8 +158,8 @@ public:
FRSingleTensor(const FRSingleTensor &ft) FRSingleTensor(const FRSingleTensor &ft)
= default; = default;
virtual ~FRSingleTensor() ~FRSingleTensor()
= default; override = default;
}; };
#endif #endif

View File

@ -138,7 +138,7 @@ public:
void insert(const IntSequence &s, int r, double c); void insert(const IntSequence &s, int r, double c);
void multColumnAndAdd(const Tensor &t, Vector &v) const; void multColumnAndAdd(const Tensor &t, Vector &v) const;
const Symmetry & const Symmetry &
getSym() const getSym() const override
{ {
return sym; return sym;
} }
@ -169,7 +169,7 @@ public:
= default; = default;
void insert(const IntSequence &s, int r, double c); void insert(const IntSequence &s, int r, double c);
const Symmetry & const Symmetry &
getSym() const getSym() const override
{ {
return tdims.getSym(); return tdims.getSym();
} }

View File

@ -148,48 +148,48 @@ public:
conts(new const _Ctype *[nc]) conts(new const _Ctype *[nc])
{ {
} }
virtual ~StackContainer() ~StackContainer() override
{ {
delete [] conts; delete [] conts;
} }
const IntSequence & const IntSequence &
getStackSizes() const getStackSizes() const override
{ {
return stack_sizes; return stack_sizes;
} }
IntSequence & IntSequence &
getStackSizes() getStackSizes() override
{ {
return stack_sizes; return stack_sizes;
} }
const IntSequence & const IntSequence &
getStackOffsets() const getStackOffsets() const override
{ {
return stack_offsets; return stack_offsets;
} }
IntSequence & IntSequence &
getStackOffsets() getStackOffsets() override
{ {
return stack_offsets; return stack_offsets;
} }
int int
numConts() const numConts() const override
{ {
return num_conts; return num_conts;
} }
const _Ctype * const _Ctype *
getCont(int i) const getCont(int i) const override
{ {
return conts[i]; return conts[i];
} }
virtual itype getType(int i, const Symmetry &s) const = 0; itype getType(int i, const Symmetry &s) const override = 0;
int int
numStacks() const numStacks() const override
{ {
return stack_sizes.size(); return stack_sizes.size();
} }
bool bool
isZero(int i, const Symmetry &s) const isZero(int i, const Symmetry &s) const override
{ {
TL_RAISE_IF(i < 0 || i >= numStacks(), TL_RAISE_IF(i < 0 || i >= numStacks(),
"Wrong index to stack in StackContainer::isZero."); "Wrong index to stack in StackContainer::isZero.");
@ -198,7 +198,7 @@ public:
} }
const _Ttype * const _Ttype *
getMatrix(int i, const Symmetry &s) const getMatrix(int i, const Symmetry &s) const override
{ {
TL_RAISE_IF(isZero(i, s) || getType(i, s) == _Stype::unit, TL_RAISE_IF(isZero(i, s) || getType(i, s) == _Stype::unit,
"Matrix is not returned in StackContainer::getMatrix"); "Matrix is not returned in StackContainer::getMatrix");
@ -206,7 +206,7 @@ public:
} }
int int
getLengthOfMatrixStacks(const Symmetry &s) const getLengthOfMatrixStacks(const Symmetry &s) const override
{ {
int res = 0; int res = 0;
int i = 0; int i = 0;
@ -216,7 +216,7 @@ public:
} }
int int
getUnitPos(const Symmetry &s) const getUnitPos(const Symmetry &s) const override
{ {
if (s.dimen() != 1) if (s.dimen() != 1)
return -1; return -1;
@ -228,7 +228,7 @@ public:
Vector * Vector *
createPackedColumn(const Symmetry &s, createPackedColumn(const Symmetry &s,
const IntSequence &coor, int &iu) const const IntSequence &coor, int &iu) const override
{ {
TL_RAISE_IF(s.dimen() != coor.size(), TL_RAISE_IF(s.dimen() != coor.size(),
"Incompatible coordinates for symmetry in StackContainer::createPackedColumn"); "Incompatible coordinates for symmetry in StackContainer::createPackedColumn");
@ -360,7 +360,7 @@ public:
file, how $z$ looks, and code is clear. */ file, how $z$ looks, and code is clear. */
itype itype
getType(int i, const Symmetry &s) const getType(int i, const Symmetry &s) const override
{ {
if (i == 0) if (i == 0)
return _Stype::matrix; return _Stype::matrix;
@ -443,7 +443,7 @@ public:
information. */ information. */
itype itype
getType(int i, const Symmetry &s) const getType(int i, const Symmetry &s) const override
{ {
if (i == 0) if (i == 0)
if (s[2] > 0 || s == Symmetry(0, 0, 0, 1)) if (s[2] > 0 || s == Symmetry(0, 0, 0, 1))
@ -656,7 +656,7 @@ public:
const Symmetry &s, const Symmetry &s,
const FGSContainer &dcontainer, const FGSContainer &dcontainer,
FGSTensor &outten); FGSTensor &outten);
void operator()(); void operator()() override;
}; };
class WorkerFoldMAASparse1 : public THREAD class WorkerFoldMAASparse1 : public THREAD
@ -670,7 +670,7 @@ public:
WorkerFoldMAASparse1(const FoldedStackContainer &container, WorkerFoldMAASparse1(const FoldedStackContainer &container,
const FSSparseTensor &ten, const FSSparseTensor &ten,
FGSTensor &outten, const IntSequence &c); FGSTensor &outten, const IntSequence &c);
void operator()(); void operator()() override;
}; };
class WorkerFoldMAASparse2 : public THREAD class WorkerFoldMAASparse2 : public THREAD
@ -683,7 +683,7 @@ public:
WorkerFoldMAASparse2(const FoldedStackContainer &container, WorkerFoldMAASparse2(const FoldedStackContainer &container,
const FSSparseTensor &ten, const FSSparseTensor &ten,
FGSTensor &outten, const IntSequence &c); FGSTensor &outten, const IntSequence &c);
void operator()(); void operator()() override;
}; };
class WorkerFoldMAASparse4 : public THREAD class WorkerFoldMAASparse4 : public THREAD
@ -696,7 +696,7 @@ public:
WorkerFoldMAASparse4(const FoldedStackContainer &container, WorkerFoldMAASparse4(const FoldedStackContainer &container,
const FSSparseTensor &ten, const FSSparseTensor &ten,
FGSTensor &outten, const IntSequence &c); FGSTensor &outten, const IntSequence &c);
void operator()(); void operator()() override;
}; };
class WorkerUnfoldMAADense : public THREAD class WorkerUnfoldMAADense : public THREAD
@ -710,7 +710,7 @@ public:
const Symmetry &s, const Symmetry &s,
const UGSContainer &dcontainer, const UGSContainer &dcontainer,
UGSTensor &outten); UGSTensor &outten);
void operator()(); void operator()() override;
}; };
class WorkerUnfoldMAASparse1 : public THREAD class WorkerUnfoldMAASparse1 : public THREAD
@ -724,7 +724,7 @@ public:
WorkerUnfoldMAASparse1(const UnfoldedStackContainer &container, WorkerUnfoldMAASparse1(const UnfoldedStackContainer &container,
const FSSparseTensor &ten, const FSSparseTensor &ten,
UGSTensor &outten, const IntSequence &c); UGSTensor &outten, const IntSequence &c);
void operator()(); void operator()() override;
}; };
class WorkerUnfoldMAASparse2 : public THREAD class WorkerUnfoldMAASparse2 : public THREAD
@ -737,7 +737,7 @@ public:
WorkerUnfoldMAASparse2(const UnfoldedStackContainer &container, WorkerUnfoldMAASparse2(const UnfoldedStackContainer &container,
const FSSparseTensor &ten, const FSSparseTensor &ten,
UGSTensor &outten, const IntSequence &c); UGSTensor &outten, const IntSequence &c);
void operator()(); void operator()() override;
}; };
#endif #endif

View File

@ -197,8 +197,8 @@ public:
dim(t.dim) dim(t.dim)
{ {
} }
virtual ~Tensor() ~Tensor()
= default; override = default;
virtual void increment(IntSequence &v) const = 0; virtual void increment(IntSequence &v) const = 0;
virtual void decrement(IntSequence &v) const = 0; virtual void decrement(IntSequence &v) const = 0;
virtual int getOffset(const IntSequence &v) const = 0; virtual int getOffset(const IntSequence &v) const = 0;
@ -252,8 +252,8 @@ public:
: Tensor(first_row, num, t) : Tensor(first_row, num, t)
{ {
} }
virtual ~UTensor() ~UTensor()
= default; override = default;
virtual FTensor&fold() const = 0; virtual FTensor&fold() const = 0;
static void increment(IntSequence &v, int nv); static void increment(IntSequence &v, int nv);
@ -287,8 +287,8 @@ public:
: Tensor(first_row, num, t) : Tensor(first_row, num, t)
{ {
} }
virtual ~FTensor() ~FTensor()
= default; override = default;
virtual UTensor&unfold() const = 0; virtual UTensor&unfold() const = 0;
static void decrement(IntSequence &v, int nv); static void decrement(IntSequence &v, int nv);

View File

@ -42,8 +42,8 @@ public:
: ConstGeneralMatrix(m, first_row, first_col, rows, cols) : ConstGeneralMatrix(m, first_row, first_col, rows, cols)
{ {
} }
virtual ~ConstTwoDMatrix() ~ConstTwoDMatrix()
= default; override = default;
int int
nrows() const nrows() const
@ -115,8 +115,8 @@ public:
: GeneralMatrix(a, b) : GeneralMatrix(a, b)
{ {
} }
virtual ~TwoDMatrix() ~TwoDMatrix()
= default; override = default;
int int
nrows() const nrows() const

View File

@ -600,7 +600,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
Symmetry s(2, 3); Symmetry s(2, 3);
IntSequence nvs(2); nvs[0] = 4; nvs[1] = 2; IntSequence nvs(2); nvs[0] = 4; nvs[1] = 2;
@ -616,7 +616,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
Symmetry s(2, 3); Symmetry s(2, 3);
IntSequence nvs(2); nvs[0] = 4; nvs[1] = 2; IntSequence nvs(2); nvs[0] = 4; nvs[1] = 2;
@ -632,7 +632,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
Symmetry s(2, 3, 2); Symmetry s(2, 3, 2);
IntSequence nvs(3); nvs[0] = 5; nvs[1] = 2; nvs[2] = 2; IntSequence nvs(3); nvs[0] = 5; nvs[1] = 2; nvs[2] = 2;
@ -648,7 +648,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
Symmetry s(2, 3, 2); Symmetry s(2, 3, 2);
IntSequence nvs(3); nvs[0] = 5; nvs[1] = 2; nvs[2] = 2; IntSequence nvs(3); nvs[0] = 5; nvs[1] = 2; nvs[2] = 2;
@ -664,7 +664,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
Symmetry s(1, 1, 3); Symmetry s(1, 1, 3);
IntSequence nvs(3); nvs[0] = 3; nvs[1] = 3; nvs[2] = 2; IntSequence nvs(3); nvs[0] = 3; nvs[1] = 3; nvs[2] = 2;
@ -680,7 +680,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
Symmetry s(2, 3, 2); Symmetry s(2, 3, 2);
IntSequence nvs(3); nvs[0] = 4; nvs[1] = 2; nvs[2] = 4; IntSequence nvs(3); nvs[0] = 4; nvs[1] = 2; nvs[2] = 4;
@ -696,7 +696,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
Symmetry s(1, 1, 3); Symmetry s(1, 1, 3);
IntSequence nvs(3); nvs[0] = 3; nvs[1] = 3; nvs[2] = 2; IntSequence nvs(3); nvs[0] = 3; nvs[1] = 3; nvs[2] = 2;
@ -712,7 +712,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
Symmetry s(2, 3, 2); Symmetry s(2, 3, 2);
IntSequence nvs(3); nvs[0] = 4; nvs[1] = 2; nvs[2] = 4; IntSequence nvs(3); nvs[0] = 4; nvs[1] = 2; nvs[2] = 4;
@ -728,7 +728,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
Symmetry s(2, 3); Symmetry s(2, 3);
IntSequence nvs(2); nvs[0] = 4; nvs[1] = 2; IntSequence nvs(2); nvs[0] = 4; nvs[1] = 2;
@ -744,7 +744,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
Symmetry s(2, 3); Symmetry s(2, 3);
IntSequence nvs(2); nvs[0] = 4; nvs[1] = 2; IntSequence nvs(2); nvs[0] = 4; nvs[1] = 2;
@ -760,7 +760,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
Symmetry s(2, 3, 2); Symmetry s(2, 3, 2);
IntSequence nvs(3); nvs[0] = 5; nvs[1] = 2; nvs[2] = 2; IntSequence nvs(3); nvs[0] = 5; nvs[1] = 2; nvs[2] = 2;
@ -776,7 +776,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
Symmetry s(2, 3, 2); Symmetry s(2, 3, 2);
IntSequence nvs(3); nvs[0] = 5; nvs[1] = 2; nvs[2] = 2; IntSequence nvs(3); nvs[0] = 5; nvs[1] = 2; nvs[2] = 2;
@ -792,7 +792,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return fs_fold_unfold(5, 4, 3); return fs_fold_unfold(5, 4, 3);
} }
@ -806,7 +806,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
Symmetry s(1, 2, 2); Symmetry s(1, 2, 2);
IntSequence nvs(3); nvs[0] = 3; nvs[1] = 3; nvs[2] = 2; IntSequence nvs(3); nvs[0] = 3; nvs[1] = 3; nvs[2] = 2;
@ -822,7 +822,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return fs_fold_unfold(5, 9, 4); return fs_fold_unfold(5, 9, 4);
} }
@ -836,7 +836,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
Symmetry s(2, 1, 2); Symmetry s(2, 1, 2);
IntSequence nvs(3); nvs[0] = 6; nvs[1] = 2; nvs[2] = 6; IntSequence nvs(3); nvs[0] = 6; nvs[1] = 2; nvs[2] = 6;
@ -852,7 +852,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return r_fold_unfold(5, 3, 3); return r_fold_unfold(5, 3, 3);
} }
@ -866,7 +866,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return r_fold_unfold(5, 6, 5); return r_fold_unfold(5, 6, 5);
} }
@ -880,7 +880,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
IntSequence bnvs(2); bnvs[0] = 3; bnvs[1] = 2; IntSequence bnvs(2); bnvs[0] = 3; bnvs[1] = 2;
return dense_prod(Symmetry(1, 2), bnvs, 2, 3, 2); return dense_prod(Symmetry(1, 2), bnvs, 2, 3, 2);
@ -895,7 +895,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
IntSequence bnvs(2); bnvs[0] = 10; bnvs[1] = 7; IntSequence bnvs(2); bnvs[0] = 10; bnvs[1] = 7;
return dense_prod(Symmetry(2, 3), bnvs, 3, 15, 10); return dense_prod(Symmetry(2, 3), bnvs, 3, 15, 10);
@ -910,7 +910,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
IntSequence bnvs(2); bnvs[0] = 13; bnvs[1] = 11; IntSequence bnvs(2); bnvs[0] = 13; bnvs[1] = 11;
return dense_prod(Symmetry(3, 2), bnvs, 3, 20, 20); return dense_prod(Symmetry(3, 2), bnvs, 3, 20, 20);
@ -925,7 +925,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return folded_monomial(10, 4, 5, 3, 4); return folded_monomial(10, 4, 5, 3, 4);
} }
@ -939,7 +939,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return folded_monomial(20, 12, 10, 5, 4); return folded_monomial(20, 12, 10, 5, 4);
} }
@ -953,7 +953,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return unfolded_monomial(10, 4, 5, 3, 4); return unfolded_monomial(10, 4, 5, 3, 4);
} }
@ -967,7 +967,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return unfolded_monomial(20, 12, 10, 5, 4); return unfolded_monomial(20, 12, 10, 5, 4);
} }
@ -981,7 +981,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return folded_contraction(5, 4, 3); return folded_contraction(5, 4, 3);
} }
@ -995,7 +995,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return folded_contraction(20, 12, 5); return folded_contraction(20, 12, 5);
} }
@ -1009,7 +1009,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return unfolded_contraction(5, 4, 3); return unfolded_contraction(5, 4, 3);
} }
@ -1023,7 +1023,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return unfolded_contraction(20, 12, 5); return unfolded_contraction(20, 12, 5);
} }
@ -1037,7 +1037,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return poly_eval(4, 5, 4); return poly_eval(4, 5, 4);
} }
@ -1051,7 +1051,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return poly_eval(244, 97, 2); return poly_eval(244, 97, 2);
} }
@ -1066,7 +1066,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return fold_zcont(3, 2, 2, 1, 2, 2, 3); return fold_zcont(3, 2, 2, 1, 2, 2, 3);
} }
@ -1081,7 +1081,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return fold_zcont(13, 5, 7, 4, 6, 7, 4); return fold_zcont(13, 5, 7, 4, 6, 7, 4);
} }
@ -1096,7 +1096,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return unfold_zcont(3, 2, 2, 1, 2, 2, 3); return unfold_zcont(3, 2, 2, 1, 2, 2, 3);
} }
@ -1111,7 +1111,7 @@ public:
{ {
} }
bool bool
run() const run() const override
{ {
return unfold_zcont(13, 5, 7, 4, 6, 7, 4); return unfold_zcont(13, 5, 7, 4, 6, 7, 4);
} }