mirror of
https://github.com/marcin-szczepanski/jFuzzyLogic.git
synced 2024-08-24 20:36:57 +02:00
Fix Mean of Max method
maxX was being overwritten, changed to accumulator.
This commit is contained in:
parent
690b083f90
commit
2a56c6134e
@ -29,7 +29,7 @@ public class DefuzzifierMeanMax extends DefuzzifierContinuous {
|
|||||||
// Calculate mean of max
|
// Calculate mean of max
|
||||||
for( int i = 0; i < values.length; i++ ) {
|
for( int i = 0; i < values.length; i++ ) {
|
||||||
if( values[i] == max ) {
|
if( values[i] == max ) {
|
||||||
maxX = min + stepSize * i;
|
maxX += min + stepSize * i;
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user