You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please provide this information in the documentation, it is available only in the source code:
// Deal with non-uniqueness of continued fractions: [a0; a1, ..., an, 1] = a0; a1, ..., an + 1].
// The shorter representation is considered the canonical representation,
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.
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.
Activity
NAThompson commentedon Mar 28, 2023
This seems like a reasonable ask, and not too difficult. Lemme think about how to communicate it.
Tomaqa commentedon Mar 28, 2023
I added these member functions as a workaround:
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.
simple_continued_fraction: added protected non-const accessor to part…
simple_continued_fraction: added protected non-const accessor to part…
simple_continued_fraction: added protected non-const accessor to part…
simple_continued_fraction: added protected non-const accessor to part…
Better documentation for simple_continued_fraction