Use fixed locale for matrix formatter to prevent decimal point problems.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1373551 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2012-08-15 18:24:25 +00:00
parent 9b5b8d7d45
commit c90de5a469
1 changed files with 3 additions and 2 deletions

View File

@ -18,6 +18,7 @@
package org.apache.commons.math3.linear;
import java.util.ArrayList;
import java.util.Locale;
import org.apache.commons.math3.exception.NoDataException;
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
@ -40,7 +41,7 @@ public abstract class AbstractRealMatrix
implements RealMatrix {
/** Default format. */
private static final RealMatrixFormat DEFAULT_FORMAT = RealMatrixFormat.getInstance();
private static final RealMatrixFormat DEFAULT_FORMAT = RealMatrixFormat.getInstance(Locale.US);
static {
// set the minimum fraction digits to 1 to keep compatibility
DEFAULT_FORMAT.getFormat().setMinimumFractionDigits(1);