Completed a test which did not exhaust all possibilities. Also cosmetic changes (param naming).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1175683 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a0c36a7c8c
commit
924769fb05
|
@ -88,10 +88,10 @@ public abstract class IterativeLinearSolver {
|
|||
}
|
||||
if (inPlace) {
|
||||
MathUtils.checkNotNull(x0);
|
||||
if (x0.getDimension() != a.getColumnDimension()) {
|
||||
throw new DimensionMismatchException(x0.getDimension(),
|
||||
a.getColumnDimension());
|
||||
}
|
||||
}
|
||||
if ((x0 != null) && (x0.getDimension() != a.getColumnDimension())) {
|
||||
throw new DimensionMismatchException(x0.getDimension(),
|
||||
a.getColumnDimension());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -126,10 +126,10 @@ public abstract class PreconditionedIterativeLinearSolver
|
|||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public RealVector solve(final RealLinearOperator a, final RealVector b,
|
||||
final RealVector x, final boolean inPlace)
|
||||
final RealVector x0, final boolean inPlace)
|
||||
throws NullArgumentException, NonSquareLinearOperatorException,
|
||||
DimensionMismatchException, MaxCountExceededException {
|
||||
checkParameters(a, b, x, inPlace);
|
||||
return solve(a, null, b, x, inPlace);
|
||||
checkParameters(a, b, x0, inPlace);
|
||||
return solve(a, null, b, x0, inPlace);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue