Code review on org.jquantlib.util.stdlibc.Std

Bug #1209584 reported by Richard Gomes
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
JQuantLib
New
Low
Unassigned

Bug Description

Code review on org.jquantlib.util.stdlibc.Std

=============
Relationships
=============
related to http://bugs.launchpad.net/bugs/jquantlib-311
parent of http://bugs.launchpad.net/bugs/jquantlib-129
has duplicate http://bugs.launchpad.net/bugs/jquantlib-235

Tags: code-review
Revision history for this message
Ueli Hofstetter (hofi85) wrote :

hi richard,

same thing here. plz. assign the stuff back to you before you start working on. sry. for saying this.

let me know when you're finished and when i can start implementing the remaining testcases for the std class.

cheers

ueli

Revision history for this message
Richard Gomes (frgomes) wrote :

I've done an initial code review aiming:

1. Better comments, headers and documentation referring to
http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/

2. Performance improvements, basically replacing List<Double> by double[]

3. Removal of old code which was intended to interface to fastutil (which is now removed).

4. Standardization of names of parameters. Example: "begin", "from" and "start" have been previously employed. Now I changed everything to "from".

5. "final private" everywhere

Please have a look at the source code and find FIXME tags like these:

1. The use of E_IUnaryFunction and E_IBinaryFunction are pretty confusing.
It's not clear what these interfaces/classes do (where are the comments and references, etc?) and, in particular, E_IBinaryFunction should have 3 generic arguments: 2 parameter types and 1 result type.

2. There's no such "std::multiplies"
This class returns an object which is extended from an abstract class from math package, which is something weird because 2 very related concepts which could not be apart are located in two very different places.

Revision history for this message
Ueli Hofstetter (hofi85) wrote :

std.java been made redundant/basically everything has been refactored

Revision history for this message
Richard Gomes (frgomes) wrote :

class Std removed.

Methods migrated to Array and/or Date

Revision history for this message
Richard Gomes (frgomes) wrote :

Issue reopened.

As translation goes ahead, we found other situations where C-style "std" functions are called.

Zahid created another Std.Java at org.jquantlib.util.

We should keep this file there and should keep this issue open until we reach near 100% of QuantLib translated.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.