Open Tomaqa opened 1 year ago
This seems like a reasonable ask, and not too difficult. Lemme think about how to communicate it.
I added these member functions as a workaround:
size_t size() const noexcept { return b_.size(); }
const auto& operator [](int idx) const { return b_[idx]; }
auto& operator [](int idx) { return b_[idx]; }
void reserve(size_t size_) { b_.reserve(size_); }
void push_back(Z c) { b_.push_back(c); }
Although the non-const functions may cause inconsistency with the private member variable x_
, it seems that it is not used anywhere else than in the constructor (which suggests to actually remove the member variable and use only the parameter itself /or its local copy/).
Also, it is a question whether to check index bounds or not.
Please provide this information in the documentation, it is available only in the source code:
Also, I am disappointed that I cannot acces particular coefficients of the continued fraction, so the whole class is useless in the case one does not want to use the provided public functions. I want to use it for rational approxamations. So I also need to convert it to rational afterwards.