Replaced package.html with package-info.java for package documentation.
JIRA: MATH-445 git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1178067 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
add2d54457
commit
e364018316
|
@ -0,0 +1,26 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* The {@code function} package contains function objects that wrap the
|
||||||
|
* methods contained in {@link java.lang.Math}, as well as common
|
||||||
|
* mathematical functions such as the gaussian and sinc functions.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.analysis.function;
|
|
@ -1,26 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
The {@code function} package contains function objects that wrap the
|
|
||||||
methods contained in {@link java.lang.Math}, as well as common
|
|
||||||
mathematical functions such as the gaussian and sinc functions.
|
|
||||||
</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Numerical integration (quadrature) algorithms for univariate real functions.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.analysis.integration;
|
|
@ -1,22 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
Numerical integration (quadrature) algorithms for univariate real functions.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Univariate real functions interpolation algorithms.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.analysis.interpolation;
|
|
@ -1,22 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
Univariate real functions interpolation algorithms.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* Parent package for common numerical analysis procedures, including root finding,
|
||||||
|
* function interpolation and integration. Note that the optimization (i.e. minimization
|
||||||
|
* and maximization) is a huge separate top package, despite it also operate on functions
|
||||||
|
* as defined by this top-level package.
|
||||||
|
* </p>
|
||||||
|
* <p>
|
||||||
|
* Functions interfaces are intended to be implemented by user code to represent their
|
||||||
|
* domain problems. The algorithms provided by the library will then operate on these
|
||||||
|
* function to find their roots, or integrate them, or ... Functions can be multivariate
|
||||||
|
* or univariate, real vectorial or matrix valued, and they can be differentiable or not.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.analysis;
|
|
@ -1,33 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
Parent package for common numerical analysis procedures, including root finding,
|
|
||||||
function interpolation and integration. Note that the optimization (i.e. minimization
|
|
||||||
and maximization) is a huge separate top package, despite it also operate on functions
|
|
||||||
as defined by this top-level package.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Functions interfaces are intended to be implemented by user code to represent their
|
|
||||||
domain problems. The algorithms provided by the library will then operate on these
|
|
||||||
function to find their roots, or integrate them, or ... Functions can be multivariate
|
|
||||||
or univariate, real vectorial or matrix valued, and they can be differentiable or not.
|
|
||||||
</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Univariate real polynomials implementations, seen as differentiable
|
||||||
|
* univariate real functions.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.analysis.polynomials;
|
|
@ -1,23 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
Univariate real polynomials implementations, seen as differentiable
|
|
||||||
univariate real functions.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Root finding algorithms, for univariate real functions.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.analysis.solvers;
|
|
@ -1,22 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
Root finding algorithms, for univariate real functions.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Complex number type and implementations of complex transcendental
|
||||||
|
* functions.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.complex;
|
|
@ -1,23 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
Complex number type and implementations of complex transcendental
|
|
||||||
functions.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,88 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*Decimal floating point library for Java
|
||||||
|
*
|
||||||
|
*<p>Another floating point class. This one is built using radix 10000
|
||||||
|
*which is 10<sup>4</sup>, so its almost decimal.</p>
|
||||||
|
*
|
||||||
|
*<p>The design goals here are:
|
||||||
|
*<ol>
|
||||||
|
* <li>Decimal math, or close to it</li>
|
||||||
|
* <li>Settable precision (but no mix between numbers using different settings)</li>
|
||||||
|
* <li>Portability. Code should be keep as portable as possible.</li>
|
||||||
|
* <li>Performance</li>
|
||||||
|
* <li>Accuracy - Results should always be +/- 1 ULP for basic
|
||||||
|
* algebraic operation</li>
|
||||||
|
* <li>Comply with IEEE 854-1987 as much as possible.
|
||||||
|
* (See IEEE 854-1987 notes below)</li>
|
||||||
|
*</ol></p>
|
||||||
|
*
|
||||||
|
*<p>Trade offs:
|
||||||
|
*<ol>
|
||||||
|
* <li>Memory foot print. I'm using more memory than necessary to
|
||||||
|
* represent numbers to get better performance.</li>
|
||||||
|
* <li>Digits are bigger, so rounding is a greater loss. So, if you
|
||||||
|
* really need 12 decimal digits, better use 4 base 10000 digits
|
||||||
|
* there can be one partially filled.</li>
|
||||||
|
*</ol></p>
|
||||||
|
*
|
||||||
|
*<p>Numbers are represented in the following form:
|
||||||
|
*<pre>
|
||||||
|
*n = sign × mant × (radix)<sup>exp</sup>;</p>
|
||||||
|
*</pre>
|
||||||
|
*where sign is ±1, mantissa represents a fractional number between
|
||||||
|
*zero and one. mant[0] is the least significant digit.
|
||||||
|
*exp is in the range of -32767 to 32768</p>
|
||||||
|
*
|
||||||
|
*<p>IEEE 854-1987 Notes and differences</p>
|
||||||
|
*
|
||||||
|
*<p>IEEE 854 requires the radix to be either 2 or 10. The radix here is
|
||||||
|
*10000, so that requirement is not met, but it is possible that a
|
||||||
|
*subclassed can be made to make it behave as a radix 10
|
||||||
|
*number. It is my opinion that if it looks and behaves as a radix
|
||||||
|
*10 number then it is one and that requirement would be met.</p>
|
||||||
|
*
|
||||||
|
*<p>The radix of 10000 was chosen because it should be faster to operate
|
||||||
|
*on 4 decimal digits at once instead of one at a time. Radix 10 behavior
|
||||||
|
*can be realized by add an additional rounding step to ensure that
|
||||||
|
*the number of decimal digits represented is constant.</p>
|
||||||
|
*
|
||||||
|
*<p>The IEEE standard specifically leaves out internal data encoding,
|
||||||
|
*so it is reasonable to conclude that such a subclass of this radix
|
||||||
|
*10000 system is merely an encoding of a radix 10 system.</p>
|
||||||
|
*
|
||||||
|
*<p>IEEE 854 also specifies the existence of "sub-normal" numbers. This
|
||||||
|
*class does not contain any such entities. The most significant radix
|
||||||
|
*10000 digit is always non-zero. Instead, we support "gradual underflow"
|
||||||
|
*by raising the underflow flag for numbers less with exponent less than
|
||||||
|
*expMin, but don't flush to zero until the exponent reaches MIN_EXP-digits.
|
||||||
|
*Thus the smallest number we can represent would be:
|
||||||
|
*1E(-(MIN_EXP-digits-1)∗4), eg, for digits=5, MIN_EXP=-32767, that would
|
||||||
|
*be 1e-131092.</p>
|
||||||
|
*
|
||||||
|
*<p>IEEE 854 defines that the implied radix point lies just to the right
|
||||||
|
*of the most significant digit and to the left of the remaining digits.
|
||||||
|
*This implementation puts the implied radix point to the left of all
|
||||||
|
*digits including the most significant one. The most significant digit
|
||||||
|
*here is the one just to the right of the radix point. This is a fine
|
||||||
|
*detail and is really only a matter of definition. Any side effects of
|
||||||
|
*this can be rendered invisible by a subclass.</p>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.dfp;
|
|
@ -1,88 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
Decimal floating point library for Java
|
|
||||||
|
|
||||||
<p>Another floating point class. This one is built using radix 10000
|
|
||||||
which is 10<sup>4</sup>, so its almost decimal.</p>
|
|
||||||
|
|
||||||
<p>The design goals here are:
|
|
||||||
<ol>
|
|
||||||
<li>Decimal math, or close to it</li>
|
|
||||||
<li>Settable precision (but no mix between numbers using different settings)</li>
|
|
||||||
<li>Portability. Code should be keep as portable as possible.</li>
|
|
||||||
<li>Performance</li>
|
|
||||||
<li>Accuracy - Results should always be +/- 1 ULP for basic
|
|
||||||
algebraic operation</li>
|
|
||||||
<li>Comply with IEEE 854-1987 as much as possible.
|
|
||||||
(See IEEE 854-1987 notes below)</li>
|
|
||||||
</ol></p>
|
|
||||||
|
|
||||||
<p>Trade offs:
|
|
||||||
<ol>
|
|
||||||
<li>Memory foot print. I'm using more memory than necessary to
|
|
||||||
represent numbers to get better performance.</li>
|
|
||||||
<li>Digits are bigger, so rounding is a greater loss. So, if you
|
|
||||||
really need 12 decimal digits, better use 4 base 10000 digits
|
|
||||||
there can be one partially filled.</li>
|
|
||||||
</ol></p>
|
|
||||||
|
|
||||||
<p>Numbers are represented in the following form:
|
|
||||||
<pre>
|
|
||||||
n = sign × mant × (radix)<sup>exp</sup>;</p>
|
|
||||||
</pre>
|
|
||||||
where sign is ±1, mantissa represents a fractional number between
|
|
||||||
zero and one. mant[0] is the least significant digit.
|
|
||||||
exp is in the range of -32767 to 32768</p>
|
|
||||||
|
|
||||||
<p>IEEE 854-1987 Notes and differences</p>
|
|
||||||
|
|
||||||
<p>IEEE 854 requires the radix to be either 2 or 10. The radix here is
|
|
||||||
10000, so that requirement is not met, but it is possible that a
|
|
||||||
subclassed can be made to make it behave as a radix 10
|
|
||||||
number. It is my opinion that if it looks and behaves as a radix
|
|
||||||
10 number then it is one and that requirement would be met.</p>
|
|
||||||
|
|
||||||
<p>The radix of 10000 was chosen because it should be faster to operate
|
|
||||||
on 4 decimal digits at once instead of one at a time. Radix 10 behavior
|
|
||||||
can be realized by add an additional rounding step to ensure that
|
|
||||||
the number of decimal digits represented is constant.</p>
|
|
||||||
|
|
||||||
<p>The IEEE standard specifically leaves out internal data encoding,
|
|
||||||
so it is reasonable to conclude that such a subclass of this radix
|
|
||||||
10000 system is merely an encoding of a radix 10 system.</p>
|
|
||||||
|
|
||||||
<p>IEEE 854 also specifies the existence of "sub-normal" numbers. This
|
|
||||||
class does not contain any such entities. The most significant radix
|
|
||||||
10000 digit is always non-zero. Instead, we support "gradual underflow"
|
|
||||||
by raising the underflow flag for numbers less with exponent less than
|
|
||||||
expMin, but don't flush to zero until the exponent reaches MIN_EXP-digits.
|
|
||||||
Thus the smallest number we can represent would be:
|
|
||||||
1E(-(MIN_EXP-digits-1)*4), eg, for digits=5, MIN_EXP=-32767, that would
|
|
||||||
be 1e-131092.</p>
|
|
||||||
|
|
||||||
<p>IEEE 854 defines that the implied radix point lies just to the right
|
|
||||||
of the most significant digit and to the left of the remaining digits.
|
|
||||||
This implementation puts the implied radix point to the left of all
|
|
||||||
digits including the most significant one. The most significant digit
|
|
||||||
here is the one just to the right of the radix point. This is a fine
|
|
||||||
detail and is really only a matter of definition. Any side effects of
|
|
||||||
this can be rendered invisible by a subclass.</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*Implementations of common discrete and continuous distributions.
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.distribution;
|
|
@ -1,20 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>Implementations of common discrete and continuous distributions.</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Specialized exceptions for algorithms errors. The exceptions can be localized
|
||||||
|
* using simple java properties.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.exception;
|
|
@ -1,23 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
Specialized exceptions for algorithms errors. The exceptions can be localized
|
|
||||||
using simple java properties.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Classes supporting exception localization.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.exception.util;
|
|
@ -1,22 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
Classes supporting exception localization.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*Implementations of common discrete-time linear filters.
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.filter;
|
|
@ -1,19 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<body>Implementations of common discrete-time linear filters.</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Fraction number type and fraction number formatting.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.fraction;
|
|
@ -1,22 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
Fraction number type and fraction number formatting.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*This package provides Genetic Algorithms components and implementations.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.genetics;
|
|
@ -1,24 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ -->
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
This package provides Genetic Algorithms components and implementations.
|
|
||||||
</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*This package provides basic 1D geometry components.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.geometry.euclidean.oned;
|
|
@ -1,24 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ -->
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
This package provides basic 1D geometry components.
|
|
||||||
</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*This package provides basic 3D geometry components.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.geometry.euclidean.threed;
|
|
@ -1,24 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ -->
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
This package provides basic 3D geometry components.
|
|
||||||
</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*This package provides basic 2D geometry components.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.geometry.euclidean.twod;
|
|
@ -1,24 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ -->
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
This package provides basic 2D geometry components.
|
|
||||||
</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*This package is the top level package for geometry. It provides only a few interfaces
|
||||||
|
*related to vectorial/affine spaces that are implemented in sub-packages.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.geometry;
|
|
@ -1,25 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ -->
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
This package is the top level package for geometry. It provides only a few interfaces
|
|
||||||
related to vectorial/affine spaces that are implemented in sub-packages.
|
|
||||||
</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,108 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*This package provides classes to implement Binary Space Partition trees.
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*{@link org.apache.commons.math.geometry.partitioning.BSPTree BSP trees}
|
||||||
|
*are an efficient way to represent parts of space and in particular
|
||||||
|
*polytopes (line segments in 1D, polygons in 2D and polyhedrons in 3D)
|
||||||
|
*and to operate on them. The main principle is to recursively subdivide
|
||||||
|
*the space using simple hyperplanes (points in 1D, lines in 2D, planes
|
||||||
|
*in 3D).
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*We start with a tree composed of a single node without any cut
|
||||||
|
*hyperplane: it represents the complete space, which is a convex
|
||||||
|
*part. If we add a cut hyperplane to this node, this represents a
|
||||||
|
*partition with the hyperplane at the node level and two half spaces at
|
||||||
|
*each side of the cut hyperplane. These half-spaces are represented by
|
||||||
|
*two child nodes without any cut hyperplanes associated, the plus child
|
||||||
|
*which represents the half space on the plus side of the cut hyperplane
|
||||||
|
*and the minus child on the other side. Continuing the subdivisions, we
|
||||||
|
*end up with a tree having internal nodes that are associated with a
|
||||||
|
*cut hyperplane and leaf nodes without any hyperplane which correspond
|
||||||
|
*to convex parts.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*When BSP trees are used to represent polytopes, the convex parts are
|
||||||
|
*known to be completely inside or outside the polytope as long as there
|
||||||
|
*is no facet in the part (which is obviously the case if the cut
|
||||||
|
*hyperplanes have been chosen as the underlying hyperplanes of the
|
||||||
|
*facets (this is called an autopartition) and if the subdivision
|
||||||
|
*process has been continued until all facets have been processed. It is
|
||||||
|
*important to note that the polytope is <em>not</em> defined by a
|
||||||
|
*single part, but by several convex ones. This is the property that
|
||||||
|
*allows BSP-trees to represent non-convex polytopes despites all parts
|
||||||
|
*are convex. The {@link
|
||||||
|
*org.apache.commons.math.geometry.partitioning.Region Region} class is
|
||||||
|
*devoted to this representation, it is build on top of the {@link
|
||||||
|
*org.apache.commons.math.geometry.partitioning.BSPTree BSPTree} class using
|
||||||
|
*boolean objects as the leaf nodes attributes to represent the
|
||||||
|
*inside/outside property of each leaf part, and also adds various
|
||||||
|
*methods dealing with boundaries (i.e. the separation between the
|
||||||
|
*inside and the outside parts).
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*Rather than simply associating the internal nodes with an hyperplane,
|
||||||
|
*we consider <em>sub-hyperplanes</em> which correspond to the part of
|
||||||
|
*the hyperplane that is inside the convex part defined by all the
|
||||||
|
*parent nodes (this implies that the sub-hyperplane at root node is in
|
||||||
|
*fact a complete hyperplane, because there is no parent to bound
|
||||||
|
*it). Since the parts are convex, the sub-hyperplanes are convex, in
|
||||||
|
*3D the convex parts are convex polyhedrons, and the sub-hyperplanes
|
||||||
|
*are convex polygons that cut these polyhedrons in two
|
||||||
|
*sub-polyhedrons. Using this definition, a BSP tree completely
|
||||||
|
*partitions the space. Each point either belongs to one of the
|
||||||
|
*sub-hyperplanes in an internal node or belongs to one of the leaf
|
||||||
|
*convex parts.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*In order to determine where a point is, it is sufficient to check its
|
||||||
|
*position with respect to the root cut hyperplane, to select the
|
||||||
|
*corresponding child tree and to repeat the procedure recursively,
|
||||||
|
*until either the point appears to be exactly on one of the hyperplanes
|
||||||
|
*in the middle of the tree or to be in one of the leaf parts. For
|
||||||
|
*this operation, it is sufficient to consider the complete hyperplanes,
|
||||||
|
*there is no need to check the points with the boundary of the
|
||||||
|
*sub-hyperplanes, because this check has in fact already been realized
|
||||||
|
*by the recursive descent in the tree. This is very easy to do and very
|
||||||
|
*efficient, especially if the tree is well balanced (the cost is
|
||||||
|
*<code>O(log(n))</code> where <code>n</code> is the number of facets)
|
||||||
|
*or if the first tree levels close to the root discriminate large parts
|
||||||
|
*of the total space.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*One of the main sources for the development of this package was Bruce
|
||||||
|
*Naylor, John Amanatides and William Thibault paper <a
|
||||||
|
*href="http://www.cs.yorku.ca/~amana/research/bsptSetOp.pdf">Merging
|
||||||
|
*BSP Trees Yields Polyhedral Set Operations</a> Proc. Siggraph '90,
|
||||||
|
*Computer Graphics 24(4), August 1990, pp 115-124, published by the
|
||||||
|
*Association for Computing Machinery (ACM). The same paper can also be
|
||||||
|
*found <a
|
||||||
|
*href="http://www.cs.utexas.edu/users/fussell/courses/cs384g/bsp_treemerge.pdf">here</a>.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.geometry.partitioning;
|
|
@ -1,107 +0,0 @@
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
This package provides classes to implement Binary Space Partition trees.
|
|
||||||
|
|
||||||
<p>
|
|
||||||
{@link org.apache.commons.math.geometry.partitioning.BSPTree BSP trees}
|
|
||||||
are an efficient way to represent parts of space and in particular
|
|
||||||
polytopes (line segments in 1D, polygons in 2D and polyhedrons in 3D)
|
|
||||||
and to operate on them. The main principle is to recursively subdivide
|
|
||||||
the space using simple hyperplanes (points in 1D, lines in 2D, planes
|
|
||||||
in 3D).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
We start with a tree composed of a single node without any cut
|
|
||||||
hyperplane: it represents the complete space, which is a convex
|
|
||||||
part. If we add a cut hyperplane to this node, this represents a
|
|
||||||
partition with the hyperplane at the node level and two half spaces at
|
|
||||||
each side of the cut hyperplane. These half-spaces are represented by
|
|
||||||
two child nodes without any cut hyperplanes associated, the plus child
|
|
||||||
which represents the half space on the plus side of the cut hyperplane
|
|
||||||
and the minus child on the other side. Continuing the subdivisions, we
|
|
||||||
end up with a tree having internal nodes that are associated with a
|
|
||||||
cut hyperplane and leaf nodes without any hyperplane which correspond
|
|
||||||
to convex parts.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
When BSP trees are used to represent polytopes, the convex parts are
|
|
||||||
known to be completely inside or outside the polytope as long as there
|
|
||||||
is no facet in the part (which is obviously the case if the cut
|
|
||||||
hyperplanes have been chosen as the underlying hyperplanes of the
|
|
||||||
facets (this is called an autopartition) and if the subdivision
|
|
||||||
process has been continued until all facets have been processed. It is
|
|
||||||
important to note that the polytope is <em>not</em> defined by a
|
|
||||||
single part, but by several convex ones. This is the property that
|
|
||||||
allows BSP-trees to represent non-convex polytopes despites all parts
|
|
||||||
are convex. The {@link
|
|
||||||
org.apache.commons.math.geometry.partitioning.Region Region} class is
|
|
||||||
devoted to this representation, it is build on top of the {@link
|
|
||||||
org.apache.commons.math.geometry.partitioning.BSPTree BSPTree} class using
|
|
||||||
boolean objects as the leaf nodes attributes to represent the
|
|
||||||
inside/outside property of each leaf part, and also adds various
|
|
||||||
methods dealing with boundaries (i.e. the separation between the
|
|
||||||
inside and the outside parts).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Rather than simply associating the internal nodes with an hyperplane,
|
|
||||||
we consider <em>sub-hyperplanes</em> which correspond to the part of
|
|
||||||
the hyperplane that is inside the convex part defined by all the
|
|
||||||
parent nodes (this implies that the sub-hyperplane at root node is in
|
|
||||||
fact a complete hyperplane, because there is no parent to bound
|
|
||||||
it). Since the parts are convex, the sub-hyperplanes are convex, in
|
|
||||||
3D the convex parts are convex polyhedrons, and the sub-hyperplanes
|
|
||||||
are convex polygons that cut these polyhedrons in two
|
|
||||||
sub-polyhedrons. Using this definition, a BSP tree completely
|
|
||||||
partitions the space. Each point either belongs to one of the
|
|
||||||
sub-hyperplanes in an internal node or belongs to one of the leaf
|
|
||||||
convex parts.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
In order to determine where a point is, it is sufficient to check its
|
|
||||||
position with respect to the root cut hyperplane, to select the
|
|
||||||
corresponding child tree and to repeat the procedure recursively,
|
|
||||||
until either the point appears to be exactly on one of the hyperplanes
|
|
||||||
in the middle of the tree or to be in one of the leaf parts. For
|
|
||||||
this operation, it is sufficient to consider the complete hyperplanes,
|
|
||||||
there is no need to check the points with the boundary of the
|
|
||||||
sub-hyperplanes, because this check has in fact already been realized
|
|
||||||
by the recursive descent in the tree. This is very easy to do and very
|
|
||||||
efficient, especially if the tree is well balanced (the cost is
|
|
||||||
<code>O(log(n))</code> where <code>n</code> is the number of facets)
|
|
||||||
or if the first tree levels close to the root discriminate large parts
|
|
||||||
of the total space.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
One of the main sources for the development of this package was Bruce
|
|
||||||
Naylor, John Amanatides and William Thibault paper <a
|
|
||||||
href="http://www.cs.yorku.ca/~amana/research/bsptSetOp.pdf">Merging
|
|
||||||
BSP Trees Yields Polyhedral Set Operations</a> Proc. Siggraph '90,
|
|
||||||
Computer Graphics 24(4), August 1990, pp 115-124, published by the
|
|
||||||
Association for Computing Machinery (ACM). The same paper can also be
|
|
||||||
found <a
|
|
||||||
href="http://www.cs.utexas.edu/users/fussell/courses/cs384g/bsp_treemerge.pdf">here</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*This package provides multidimensional ordering features for partitioning.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.geometry.partitioning.utilities;
|
|
@ -1,24 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ -->
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
This package provides multidimensional ordering features for partitioning.
|
|
||||||
</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*Linear algebra support.
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.linear;
|
|
@ -1,20 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>Linear algebra support.</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,96 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*This package provides classes to handle discrete events occurring during
|
||||||
|
*Ordinary Differential Equations integration.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*Discrete events detection is based on switching functions. The user provides
|
||||||
|
*a simple {@link org.apache.commons.math.ode.events.EventHandler#g g(t, y)}
|
||||||
|
*function depending on the current time and state. The integrator will monitor
|
||||||
|
*the value of the function throughout integration range and will trigger the
|
||||||
|
*event when its sign changes. The magnitude of the value is almost irrelevant,
|
||||||
|
*it should however be continuous (but not necessarily smooth) for the sake of
|
||||||
|
*root finding. The steps are shortened as needed to ensure the events occur
|
||||||
|
*at step boundaries (even if the integrator is a fixed-step integrator).
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*When an event is triggered, several different options are available:
|
||||||
|
*</p>
|
||||||
|
*<ul>
|
||||||
|
* <li>integration can be stopped (this is called a G-stop facility),</li>
|
||||||
|
* <li>the state vector or the derivatives can be changed,</li>
|
||||||
|
* <li>or integration can simply go on.</li>
|
||||||
|
*</ul>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*The first case, G-stop, is the most common one. A typical use case is when an
|
||||||
|
*ODE must be solved up to some target state is reached, with a known value of
|
||||||
|
*the state but an unknown occurrence time. As an example, if we want to monitor
|
||||||
|
*a chemical reaction up to some predefined concentration for the first substance,
|
||||||
|
*we can use the following switching function setting:
|
||||||
|
*<pre>
|
||||||
|
* public double g(double t, double[] y) {
|
||||||
|
* return y[0] - targetConcentration;
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* public int eventOccurred(double t, double[] y) {
|
||||||
|
* return STOP;
|
||||||
|
* }
|
||||||
|
*</pre>
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*The second case, change state vector or derivatives is encountered when dealing
|
||||||
|
*with discontinuous dynamical models. A typical case would be the motion of a
|
||||||
|
*spacecraft when thrusters are fired for orbital maneuvers. The acceleration is
|
||||||
|
*smooth as long as no maneuver are performed, depending only on gravity, drag,
|
||||||
|
*third body attraction, radiation pressure. Firing a thruster introduces a
|
||||||
|
*discontinuity that must be handled appropriately by the integrator. In such a case,
|
||||||
|
*we would use a switching function setting similar to this:
|
||||||
|
*<pre>
|
||||||
|
* public double g(double t, double[] y) {
|
||||||
|
* return (t - tManeuverStart) ∗ (t - tManeuverStop);
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* public int eventOccurred(double t, double[] y) {
|
||||||
|
* return RESET_DERIVATIVES;
|
||||||
|
* }
|
||||||
|
*</pre>
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*The third case is useful mainly for monitoring purposes, a simple example is:
|
||||||
|
*<pre>
|
||||||
|
* public double g(double t, double[] y) {
|
||||||
|
* return y[0] - y[1];
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* public int eventOccurred(double t, double[] y) {
|
||||||
|
* logger.log("y0(t) and y1(t) curves cross at t = " + t);
|
||||||
|
* return CONTINUE;
|
||||||
|
* }
|
||||||
|
*</pre>
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.ode.events;
|
|
@ -1,96 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision: 613620 $ -->
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
This package provides classes to handle discrete events occurring during
|
|
||||||
Ordinary Differential Equations integration.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Discrete events detection is based on switching functions. The user provides
|
|
||||||
a simple {@link org.apache.commons.math.ode.events.EventHandler#g g(t, y)}
|
|
||||||
function depending on the current time and state. The integrator will monitor
|
|
||||||
the value of the function throughout integration range and will trigger the
|
|
||||||
event when its sign changes. The magnitude of the value is almost irrelevant,
|
|
||||||
it should however be continuous (but not necessarily smooth) for the sake of
|
|
||||||
root finding. The steps are shortened as needed to ensure the events occur
|
|
||||||
at step boundaries (even if the integrator is a fixed-step integrator).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
When an event is triggered, several different options are available:
|
|
||||||
</p>
|
|
||||||
<ul>
|
|
||||||
<li>integration can be stopped (this is called a G-stop facility),</li>
|
|
||||||
<li>the state vector or the derivatives can be changed,</li>
|
|
||||||
<li>or integration can simply go on.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The first case, G-stop, is the most common one. A typical use case is when an
|
|
||||||
ODE must be solved up to some target state is reached, with a known value of
|
|
||||||
the state but an unknown occurrence time. As an example, if we want to monitor
|
|
||||||
a chemical reaction up to some predefined concentration for the first substance,
|
|
||||||
we can use the following switching function setting:
|
|
||||||
<pre>
|
|
||||||
public double g(double t, double[] y) {
|
|
||||||
return y[0] - targetConcentration;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int eventOccurred(double t, double[] y) {
|
|
||||||
return STOP;
|
|
||||||
}
|
|
||||||
</pre>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The second case, change state vector or derivatives is encountered when dealing
|
|
||||||
with discontinuous dynamical models. A typical case would be the motion of a
|
|
||||||
spacecraft when thrusters are fired for orbital maneuvers. The acceleration is
|
|
||||||
smooth as long as no maneuver are performed, depending only on gravity, drag,
|
|
||||||
third body attraction, radiation pressure. Firing a thruster introduces a
|
|
||||||
discontinuity that must be handled appropriately by the integrator. In such a case,
|
|
||||||
we would use a switching function setting similar to this:
|
|
||||||
<pre>
|
|
||||||
public double g(double t, double[] y) {
|
|
||||||
return (t - tManeuverStart) * (t - tManeuverStop);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int eventOccurred(double t, double[] y) {
|
|
||||||
return RESET_DERIVATIVES;
|
|
||||||
}
|
|
||||||
</pre>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The third case is useful mainly for monitoring purposes, a simple example is:
|
|
||||||
<pre>
|
|
||||||
public double g(double t, double[] y) {
|
|
||||||
return y[0] - y[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
public int eventOccurred(double t, double[] y) {
|
|
||||||
logger.log("y0(t) and y1(t) curves cross at t = " + t);
|
|
||||||
return CONTINUE;
|
|
||||||
}
|
|
||||||
</pre>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*This package provides classes to solve non-stiff Ordinary Differential Equations problems.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.ode.nonstiff;
|
|
@ -1,25 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision: 613620 $ -->
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
This package provides classes to solve non-stiff Ordinary Differential Equations problems.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,163 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*This package provides classes to solve Ordinary Differential Equations problems.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*This package solves Initial Value Problems of the form
|
||||||
|
*<code>y'=f(t,y)</code> with <code>t<sub>0</sub></code> and
|
||||||
|
*<code>y(t<sub>0</sub>)=y<sub>0</sub></code> known. The provided
|
||||||
|
*integrators compute an estimate of <code>y(t)</code> from
|
||||||
|
*<code>t=t<sub>0</sub></code> to <code>t=t<sub>1</sub></code>.
|
||||||
|
*It is also possible to get thederivatives with respect to the initial state
|
||||||
|
*<code>dy(t)/dy(t<sub>0</sub>)</code> or the derivatives with
|
||||||
|
*respect to some ODE parameters <code>dy(t)/dp</code>.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*All integrators provide dense output. This means that besides
|
||||||
|
*computing the state vector at discrete times, they also provide a
|
||||||
|
*cheap mean to get the state between the time steps. They do so through
|
||||||
|
*classes extending the {@link
|
||||||
|
*org.apache.commons.math.ode.sampling.StepInterpolator StepInterpolator}
|
||||||
|
*abstract class, which are made available to the user at the end of
|
||||||
|
*each step.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*All integrators handle multiple discrete events detection based on switching
|
||||||
|
*functions. This means that the integrator can be driven by user specified
|
||||||
|
*discrete events. The steps are shortened as needed to ensure the events occur
|
||||||
|
*at step boundaries (even if the integrator is a fixed-step
|
||||||
|
*integrator). When the events are triggered, integration can be stopped
|
||||||
|
*(this is called a G-stop facility), the state vector can be changed,
|
||||||
|
*or integration can simply go on. The latter case is useful to handle
|
||||||
|
*discontinuities in the differential equations gracefully and get
|
||||||
|
*accurate dense output even close to the discontinuity.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*The user should describe his problem in his own classes
|
||||||
|
*(<code>UserProblem</code> in the diagram below) which should implement
|
||||||
|
*the {@link org.apache.commons.math.ode.FirstOrderDifferentialEquations
|
||||||
|
*FirstOrderDifferentialEquations} interface. Then he should pass it to
|
||||||
|
*the integrator he prefers among all the classes that implement the
|
||||||
|
*{@link org.apache.commons.math.ode.FirstOrderIntegrator
|
||||||
|
*FirstOrderIntegrator} interface.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*The solution of the integration problem is provided by two means. The
|
||||||
|
*first one is aimed towards simple use: the state vector at the end of
|
||||||
|
*the integration process is copied in the <code>y</code> array of the
|
||||||
|
*{@link org.apache.commons.math.ode.FirstOrderIntegrator#integrate
|
||||||
|
*FirstOrderIntegrator.integrate} method. The second one should be used
|
||||||
|
*when more in-depth information is needed throughout the integration
|
||||||
|
*process. The user can register an object implementing the {@link
|
||||||
|
*org.apache.commons.math.ode.sampling.StepHandler StepHandler} interface or a
|
||||||
|
*{@link org.apache.commons.math.ode.sampling.StepNormalizer StepNormalizer}
|
||||||
|
*object wrapping a user-specified object implementing the {@link
|
||||||
|
*org.apache.commons.math.ode.sampling.FixedStepHandler FixedStepHandler}
|
||||||
|
*interface into the integrator before calling the {@link
|
||||||
|
*org.apache.commons.math.ode.FirstOrderIntegrator#integrate
|
||||||
|
*FirstOrderIntegrator.integrate} method. The user object will be called
|
||||||
|
*appropriately during the integration process, allowing the user to
|
||||||
|
*process intermediate results. The default step handler does nothing.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*{@link org.apache.commons.math.ode.ContinuousOutputModel
|
||||||
|
*ContinuousOutputModel} is a special-purpose step handler that is able
|
||||||
|
*to store all steps and to provide transparent access to any
|
||||||
|
*intermediate result once the integration is over. An important feature
|
||||||
|
*of this class is that it implements the <code>Serializable</code>
|
||||||
|
*interface. This means that a complete continuous model of the
|
||||||
|
*integrated function throughout the integration range can be serialized
|
||||||
|
*and reused later (if stored into a persistent medium like a filesystem
|
||||||
|
*or a database) or elsewhere (if sent to another application). Only the
|
||||||
|
*result of the integration is stored, there is no reference to the
|
||||||
|
*integrated problem by itself.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*Other default implementations of the {@link
|
||||||
|
*org.apache.commons.math.ode.sampling.StepHandler StepHandler} interface are
|
||||||
|
*available for general needs ({@link
|
||||||
|
*org.apache.commons.math.ode.sampling.DummyStepHandler DummyStepHandler}, {@link
|
||||||
|
*org.apache.commons.math.ode.sampling.StepNormalizer StepNormalizer}) and custom
|
||||||
|
*implementations can be developed for specific needs. As an example,
|
||||||
|
*if an application is to be completely driven by the integration
|
||||||
|
*process, then most of the application code will be run inside a step
|
||||||
|
*handler specific to this application.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*Some integrators (the simple ones) use fixed steps that are set at
|
||||||
|
*creation time. The more efficient integrators use variable steps that
|
||||||
|
*are handled internally in order to control the integration error with
|
||||||
|
*respect to a specified accuracy (these integrators extend the {@link
|
||||||
|
*org.apache.commons.math.ode.nonstiff.AdaptiveStepsizeIntegrator
|
||||||
|
*AdaptiveStepsizeIntegrator} abstract class). In this case, the step
|
||||||
|
*handler which is called after each successful step shows up the
|
||||||
|
*variable stepsize. The {@link
|
||||||
|
*org.apache.commons.math.ode.sampling.StepNormalizer StepNormalizer} class can
|
||||||
|
*be used to convert the variable stepsize into a fixed stepsize that
|
||||||
|
*can be handled by classes implementing the {@link
|
||||||
|
*org.apache.commons.math.ode.sampling.FixedStepHandler FixedStepHandler}
|
||||||
|
*interface. Adaptive stepsize integrators can automatically compute the
|
||||||
|
*initial stepsize by themselves, however the user can specify it if he
|
||||||
|
*prefers to retain full control over the integration or if the
|
||||||
|
*automatic guess is wrong.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*<table border="1" align="center">
|
||||||
|
*<tr BGCOLOR="#CCCCFF"><td colspan=2><font size="+2">Fixed Step Integrators</font></td></tr>
|
||||||
|
*<tr BGCOLOR="#EEEEFF"><font size="+1"><td>Name</td><td>Order</td></font></tr>
|
||||||
|
*<tr><td>{@link org.apache.commons.math.ode.nonstiff.EulerIntegrator Euler}</td><td>1</td></tr>
|
||||||
|
*<tr><td>{@link org.apache.commons.math.ode.nonstiff.MidpointIntegrator Midpoint}</td><td>2</td></tr>
|
||||||
|
*<tr><td>{@link org.apache.commons.math.ode.nonstiff.ClassicalRungeKuttaIntegrator Classical Runge-Kutta}</td><td>4</td></tr>
|
||||||
|
*<tr><td>{@link org.apache.commons.math.ode.nonstiff.GillIntegrator Gill}</td><td>4</td></tr>
|
||||||
|
*<tr><td>{@link org.apache.commons.math.ode.nonstiff.ThreeEighthesIntegrator 3/8}</td><td>4</td></tr>
|
||||||
|
*</table>
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<table border="1" align="center">
|
||||||
|
*<tr BGCOLOR="#CCCCFF"><td colspan=3><font size="+2">Adaptive Stepsize Integrators</font></td></tr>
|
||||||
|
*<tr BGCOLOR="#EEEEFF"><font size="+1"><td>Name</td><td>Integration Order</td><td>Error Estimation Order</td></font></tr>
|
||||||
|
*<tr><td>{@link org.apache.commons.math.ode.nonstiff.HighamHall54Integrator Higham and Hall}</td><td>5</td><td>4</td></tr>
|
||||||
|
*<tr><td>{@link org.apache.commons.math.ode.nonstiff.DormandPrince54Integrator Dormand-Prince 5(4)}</td><td>5</td><td>4</td></tr>
|
||||||
|
*<tr><td>{@link org.apache.commons.math.ode.nonstiff.DormandPrince853Integrator Dormand-Prince 8(5,3)}</td><td>8</td><td>5 and 3</td></tr>
|
||||||
|
*<tr><td>{@link org.apache.commons.math.ode.nonstiff.GraggBulirschStoerIntegrator Gragg-Bulirsch-Stoer}</td><td>variable (up to 18 by default)</td><td>variable</td></tr>
|
||||||
|
*<tr><td>{@link org.apache.commons.math.ode.nonstiff.AdamsBashforthIntegrator Adams-Bashforth}</td><td>variable</td><td>variable</td></tr>
|
||||||
|
*<tr><td>{@link org.apache.commons.math.ode.nonstiff.AdamsMoultonIntegrator Adams-Moulton}</td><td>variable</td><td>variable</td></tr>
|
||||||
|
*</table>
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*In the table above, the {@link org.apache.commons.math.ode.nonstiff.AdamsBashforthIntegrator
|
||||||
|
*Adams-Bashforth} and {@link org.apache.commons.math.ode.nonstiff.AdamsMoultonIntegrator
|
||||||
|
*Adams-Moulton} integrators appear as variable-step ones. This is an experimental extension
|
||||||
|
*to the classical algorithms using the Nordsieck vector representation.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.ode;
|
|
@ -1,167 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ -->
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
This package provides classes to solve Ordinary Differential Equations problems.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This package solves Initial Value Problems of the form
|
|
||||||
<code>y'=f(t,y)</code> with <code>t<sub>0</sub></code> and
|
|
||||||
<code>y(t<sub>0</sub>)=y<sub>0</sub></code> known. The provided
|
|
||||||
integrators compute an estimate of <code>y(t)</code> from
|
|
||||||
<code>t=t<sub>0</sub></code> to <code>t=t<sub>1</sub></code>.
|
|
||||||
If in addition to <code>y(t)</code> users need to get the
|
|
||||||
derivatives with respect to the initial state
|
|
||||||
<code>dy(t)/dy(t<sub>0</sub>)</code> or the derivatives with
|
|
||||||
respect to some ODE parameters <code>dy(t)/dp</code>, then the
|
|
||||||
classes from the <a href="./jacobians/package-summary.html">
|
|
||||||
org.apache.commons.math.ode.jacobians</a> package must be used
|
|
||||||
instead of the classes in this package.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
All integrators provide dense output. This means that besides
|
|
||||||
computing the state vector at discrete times, they also provide a
|
|
||||||
cheap mean to get the state between the time steps. They do so through
|
|
||||||
classes extending the {@link
|
|
||||||
org.apache.commons.math.ode.sampling.StepInterpolator StepInterpolator}
|
|
||||||
abstract class, which are made available to the user at the end of
|
|
||||||
each step.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
All integrators handle multiple discrete events detection based on switching
|
|
||||||
functions. This means that the integrator can be driven by user specified
|
|
||||||
discrete events. The steps are shortened as needed to ensure the events occur
|
|
||||||
at step boundaries (even if the integrator is a fixed-step
|
|
||||||
integrator). When the events are triggered, integration can be stopped
|
|
||||||
(this is called a G-stop facility), the state vector can be changed,
|
|
||||||
or integration can simply go on. The latter case is useful to handle
|
|
||||||
discontinuities in the differential equations gracefully and get
|
|
||||||
accurate dense output even close to the discontinuity.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The user should describe his problem in his own classes
|
|
||||||
(<code>UserProblem</code> in the diagram below) which should implement
|
|
||||||
the {@link org.apache.commons.math.ode.FirstOrderDifferentialEquations
|
|
||||||
FirstOrderDifferentialEquations} interface. Then he should pass it to
|
|
||||||
the integrator he prefers among all the classes that implement the
|
|
||||||
{@link org.apache.commons.math.ode.FirstOrderIntegrator
|
|
||||||
FirstOrderIntegrator} interface.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The solution of the integration problem is provided by two means. The
|
|
||||||
first one is aimed towards simple use: the state vector at the end of
|
|
||||||
the integration process is copied in the <code>y</code> array of the
|
|
||||||
{@link org.apache.commons.math.ode.FirstOrderIntegrator#integrate
|
|
||||||
FirstOrderIntegrator.integrate} method. The second one should be used
|
|
||||||
when more in-depth information is needed throughout the integration
|
|
||||||
process. The user can register an object implementing the {@link
|
|
||||||
org.apache.commons.math.ode.sampling.StepHandler StepHandler} interface or a
|
|
||||||
{@link org.apache.commons.math.ode.sampling.StepNormalizer StepNormalizer}
|
|
||||||
object wrapping a user-specified object implementing the {@link
|
|
||||||
org.apache.commons.math.ode.sampling.FixedStepHandler FixedStepHandler}
|
|
||||||
interface into the integrator before calling the {@link
|
|
||||||
org.apache.commons.math.ode.FirstOrderIntegrator#integrate
|
|
||||||
FirstOrderIntegrator.integrate} method. The user object will be called
|
|
||||||
appropriately during the integration process, allowing the user to
|
|
||||||
process intermediate results. The default step handler does nothing.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
{@link org.apache.commons.math.ode.ContinuousOutputModel
|
|
||||||
ContinuousOutputModel} is a special-purpose step handler that is able
|
|
||||||
to store all steps and to provide transparent access to any
|
|
||||||
intermediate result once the integration is over. An important feature
|
|
||||||
of this class is that it implements the <code>Serializable</code>
|
|
||||||
interface. This means that a complete continuous model of the
|
|
||||||
integrated function throughout the integration range can be serialized
|
|
||||||
and reused later (if stored into a persistent medium like a filesystem
|
|
||||||
or a database) or elsewhere (if sent to another application). Only the
|
|
||||||
result of the integration is stored, there is no reference to the
|
|
||||||
integrated problem by itself.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Other default implementations of the {@link
|
|
||||||
org.apache.commons.math.ode.sampling.StepHandler StepHandler} interface are
|
|
||||||
available for general needs ({@link
|
|
||||||
org.apache.commons.math.ode.sampling.DummyStepHandler DummyStepHandler}, {@link
|
|
||||||
org.apache.commons.math.ode.sampling.StepNormalizer StepNormalizer}) and custom
|
|
||||||
implementations can be developed for specific needs. As an example,
|
|
||||||
if an application is to be completely driven by the integration
|
|
||||||
process, then most of the application code will be run inside a step
|
|
||||||
handler specific to this application.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Some integrators (the simple ones) use fixed steps that are set at
|
|
||||||
creation time. The more efficient integrators use variable steps that
|
|
||||||
are handled internally in order to control the integration error with
|
|
||||||
respect to a specified accuracy (these integrators extend the {@link
|
|
||||||
org.apache.commons.math.ode.nonstiff.AdaptiveStepsizeIntegrator
|
|
||||||
AdaptiveStepsizeIntegrator} abstract class). In this case, the step
|
|
||||||
handler which is called after each successful step shows up the
|
|
||||||
variable stepsize. The {@link
|
|
||||||
org.apache.commons.math.ode.sampling.StepNormalizer StepNormalizer} class can
|
|
||||||
be used to convert the variable stepsize into a fixed stepsize that
|
|
||||||
can be handled by classes implementing the {@link
|
|
||||||
org.apache.commons.math.ode.sampling.FixedStepHandler FixedStepHandler}
|
|
||||||
interface. Adaptive stepsize integrators can automatically compute the
|
|
||||||
initial stepsize by themselves, however the user can specify it if he
|
|
||||||
prefers to retain full control over the integration or if the
|
|
||||||
automatic guess is wrong.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<table border="1" align="center">
|
|
||||||
<tr BGCOLOR="#CCCCFF"><td colspan=2><font size="+2">Fixed Step Integrators</font></td></tr>
|
|
||||||
<tr BGCOLOR="#EEEEFF"><font size="+1"><td>Name</td><td>Order</td></font></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.ode.nonstiff.EulerIntegrator Euler}</td><td>1</td></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.ode.nonstiff.MidpointIntegrator Midpoint}</td><td>2</td></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.ode.nonstiff.ClassicalRungeKuttaIntegrator Classical Runge-Kutta}</td><td>4</td></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.ode.nonstiff.GillIntegrator Gill}</td><td>4</td></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.ode.nonstiff.ThreeEighthesIntegrator 3/8}</td><td>4</td></tr>
|
|
||||||
</table>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<table border="1" align="center">
|
|
||||||
<tr BGCOLOR="#CCCCFF"><td colspan=3><font size="+2">Adaptive Stepsize Integrators</font></td></tr>
|
|
||||||
<tr BGCOLOR="#EEEEFF"><font size="+1"><td>Name</td><td>Integration Order</td><td>Error Estimation Order</td></font></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.ode.nonstiff.HighamHall54Integrator Higham and Hall}</td><td>5</td><td>4</td></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.ode.nonstiff.DormandPrince54Integrator Dormand-Prince 5(4)}</td><td>5</td><td>4</td></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.ode.nonstiff.DormandPrince853Integrator Dormand-Prince 8(5,3)}</td><td>8</td><td>5 and 3</td></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.ode.nonstiff.GraggBulirschStoerIntegrator Gragg-Bulirsch-Stoer}</td><td>variable (up to 18 by default)</td><td>variable</td></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.ode.nonstiff.AdamsBashforthIntegrator Adams-Bashforth}</td><td>variable</td><td>variable</td></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.ode.nonstiff.AdamsMoultonIntegrator Adams-Moulton}</td><td>variable</td><td>variable</td></tr>
|
|
||||||
</table>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
In the table above, the {@link org.apache.commons.math.ode.nonstiff.AdamsBashforthIntegrator
|
|
||||||
Adams-Bashforth} and {@link org.apache.commons.math.ode.nonstiff.AdamsMoultonIntegrator
|
|
||||||
Adams-Moulton} integrators appear as variable-step ones. This is an experimental extension
|
|
||||||
to the classical algorithms using the Nordsieck vector representation.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*This package provides classes to handle sampling steps during
|
||||||
|
*Ordinary Differential Equations integration.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*In addition to computing the evolution of the state vector at some grid points, all
|
||||||
|
*ODE integrators also build up interpolation models of this evolution <em>inside</em> the
|
||||||
|
*last computed step. If users are interested in these interpolators, they can register a
|
||||||
|
*{@link org.apache.commons.math.ode.sampling.StepHandler StepHandler} instance using the
|
||||||
|
*{@link org.apache.commons.math.ode.FirstOrderIntegrator#addStepHandler addStepHandler}
|
||||||
|
*method which is supported by all integrators. The integrator will call this instance
|
||||||
|
*at the end of each accepted step and provide it the interpolator. The user can do
|
||||||
|
*whatever he wants with this interpolator, which computes both the state and its
|
||||||
|
*time-derivative. A typical use of step handler is to provide some output to monitor
|
||||||
|
*the integration process.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*In a sense, this is a kind of Inversion Of Control: rather than having the master
|
||||||
|
*application driving the slave integrator by providing the target end value for
|
||||||
|
*the free variable, we get a master integrator scheduling the free variable
|
||||||
|
*evolution and calling the slave application callbacks that were registered at
|
||||||
|
*configuration time.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*Since some integrators may use variable step size, the generic {@link
|
||||||
|
*org.apache.commons.math.ode.sampling.StepHandler StepHandler} interface can be called
|
||||||
|
*either at regular or irregular rate. This interface allows to navigate to any location
|
||||||
|
*within the last computed step, thanks to the provided {@link
|
||||||
|
*org.apache.commons.math.ode.sampling.StepInterpolator StepInterpolator} object.
|
||||||
|
*If regular output is desired (for example in order to write an ephemeris file), then
|
||||||
|
*the simpler {@link org.apache.commons.math.ode.sampling.FixedStepHandler FixedStepHandler}
|
||||||
|
*interface can be used. Objects implementing this interface should be wrapped within a
|
||||||
|
*{@link org.apache.commons.math.ode.sampling.StepNormalizer StepNormalizer} instance
|
||||||
|
*in order to be registered to the integrator.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.ode.sampling;
|
|
@ -1,60 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision: 613620 $ -->
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
This package provides classes to handle sampling steps during
|
|
||||||
Ordinary Differential Equations integration.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
In addition to computing the evolution of the state vector at some grid points, all
|
|
||||||
ODE integrators also build up interpolation models of this evolution <em>inside</em> the
|
|
||||||
last computed step. If users are interested in these interpolators, they can register a
|
|
||||||
{@link org.apache.commons.math.ode.sampling.StepHandler StepHandler} instance using the
|
|
||||||
{@link org.apache.commons.math.ode.FirstOrderIntegrator#addStepHandler addStepHandler}
|
|
||||||
method which is supported by all integrators. The integrator will call this instance
|
|
||||||
at the end of each accepted step and provide it the interpolator. The user can do
|
|
||||||
whatever he wants with this interpolator, which computes both the state and its
|
|
||||||
time-derivative. A typical use of step handler is to provide some output to monitor
|
|
||||||
the integration process.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
In a sense, this is a kind of Inversion Of Control: rather than having the master
|
|
||||||
application driving the slave integrator by providing the target end value for
|
|
||||||
the free variable, we get a master integrator scheduling the free variable
|
|
||||||
evolution and calling the slave application callbacks that were registered at
|
|
||||||
configuration time.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Since some integrators may use variable step size, the generic {@link
|
|
||||||
org.apache.commons.math.ode.sampling.StepHandler StepHandler} interface can be called
|
|
||||||
either at regular or irregular rate. This interface allows to navigate to any location
|
|
||||||
within the last computed step, thanks to the provided {@link
|
|
||||||
org.apache.commons.math.ode.sampling.StepInterpolator StepInterpolator} object.
|
|
||||||
If regular output is desired (for example in order to write an ephemeris file), then
|
|
||||||
the simpler {@link org.apache.commons.math.ode.sampling.FixedStepHandler FixedStepHandler}
|
|
||||||
interface can be used. Objects implementing this interface should be wrapped within a
|
|
||||||
{@link org.apache.commons.math.ode.sampling.StepNormalizer StepNormalizer} instance
|
|
||||||
in order to be registered to the integrator.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*This package provides optimization algorithms that don't require derivatives.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.optimization.direct;
|
|
@ -1,24 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ -->
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
This package provides optimization algorithms that don't require derivatives.
|
|
||||||
</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*This package provides classes to perform curve fitting.
|
||||||
|
*
|
||||||
|
*<p>Curve fitting is a special case of a least squares problem
|
||||||
|
*were the parameters are the coefficients of a function <code>f</code>
|
||||||
|
*whose graph <code>y=f(x)</code> should pass through sample points, and
|
||||||
|
*were the objective function is the squared sum of residuals
|
||||||
|
*<code>f(x<sub>i</sub>)-y<sub>i</sub></code> for observed points
|
||||||
|
*(x<sub>i</sub>, y<sub>i</sub>).</p>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.optimization.fitting;
|
|
@ -1,30 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ -->
|
|
||||||
<body>
|
|
||||||
This package provides classes to perform curve fitting.
|
|
||||||
|
|
||||||
<p>Curve fitting is a special case of a least squares problem
|
|
||||||
were the parameters are the coefficients of a function <code>f</code>
|
|
||||||
whose graph <code>y=f(x)</code> should pass through sample points, and
|
|
||||||
were the objective function is the squared sum of residuals
|
|
||||||
<code>f(x<sub>i</sub>)-y<sub>i</sub></code> for observed points
|
|
||||||
(x<sub>i</sub>, y<sub>i</sub>).</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*This package provides optimization algorithms that require derivatives.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.optimization.general;
|
|
@ -1,22 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ -->
|
|
||||||
<body>
|
|
||||||
This package provides optimization algorithms that require derivatives.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*This package provides optimization algorithms for linear constrained problems.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.optimization.linear;
|
|
@ -1,22 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ -->
|
|
||||||
<body>
|
|
||||||
This package provides optimization algorithms for linear constrained problems.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*This package provides common interfaces for the optimization algorithms
|
||||||
|
*provided in sub-packages. The main interfaces defines optimizers and convergence
|
||||||
|
*checkers. The functions that are optimized by the algorithms provided by this
|
||||||
|
*package and its sub-packages are a subset of the one defined in the <code>analysis</code>
|
||||||
|
*package, namely the real and vector valued functions. These functions are called
|
||||||
|
*objective function here. When the goal is to minimize, the functions are often called
|
||||||
|
*cost function, this name is not used in this package.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*Optimizers are the algorithms that will either minimize or maximize, the objective function
|
||||||
|
*by changing its input variables set until an optimal set is found. There are only four
|
||||||
|
*interfaces defining the common behavior of optimizers, one for each supported type of objective
|
||||||
|
*function:
|
||||||
|
*<ul>
|
||||||
|
* <li>{@link org.apache.commons.math.optimization.univariate.UnivariateRealOptimizer
|
||||||
|
* UnivariateRealOptimizer} for {@link org.apache.commons.math.analysis.UnivariateRealFunction
|
||||||
|
* univariate real functions}</li>
|
||||||
|
* <li>{@link org.apache.commons.math.optimization.MultivariateRealOptimizer
|
||||||
|
* MultivariateRealOptimizer} for {@link org.apache.commons.math.analysis.MultivariateRealFunction
|
||||||
|
* multivariate real functions}</li>
|
||||||
|
* <li>{@link org.apache.commons.math.optimization.DifferentiableMultivariateRealOptimizer
|
||||||
|
* DifferentiableMultivariateRealOptimizer} for {@link
|
||||||
|
* org.apache.commons.math.analysis.DifferentiableMultivariateRealFunction
|
||||||
|
* differentiable multivariate real functions}</li>
|
||||||
|
* <li>{@link org.apache.commons.math.optimization.DifferentiableMultivariateVectorialOptimizer
|
||||||
|
* DifferentiableMultivariateVectorialOptimizer} for {@link
|
||||||
|
* org.apache.commons.math.analysis.DifferentiableMultivariateVectorialFunction
|
||||||
|
* differentiable multivariate vectorial functions}</li>
|
||||||
|
*</ul>
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*Despite there are only four types of supported optimizers, it is possible to optimize a
|
||||||
|
*transform a {@link org.apache.commons.math.analysis.MultivariateVectorialFunction
|
||||||
|
*non-differentiable multivariate vectorial function} by converting it to a {@link
|
||||||
|
*org.apache.commons.math.analysis.MultivariateRealFunction non-differentiable multivariate
|
||||||
|
*real function} thanks to the {@link
|
||||||
|
*org.apache.commons.math.optimization.LeastSquaresConverter LeastSquaresConverter} helper class.
|
||||||
|
*The transformed function can be optimized using any implementation of the {@link
|
||||||
|
*org.apache.commons.math.optimization.MultivariateRealOptimizer MultivariateRealOptimizer} interface.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*<p>
|
||||||
|
*For each of the four types of supported optimizers, there is a special implementation which
|
||||||
|
*wraps a classical optimizer in order to add it a multi-start feature. This feature call the
|
||||||
|
*underlying optimizer several times in sequence with different starting points and returns
|
||||||
|
*the best optimum found or all optima if desired. This is a classical way to prevent being
|
||||||
|
*trapped into a local extremum when looking for a global one.
|
||||||
|
*</p>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.optimization;
|
|
@ -1,72 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ -->
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
This package provides common interfaces for the optimization algorithms
|
|
||||||
provided in sub-packages. The main interfaces defines optimizers and convergence
|
|
||||||
checkers. The functions that are optimized by the algorithms provided by this
|
|
||||||
package and its sub-packages are a subset of the one defined in the <code>analysis</code>
|
|
||||||
package, namely the real and vector valued functions. These functions are called
|
|
||||||
objective function here. When the goal is to minimize, the functions are often called
|
|
||||||
cost function, this name is not used in this package.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Optimizers are the algorithms that will either minimize or maximize, the objective function
|
|
||||||
by changing its input variables set until an optimal set is found. There are only four
|
|
||||||
interfaces defining the common behavior of optimizers, one for each supported type of objective
|
|
||||||
function:
|
|
||||||
<ul>
|
|
||||||
<li>{@link org.apache.commons.math.optimization.univariate.UnivariateRealOptimizer
|
|
||||||
UnivariateRealOptimizer} for {@link org.apache.commons.math.analysis.UnivariateRealFunction
|
|
||||||
univariate real functions}</li>
|
|
||||||
<li>{@link org.apache.commons.math.optimization.MultivariateRealOptimizer
|
|
||||||
MultivariateRealOptimizer} for {@link org.apache.commons.math.analysis.MultivariateRealFunction
|
|
||||||
multivariate real functions}</li>
|
|
||||||
<li>{@link org.apache.commons.math.optimization.DifferentiableMultivariateRealOptimizer
|
|
||||||
DifferentiableMultivariateRealOptimizer} for {@link
|
|
||||||
org.apache.commons.math.analysis.DifferentiableMultivariateRealFunction
|
|
||||||
differentiable multivariate real functions}</li>
|
|
||||||
<li>{@link org.apache.commons.math.optimization.DifferentiableMultivariateVectorialOptimizer
|
|
||||||
DifferentiableMultivariateVectorialOptimizer} for {@link
|
|
||||||
org.apache.commons.math.analysis.DifferentiableMultivariateVectorialFunction
|
|
||||||
differentiable multivariate vectorial functions}</li>
|
|
||||||
</ul>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Despite there are only four types of supported optimizers, it is possible to optimize a
|
|
||||||
transform a {@link org.apache.commons.math.analysis.MultivariateVectorialFunction
|
|
||||||
non-differentiable multivariate vectorial function} by converting it to a {@link
|
|
||||||
org.apache.commons.math.analysis.MultivariateRealFunction non-differentiable multivariate
|
|
||||||
real function} thanks to the {@link
|
|
||||||
org.apache.commons.math.optimization.LeastSquaresConverter LeastSquaresConverter} helper class.
|
|
||||||
The transformed function can be optimized using any implementation of the {@link
|
|
||||||
org.apache.commons.math.optimization.MultivariateRealOptimizer MultivariateRealOptimizer} interface.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
For each of the four types of supported optimizers, there is a special implementation which
|
|
||||||
wraps a classical optimizer in order to add it a multi-start feature. This feature call the
|
|
||||||
underlying optimizer several times in sequence with different starting points and returns
|
|
||||||
the best optimum found or all optima if desired. This is a classical way to prevent being
|
|
||||||
trapped into a local extremum when looking for a global one.
|
|
||||||
</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Univariate real functions minimum finding algorithms.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.optimization.univariate;
|
|
@ -1,22 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
Univariate real functions minimum finding algorithms.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*Common classes used throughout the commons-math library.
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math;
|
|
@ -1,20 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>Common classes used throughout the commons-math library.</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,132 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* <p>Random number and random data generators.</p>
|
||||||
|
* <p>Commons-math provides a few pseudo random number generators. The top level interface is RandomGenerator.
|
||||||
|
* It is implemented by three classes:
|
||||||
|
* <ul>
|
||||||
|
* <li>{@link org.apache.commons.math.random.JDKRandomGenerator JDKRandomGenerator}
|
||||||
|
* that extends the JDK provided generator</li>
|
||||||
|
* <li>AbstractRandomGenerator as a helper for users generators</li>
|
||||||
|
* <li>BitStreamGenerator which is an abstract class for several generators and
|
||||||
|
* which in turn is extended by:
|
||||||
|
* <ul>
|
||||||
|
* <li>{@link org.apache.commons.math.random.MersenneTwister MersenneTwister}</li>
|
||||||
|
* <li>{@link org.apache.commons.math.random.Well512a Well512a}</li>
|
||||||
|
* <li>{@link org.apache.commons.math.random.Well1024a Well1024a}</li>
|
||||||
|
* <li>{@link org.apache.commons.math.random.Well19937a Well19937a}</li>
|
||||||
|
* <li>{@link org.apache.commons.math.random.Well19937c Well19937c}</li>
|
||||||
|
* <li>{@link org.apache.commons.math.random.Well44497a Well44497a}</li>
|
||||||
|
* <li>{@link org.apache.commons.math.random.Well44497b Well44497b}</li>
|
||||||
|
* </ul>
|
||||||
|
* </li>
|
||||||
|
* </ul>
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* The JDK provided generator is a simple one that can be used only for very simple needs.
|
||||||
|
* The Mersenne Twister is a fast generator with very good properties well suited for
|
||||||
|
* Monte-Carlo simulation. It is equidistributed for generating vectors up to dimension 623
|
||||||
|
* and has a huge period: 2<sup>19937</sup> - 1 (which is a Mersenne prime). This generator
|
||||||
|
* is described in a paper by Makoto Matsumoto and Takuji Nishimura in 1998: <a
|
||||||
|
* href="http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/ARTICLES/mt.pdf">Mersenne Twister:
|
||||||
|
* A 623-Dimensionally Equidistributed Uniform Pseudo-Random Number Generator</a>, ACM
|
||||||
|
* Transactions on Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3--30.
|
||||||
|
* The WELL generators are a family of generators with period ranging from 2<sup>512</sup> - 1
|
||||||
|
* to 2<sup>44497</sup> - 1 (this last one is also a Mersenne prime) with even better properties
|
||||||
|
* than Mersenne Twister. These generators are described in a paper by François Panneton,
|
||||||
|
* Pierre L'Ecuyer and Makoto Matsumoto <a
|
||||||
|
* href="http://www.iro.umontreal.ca/~lecuyer/myftp/papers/wellrng.pdf">Improved Long-Period
|
||||||
|
* Generators Based on Linear Recurrences Modulo 2</a> ACM Transactions on Mathematical Software,
|
||||||
|
* 32, 1 (2006). The errata for the paper are in <a
|
||||||
|
* href="http://www.iro.umontreal.ca/~lecuyer/myftp/papers/wellrng-errata.txt">wellrng-errata.txt</a>.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* For simple sampling, any of these generators is sufficient. For Monte-Carlo simulations the
|
||||||
|
* JDK generator does not have any of the good mathematical properties of the other generators,
|
||||||
|
* so it should be avoided. The Mersenne twister and WELL generators have equidistribution properties
|
||||||
|
* proven according to their bits pool size which is directly linked to their period (all of them
|
||||||
|
* have maximal period, i.e. a generator with size n pool has a period 2<sup>n</sup>-1). They also
|
||||||
|
* have equidistribution properties for 32 bits blocks up to s/32 dimension where s is their pool size.
|
||||||
|
* So WELL19937c for exemple is equidistributed up to dimension 623 (19937/32). This means a Monte-Carlo
|
||||||
|
* simulation generating a vector of n variables at each iteration has some guarantees on the properties
|
||||||
|
* of the vector as long as its dimension does not exceed the limit. However, since we use bits from two
|
||||||
|
* successive 32 bits generated integers to create one double, this limit is smaller when the variables are
|
||||||
|
* of type double. so for Monte-Carlo simulation where less the 16 doubles are generated at each round,
|
||||||
|
* WELL1024 may be sufficient. If a larger number of doubles are needed a generator with a larger pool
|
||||||
|
* would be useful.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* The WELL generators are more modern then MersenneTwister (the paper describing than has been published
|
||||||
|
* in 2006 instead of 1998) and fix some of its (few) drawbacks. If initialization array contains many
|
||||||
|
* zero bits, MersenneTwister may take a very long time (several hundreds of thousands of iterations to
|
||||||
|
* reach a steady state with a balanced number of zero and one in its bits pool). So the WELL generators
|
||||||
|
* are better to <i>escape zeroland</i> as explained by the WELL generators creators. The Well19937a and
|
||||||
|
* Well44497a generator are not maximally equidistributed (i.e. there are some dimensions or bits blocks
|
||||||
|
* size for which they are not equidistributed). The Well512a, Well1024a, Well19937c and Well44497b are
|
||||||
|
* maximally equidistributed for blocks size up to 32 bits (they should behave correctly also for double
|
||||||
|
* based on more than 32 bits blocks, but equidistribution is not proven at these blocks sizes).
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* The MersenneTwister generator uses a 624 elements integer array, so it consumes less than 2.5 kilobytes.
|
||||||
|
* The WELL generators use 6 integer arrays with a size equal to the pool size, so for example the
|
||||||
|
* WELL44497b generator uses about 33 kilobytes. This may be important if a very large number of
|
||||||
|
* generator instances were used at the same time.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* All generators are quite fast. As an example, here are some comparisons, obtained on a 64 bits JVM on a
|
||||||
|
* linux computer with a 2008 processor (AMD phenom Quad 9550 at 2.2 GHz). The generation rate for
|
||||||
|
* MersenneTwister was about 27 millions doubles per second (remember we generate two 32 bits integers for
|
||||||
|
* each double). Generation rates for other PRNG, relative to MersenneTwister:
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* <table border="1" align="center">
|
||||||
|
* <tr BGCOLOR="#CCCCFF"><td colspan="2"><font size="+2">Example of performances</font></td></tr>
|
||||||
|
* <tr BGCOLOR="#EEEEFF"><font size="+1"><td>Name</td><td>generation rate (relative to MersenneTwister)</td></font></tr>
|
||||||
|
* <tr><td>{@link org.apache.commons.math.random.MersenneTwister MersenneTwister}</td><td>1</td></tr>
|
||||||
|
* <tr><td>{@link org.apache.commons.math.random.JDKRandomGenerator JDKRandomGenerator}</td><td>between 0.96 and 1.16</td></tr>
|
||||||
|
* <tr><td>{@link org.apache.commons.math.random.Well512a Well512a}</td><td>between 0.85 and 0.88</td></tr>
|
||||||
|
* <tr><td>{@link org.apache.commons.math.random.Well1024a Well1024a}</td><td>between 0.63 and 0.73</td></tr>
|
||||||
|
* <tr><td>{@link org.apache.commons.math.random.Well19937a Well19937a}</td><td>between 0.70 and 0.71</td></tr>
|
||||||
|
* <tr><td>{@link org.apache.commons.math.random.Well19937c Well19937c}</td><td>between 0.57 and 0.71</td></tr>
|
||||||
|
* <tr><td>{@link org.apache.commons.math.random.Well44497a Well44497a}</td><td>between 0.69 and 0.71</td></tr>
|
||||||
|
* <tr><td>{@link org.apache.commons.math.random.Well44497b Well44497b}</td><td>between 0.65 and 0.71</td></tr>
|
||||||
|
* </table>
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* So for most simulation problems, the better generators like {@link
|
||||||
|
* org.apache.commons.math.random.Well19937c Well19937c} and {@link
|
||||||
|
* org.apache.commons.math.random.Well44497b Well44497b} are probably very good choices.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* Note that <em>none</em> of these generators are suitable for cryptography. They are devoted
|
||||||
|
* to simulation, and to generate very long series with strong properties on the series as a whole
|
||||||
|
* (equidistribution, no correlation ...). They do not attempt to create small series but with
|
||||||
|
* very strong properties of unpredictability as needed in cryptography.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.random;
|
|
@ -1,132 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
<p>Random number and random data generators.</p>
|
|
||||||
<p>Commons-math provides a few pseudo random number generators. The top level interface is RandomGenerator.
|
|
||||||
It is implemented by three classes:
|
|
||||||
<ul>
|
|
||||||
<li>{@link org.apache.commons.math.random.JDKRandomGenerator JDKRandomGenerator}
|
|
||||||
that extends the JDK provided generator</li>
|
|
||||||
<li>AbstractRandomGenerator as a helper for users generators</li>
|
|
||||||
<li>BitStreamGenerator which is an abstract class for several generators and
|
|
||||||
which in turn is extended by:
|
|
||||||
<ul>
|
|
||||||
<li>{@link org.apache.commons.math.random.MersenneTwister MersenneTwister}</li>
|
|
||||||
<li>{@link org.apache.commons.math.random.Well512a Well512a}</li>
|
|
||||||
<li>{@link org.apache.commons.math.random.Well1024a Well1024a}</li>
|
|
||||||
<li>{@link org.apache.commons.math.random.Well19937a Well19937a}</li>
|
|
||||||
<li>{@link org.apache.commons.math.random.Well19937c Well19937c}</li>
|
|
||||||
<li>{@link org.apache.commons.math.random.Well44497a Well44497a}</li>
|
|
||||||
<li>{@link org.apache.commons.math.random.Well44497b Well44497b}</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The JDK provided generator is a simple one that can be used only for very simple needs.
|
|
||||||
The Mersenne Twister is a fast generator with very good properties well suited for
|
|
||||||
Monte-Carlo simulation. It is equidistributed for generating vectors up to dimension 623
|
|
||||||
and has a huge period: 2<sup>19937</sup> - 1 (which is a Mersenne prime). This generator
|
|
||||||
is described in a paper by Makoto Matsumoto and Takuji Nishimura in 1998: <a
|
|
||||||
href="http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/ARTICLES/mt.pdf">Mersenne Twister:
|
|
||||||
A 623-Dimensionally Equidistributed Uniform Pseudo-Random Number Generator</a>, ACM
|
|
||||||
Transactions on Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3--30.
|
|
||||||
The WELL generators are a family of generators with period ranging from 2<sup>512</sup> - 1
|
|
||||||
to 2<sup>44497</sup> - 1 (this last one is also a Mersenne prime) with even better properties
|
|
||||||
than Mersenne Twister. These generators are described in a paper by François Panneton,
|
|
||||||
Pierre L'Ecuyer and Makoto Matsumoto <a
|
|
||||||
href="http://www.iro.umontreal.ca/~lecuyer/myftp/papers/wellrng.pdf">Improved Long-Period
|
|
||||||
Generators Based on Linear Recurrences Modulo 2</a> ACM Transactions on Mathematical Software,
|
|
||||||
32, 1 (2006). The errata for the paper are in <a
|
|
||||||
href="http://www.iro.umontreal.ca/~lecuyer/myftp/papers/wellrng-errata.txt">wellrng-errata.txt</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
For simple sampling, any of these generators is sufficient. For Monte-Carlo simulations the
|
|
||||||
JDK generator does not have any of the good mathematical properties of the other generators,
|
|
||||||
so it should be avoided. The Mersenne twister and WELL generators have equidistribution properties
|
|
||||||
proven according to their bits pool size which is directly linked to their period (all of them
|
|
||||||
have maximal period, i.e. a generator with size n pool has a period 2<sup>n</sup>-1). They also
|
|
||||||
have equidistribution properties for 32 bits blocks up to s/32 dimension where s is their pool size.
|
|
||||||
So WELL19937c for exemple is equidistributed up to dimension 623 (19937/32). This means a Monte-Carlo
|
|
||||||
simulation generating a vector of n variables at each iteration has some guarantees on the properties
|
|
||||||
of the vector as long as its dimension does not exceed the limit. However, since we use bits from two
|
|
||||||
successive 32 bits generated integers to create one double, this limit is smaller when the variables are
|
|
||||||
of type double. so for Monte-Carlo simulation where less the 16 doubles are generated at each round,
|
|
||||||
WELL1024 may be sufficient. If a larger number of doubles are needed a generator with a larger pool
|
|
||||||
would be useful.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The WELL generators are more modern then MersenneTwister (the paper describing than has been published
|
|
||||||
in 2006 instead of 1998) and fix some of its (few) drawbacks. If initialization array contains many
|
|
||||||
zero bits, MersenneTwister may take a very long time (several hundreds of thousands of iterations to
|
|
||||||
reach a steady state with a balanced number of zero and one in its bits pool). So the WELL generators
|
|
||||||
are better to <i>escape zeroland</i> as explained by the WELL generators creators. The Well19937a and
|
|
||||||
Well44497a generator are not maximally equidistributed (i.e. there are some dimensions or bits blocks
|
|
||||||
size for which they are not equidistributed). The Well512a, Well1024a, Well19937c and Well44497b are
|
|
||||||
maximally equidistributed for blocks size up to 32 bits (they should behave correctly also for double
|
|
||||||
based on more than 32 bits blocks, but equidistribution is not proven at these blocks sizes).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The MersenneTwister generator uses a 624 elements integer array, so it consumes less than 2.5 kilobytes.
|
|
||||||
The WELL generators use 6 integer arrays with a size equal to the pool size, so for example the
|
|
||||||
WELL44497b generator uses about 33 kilobytes. This may be important if a very large number of
|
|
||||||
generator instances were used at the same time.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
All generators are quite fast. As an example, here are some comparisons, obtained on a 64 bits JVM on a
|
|
||||||
linux computer with a 2008 processor (AMD phenom Quad 9550 at 2.2 GHz). The generation rate for
|
|
||||||
MersenneTwister was about 27 millions doubles per second (remember we generate two 32 bits integers for
|
|
||||||
each double). Generation rates for other PRNG, relative to MersenneTwister:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<table border="1" align="center">
|
|
||||||
<tr BGCOLOR="#CCCCFF"><td colspan="2"><font size="+2">Example of performances</font></td></tr>
|
|
||||||
<tr BGCOLOR="#EEEEFF"><font size="+1"><td>Name</td><td>generation rate (relative to MersenneTwister)</td></font></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.random.MersenneTwister MersenneTwister}</td><td>1</td></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.random.JDKRandomGenerator JDKRandomGenerator}</td><td>between 0.96 and 1.16</td></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.random.Well512a Well512a}</td><td>between 0.85 and 0.88</td></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.random.Well1024a Well1024a}</td><td>between 0.63 and 0.73</td></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.random.Well19937a Well19937a}</td><td>between 0.70 and 0.71</td></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.random.Well19937c Well19937c}</td><td>between 0.57 and 0.71</td></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.random.Well44497a Well44497a}</td><td>between 0.69 and 0.71</td></tr>
|
|
||||||
<tr><td>{@link org.apache.commons.math.random.Well44497b Well44497b}</td><td>between 0.65 and 0.71</td></tr>
|
|
||||||
</table>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
So for most simulation problems, the better generators like {@link
|
|
||||||
org.apache.commons.math.random.Well19937c Well19937c} and {@link
|
|
||||||
org.apache.commons.math.random.Well44497b Well44497b} are probably very good choices.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Note that <em>none</em> of these generators are suitable for cryptography. They are devoted
|
|
||||||
to simulation, and to generate very long series with strong properties on the series as a whole
|
|
||||||
(equidistribution, no correlation ...). They do not attempt to create small series but with
|
|
||||||
very strong properties of unpredictability as needed in cryptography.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*Implementations of special functions such as Beta and Gamma.
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.special;
|
|
@ -1,20 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>Implementations of special functions such as Beta and Gamma.</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*Clustering algorithms
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.stat.clustering;
|
|
@ -1,20 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>Clustering algorithms</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Correlations/Covariance computations.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.stat.correlation;
|
|
@ -1,22 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
Correlations/Covariance computations.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*Summary statistics based on moments.
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.stat.descriptive.moment;
|
|
@ -1,20 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>Summary statistics based on moments.</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Generic univariate summary statistic objects.
|
||||||
|
*
|
||||||
|
* <h3>UnivariateStatistic API Usage Examples:</h3>
|
||||||
|
*
|
||||||
|
* <h4>UnivariateStatistic:</h4>
|
||||||
|
* <code>/∗ evaluation approach ∗/<br/>
|
||||||
|
* double[] values = new double[] { 1, 2, 3, 4, 5 };<br/>
|
||||||
|
* <span style="font-weight: bold;">UnivariateStatistic stat = new Mean();</span><br/>
|
||||||
|
* System.out.println("mean = " + <span style="font-weight: bold;">stat.evaluate(values)</span>);<br/>
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* <h4>StorelessUnivariateStatistic:</h4>
|
||||||
|
* <code>/∗ incremental approach ∗/<br/>
|
||||||
|
* double[] values = new double[] { 1, 2, 3, 4, 5 };<br/>
|
||||||
|
* <span style="font-weight: bold;">StorelessUnivariateStatistic stat = new Mean();</span><br/>
|
||||||
|
* System.out.println("mean before adding a value is NaN = " + <span style="font-weight: bold;">stat.getResult()</span>);<br/>
|
||||||
|
* for (int i = 0; i < values.length; i++) {<br/>
|
||||||
|
* <span style="font-weight: bold;">stat.increment(values[i]);</span><br/>
|
||||||
|
* System.out.println("current mean = " + <span style="font-weight: bold;">stat2.getResult()</span>);<br/>
|
||||||
|
* }<br/>
|
||||||
|
* <span style="font-weight: bold;"> stat.clear();</span><br/>
|
||||||
|
* System.out.println("mean after clear is NaN = " + <span style="font-weight: bold;">stat.getResult()</span>);
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.stat.descriptive;
|
|
@ -1,41 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
Generic univariate summary statistic objects.
|
|
||||||
|
|
||||||
<h3>UnivariateStatistic API Usage Examples:</h3>
|
|
||||||
<h4>UnivariateStatistic:</h4>
|
|
||||||
<code>/* evaluation approach */<br/> double[] values = new double[] { 1, 2,
|
|
||||||
3, 4, 5 };<br/> <span style="font-weight: bold;">UnivariateStatistic stat
|
|
||||||
= new Mean();</span><br/> System.out.println("mean = " + <span
|
|
||||||
style="font-weight: bold;">stat.evaluate(values)</span>);<br/> </code>
|
|
||||||
<h4>StorelessUnivariateStatistic:</h4>
|
|
||||||
<code>/* incremental approach */<br/> double[] values = new double[] { 1, 2,
|
|
||||||
3, 4, 5 };<br/> <span style="font-weight: bold;">
|
|
||||||
StorelessUnivariateStatistic stat = new Mean();</span><br/>
|
|
||||||
System.out.println("mean before adding a value is NaN = " + <span
|
|
||||||
style="font-weight: bold;">stat.getResult()</span>);<br/> for (int i = 0;
|
|
||||||
i < values.length; i++) {<br/> <span
|
|
||||||
style="font-weight: bold;">stat.increment(values[i]);</span><br/>
|
|
||||||
System.out.println("current mean = " + <span style="font-weight: bold;">
|
|
||||||
stat2.getResult()</span>);<br/> }<br/> <span style="font-weight: bold;">
|
|
||||||
stat.clear();</span><br/> System.out.println("mean after clear is NaN = "
|
|
||||||
+ <span style="font-weight: bold;">stat.getResult()</span>);</code>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*Summary statistics based on ranks.
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.stat.descriptive.rank;
|
|
@ -1,20 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>Summary statistics based on ranks.</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*Other summary statistics.
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.stat.descriptive.summary;
|
|
@ -1,20 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>Other summary statistics.</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Classes providing hypothesis testing and confidence interval
|
||||||
|
* construction.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.stat.inference;
|
|
@ -1,23 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
Classes providing hypothesis testing and confidence interval
|
|
||||||
construction.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*Data storage, manipulation and summary routines.
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.stat;
|
|
@ -1,20 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>Data storage, manipulation and summary routines.</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Classes providing rank transformations.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.stat.ranking;
|
|
@ -1,22 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision:$ $Date:$ -->
|
|
||||||
<body>
|
|
||||||
Classes providing rank transformations.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Statistical routines involving multivariate data.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.stat.regression;
|
|
@ -1,22 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
Statistical routines involving multivariate data.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Implementations of transform methods, including Fast Fourier transforms.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.transform;
|
|
@ -1,22 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>
|
|
||||||
Implementations of transform methods, including Fast Fourier transforms.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*Convenience routines and common data structures used throughout the commons-math library.
|
||||||
|
*/
|
||||||
|
package org.apache.commons.math.util;
|
|
@ -1,20 +0,0 @@
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- $Revision$ $Date$ -->
|
|
||||||
<body>Convenience routines and common data structures used throughout the commons-math library.</body>
|
|
||||||
</html>
|
|
|
@ -52,6 +52,9 @@ The <action> type attribute can be add,update,fix,remove.
|
||||||
If the output is not quite correct, check for invisible trailing spaces!
|
If the output is not quite correct, check for invisible trailing spaces!
|
||||||
-->
|
-->
|
||||||
<release version="3.0" date="TBD" description="TBD">
|
<release version="3.0" date="TBD" description="TBD">
|
||||||
|
<action dev="luc" type="fix" issue="MATH-445" >
|
||||||
|
Replaced package.html with package-info.java for package documentation.
|
||||||
|
</action>
|
||||||
<action dev="luc" type="fix" issue="MATH-284" due-to="Klaus Hartlage">
|
<action dev="luc" type="fix" issue="MATH-284" due-to="Klaus Hartlage">
|
||||||
Added a getRuntimeClass method to the Field interface allowing to use a
|
Added a getRuntimeClass method to the Field interface allowing to use a
|
||||||
complete hierarchy of fields sharing a common interface.
|
complete hierarchy of fields sharing a common interface.
|
||||||
|
|
Loading…
Reference in New Issue