Skip to content

Commit

Permalink
Merge pull request #1358 from copyme/MultiStatOneSample
Browse files Browse the repository at this point in the history
Multi stat one sample
  • Loading branch information
dcoeurjo committed Nov 4, 2018
2 parents fdeedec + 5534b65 commit 4c30d62
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
- *DEC*
- Adding missing headers in some files of DEC.
(Roland Denis, [#1349](https://github.com/DGtal-team/DGtal/pull/1349))

- *Math*
- Fix possible division by zero in the MultiStatistics class.
(Kacper Pluta, [#1358](https://github.com/DGtal-team/DGtal/pull/1358))

- *Image*
- Fix bug in ImageLinearCellEmbedder.
Expand Down
7 changes: 5 additions & 2 deletions src/DGtal/math/MultiStatistics.ih
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,11 @@ DGtal::MultiStatistics::terminate()
myExp[ k ] /= mySamples[ k ];
myExp2[ k ] /= mySamples[ k ];
myVar[ k ] = myExp2[ k ] - myExp[ k ] * myExp[ k ];
myUnbiasedVar[ k ] = mySamples[ k ] * myVar[ k ]
/ ( mySamples[ k ] - 1 );
if ( mySamples[ k ] > 1 )
myUnbiasedVar[ k ] = mySamples[ k ] * myVar[ k ] / ( mySamples[ k ] - 1 );
else
myUnbiasedVar[ k ] = 0;

}
myIsTerminate = true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/DGtal/topology/doc/moduleCubicalComplex.dox
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ href="https://gforge.liris.cnrs.fr/projects/imagene">ImaGene</a>.


The following programs are related to this documentation:
cubical-complex-collapse.cpp, cubical-complex-illustrations.cpp,
cubical-complex-collapse.cpp, cubical-complex-illustrations.cpp,
testCubicalComplex.cpp, cubicalComplexThinning.cpp.

@section dgtal_ccomplex_sec1 Introduction to cubical complexes
Expand Down

0 comments on commit 4c30d62

Please sign in to comment.