Documentation of 'info.monitorenter.gui.chart.traces.computing.Trace2DArithmeticMean' Java class
Trace2DArithmeticMean
info.monitorenter.gui.chart.traces.computing

Class Trace2DArithmeticMean

  • All Implemented Interfaces:
    ITrace2D, java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Comparable<ITrace2D>, java.util.EventListener


    public class Trace2DArithmeticMean
    extends ATrace2D
    A trace that accumulates the latest n points added to points with the arithmetic mean value.

    This trace will not reduce the amount of n points added to one carrying the arithmetic mean but always add a point that has the average of the recent added n points.

    Please note that this trace scan be used in two modes:

    1. Stand alone:
      Add the ITrace2D implementation to a chart and add data points to it as normal.
    2. Computing trace:
      Add the ITrace2D implementation as a computing trace to an existing trace via ITrace2D.addComputingTrace(info.monitorenter.gui.chart.ITrace2D) and only add data points to the original trace. Add the computing trace to the same chart and updates of the original trace will be reflected on the computing trace as well.

    Since:
    7.0.0
    See Also:
    Serialized Form
    • Constructor Detail

      • Trace2DArithmeticMean

        public Trace2DArithmeticMean(int arithmenticMeanSpan)
        The amount of n recent points to buffer. private int m_pointBufferSize; /** Constructor with the given amount of points to merge into one point with their arithmetic mean.

        Parameters:
        arithmenticMeanSpan - the amount of points to merge into one point with their arithmetic mean.
    • Method Detail

      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • getMaxSize

        public int getMaxSize()
        Description copied from interface: ITrace2D

        Returns the maximum amount of TracePoint2D instances that may be added. For implementations that limit the maximum amount this is a reasonable amount. Non-limiting implementations should return Integer.MAX_VALUE. This allows to detect the unlimitedness. Of course no implementation could store that amount of points.

        Returns:
        The maximum amount of TracePoint2D instances that may be added.
        See Also:
        ITrace2D.getMaxSize()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: ITrace2D
        Returns false if internal TracePoint2D instances are contained or true if not.

        Returns:
        false if internal TracePoint2D instances are contained or true if not.
        See Also:
        ITrace2D.isEmpty()
      • iterator

        public java.util.Iterator<ITracePoint2D> iterator()
        Description copied from interface: ITrace2D
        Returns an Iterator over the internal TracePoint2D instances.

        Implementations should be synchronized. This method is meant to allow modifications of the intenal TracePoint2D instances, so the original points should be returned.

        There is no guarantee that changes made to the contained tracepoints will be reflected in the display immediately. The order the iterator returns the TracePoint2D instances decides how the Chart2D will paint the trace.

        Returns:
        an Iterator over the internal TracePoint2D instances.
        See Also:
        ITrace2D.iterator()

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.