20
20
<?xml-stylesheet type="text/xsl" href="./xdoc.xsl"?>
21
<!-- $Revision: 804489 $ $Date: 2009-08-15 13:19:04 -0400 (Sat, 15 Aug 2009) $ -->
21
<!-- $Revision: 982950 $ $Date: 2010-08-06 15:29:01 +0200 (ven. 06 août 2010) $ -->
24
24
<title>User Guide - Overview</title>
95
95
<subsection name="0.4 How interface contracts are specified in commons-math javadoc" href="contracts">
97
97
You should always read the javadoc class and method comments carefully when using
98
98
Commons Math components in your programs. The javadoc provides references to the algorithms
99
99
that are used, usage notes about limitations, performance, etc. as well as interface contracts.
101
101
for the method to return valid results), special values returned (e.g. Double.NaN)
102
102
or exceptions that may be thrown if the preconditions are not met, and definitions for returned
103
103
values/objects or state changes.</p>
105
When the actual parameters provided to a method or the internal state of an object
106
make a computation meaningless, an IllegalArgumentException or IllegalStateException may
107
be thrown. Exact conditions under which runtime exceptions (and any other exceptions) are
108
thrown are specified in the javadoc method comments. In some cases, to be consistent with
109
the <a href="http://grouper.ieee.org/groups/754/">IEEE 754 standard</a> for floating point
110
arithmetic and with java.lang.Math, Commons Math methods return Double.NaN values.
111
Conditions under which Double.NaN or other special values are returned are fully specified
112
in the javadoc method comments.
105
When the actual parameters provided to a method or the internal state of an object
106
make a computation meaningless, an IllegalArgumentException or IllegalStateException may
107
be thrown. Exact conditions under which runtime exceptions (and any other exceptions) are
108
thrown are specified in the javadoc method comments. In some cases, to be consistent with
109
the <a href="http://grouper.ieee.org/groups/754/">IEEE 754 standard</a> for floating point
110
arithmetic and with java.lang.Math, Commons Math methods return Double.NaN values.
111
Conditions under which Double.NaN or other special values are returned are fully specified
112
in the javadoc method comments.
115
As of version 2.2, the policy for dealing with null references is as
116
follows: When an argument is unexpectedly null, a
117
<a href="../apidocs/org/apache/commons/math/exception/NullArgumentException.html">
118
NullArgumentException</a> is raised for signalling the
119
illegal argument. Note that this class does not inherit from the
120
standard <code>NullPointerException</code> but is a subclass of
121
<code>IllegalArgumentException</code>.
122
No <code>NullPointerException</code> should be propagated from within
116
127
<subsection name="0.5 Dependencies" href="dependencies">