Class FloatIndexer

java.lang.Object
org.bytedeco.javacpp.indexer.Indexer
org.bytedeco.javacpp.indexer.FloatIndexer
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
FloatArrayIndexer, FloatBufferIndexer, FloatRawIndexer

public abstract class FloatIndexer extends Indexer
Abstract indexer for the float primitive type.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The number of bytes used to represent a float.

    Fields inherited from class org.bytedeco.javacpp.indexer.Indexer

    index, indexable, sizes, strides
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    FloatIndexer(long[] sizes, long[] strides)
     
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    create(float[] array)
    Returns new FloatArrayIndexer(array)
    create(float[] array, long... sizes)
    Returns new FloatArrayIndexer(array, sizes)
    create(float[] array, long[] sizes, long[] strides)
    Returns new FloatArrayIndexer(array, sizes, strides)
    create(float[] array, Index index)
    Returns new FloatArrayIndexer(array, index)
    Returns new FloatBufferIndexer(buffer)
    create(FloatBuffer buffer, long... sizes)
    Returns new FloatBufferIndexer(buffer, sizes)
    create(FloatBuffer buffer, long[] sizes, long[] strides)
    Returns new FloatBufferIndexer(buffer, sizes, strides)
    create(FloatBuffer buffer, Index index)
    Returns new FloatBufferIndexer(buffer, index)
    Returns new FloatRawIndexer(pointer)
    create(FloatPointer pointer, long... sizes)
    Returns new FloatRawIndexer(pointer, sizes)
    create(FloatPointer pointer, long[] sizes, long[] strides)
    Returns new FloatRawIndexer(pointer, sizes, strides)
    create(FloatPointer pointer, long[] sizes, long[] strides, boolean direct)
    Returns create(pointer, Index.create(sizes, strides), direct)
    create(FloatPointer pointer, Index index)
    Returns new FloatRawIndexer(pointer, index)
    create(FloatPointer pointer, Index index, boolean direct)
    Creates a float indexer to access efficiently the data of a pointer.
    abstract float
    get(long i)
    Returns array/buffer[index(i)]
    abstract float
    get(long... indices)
    Returns array/buffer[index(indices)]
    get(long[] indices, float[] f)
    Returns this where f = array/buffer[index(indices)]
    abstract FloatIndexer
    get(long[] indices, float[] f, int offset, int length)
    Returns this where f[offset:offset + length] = array/buffer[index(indices)]
    get(long i, float[] f)
    Returns this where f = array/buffer[index(i)]
    abstract FloatIndexer
    get(long i, float[] f, int offset, int length)
    Returns this where f[offset:offset + length] = array/buffer[index(i)]
    abstract float
    get(long i, long j)
    Returns array/buffer[index(i, j)]
    get(long i, long j, float[] f)
    Returns this where f = array/buffer[index(i, j)]
    abstract FloatIndexer
    get(long i, long j, float[] f, int offset, int length)
    Returns this where f[offset:offset + length] = array/buffer[index(i, j)]
    abstract float
    get(long i, long j, long k)
    Returns array/buffer[index(i, j, k)]
    double
    getDouble(long... indices)
    Calls get(int...indices) and returns the value as a double.
    abstract FloatIndexer
    put(long[] indices, float f)
    Returns this where array/buffer[index(indices)] = f
    put(long[] indices, float... f)
    Returns this where array/buffer[index(indices)] = f
    abstract FloatIndexer
    put(long[] indices, float[] f, int offset, int length)
    Returns this where array/buffer[index(indices)] = f[offset:offset + length]
    abstract FloatIndexer
    put(long i, float f)
    Returns this where array/buffer[index(i)] = f
    put(long i, float... f)
    Returns this where array/buffer[index(i)] = f
    abstract FloatIndexer
    put(long i, float[] f, int offset, int length)
    Returns this where array/buffer[index(i)] = f[offset:offset + length]
    abstract FloatIndexer
    put(long i, long j, float f)
    Returns this where array/buffer[index(i, j)] = f
    put(long i, long j, float... f)
    Returns this where array/buffer[index(i, j)] = f
    abstract FloatIndexer
    put(long i, long j, float[] f, int offset, int length)
    Returns this where array/buffer[index(i, j)] = f[offset:offset + length]
    abstract FloatIndexer
    put(long i, long j, long k, float f)
    Returns this where array/buffer[index(i, j, k)] = f
    putDouble(long[] indices, double f)
    Casts value to primitive type and calls put(long[] indices, <type> value).

    Methods inherited from class org.bytedeco.javacpp.indexer.Indexer

    array, buffer, channels, checkIndex, close, cols, height, index, index, index, index, indexable, indexable, pointer, rank, reindex, release, rows, size, sizes, stride, strides, strides, toString, width

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • VALUE_BYTES

      public static final int VALUE_BYTES
      The number of bytes used to represent a float.
      See Also:
  • Constructor Details

    • FloatIndexer

      protected FloatIndexer(Index index)
    • FloatIndexer

      protected FloatIndexer(long[] sizes, long[] strides)
  • Method Details

    • create

      public static FloatIndexer create(float[] array)
      Returns new FloatArrayIndexer(array)
    • create

      public static FloatIndexer create(FloatBuffer buffer)
      Returns new FloatBufferIndexer(buffer)
    • create

      public static FloatIndexer create(FloatPointer pointer)
      Returns new FloatRawIndexer(pointer)
    • create

      public static FloatIndexer create(float[] array, Index index)
      Returns new FloatArrayIndexer(array, index)
    • create

      public static FloatIndexer create(FloatBuffer buffer, Index index)
      Returns new FloatBufferIndexer(buffer, index)
    • create

      public static FloatIndexer create(FloatPointer pointer, Index index)
      Returns new FloatRawIndexer(pointer, index)
    • create

      public static FloatIndexer create(float[] array, long... sizes)
      Returns new FloatArrayIndexer(array, sizes)
    • create

      public static FloatIndexer create(FloatBuffer buffer, long... sizes)
      Returns new FloatBufferIndexer(buffer, sizes)
    • create

      public static FloatIndexer create(FloatPointer pointer, long... sizes)
      Returns new FloatRawIndexer(pointer, sizes)
    • create

      public static FloatIndexer create(float[] array, long[] sizes, long[] strides)
      Returns new FloatArrayIndexer(array, sizes, strides)
    • create

      public static FloatIndexer create(FloatBuffer buffer, long[] sizes, long[] strides)
      Returns new FloatBufferIndexer(buffer, sizes, strides)
    • create

      public static FloatIndexer create(FloatPointer pointer, long[] sizes, long[] strides)
      Returns new FloatRawIndexer(pointer, sizes, strides)
    • create

      public static FloatIndexer create(FloatPointer pointer, long[] sizes, long[] strides, boolean direct)
      Returns create(pointer, Index.create(sizes, strides), direct)
    • create

      public static FloatIndexer create(FloatPointer pointer, Index index, boolean direct)
      Creates a float indexer to access efficiently the data of a pointer.
      Parameters:
      pointer - data to access via a buffer or to copy to an array
      index - to use
      direct - true to use a direct buffer, see Indexer for details
      Returns:
      the new float indexer backed by the raw memory interface, a buffer, or an array
    • get

      public abstract float get(long i)
      Returns array/buffer[index(i)]
    • get

      public FloatIndexer get(long i, float[] f)
      Returns this where f = array/buffer[index(i)]
    • get

      public abstract FloatIndexer get(long i, float[] f, int offset, int length)
      Returns this where f[offset:offset + length] = array/buffer[index(i)]
    • get

      public abstract float get(long i, long j)
      Returns array/buffer[index(i, j)]
    • get

      public FloatIndexer get(long i, long j, float[] f)
      Returns this where f = array/buffer[index(i, j)]
    • get

      public abstract FloatIndexer get(long i, long j, float[] f, int offset, int length)
      Returns this where f[offset:offset + length] = array/buffer[index(i, j)]
    • get

      public abstract float get(long i, long j, long k)
      Returns array/buffer[index(i, j, k)]
    • get

      public abstract float get(long... indices)
      Returns array/buffer[index(indices)]
    • get

      public FloatIndexer get(long[] indices, float[] f)
      Returns this where f = array/buffer[index(indices)]
    • get

      public abstract FloatIndexer get(long[] indices, float[] f, int offset, int length)
      Returns this where f[offset:offset + length] = array/buffer[index(indices)]
    • put

      public abstract FloatIndexer put(long i, float f)
      Returns this where array/buffer[index(i)] = f
    • put

      public FloatIndexer put(long i, float... f)
      Returns this where array/buffer[index(i)] = f
    • put

      public abstract FloatIndexer put(long i, float[] f, int offset, int length)
      Returns this where array/buffer[index(i)] = f[offset:offset + length]
    • put

      public abstract FloatIndexer put(long i, long j, float f)
      Returns this where array/buffer[index(i, j)] = f
    • put

      public FloatIndexer put(long i, long j, float... f)
      Returns this where array/buffer[index(i, j)] = f
    • put

      public abstract FloatIndexer put(long i, long j, float[] f, int offset, int length)
      Returns this where array/buffer[index(i, j)] = f[offset:offset + length]
    • put

      public abstract FloatIndexer put(long i, long j, long k, float f)
      Returns this where array/buffer[index(i, j, k)] = f
    • put

      public abstract FloatIndexer put(long[] indices, float f)
      Returns this where array/buffer[index(indices)] = f
    • put

      public FloatIndexer put(long[] indices, float... f)
      Returns this where array/buffer[index(indices)] = f
    • put

      public abstract FloatIndexer put(long[] indices, float[] f, int offset, int length)
      Returns this where array/buffer[index(indices)] = f[offset:offset + length]
    • getDouble

      public double getDouble(long... indices)
      Description copied from class: Indexer
      Calls get(int...indices) and returns the value as a double.
      Specified by:
      getDouble in class Indexer
    • putDouble

      public FloatIndexer putDouble(long[] indices, double f)
      Description copied from class: Indexer
      Casts value to primitive type and calls put(long[] indices, <type> value).
      Specified by:
      putDouble in class Indexer