38 std::vector<int> poly2(1, 1);
39 std::vector<std::vector<int>> poly1;
40 poly1.push_back(poly2);
41 TwoPolynomial poly(poly1);
46 const std::size_t &highestXorder):
47 power_m(
power), highestXorder_m(highestXorder) {
48 std::vector<int> poly2(1, 1);
49 std::vector<std::vector<int>> poly1;
50 poly1.push_back(poly2);
51 TwoPolynomial poly(poly1);
53 for (std::size_t i = 0; i <
power_m; i++) {
63 power_m(doperator.power_m), highestXorder_m(doperator.highestXorder_m) {
89 std::vector<std::vector<int>> p, q;
95 p[i][i + 1] = pow(-1, i);
constexpr T power(T base, unsigned exponent)
void differentiateS()
Differentiate wrt s using product rule.
void setPolynomial(const TwoPolynomial &poly, const std::size_t &x, const std::size_t &s)
Assign the polynomial poly to the operator.
void differentiateX()
Differentiate wrt x using product rule.
void multiplyPolynomial(const TwoPolynomial &poly)
Multiplies each term with given polynomial.
void addOperator(const DifferentialOperatorTwo &doperator)
Add the doperator to operator, term by term.
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 sortTerms()
Sort the terms in each sum, with fewest S(s)-derivatives first, then in increasing powers.
std::size_t highestXorder_m
~RecursionRelationTwo()
Desctructor, does nothing.
RecursionRelationTwo & operator=(const RecursionRelationTwo &recursion)
Assigment operator.
RecursionRelationTwo()
Default constructor, initialises identity operator.