moved the decomposition algorithms in a subpackage of the linear package

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@744768 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2009-02-15 21:59:09 +00:00
parent 0992284ca5
commit f24bbdd41d
46 changed files with 259 additions and 69 deletions

View File

@ -68,11 +68,11 @@ public class MessagesResources_fr
{ "dimension mismatch {0} != {1}",
"dimensions incompatibles {0} != {1}" },
// org.apache.commons.math.linear.NotPositiveDefiniteMatrixException
// org.apache.commons.math.linear.decomposition.NotPositiveDefiniteMatrixException
{ "not positive definite matrix",
"matrice non d\u00e9finie positive" },
// org.apache.commons.math.linear.NotSymmetricMatrixException
// org.apache.commons.math.linear.decomposition.NotSymmetricMatrixException
{ "not symmetric matrix",
"matrice non symm\u00e9trique" },
@ -175,25 +175,25 @@ public class MessagesResources_fr
{ "no bin selected",
"aucun compartiment s\u00e9lectionn\u00e9" },
// org.apache.commons.math.linear.EigenDecompositionImpl
// org.apache.commons.math.linear.decomposition.EigenDecompositionImpl
{ "cannot solve degree {0} equation",
"impossible de r\u00e9soudre une \u00e9quation de degr\u00e9 {0}" },
{ "eigen decomposition of assymetric matrices not supported yet",
"la d\u00e9composition en valeurs/vecteurs propres de matrices non sym\u00e9triques n''est pas encore disponible" },
// org.apache.commons.math.linear.NonSquareMatrixException
// org.apache.commons.math.linear.decomposition.NonSquareMatrixException
{ "a {0}x{1} matrix was provided instead of a square matrix",
"une matrice {0}x{1} a \u00e9t\u00e9 fournie \u00e0 la place d''une matrice carr\u00e9e" },
// org.apache.commons.math.linear.SingularMatrixException
// org.apache.commons.math.linear.decomposition.SingularMatrixException
{ "matrix is singular",
"matrice singuli\u00e8re" },
// org.apache.commons.math.linear.CholeskyDecompositionImpl
// org.apache.commons.math.linear.EigenDecompositionImpl
// org.apache.commons.math.linear.LUDecompositionImpl
// org.apache.commons.math.linear.QRDecompositionImpl
// org.apache.commons.math.linear.SingularValueDecompositionImpl
// org.apache.commons.math.linear.decomposition.CholeskyDecompositionImpl
// org.apache.commons.math.linear.decomposition.EigenDecompositionImpl
// org.apache.commons.math.linear.decomposition.LUDecompositionImpl
// org.apache.commons.math.linear.decomposition.QRDecompositionImpl
// org.apache.commons.math.linear.decomposition.SingularValueDecompositionImpl
{ "vector length mismatch: got {0} but expected {1}",
"dimension de vecteur erronn\u00e9e : {0} \u00e0 la place de {1}" },
{ "dimensions mismatch: got {0}x{1} but expected {2}x{3}",

View File

@ -20,9 +20,9 @@ package org.apache.commons.math.estimation;
import java.util.Arrays;
import org.apache.commons.math.linear.InvalidMatrixException;
import org.apache.commons.math.linear.LUDecompositionImpl;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.decomposition.LUDecompositionImpl;
/**
* Base class for implementing estimators.

View File

@ -20,11 +20,11 @@ package org.apache.commons.math.estimation;
import java.io.Serializable;
import org.apache.commons.math.linear.InvalidMatrixException;
import org.apache.commons.math.linear.LUDecompositionImpl;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.RealVector;
import org.apache.commons.math.linear.RealVectorImpl;
import org.apache.commons.math.linear.decomposition.LUDecompositionImpl;
/**
* This class implements a solver for estimation problems.

View File

@ -20,6 +20,10 @@ package org.apache.commons.math.linear;
import java.io.Serializable;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.linear.decomposition.DecompositionSolver;
import org.apache.commons.math.linear.decomposition.LUDecomposition;
import org.apache.commons.math.linear.decomposition.LUDecompositionImpl;
import org.apache.commons.math.linear.decomposition.NonSquareMatrixException;
import org.apache.commons.math.util.MathUtils;
/**

View File

@ -20,6 +20,8 @@ import java.io.Serializable;
import java.math.BigDecimal;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.linear.decomposition.NonSquareMatrixException;
import org.apache.commons.math.linear.decomposition.SingularMatrixException;
/**
* Implementation of {@link BigMatrix} using a BigDecimal[][] array to store entries

View File

@ -19,6 +19,10 @@ package org.apache.commons.math.linear;
import java.io.Serializable;
import org.apache.commons.math.linear.decomposition.DecompositionSolver;
import org.apache.commons.math.linear.decomposition.LUDecomposition;
import org.apache.commons.math.linear.decomposition.NonSquareMatrixException;
/**
* Interface defining a real-valued matrix with basic algebraic operations.
* <p>

View File

@ -15,10 +15,13 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import java.io.Serializable;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
/**
* Class transforming any matrix to bi-diagonal shape.
* <p>Any m &times; n matrix A can be written as the product of three matrices:

View File

@ -15,10 +15,12 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import java.io.Serializable;
import org.apache.commons.math.linear.RealMatrix;
/**
* An interface to classes that implement an algorithm to calculate the
* Cholesky decomposition of a real symmetric positive-definite matrix.

View File

@ -15,9 +15,15 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.linear.InvalidMatrixException;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.RealMatrixImpl;
import org.apache.commons.math.linear.RealVector;
import org.apache.commons.math.linear.RealVectorImpl;
/**

View File

@ -15,10 +15,14 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import java.io.Serializable;
import org.apache.commons.math.linear.InvalidMatrixException;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.RealVector;
/**
* Interface handling decomposition algorithms that can solve A &times; X = B.

View File

@ -15,10 +15,13 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import java.io.Serializable;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.RealVector;
/**
* An interface to classes that implement an algorithm to calculate the
* eigen decomposition of a real matrix.

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import java.util.ArrayList;
import java.util.Arrays;
@ -24,6 +24,11 @@ import java.util.List;
import org.apache.commons.math.ConvergenceException;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.MaxIterationsExceededException;
import org.apache.commons.math.linear.InvalidMatrixException;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.RealVector;
import org.apache.commons.math.linear.RealVectorImpl;
import org.apache.commons.math.util.MathUtils;
/**

View File

@ -15,10 +15,12 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import java.io.Serializable;
import org.apache.commons.math.linear.RealMatrix;
/**
* An interface to classes that implement an algorithm to calculate the
* LU-decomposition of a real matrix.

View File

@ -15,9 +15,15 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.linear.InvalidMatrixException;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.RealMatrixImpl;
import org.apache.commons.math.linear.RealVector;
import org.apache.commons.math.linear.RealVectorImpl;
/**
* Calculates the LUP-decomposition of a square matrix.

View File

@ -15,7 +15,9 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import org.apache.commons.math.linear.InvalidMatrixException;
/**
* Thrown when an operation defined only for square matrices is applied to non-square ones.

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import org.apache.commons.math.MathException;

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import org.apache.commons.math.MathException;

View File

@ -15,10 +15,12 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import java.io.Serializable;
import org.apache.commons.math.linear.RealMatrix;
/**
* An interface to classes that implement an algorithm to calculate the
* QR-decomposition of a real matrix.

View File

@ -15,11 +15,17 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import java.util.Arrays;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.linear.DenseRealMatrix;
import org.apache.commons.math.linear.InvalidMatrixException;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.RealVector;
import org.apache.commons.math.linear.RealVectorImpl;
/**

View File

@ -15,7 +15,9 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import org.apache.commons.math.linear.InvalidMatrixException;
/**
* Thrown when a matrix is singular.

View File

@ -15,10 +15,12 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import java.io.Serializable;
import org.apache.commons.math.linear.RealMatrix;
/**
* An interface to classes that implement an algorithm to calculate the

View File

@ -15,10 +15,14 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import org.apache.commons.math.ConvergenceException;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.linear.InvalidMatrixException;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.RealVector;
import org.apache.commons.math.util.MathUtils;
/**

View File

@ -15,11 +15,15 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import java.io.Serializable;
import java.util.Arrays;
import org.apache.commons.math.linear.InvalidMatrixException;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
/**
* Class transforming a symmetrical matrix to tridiagonal shape.
* <p>A symmetrical m &times; m matrix A can be written as the product of three matrices:

View File

@ -0,0 +1,20 @@
<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>Matrix decomposition algorithms and linear/least squares solvers.</body>
</html>

View File

@ -23,8 +23,8 @@ import java.util.Comparator;
import org.apache.commons.math.ConvergenceException;
import org.apache.commons.math.DimensionMismatchException;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.linear.NotPositiveDefiniteMatrixException;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.decomposition.NotPositiveDefiniteMatrixException;
import org.apache.commons.math.random.CorrelatedRandomVectorGenerator;
import org.apache.commons.math.random.JDKRandomGenerator;
import org.apache.commons.math.random.RandomGenerator;

View File

@ -19,8 +19,8 @@ package org.apache.commons.math.random;
import org.apache.commons.math.DimensionMismatchException;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.NotPositiveDefiniteMatrixException;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.decomposition.NotPositiveDefiniteMatrixException;
/**
* A {@link RandomVectorGenerator} that generates vectors with with

View File

@ -16,9 +16,9 @@
*/
package org.apache.commons.math.stat.regression;
import org.apache.commons.math.linear.LUDecompositionImpl;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.RealMatrixImpl;
import org.apache.commons.math.linear.decomposition.LUDecompositionImpl;
/**

View File

@ -16,11 +16,11 @@
*/
package org.apache.commons.math.stat.regression;
import org.apache.commons.math.linear.LUDecompositionImpl;
import org.apache.commons.math.linear.QRDecomposition;
import org.apache.commons.math.linear.QRDecompositionImpl;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.RealMatrixImpl;
import org.apache.commons.math.linear.decomposition.LUDecompositionImpl;
import org.apache.commons.math.linear.decomposition.QRDecomposition;
import org.apache.commons.math.linear.decomposition.QRDecompositionImpl;
/**
* <p>Implements ordinary least squares (OLS) to estimate the parameters of a

View File

@ -100,17 +100,25 @@ RealMatrix pInverse = new LUDecompositionImpl(p).getSolver().getInverse();
</subsection>
<subsection name="3.4 Solving linear systems" href="solve">
<p>
The <code>solve()</code> methods of the <code>DecompositionSolver</code> interface
support solving linear systems of equations of the form AX=B, either in linear sense
or in least square sense. In each case, the <code>RealMatrix</code> represents the
coefficient matrix of the system. For example, to solve the linear system
The <code>solve()</code> methods of the <a
href="../apidocs/org/apache/commons/math/linear/decomposition/DecompositionSolver.html">DecompositionSolver</a>
interface support solving linear systems of equations of the form AX=B, either
in linear sense or in least square sense. A <code>RealMatrix</code> instance is
used to represent the coefficient matrix of the system. Solving the system is a
two phases process: first the coefficient matrix is decomposed in some way and
then a solver built from the decomposition solves the system. This allows to
compute the decomposition and build the solver only once if several systems have
to be solved with the same coefficient matrix.
</p>
<p>
For example, to solve the linear system
<pre>
2x + 3y - 2z = 1
-x + 7y + 6x = -2
4x - 3y - 5z = 1
</pre>
Start by creating a RealMatrix to store the coefficients matrix A and provide it
to a solver
Start by decomposing the coefficient matrix A (in this case using LU decomposition)
and build a solver
<source>
RealMatrix coefficients =
new RealMatrixImpl(new double[][] { { 2, 3, -2 }, { -1, 7, 6 }, { 4, -3, -5 } },
@ -128,22 +136,24 @@ RealVector solution = solver.solve(constants);
and z (<code>solution.getEntry(2)</code>) that solve the system.
</p>
<p>
The linear system AX=B is solved in least squares sense: the value returned
for X is such that the residual AX-B has minimal norm. If an exact solution
exist (i.e. if for some X the residual AX-B is exactly 0), then this exact
solution is also the solution in least square sense. Some solvers like
the one obtained from <code>LUDecomposition</code> or
<code>CholeskyDecomposition</code>code> can only find the solution
for square matrices and when the solution is an exact linear solution. Other
solvers like the one obtained from <code>QRDecomposition</code>
are more versatile and can also find solutions with non-square matrix A or when
no exact solution exist (i.e. when the minimal value for AX-B norm is non-null).
Each type of decomposition has its specific semantics and constraints on
the coefficient matrix as shown in the following table. For algorithms that
solve AX=B in least squares sense the value returned for X is such that the
residual AX-B has minimal norm. If an exact solution exist (i.e. if for some
X the residual AX-B is exactly 0), then this exact solution is also the solution
in least square sense. This implies that algorithms suited for least squares
problems can also be used to solve exact problems, but the reverse is not true.
</p>
<p>
If the coefficient matrix is singular or doesn't fulfill the requirements of
the solver, an
<a href="../apidocs/org/apache/commons/math/linear/InvalidMatrixException.html">
InvalidMatrixException</a> or an <code>IllegalArgumentException</code> is thrown.
<table border="1" align="center">
<tr BGCOLOR="#CCCCFF"><td colspan="2"><font size="+2">Decomposition algorithms</font></td></tr>
<tr BGCOLOR="#EEEEFF"><font size="+1"><td>Name</td><td>coefficients matrix</td><td>problem type</td></font></tr>
<tr><td><a href="../apidocs/org/apache/commons/math/linear/decomposition/LUDecomposition.html">LU</a></td><td>square</td><td>exact solution only</td></tr>
<tr><td><a href="../apidocs/org/apache/commons/math/linear/decomposition/CholeskyDecomposition.html">Cholesky</a></td><td>symmetric positive definite</td><td>exact solution only</td></tr>
<tr><td><a href="../apidocs/org/apache/commons/math/linear/decomposition/QRDecomposition.html">QR</a></td><td>any</td><td>least squares solution</td></tr>
<tr><td><a href="../apidocs/org/apache/commons/math/linear/decomposition/EigenDecomposition.html">eigen decomposition</a></td><td>square</td><td>exact solution only</td></tr>
<tr><td><a href="../apidocs/org/apache/commons/math/linear/decomposition/SingularValueDecomposition.html">SVD</a></td><td>any</td><td>least squares solution</td></tr>
</table>
</p>
<p>
It is possible to use a simple array of double instead of a <code>RealVector</code>.

View File

@ -19,6 +19,9 @@ package org.apache.commons.math.linear;
import java.util.Arrays;
import java.util.Random;
import org.apache.commons.math.linear.decomposition.LUDecompositionImpl;
import org.apache.commons.math.linear.decomposition.NonSquareMatrixException;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

View File

@ -21,6 +21,8 @@ import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.apache.commons.math.TestUtils;
import org.apache.commons.math.linear.decomposition.LUDecompositionImpl;
import org.apache.commons.math.linear.decomposition.NonSquareMatrixException;
/**
* Test cases for the {@link RealMatrixImpl} class.

View File

@ -16,6 +16,9 @@
*/
package org.apache.commons.math.linear;
import org.apache.commons.math.linear.decomposition.LUDecompositionImpl;
import org.apache.commons.math.linear.decomposition.NonSquareMatrixException;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

View File

@ -15,7 +15,11 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.decomposition.BiDiagonalTransformer;
import junit.framework.Test;
import junit.framework.TestCase;

View File

@ -15,9 +15,16 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import org.apache.commons.math.MathException;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.decomposition.CholeskyDecomposition;
import org.apache.commons.math.linear.decomposition.CholeskyDecompositionImpl;
import org.apache.commons.math.linear.decomposition.NonSquareMatrixException;
import org.apache.commons.math.linear.decomposition.NotPositiveDefiniteMatrixException;
import org.apache.commons.math.linear.decomposition.NotSymmetricMatrixException;
import junit.framework.Test;
import junit.framework.TestCase;

View File

@ -15,13 +15,20 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.apache.commons.math.MathException;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.RealVectorImpl;
import org.apache.commons.math.linear.RealVectorImplTest;
import org.apache.commons.math.linear.RealVectorImplTest.RealVectorTestImpl;
import org.apache.commons.math.linear.decomposition.CholeskyDecompositionImpl;
import org.apache.commons.math.linear.decomposition.DecompositionSolver;
public class CholeskySolverTest extends TestCase {

View File

@ -15,11 +15,17 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import java.util.Arrays;
import java.util.Random;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.RealVector;
import org.apache.commons.math.linear.decomposition.EigenDecomposition;
import org.apache.commons.math.linear.decomposition.EigenDecompositionImpl;
import org.apache.commons.math.linear.decomposition.TriDiagonalTransformer;
import org.apache.commons.math.util.MathUtils;
import junit.framework.Test;

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import java.util.Random;
@ -23,6 +23,14 @@ import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.apache.commons.math.linear.InvalidMatrixException;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.RealVectorImpl;
import org.apache.commons.math.linear.RealVectorImplTest;
import org.apache.commons.math.linear.RealVectorImplTest.RealVectorTestImpl;
import org.apache.commons.math.linear.decomposition.DecompositionSolver;
import org.apache.commons.math.linear.decomposition.EigenDecompositionImpl;
import org.apache.commons.math.util.MathUtils;
public class EigenSolverTest extends TestCase {

View File

@ -15,7 +15,13 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import org.apache.commons.math.linear.InvalidMatrixException;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.decomposition.LUDecomposition;
import org.apache.commons.math.linear.decomposition.LUDecompositionImpl;
import junit.framework.Test;
import junit.framework.TestCase;

View File

@ -15,7 +15,16 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import org.apache.commons.math.linear.InvalidMatrixException;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.RealVectorImpl;
import org.apache.commons.math.linear.RealVectorImplTest;
import org.apache.commons.math.linear.RealVectorImplTest.RealVectorTestImpl;
import org.apache.commons.math.linear.decomposition.DecompositionSolver;
import org.apache.commons.math.linear.decomposition.LUDecompositionImpl;
import junit.framework.Test;
import junit.framework.TestCase;

View File

@ -15,10 +15,19 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import java.util.Random;
import org.apache.commons.math.linear.DefaultRealMatrixChangingVisitor;
import org.apache.commons.math.linear.DefaultRealMatrixPreservingVisitor;
import org.apache.commons.math.linear.DenseRealMatrix;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.MatrixVisitorException;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.decomposition.QRDecomposition;
import org.apache.commons.math.linear.decomposition.QRDecompositionImpl;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

View File

@ -15,10 +15,24 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import java.util.Random;
import org.apache.commons.math.linear.DefaultRealMatrixChangingVisitor;
import org.apache.commons.math.linear.DenseRealMatrix;
import org.apache.commons.math.linear.InvalidMatrixException;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.MatrixVisitorException;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.RealVector;
import org.apache.commons.math.linear.RealVectorImpl;
import org.apache.commons.math.linear.RealVectorImplTest;
import org.apache.commons.math.linear.RealVectorImplTest.RealVectorTestImpl;
import org.apache.commons.math.linear.decomposition.DecompositionSolver;
import org.apache.commons.math.linear.decomposition.QRDecomposition;
import org.apache.commons.math.linear.decomposition.QRDecompositionImpl;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

View File

@ -15,10 +15,15 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import java.util.Random;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.decomposition.SingularValueDecomposition;
import org.apache.commons.math.linear.decomposition.SingularValueDecompositionImpl;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

View File

@ -15,7 +15,16 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import org.apache.commons.math.linear.InvalidMatrixException;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.RealVectorImpl;
import org.apache.commons.math.linear.RealVectorImplTest;
import org.apache.commons.math.linear.RealVectorImplTest.RealVectorTestImpl;
import org.apache.commons.math.linear.decomposition.DecompositionSolver;
import org.apache.commons.math.linear.decomposition.SingularValueDecompositionImpl;
import junit.framework.Test;
import junit.framework.TestCase;

View File

@ -15,10 +15,15 @@
* limitations under the License.
*/
package org.apache.commons.math.linear;
package org.apache.commons.math.linear.decomposition;
import java.util.Arrays;
import org.apache.commons.math.linear.InvalidMatrixException;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.decomposition.TriDiagonalTransformer;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

View File

@ -17,7 +17,7 @@
package org.apache.commons.math.optimization;
import org.apache.commons.math.linear.NotPositiveDefiniteMatrixException;
import org.apache.commons.math.linear.decomposition.NotPositiveDefiniteMatrixException;
import org.apache.commons.math.optimization.ConvergenceChecker;
import org.apache.commons.math.optimization.CostException;
import org.apache.commons.math.optimization.CostFunction;

View File

@ -23,8 +23,8 @@ import junit.framework.TestSuite;
import org.apache.commons.math.DimensionMismatchException;
import org.apache.commons.math.linear.MatrixUtils;
import org.apache.commons.math.linear.NotPositiveDefiniteMatrixException;
import org.apache.commons.math.linear.RealMatrix;
import org.apache.commons.math.linear.decomposition.NotPositiveDefiniteMatrixException;
import org.apache.commons.math.stat.descriptive.moment.VectorialCovariance;
import org.apache.commons.math.stat.descriptive.moment.VectorialMean;