Class LongIndexer

java.lang.Object
org.bytedeco.javacpp.indexer.Indexer
org.bytedeco.javacpp.indexer.LongIndexer
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
LongArrayIndexer, LongBufferIndexer, LongRawIndexer

public abstract class LongIndexer extends Indexer
Abstract indexer for the long primitive type.
  • Field Summary

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

    Fields inherited from class Indexer

    index, indexable, sizes, strides
  • Constructor Summary

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

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

    Methods inherited from class 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 long.
      See Also:
  • Constructor Details

    • LongIndexer

      protected LongIndexer(Index index)
    • LongIndexer

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

    • create

      public static LongIndexer create(long[] array)
      Returns new LongArrayIndexer(array)
    • create

      public static LongIndexer create(LongBuffer buffer)
      Returns new LongBufferIndexer(buffer)
    • create

      public static LongIndexer create(LongPointer pointer)
      Returns new LongRawIndexer(pointer)
    • create

      public static LongIndexer create(long[] array, Index index)
      Returns new LongArrayIndexer(array, index)
    • create

      public static LongIndexer create(LongBuffer buffer, Index index)
      Returns new LongBufferIndexer(buffer, index)
    • create

      public static LongIndexer create(LongPointer pointer, Index index)
      Returns new LongRawIndexer(pointer, index)
    • create

      public static LongIndexer create(long[] array, long... sizes)
      Returns new LongArrayIndexer(array, sizes)
    • create

      public static LongIndexer create(LongBuffer buffer, long... sizes)
      Returns new LongBufferIndexer(buffer, sizes)
    • create

      public static LongIndexer create(LongPointer pointer, long... sizes)
      Returns new LongRawIndexer(pointer, sizes)
    • create

      public static LongIndexer create(long[] array, long[] sizes, long[] strides)
      Returns new LongArrayIndexer(array, sizes, strides)
    • create

      public static LongIndexer create(LongBuffer buffer, long[] sizes, long[] strides)
      Returns new LongBufferIndexer(buffer, sizes, strides)
    • create

      public static LongIndexer create(LongPointer pointer, long[] sizes, long[] strides)
      Returns new LongRawIndexer(pointer, sizes, strides)
    • create

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

      public static LongIndexer create(LongPointer pointer, Index index, boolean direct)
      Creates a long 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 long indexer backed by the raw memory interface, a buffer, or an array
    • get

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

      public LongIndexer get(long i, long[] l)
      Returns this where l = array/buffer[index(i)]
    • get

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

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

      public LongIndexer get(long i, long j, long[] l)
      Returns this where l = array/buffer[index(i, j)]
    • get

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

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

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

      public LongIndexer get(long[] indices, long[] l)
      Returns this where l = array/buffer[index(indices)]
    • get

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

      public abstract LongIndexer put(long i, long l)
      Returns this where array/buffer[index(i)] = l
    • put

      public LongIndexer put(long i, long... l)
      Returns this where array/buffer[index(i)] = l
    • put

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

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

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

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

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

      public abstract LongIndexer put(long[] indices, long l)
      Returns this where array/buffer[index(indices)] = l
    • put

      public LongIndexer put(long[] indices, long... l)
      Returns this where array/buffer[index(indices)] = l
    • put

      public abstract LongIndexer put(long[] indices, long[] l, int offset, int length)
      Returns this where array/buffer[index(indices)] = l[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 LongIndexer putDouble(long[] indices, double l)
      Description copied from class: Indexer
      Casts value to primitive type and calls put(long[] indices, <type> value).
      Specified by:
      putDouble in class Indexer