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:
parent
9b5b8d7d45
commit
c90de5a469
|
@ -18,6 +18,7 @@
|
||||||
package org.apache.commons.math3.linear;
|
package org.apache.commons.math3.linear;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import org.apache.commons.math3.exception.NoDataException;
|
import org.apache.commons.math3.exception.NoDataException;
|
||||||
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
|
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
|
||||||
|
@ -30,7 +31,7 @@ import org.apache.commons.math3.util.FastMath;
|
||||||
/**
|
/**
|
||||||
* Basic implementation of RealMatrix methods regardless of the underlying storage.
|
* Basic implementation of RealMatrix methods regardless of the underlying storage.
|
||||||
* <p>All the methods implemented here use {@link #getEntry(int, int)} to access
|
* <p>All the methods implemented here use {@link #getEntry(int, int)} to access
|
||||||
* matrix elements. Derived class can provide faster implementations. </p>
|
* matrix elements. Derived class can provide faster implementations.</p>
|
||||||
*
|
*
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
|
@ -40,7 +41,7 @@ public abstract class AbstractRealMatrix
|
||||||
implements RealMatrix {
|
implements RealMatrix {
|
||||||
|
|
||||||
/** Default format. */
|
/** Default format. */
|
||||||
private static final RealMatrixFormat DEFAULT_FORMAT = RealMatrixFormat.getInstance();
|
private static final RealMatrixFormat DEFAULT_FORMAT = RealMatrixFormat.getInstance(Locale.US);
|
||||||
static {
|
static {
|
||||||
// set the minimum fraction digits to 1 to keep compatibility
|
// set the minimum fraction digits to 1 to keep compatibility
|
||||||
DEFAULT_FORMAT.getFormat().setMinimumFractionDigits(1);
|
DEFAULT_FORMAT.getFormat().setMinimumFractionDigits(1);
|
||||||
|
|
Loading…
Reference in New Issue