Changeset 1007

Show
Ignore:
Timestamp:
11/07/08 23:41:24 (2 months ago)
Author:
lebrun
Message:

Fixed a typo in the computeKendallTau() method of the NumericalSample class. This closed ticket #161.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/lebrun/devel/lib/src/Base/Stat/NumericalSampleImplementation.cxx

    r975 r1007  
    490490      /* 
    491491       * Gives the Kendall tau matrix of the sample 
     492       * The correction for ties should be made according to http://www.statsdirect.com/help/nonparametric_methods/kend.htm 
    492493       */ 
    493494      NumericalSampleImplementation::CorrelationMatrix NumericalSampleImplementation::computeKendallTau() const 
     
    518519          } 
    519520        // Normalization 
    520         NumericalScalar normalizationFactor = 2.0 / (static_cast<NumericalScalar>(size) * (static_cast<NumericalScalar>(size) + 1.0)); 
     521        NumericalScalar normalizationFactor = 2.0 / (static_cast<NumericalScalar>(size) * (static_cast<NumericalScalar>(size) - 1.0)); 
    521522        // For each first component 
    522523        for (UnsignedLong m = 1; m < dimension; ++m)