Commit 5365622c authored by Julien Michel's avatar Julien Michel

ENH: Since GetContingencyTable() is not a simple getter (it computes new...

ENH: Since GetContingencyTable() is not a simple getter (it computes new things), change name to less ambiguous BuildContingencyTable()
parent bb9059c0
......@@ -390,7 +390,7 @@ private:
calculator->Compute( itRef, itInput,sid.refhasnodata,sid.refnodata,sid.prodhasnodata,sid.prodnodata);
}
ContingencyTableType contingencyTable = calculator->GetContingencyTable();
ContingencyTableType contingencyTable = calculator->BuildContingencyTable();
LogContingencyTable(contingencyTable);
writeContingencyTable(contingencyTable);
}
......
......@@ -102,9 +102,9 @@ private:
otbAppLogINFO( "Training performances:" );
otbAppLogINFO(<<"Contingency table: reference labels (rows) vs. produced labels (cols)\n"<<contingencyTableCalculator->GetContingencyTable());
otbAppLogINFO(<<"Contingency table: reference labels (rows) vs. produced labels (cols)\n"<<contingencyTableCalculator->BuildContingencyTable());
return contingencyTableCalculator->GetContingencyTable();
return contingencyTableCalculator->BuildContingencyTable();
}
......
......@@ -72,7 +72,7 @@ public:
itkGetConstMacro(NumberOfSamples, unsigned long);
void Clear();
ContingencyTableType GetContingencyTable();
ContingencyTableType BuildContingencyTable();
protected:
ContingencyTableCalculator();
......
......@@ -85,7 +85,7 @@ ContingencyTableCalculator<TClassLabel>
template<class TClassLabel>
typename ContingencyTableCalculator<TClassLabel>::ContingencyTableType
ContingencyTableCalculator<TClassLabel>
::GetContingencyTable()
::BuildContingencyTable()
{
std::set<TClassLabel> refLabels;
std::set<TClassLabel> prodLabels;
......
......@@ -126,7 +126,7 @@ int otbContingencyTableCalculatorCompute(int argc, char* argv[])
}
calculator->Compute( refLabels->Begin(), refLabels->End(), prodLabels->Begin(), prodLabels->End() );
ContingencyTableType confmat = calculator->GetContingencyTable();
ContingencyTableType confmat = calculator->BuildContingencyTable();
if( static_cast<int>(calculator->GetNumberOfRefClasses()) != nbRefClasses )
......@@ -216,7 +216,7 @@ int otbContingencyTableCalculatorComputeWithBaseline(int itkNotUsed(argc), char*
}
calculator->Compute( refLabels->Begin(), refLabels->End(), prodLabels->Begin(), prodLabels->End() );
CalculatorType::ContingencyTableType confmat = calculator->GetContingencyTable();
CalculatorType::ContingencyTableType confmat = calculator->BuildContingencyTable();
std::cout << std::endl;
std::cout << "contingency Table" << std::endl << confmat << std::endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment