Translation of NULL<T> needs to be fixed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
JQuantLib |
New
|
Medium
|
Unassigned |
Bug Description
*******
IMPORTANT: This is a parent issue. Create as many children issues as needed to address specific steps to complete this task.
*******
I've found that our translation of Null<T> is by many times mistaken.
Contrary of what may seem intuitive, in QuantLib/C++ code...
* Null<int> is not zero, it is Integer.MAX_VALUE
* Null<double> is not zero or Double.NaN, but it is Double.MAX_VALUE
* Null<T> is not null, but new T(). Example: Null<Array> is equivalent to new Array()
* we can find Null<Size> being equivalent to Null<int>. Some other use cases can be found.
* we can fin Null<Rate> being equivalent to Null<double>. Several other use cases can be found.
I've created in org.jquantlib.
public static final double NULL_Integer = Integer.MAX_VALUE;
public static final double NULL_Double = Double.MAX_VALUE;
... whilst I think that Null<T> should be translated by hand, depending on the situation.
Aiming give you an idea of how many occurrences we have by package (excluding the test-suite) I'm attaching the following files (as archive ql.tar.bz2) for your information.
24 ql
46 ql_cashflows
2 ql_indexes
103 ql_instruments
28 ql_legacy_
6 ql_legacy_pricers
1 ql_math
5 ql_math_integrals
6 ql_math_
3 ql_math_
2 ql_math_solvers1d
1 ql_math_statistics
1 ql_methods_
3 ql_models
2 ql_models_
14 ql_pricingengines
11 ql_pricingengin
2 ql_pricingengin
4 ql_pricingengin
4 ql_pricingengin
12 ql_pricingengin
13 ql_pricingengin
1 ql_pricingengin
3 ql_pricingengin
2 ql_pricingengin
38 ql_pricingengin
7 ql_processes
2 ql_quotes
4 ql_termstructur
3 ql_termstructur
3 ql_time
4 ql_time_calendars
1 ql_time_daycounters
25 ql_utilities
=============
Relationships
=============
related to http://
parent of http://
parent of http://
child of http://
filename: "ql.tar. bz2",size: "5081"