I’m trying to run this example but i have some issues with an error right here. Can you help me?
The error is related to the push_back
int index = 0;
for (unsigned int i = 0; i < 2; i++)
{
MembershipFunctionType::Pointer membershipFunction = MembershipFunctionType::New();
MembershipFunctionType::CentroidType centroid(sample->GetMeasurementVectorSize());
for (unsigned int j = 0; j < sample->GetMeasurementVectorSize(); j++)
{
centroid[j] = estimatedMeans[index++];
}
membershipFunction->SetCentroid(centroid);
membershipFunctionVector.push_back(membershipFunction); //ERROR
}
classifier->SetMembershipFunctions(membershipFunctionVectorObject);