if( membershipFunction.isDiscrete() ) {
// Discrete case: Evaluate membership function and add points to dataset
MembershipFunctionDiscrete membershipFunctionDiscrete = (MembershipFunctionDiscrete) membershipFunction;
numberOfPoints = membershipFunctionDiscrete.size();
for( int i = 0; i < numberOfPoints; i++ )
series.add(membershipFunctionDiscrete.valueX(i), membershipFunctionDiscrete.membership(i));
} else {
// Continuous case: Add every membershipfunction's point
numberOfPoints = PlotWindow.DEFAULT_CHART_NUMBER_OF_POINTS;
double xx = universeMin;
for( int i = 0; i < numberOfPoints; i++, xx += step )