Skip navigation links
lejos.robotics.filter

Class SumFilter

Package class diagram package SumFilter
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      private class  SumFilter.PlainSum
      Calculates the sum by adding all the elements in the array every time
      private class  SumFilter.SmartSum
      Calculates the sum by maintaining a sum by substracting old samples and adding new samples;
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void fetchSample(float[] sample, int offset)
      Fetches a sample from a sensor or filter.
      protected int getActualSize() 
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • fetchSample

        public void fetchSample(float[] sample,
                                int offset)
        Description copied from interface: SampleProvider
        Fetches a sample from a sensor or filter.
        Specified by:
        fetchSample in interface SampleProvider
        Overrides:
        fetchSample in class AbstractFilter
        Parameters:
        sample - The array to store the sample in.
        offset - The elements of the sample are stored in the array starting at the offset position.
      • getActualSize

        protected int getActualSize()