Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
77534adc
Commit
77534adc
authored
Apr 18, 2017
by
Ludovic Hussonnois
Browse files
ENH: throw exception if labels iterators do not end at the same time.
parent
9bd55905
Changes
1
Hide whitespace changes
Inline
Side-by-side
Modules/Learning/Unsupervised/include/otbContingencyTableCalculator.txx
View file @
77534adc
...
...
@@ -22,6 +22,7 @@
#define otbContingencyTableCalculator_txx
#include "otbContingencyTableCalculator.h"
#include "itkMacro.h"
#include "itkVariableLengthVector.h"
#include "itkListSample.h"
...
...
@@ -59,6 +60,9 @@ ContingencyTableCalculator<TClassLabel>
++prodBegin;
++m_NumberOfSamples;
}
if( refBegin != refEnd || prodBegin != prodEnd )
itkExceptionMacro(<< "The references and produced labels did not end simultaneously.");
}
template<class TClassLabel>
...
...
@@ -79,6 +83,10 @@ ContingencyTableCalculator<TClassLabel>
++itRef;
++itProd;
}
if( !itRef.IsAtEnd() || !itProd.IsAtEnd() )
itkExceptionMacro(<< "The references and produced labels did not end simultaneously.");
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment