emsr / polynomial

A C++ polynomials and related algorithms.
6 stars 3 forks source link

Make methods to return the even or odd polynomials. #13

Open emsr opened 5 years ago

emsr commented 5 years ago
  /**
   * Return the even polynomial.
   */
  _Polynomial
  even() const;

  /**
   * Return the odd polynomial.
   */
  _Polynomial
  odd() const;

Underneath you should have: _Polynomial thing(int stride, int offset) const;

Conversely, an eval(int stride, int offset, x) would be a smart underpinning for eval_even/eval_odd.

emsr commented 3 years ago

Some kind of iterator would be better than a thing to emit polynomials.