int
main()
{
using MeasurementType = float;
constexpr unsigned int numberOfComponents = 2;
HistogramType::Pointer histogram = HistogramType::New();
histogram->SetMeasurementVectorSize(numberOfComponents);
size.Fill(3);
HistogramType::MeasurementVectorType lowerBound(numberOfComponents);
HistogramType::MeasurementVectorType upperBound(numberOfComponents);
lowerBound[0] = 1.1;
lowerBound[1] = 2.6;
upperBound[0] = 7.1;
upperBound[1] = 8.6;
histogram->Initialize(size, lowerBound, upperBound);
histogram->SetFrequency(0, 0);
histogram->SetFrequency(1, 2);
histogram->SetFrequency(2, 3);
histogram->SetFrequency(3, 2);
histogram->SetFrequency(4, 1);
histogram->SetFrequency(5, 1);
histogram->SetFrequency(6, 5);
histogram->SetFrequency(7, 4);
histogram->SetFrequency(8, 0);
index[0] = 0;
index[1] = 2;
std::cout << "Frequency of the bin at index " << index << " is " << histogram->GetFrequency(index)
<< " and the bin's instance identifier is " << histogram->GetInstanceIdentifier(index) << std::endl;
return EXIT_SUCCESS;
}