You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ps...@apache.org on 2015/05/13 21:27:02 UTC

[math] Document NPE. JIRA: MATH-1224.

Repository: commons-math
Updated Branches:
  refs/heads/master 903f28059 -> 83c61da2c


Document NPE.  JIRA: MATH-1224.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/83c61da2
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/83c61da2
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/83c61da2

Branch: refs/heads/master
Commit: 83c61da2c90548f2ddf48e164e8ab14b388e1d0c
Parents: 903f280
Author: Phil Steitz <ph...@gmail.com>
Authored: Wed May 13 12:21:38 2015 -0700
Committer: Phil Steitz <ph...@gmail.com>
Committed: Wed May 13 12:21:38 2015 -0700

----------------------------------------------------------------------
 .../commons/math4/stat/correlation/SpearmansCorrelation.java      | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/83c61da2/src/main/java/org/apache/commons/math4/stat/correlation/SpearmansCorrelation.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/stat/correlation/SpearmansCorrelation.java b/src/main/java/org/apache/commons/math4/stat/correlation/SpearmansCorrelation.java
index 0e436ff..2593c12 100644
--- a/src/main/java/org/apache/commons/math4/stat/correlation/SpearmansCorrelation.java
+++ b/src/main/java/org/apache/commons/math4/stat/correlation/SpearmansCorrelation.java
@@ -115,6 +115,7 @@ public class SpearmansCorrelation {
      * Calculate the Spearman Rank Correlation Matrix.
      *
      * @return Spearman Rank Correlation Matrix
+     * @throws NullPointerException if this instance was created with no data
      */
     public RealMatrix getCorrelationMatrix() {
         return rankCorrelation.getCorrelationMatrix();
@@ -130,6 +131,8 @@ public class SpearmansCorrelation {
      * configured <code>RankingAlgorithm</code> to each of the columns of
      * <code>matrix.</code>
      *
+     * <p>Returns null if this instance was created with no data.</p>
+     *
      * @return PearsonsCorrelation among ranked column data
      */
     public PearsonsCorrelation getRankCorrelation() {