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:
Sebastien Brisard 2011-09-26 06:04:33 +00:00
parent a0c36a7c8c
commit 924769fb05
2 changed files with 7 additions and 7 deletions

View File

@ -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());
}
}

View File

@ -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);
}
}