Class CenterOfArea


  • public class CenterOfArea
    extends CenterOfGravity
    Defuzzifier method that calculates the value of x where the areas become equal in the aggregated function. Formally, CoA = Area(f, x0, CoA) = Area(f, CoA, xn) This implementation uses Riemann's sums and Binary search to locate the value of CoA, to a precision of 1.e-8
    • Constructor Summary

      Constructors 
      Constructor Description
      CenterOfArea()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getValue​(java.util.List<java.awt.geom.Point2D.Double> function)
      Implements the center of gravity by calculating the Riemann's sums of the area using the trapezoidal rule.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CenterOfArea

        public CenterOfArea()
    • Method Detail

      • getValue

        public double getValue​(java.util.List<java.awt.geom.Point2D.Double> function)
        Description copied from class: CenterOfGravity
        Implements the center of gravity by calculating the Riemann's sums of the area using the trapezoidal rule. It assumes the x points are equally spaced across the whole domain of the function.
        Overrides:
        getValue in class CenterOfGravity
        Parameters:
        function - the list of points [x, f(x)] representing the function to analyze.
        Returns:
        the center of gravity of the function.