MATH-438
Removed deprecated methods. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1034190 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
07f1663320
commit
a151bff2f5
|
@ -35,20 +35,10 @@ import org.apache.commons.math.util.FastMath;
|
|||
* @since 2.0
|
||||
*/
|
||||
public abstract class AbstractRealMatrix implements RealMatrix {
|
||||
|
||||
|
||||
/** Cached LU solver.
|
||||
* @deprecated as of release 2.0, since all methods using this are deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
private DecompositionSolver lu;
|
||||
|
||||
/**
|
||||
* Creates a matrix with no data
|
||||
*/
|
||||
protected AbstractRealMatrix() {
|
||||
lu = null;
|
||||
}
|
||||
protected AbstractRealMatrix() {}
|
||||
|
||||
/**
|
||||
* Create a new RealMatrix with the supplied row and column dimensions.
|
||||
|
@ -64,7 +54,6 @@ public abstract class AbstractRealMatrix implements RealMatrix {
|
|||
if (columnDimension < 1) {
|
||||
throw new NotStrictlyPositiveException(columnDimension);
|
||||
}
|
||||
lu = null;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
|
@ -367,8 +356,6 @@ public abstract class AbstractRealMatrix implements RealMatrix {
|
|||
setEntry(row + i, column + j, subMatrix[i][j]);
|
||||
}
|
||||
}
|
||||
|
||||
lu = null;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
|
@ -539,37 +526,11 @@ public abstract class AbstractRealMatrix implements RealMatrix {
|
|||
return out;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Deprecated
|
||||
public RealMatrix inverse()
|
||||
throws InvalidMatrixException {
|
||||
if (lu == null) {
|
||||
lu = new LUDecompositionImpl(this, MathUtils.SAFE_MIN).getSolver();
|
||||
}
|
||||
return lu.getInverse();
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Deprecated
|
||||
public double getDeterminant()
|
||||
throws InvalidMatrixException {
|
||||
return new LUDecompositionImpl(this, MathUtils.SAFE_MIN).getDeterminant();
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public boolean isSquare() {
|
||||
return getColumnDimension() == getRowDimension();
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Deprecated
|
||||
public boolean isSingular() {
|
||||
if (lu == null) {
|
||||
lu = new LUDecompositionImpl(this, MathUtils.SAFE_MIN).getSolver();
|
||||
}
|
||||
return !lu.isNonSingular();
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public abstract int getRowDimension();
|
||||
|
||||
|
@ -698,7 +659,6 @@ public abstract class AbstractRealMatrix implements RealMatrix {
|
|||
setEntry(row, column, newValue);
|
||||
}
|
||||
}
|
||||
lu = null;
|
||||
return visitor.end();
|
||||
}
|
||||
|
||||
|
@ -731,7 +691,6 @@ public abstract class AbstractRealMatrix implements RealMatrix {
|
|||
setEntry(row, column, newValue);
|
||||
}
|
||||
}
|
||||
lu = null;
|
||||
return visitor.end();
|
||||
}
|
||||
|
||||
|
@ -764,7 +723,6 @@ public abstract class AbstractRealMatrix implements RealMatrix {
|
|||
setEntry(row, column, newValue);
|
||||
}
|
||||
}
|
||||
lu = null;
|
||||
return visitor.end();
|
||||
}
|
||||
|
||||
|
@ -797,7 +755,6 @@ public abstract class AbstractRealMatrix implements RealMatrix {
|
|||
setEntry(row, column, newValue);
|
||||
}
|
||||
}
|
||||
lu = null;
|
||||
return visitor.end();
|
||||
}
|
||||
|
||||
|
@ -845,53 +802,6 @@ public abstract class AbstractRealMatrix implements RealMatrix {
|
|||
return walkInRowOrder(visitor, startRow, endRow, startColumn, endColumn);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Deprecated
|
||||
public double[] solve(final double[] b)
|
||||
throws IllegalArgumentException, InvalidMatrixException {
|
||||
if (lu == null) {
|
||||
lu = new LUDecompositionImpl(this, MathUtils.SAFE_MIN).getSolver();
|
||||
}
|
||||
return lu.solve(b);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Deprecated
|
||||
public RealMatrix solve(final RealMatrix b)
|
||||
throws IllegalArgumentException, InvalidMatrixException {
|
||||
if (lu == null) {
|
||||
lu = new LUDecompositionImpl(this, MathUtils.SAFE_MIN).getSolver();
|
||||
}
|
||||
return lu.solve(b);
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes a new
|
||||
* <a href="http://www.math.gatech.edu/~bourbaki/math2601/Web-notes/2num.pdf">
|
||||
* LU decomposition</a> for this matrix, storing the result for use by other methods.
|
||||
* <p>
|
||||
* <strong>Implementation Note</strong>:<br>
|
||||
* Uses <a href="http://www.damtp.cam.ac.uk/user/fdl/people/sd/lectures/nummeth98/linear.htm">
|
||||
* Crout's algorithm</a>, with partial pivoting.</p>
|
||||
* <p>
|
||||
* <strong>Usage Note</strong>:<br>
|
||||
* This method should rarely be invoked directly. Its only use is
|
||||
* to force recomputation of the LU decomposition when changes have been
|
||||
* made to the underlying data using direct array references. Changes
|
||||
* made using setXxx methods will trigger recomputation when needed
|
||||
* automatically.</p>
|
||||
*
|
||||
* @throws InvalidMatrixException if the matrix is non-square or singular.
|
||||
* @deprecated as of release 2.0, replaced by {@link LUDecomposition}
|
||||
*/
|
||||
@Deprecated
|
||||
public void luDecompose()
|
||||
throws InvalidMatrixException {
|
||||
if (lu == null) {
|
||||
lu = new LUDecompositionImpl(this, MathUtils.SAFE_MIN).getSolver();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a string representation for this matrix.
|
||||
* @return a string representation for this matrix
|
||||
|
|
|
@ -424,44 +424,6 @@ public interface RealMatrix extends AnyMatrix {
|
|||
*/
|
||||
RealMatrix transpose();
|
||||
|
||||
/**
|
||||
* Returns the inverse of this matrix.
|
||||
*
|
||||
* @return inverse matrix
|
||||
* @throws InvalidMatrixException if this is not invertible
|
||||
* @deprecated as of release 2.0, replaced by <code>
|
||||
* {@link LUDecompositionImpl#LUDecompositionImpl(RealMatrix)
|
||||
* new LUDecompositionImpl(m)}.{@link LUDecomposition#getSolver()
|
||||
* getSolver()}.{@link DecompositionSolver#getInverse()
|
||||
* getInverse()}</code>
|
||||
*/
|
||||
@Deprecated
|
||||
RealMatrix inverse();
|
||||
|
||||
/**
|
||||
* Returns the determinant of this matrix.
|
||||
*
|
||||
* @return determinant
|
||||
* @deprecated as of release 2.0, replaced by <code>
|
||||
* {@link LUDecompositionImpl#LUDecompositionImpl(RealMatrix)
|
||||
* new LUDecompositionImpl(m)}.{@link LUDecomposition#getDeterminant()
|
||||
* getDeterminant()}</code>
|
||||
*/
|
||||
@Deprecated
|
||||
double getDeterminant();
|
||||
|
||||
/**
|
||||
* Is this a singular matrix?
|
||||
* @return true if the matrix is singular
|
||||
* @deprecated as of release 2.0, replaced by the boolean negation of
|
||||
* <code>{@link LUDecompositionImpl#LUDecompositionImpl(RealMatrix)
|
||||
* new LUDecompositionImpl(m)}.{@link LUDecomposition#getSolver()
|
||||
* getSolver()}.{@link DecompositionSolver#isNonSingular()
|
||||
* isNonSingular()}</code>
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isSingular();
|
||||
|
||||
/**
|
||||
* Returns the <a href="http://mathworld.wolfram.com/MatrixTrace.html">
|
||||
* trace</a> of the matrix (the sum of the elements on the main diagonal).
|
||||
|
@ -821,32 +783,4 @@ public interface RealMatrix extends AnyMatrix {
|
|||
*/
|
||||
double walkInOptimizedOrder(RealMatrixPreservingVisitor visitor,
|
||||
int startRow, int endRow, int startColumn, int endColumn);
|
||||
|
||||
/**
|
||||
* Returns the solution vector for a linear system with coefficient
|
||||
* matrix = this and constant vector = <code>b</code>.
|
||||
*
|
||||
* @param b constant vector
|
||||
* @return vector of solution values to AX = b, where A is *this
|
||||
* @throws IllegalArgumentException if this.rowDimension != b.length
|
||||
* @throws InvalidMatrixException if this matrix is not square or is singular
|
||||
* @deprecated as of release 2.0, replaced by {@link DecompositionSolver#solve(double[])}
|
||||
*/
|
||||
@Deprecated
|
||||
double[] solve(double[] b);
|
||||
|
||||
/**
|
||||
* Returns a matrix of (column) solution vectors for linear systems with
|
||||
* coefficient matrix = this and constant vectors = columns of
|
||||
* <code>b</code>.
|
||||
*
|
||||
* @param b matrix of constant vectors forming RHS of linear systems to
|
||||
* to solve
|
||||
* @return matrix of solution vectors
|
||||
* @throws IllegalArgumentException if this.rowDimension != row dimension
|
||||
* @throws InvalidMatrixException if this matrix is not square or is singular
|
||||
* @deprecated as of release 2.0, replaced by {@link DecompositionSolver#solve(RealMatrix)}
|
||||
*/
|
||||
@Deprecated
|
||||
RealMatrix solve(RealMatrix b);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue