[Review] Polynomial library review begins today
The review of Pawel Kieliszczyk's Polynomial library begins today and ends on Thurs 19th March. Download of the zip file from the vault is here: http://www.boostpro.com/vault/index.php?action=downloadfile&filename=polynomial.zip&directory=&PHPSESSID=bbc9a84b382be1fc412254cfe30b925b Otherwise the library is present in the sandbox here: https://svn.boost.org/svn/boost/sandbox/SOC/2008/polynomial/ And the docs can be read online here: https://svn.boost.org/svn/boost/sandbox/SOC/2008/polynomial/libs/docs/index.... The polynomial library contains a single class - polynomial<FieldType> - used for the manipulation of polynomials, along with a selection of algorithms which operate upon them. The library is an extension/rewrite of the existing "implementation detail" polynomial class in Boost.Math, and was written as part of last years Google Summer of Code under the mentorship of Fernando Cacciola. What to include in Review Comments ~~~~~~~~~~~~~~~~~~~~~~~~~ Your comments may be brief or lengthy, but basically the Review Manager needs your evaluation of the library. If you identify problems along the way, please note if they are minor, serious, or showstoppers. The goal of a Boost library review is to improve the library through constructive criticism, and at the end a decision must be made: is the library good enough at this point to accept into Boost? If not, we hope to have provided enough constructive criticism for it to be improved and accepted at a later time. The Serialization library is a good example of how constructive criticism resulted in revisions resulting in an excellent library that was accepted in its second review. Here are some questions you might want to answer in your review: * What is your evaluation of the design? * What is your evaluation of the implementation? * What is your evaluation of the documentation? * What is your evaluation of the potential usefulness of the library? * Did you try to use the library? With what compiler? Did you have any problems? * How much effort did you put into your evaluation? A glance? A quick reading? In-depth study? * Are you knowledgeable about the problem domain? And finally, every review should answer this question: * Do you think the library should be accepted as a Boost library? Be sure to say this explicitly so that your other comments don't obscure your overall opinion. Many reviews include questions for library authors. Authors are interested in defending their library against your criticisms; otherwise they would not have brought their library up for review. If you don't get a response to your question quickly, be patient; if it takes too long or you don't get an answer you feel is sufficient, ask again or try to rephrase the question. Do remember that English is not the native language for many Boosters, and that can cause misunderstandings. E-mail is a poor communication medium, and even if messages rarely get lost in transmission, they often get drowned in the deluge of other messages. Don't assume that an unanswered message means you're being ignored. Given constructively, criticism will be taken better and have more positive effects, and you'll get the answers you want. John Maddock. Review Manager for Polynomial Library.
Just a reminder that the review of the polynomial lib ends on Thursday, the original announcement is below. John Maddock (review manager)
The review of Pawel Kieliszczyk's Polynomial library begins today and ends on Thurs 19th March.
Download of the zip file from the vault is here: http://www.boostpro.com/vault/index.php?action=downloadfile&filename=polynomial.zip&directory=&PHPSESSID=bbc9a84b382be1fc412254cfe30b925b
Otherwise the library is present in the sandbox here: https://svn.boost.org/svn/boost/sandbox/SOC/2008/polynomial/
And the docs can be read online here: https://svn.boost.org/svn/boost/sandbox/SOC/2008/polynomial/libs/docs/index....
The polynomial library contains a single class - polynomial<FieldType> - used for the manipulation of polynomials, along with a selection of algorithms which operate upon them. The library is an extension/rewrite of the existing "implementation detail" polynomial class in Boost.Math, and was written as part of last years Google Summer of Code under the mentorship of Fernando Cacciola.
What to include in Review Comments ~~~~~~~~~~~~~~~~~~~~~~~~~
Your comments may be brief or lengthy, but basically the Review Manager needs your evaluation of the library. If you identify problems along the way, please note if they are minor, serious, or showstoppers.
The goal of a Boost library review is to improve the library through constructive criticism, and at the end a decision must be made: is the library good enough at this point to accept into Boost? If not, we hope to have provided enough constructive criticism for it to be improved and accepted at a later time. The Serialization library is a good example of how constructive criticism resulted in revisions resulting in an excellent library that was accepted in its second review.
Here are some questions you might want to answer in your review:
* What is your evaluation of the design? * What is your evaluation of the implementation? * What is your evaluation of the documentation? * What is your evaluation of the potential usefulness of the library? * Did you try to use the library? With what compiler? Did you have any problems? * How much effort did you put into your evaluation? A glance? A quick reading? In-depth study? * Are you knowledgeable about the problem domain?
And finally, every review should answer this question:
* Do you think the library should be accepted as a Boost library? Be sure to say this explicitly so that your other comments don't obscure your overall opinion.
Many reviews include questions for library authors. Authors are interested in defending their library against your criticisms; otherwise they would not have brought their library up for review. If you don't get a response to your question quickly, be patient; if it takes too long or you don't get an answer you feel is sufficient, ask again or try to rephrase the question. Do remember that English is not the native language for many Boosters, and that can cause misunderstandings.
E-mail is a poor communication medium, and even if messages rarely get lost in transmission, they often get drowned in the deluge of other messages. Don't assume that an unanswered message means you're being ignored. Given constructively, criticism will be taken better and have more positive effects, and you'll get the answers you want.
John Maddock. Review Manager for Polynomial Library.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-------------------------------------------------------------------------------- No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.237 / Virus Database: 270.11.9/1988 - Release Date: 03/06/09 19:17:00
A little later than planned, here is my review of the polynomial library: Documentation and Design ~~~~~~~~~~~~~~~~~~~~~~~~ As previously noted by others the Introduction doesn't adequately describe the library - some sort of simple tutorial at this point would be useful too. The "Background" section doesn't really describe the "background" as such either. This constructor: template<typename U> polynomial(const U& v); had me a little confused at first - is there any advantage to making this a template rather than simply accepting a const FieldType& as the single argument? This constructor: polynomial(std::vector<FieldType>& c); should *not* modify the original vector IMO, a construct-with-move should be a separate constructor - I'm sure we have a move/rvalue reference emulation library available somewhere? Likewise for the assignment operator polynomial<FieldType>& operator=(std::vector<FieldType>& c); It's not clear from the documentation what this constructor does: polynomial(InputIterator first1, InputIterator last1, InputIterator first2); It needs to clearly state the degree of the resulting polynomial and whether it passes through all/any of the points - in fact maybe the constructor should have a final parameter for the degree of the polynomial and use least-squares fitting when required? Likewise for the member function template<typename InputIterator> void interpolate(InputIterator first1, InputIterator last1, InputIterator first2); Operators: the / and % operators need good descriptions of what they do, given that no exact division is possible. As someone else has already noted, a function to calculate divide and remainder in one step would be useful too. GCD: presumably this is restricted to polynomials with integer coefficients? If so it should say so. Evaluation: The docs should say what method is used for the evaluate_faithfully method and give a reference. Renaming as someone else suggested may be better too, but personally I'm easy either way on that. I'm not sure whether there should be an evaluate_by_preconditioning method, shouldn't the polynomial "know" that it has been preconditioned and react accordingly. I haven't looked/checked but do the usual arithmetic operators still work if the polynomial has been preconditioned? I assume probably not, but if that's the case there should be a stern warning to that effect, *and* checks in code to prevent us from doing something stupid :-) BTW, preconditioning can be applied to polynomials of any degree I believe it's just that it gets hard to implement in the generic case. In addition I'd like to see the evaluation functions templated, so that the type being evaluated can differ from FieldType - it would surely be quite common for example to create and manipulate polynomials with integer coefficients, but then want to evaluate on a floating point type. There is machinery in Boost.Math BTW to handle the mixed argument-promotion and calculation of the result type, let me know if you need help in using this. Special Forms: the functions provided do *not* generate polynomials in the alternative forms, but rather generate the named polynomial of order N, which is rather less useful, but at the very least the docs need updating to reflect this. Implementation ~~~~~~~~~~~~~~ I haven't spent a great deal of time on this, but I note that: test_arithmetics.cpp fails on cygwin: or at least it did once I added a using std::pow; to start of operator*= to get things compiling. None of the code builds with msvc: there are a couple of issues here: friend polynomial<FieldType> boost::math::tools::gcd<>(polynomial<FieldType> u, polynomial<FieldType> v); Needs to be changed to: friend polynomial<FieldType> boost::math::tools::gcd<FieldType>(polynomial<FieldType> u, polynomial<FieldType> v); to get msvc to Grok the code. After that there are a bunch of failures due to the use of log2 which msvc doesn't support (and since it's not part of the std other compilers are likely to complain too). I haven't looked too hard at the implementation, except to echo the comments posted previously that the Conceptual requirements for FieldType need documenting and *testing*. There are concept checking classes and archetypes in Boost.Math which may be of use here. Again, shout if you need help in figuring out how to use these. I did notice that operator*= for example uses std::complex<double> internally which effectively limits the precision that can be achieved - to be useful to me - and to replace the existing "implementation detail" polynomial class in Boost.Math - I would need the polynomial class to be usable with arbitrary precision types such as NTL::RR or mpfr_class. Also as previously noted, multiplication of small polynomials may well be more efficient with the "naive" algorithm, so some performance tests and experimenting is required here. Related to this, use of "round" should be restricted to types that are known to be integers? * What is your evaluation of the potential usefulness of the library? As noted by others it's a niche library but potentially quite useful within that niche. * Do you think the library should be accepted as a Boost library? Be sure to say this explicitly so that your other comments don't obscure your overall opinion. I think that the library could be accepted into Boost, but not it's it's current form, so I would vote no for now: please note this is my personal review of the library and should not be confused with my role as review manager for this library. Regards, John Maddock.
participants (1)
-
John Maddock