28#ifndef RECURSION_RELATION_TWO_H
29#define RECURSION_RELATION_TWO_H
78 const std::size_t &highestXorder);
90 void truncate(std::size_t highestXorder);
113 const std::size_t &xDerivative,
114 const std::size_t &sDerivative,
115 const std::vector<double> &dSvalues)
const;
124 const std::size_t &s,
125 const std::size_t &term)
const;
129 void resizeX(
const std::size_t &xDerivatives);
133 void resizeS(
const std::size_t &sDerivatives);
141 const std::size_t &sDerivative)
const;
150 std::vector<std::size_t>
getdSfactors(
const std::size_t &xDerivative,
151 const std::size_t &sDerivative,
152 const std::size_t &p)
const;
192 const std::size_t &xDerivative,
193 const std::size_t &sDerivative,
194 const std::vector<double> &dSvalues)
const {
196 xDerivative, sDerivative,
201 const std::size_t &s,
202 const std::size_t &term)
const {
215 const std::size_t &xDerivative,
216 const std::size_t &sDerivative)
const {
221 const std::size_t &xDerivative,
222 const std::size_t &sDerivative,
223 const std::size_t &p)
const {
static TFunction2< double, double > power
void differentiateS()
Differentiate wrt s using product rule.
std::size_t getXDerivatives() const
Returns highest derivative in x.
bool isPolynomialZero(const std::size_t &x, const std::size_t &s, const std::size_t &term) const
Check if polynomial with x x-derivaties and s s-derivatives is a zero polynomial If x or s are out o...
void differentiateX()
Differentiate wrt x using product rule.
void sortTerms()
Sort the terms in each sum, with fewest S(s)-derivatives first, then in increasing powers.
std::size_t getSDerivatives() const
Returns highest derivative in s.
double evaluatePolynomial(const double &x, const double &s, const std::size_t &xDerivative, const std::size_t &sDerivative, const std::vector< double > &dSvalues) const
Evaluate polynomial specified.
void resizeX(const std::size_t &xDerivatives)
Set highest derivative in x to xDerivatives111.
void truncate(const std::size_t &truncateOrder)
Truncate all polynomials to truncateOrder.
std::size_t numberOfTerms(const std::size_t &xDerivatives, const std::size_t &sDerivatives) const
Returns number of terms in the sum with xDerivatives x-derivatives and sDerivatives s-derivatives If...
std::vector< std::size_t > getdSFactors(const std::size_t &xDerivatives, const std::size_t &sDerivatives, const std::size_t &p) const
Returns list of S(s)-derivatives from term p in polynomial with xDerivatives x-derivatives and sDeriv...
void resizeS(const std::size_t &sDerivatives)
Set highest derivative in s to xDerivatives.
void resizeS(const std::size_t &sDerivatives)
Change number of s-derivatives to sDerivatives.
void truncate(std::size_t highestXorder)
Truncate series in x at highestXorder.
void applyOperator()
Applies another differential operator to the existing operator.
DifferentialOperatorTwo operator_m
void differentiateX()
Apply a differential operator in x.
std::size_t numberOfTerms(const std::size_t &xDerivative, const std::size_t &sDerivative) const
Returns number of terms in the sum with xDerivative x-derivatives and sDerivative s-derivatives If x...
bool isPolynomialZero(const std::size_t &x, const std::size_t &s, const std::size_t &term) const
Check if polynomial term p with x x-derivatives and s s-derivatives is zero If x,...
void sortTerms()
Sort the terms in each sum, with fewest S(s)-derivatives first, then in increasing powers.
double evaluatePolynomial(const double &x, const double &s, const std::size_t &xDerivative, const std::size_t &sDerivative, const std::vector< double > &dSvalues) const
Evaluates polynomial term p with xDerivative x-derivatives and sDerivative s-derivatives If xDerivat...
std::size_t highestXorder_m
~RecursionRelationTwo()
Desctructor, does nothing.
void differentiateS()
Apply a differential operator in s.
RecursionRelationTwo & operator=(const RecursionRelationTwo &recursion)
Assigment operator.
RecursionRelationTwo()
Default constructor, initialises identity operator.
void printOperator() const
Print operator, used for internal debugging.
void resizeX(const std::size_t &xDerivatives)
Change number of x-derivatives to xDerivatives.
std::size_t getMaxSDerivatives() const
Returns highest derivative of s.
std::size_t getMaxXDerivatives() const
Returns highest derivative of x.
std::vector< std::size_t > getdSfactors(const std::size_t &xDerivative, const std::size_t &sDerivative, const std::size_t &p) const
Returns list of S(s)-derivatives in term p with xDerivative x-derivatives and sDerivative s-derivativ...