Package boofcv.struct

Interface PackedArray<T>

All Superinterfaces:
LArrayAccessor<T>
All Known Subinterfaces:
PackedTupleArray<T>
All Known Implementing Classes:
PackedArrayPoint2D_F32, PackedArrayPoint2D_F64, PackedArrayPoint2D_I16, PackedArrayPoint2D_I32, PackedArrayPoint3D_F32, PackedArrayPoint3D_F64, PackedArrayPoint4D_F32, PackedArrayPoint4D_F64, PackedBigArrayPoint2D_F32, PackedBigArrayPoint2D_F64, PackedBigArrayPoint3D_F32, PackedBigArrayPoint3D_F64, PackedBigArrayPoint4D_F32, PackedBigArrayPoint4D_F64, PackedTupleArray_B, PackedTupleArray_F32, PackedTupleArray_F64, PackedTupleArray_S8, PackedTupleArray_U8, PackedTupleBigArray_B, PackedTupleBigArray_F32, PackedTupleBigArray_F64, PackedTupleBigArray_S8, PackedTupleBigArray_U8

public interface PackedArray<T> extends LArrayAccessor<T>
Interface for objects which are stored in a dense array instead as individual elements. This is typically implemented internally as a structure of array format.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    append(T element)
    Appends a copy to the end of the array
    void
    forIdx(int idx0, int idx1, BoofLambdas.ProcessIndex<T> op)
    Passes in each object and index within the specified range.
    void
    reserve(int numElements)
    Ensure there is enough space to store 'numElements' before the internal array needs to grow.
    void
    Resets the array's size to be zero
    void
    set(int index, T element)
    Sets an element's value

    Methods inherited from interface org.ddogleg.struct.LArrayAccessor

    copy, getCopy, getElementType, getTemp, size
  • Method Details

    • reset

      void reset()
      Resets the array's size to be zero
    • reserve

      void reserve(int numElements)
      Ensure there is enough space to store 'numElements' before the internal array needs to grow. Does not change the size
      Parameters:
      numElements - Minimum number of elements allocated to the array
    • append

      void append(T element)
      Appends a copy to the end of the array
      Parameters:
      element - (Input) The element which is copied then added
    • set

      void set(int index, T element)
      Sets an element's value
    • forIdx

      void forIdx(int idx0, int idx1, BoofLambdas.ProcessIndex<T> op)
      Passes in each object and index within the specified range. Modifications to the passed in objcet will be saved in the array.
      Parameters:
      idx0 - Initial index. Inclusive
      idx1 - Last index, Exclusive
      op - The operation to process each element