Class LongRingBuffer

java.lang.Object
dev.pfaff.altargui.glfw.ring.RingBuffer<Long>
dev.pfaff.altargui.glfw.ring.LongRingBuffer
All Implemented Interfaces:
it.unimi.dsi.fastutil.longs.LongIterable, Iterable<Long>

public final class LongRingBuffer extends RingBuffer<Long> implements it.unimi.dsi.fastutil.longs.LongIterable
  • Constructor Details

    • LongRingBuffer

      public LongRingBuffer(int length)
  • Method Details

    • getContentsInternal

      public long[] getContentsInternal()
    • size

      public int size()
      Specified by:
      size in class RingBuffer<Long>
    • get

      public long get(int i)
    • getLast

      public long getLast()
    • add

      @Deprecated public void add(Long value)
      Deprecated.
      Specified by:
      add in class RingBuffer<Long>
    • add

      public void add(long value)
    • avg

      public double avg()
      Optimized non-overflowing average calculation.
    • iterator

      public @NonNull it.unimi.dsi.fastutil.longs.LongIterator iterator()
      Specified by:
      iterator in interface Iterable<Long>
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.longs.LongIterable
    • backIterator

      public @NonNull it.unimi.dsi.fastutil.longs.LongIterator backIterator()
    • intervalCountIterator

      public it.unimi.dsi.fastutil.ints.IntIterator intervalCountIterator(long from, long to, long interval)
    • countSince

      public int countSince(long threshold)
      Gets the count of consecutive elements that are higher than thresholdValue. If the elements are not monotonically increasing, the results are unspecified.
    • max

      public long max(long initialValue)
    • min

      public long min(long initialValue)