From 2c83cdc53782662168f74c202dc5268426218a3a Mon Sep 17 00:00:00 2001 From: William Barker Date: Sun, 9 May 2010 02:06:48 +0000 Subject: [PATCH] Correct the spelling of the getSparcity [sic] method. Issue: MATH-368 git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@942488 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/commons/math/linear/OpenMapRealVector.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java b/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java index a36f9b2d0..86654a6a5 100644 --- a/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java +++ b/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java @@ -815,8 +815,18 @@ public class OpenMapRealVector extends AbstractRealVector implements SparseRealV /** * * @return the percentage of none zero elements as a decimal percent. + * @deprecated Use the correctly spelled {@link #getSparsity()} */ + @Deprecated public double getSparcity() { + return getSparsity(); + } + + /** + * + * @return the percentage of none zero elements as a decimal percent. + */ + public double getSparsity() { return (double)entries.size()/(double)getDimension(); }