Package org.bytedeco.javacpp.indexer
Class FloatIndexer
- java.lang.Object
-
- org.bytedeco.javacpp.indexer.Indexer
-
- org.bytedeco.javacpp.indexer.FloatIndexer
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Direct Known Subclasses:
FloatArrayIndexer
,FloatBufferIndexer
,FloatRawIndexer
public abstract class FloatIndexer extends Indexer
Abstract indexer for thefloat
primitive type.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FloatIndexer(long[] sizes, long[] strides)
protected
FloatIndexer(Index index)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static FloatIndexer
create(float[] array)
Returnsnew FloatArrayIndexer(array)
static FloatIndexer
create(float[] array, long... sizes)
Returnsnew FloatArrayIndexer(array, sizes)
static FloatIndexer
create(float[] array, long[] sizes, long[] strides)
Returnsnew FloatArrayIndexer(array, sizes, strides)
static FloatIndexer
create(float[] array, Index index)
Returnsnew FloatArrayIndexer(array, index)
static FloatIndexer
create(java.nio.FloatBuffer buffer)
Returnsnew FloatBufferIndexer(buffer)
static FloatIndexer
create(java.nio.FloatBuffer buffer, long... sizes)
Returnsnew FloatBufferIndexer(buffer, sizes)
static FloatIndexer
create(java.nio.FloatBuffer buffer, long[] sizes, long[] strides)
Returnsnew FloatBufferIndexer(buffer, sizes, strides)
static FloatIndexer
create(java.nio.FloatBuffer buffer, Index index)
Returnsnew FloatBufferIndexer(buffer, index)
static FloatIndexer
create(FloatPointer pointer)
Returnsnew FloatRawIndexer(pointer)
static FloatIndexer
create(FloatPointer pointer, long... sizes)
Returnsnew FloatRawIndexer(pointer, sizes)
static FloatIndexer
create(FloatPointer pointer, long[] sizes, long[] strides)
Returnsnew FloatRawIndexer(pointer, sizes, strides)
static FloatIndexer
create(FloatPointer pointer, long[] sizes, long[] strides, boolean direct)
Returnscreate(pointer, Index.create(sizes, strides), direct)
static FloatIndexer
create(FloatPointer pointer, Index index)
Returnsnew FloatRawIndexer(pointer, index)
static FloatIndexer
create(FloatPointer pointer, Index index, boolean direct)
Creates a float indexer to access efficiently the data of a pointer.abstract float
get(long i)
Returnsarray/buffer[index(i)]
abstract float
get(long... indices)
Returnsarray/buffer[index(indices)]
FloatIndexer
get(long[] indices, float[] f)
Returnsthis
wheref = array/buffer[index(indices)]
abstract FloatIndexer
get(long[] indices, float[] f, int offset, int length)
Returnsthis
wheref[offset:offset + length] = array/buffer[index(indices)]
FloatIndexer
get(long i, float[] f)
Returnsthis
wheref = array/buffer[index(i)]
abstract FloatIndexer
get(long i, float[] f, int offset, int length)
Returnsthis
wheref[offset:offset + length] = array/buffer[index(i)]
abstract float
get(long i, long j)
Returnsarray/buffer[index(i, j)]
FloatIndexer
get(long i, long j, float[] f)
Returnsthis
wheref = array/buffer[index(i, j)]
abstract FloatIndexer
get(long i, long j, float[] f, int offset, int length)
Returnsthis
wheref[offset:offset + length] = array/buffer[index(i, j)]
abstract float
get(long i, long j, long k)
Returnsarray/buffer[index(i, j, k)]
double
getDouble(long... indices)
Callsget(int...indices)
and returns the value as a double.abstract FloatIndexer
put(long[] indices, float f)
Returnsthis
wherearray/buffer[index(indices)] = f
FloatIndexer
put(long[] indices, float... f)
Returnsthis
wherearray/buffer[index(indices)] = f
abstract FloatIndexer
put(long[] indices, float[] f, int offset, int length)
Returnsthis
wherearray/buffer[index(indices)] = f[offset:offset + length]
abstract FloatIndexer
put(long i, float f)
Returnsthis
wherearray/buffer[index(i)] = f
FloatIndexer
put(long i, float... f)
Returnsthis
wherearray/buffer[index(i)] = f
abstract FloatIndexer
put(long i, float[] f, int offset, int length)
Returnsthis
wherearray/buffer[index(i)] = f[offset:offset + length]
abstract FloatIndexer
put(long i, long j, float f)
Returnsthis
wherearray/buffer[index(i, j)] = f
FloatIndexer
put(long i, long j, float... f)
Returnsthis
wherearray/buffer[index(i, j)] = f
abstract FloatIndexer
put(long i, long j, float[] f, int offset, int length)
Returnsthis
wherearray/buffer[index(i, j)] = f[offset:offset + length]
abstract FloatIndexer
put(long i, long j, long k, float f)
Returnsthis
wherearray/buffer[index(i, j, k)] = f
FloatIndexer
putDouble(long[] indices, double f)
Casts value to primitive type and callsput(long[] indices, <type> value)
.
-
-
-
Field Detail
-
VALUE_BYTES
public static final int VALUE_BYTES
The number of bytes used to represent a float.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FloatIndexer
protected FloatIndexer(Index index)
-
FloatIndexer
protected FloatIndexer(long[] sizes, long[] strides)
-
-
Method Detail
-
create
public static FloatIndexer create(float[] array)
Returnsnew FloatArrayIndexer(array)
-
create
public static FloatIndexer create(java.nio.FloatBuffer buffer)
Returnsnew FloatBufferIndexer(buffer)
-
create
public static FloatIndexer create(FloatPointer pointer)
Returnsnew FloatRawIndexer(pointer)
-
create
public static FloatIndexer create(float[] array, Index index)
Returnsnew FloatArrayIndexer(array, index)
-
create
public static FloatIndexer create(java.nio.FloatBuffer buffer, Index index)
Returnsnew FloatBufferIndexer(buffer, index)
-
create
public static FloatIndexer create(FloatPointer pointer, Index index)
Returnsnew FloatRawIndexer(pointer, index)
-
create
public static FloatIndexer create(float[] array, long... sizes)
Returnsnew FloatArrayIndexer(array, sizes)
-
create
public static FloatIndexer create(java.nio.FloatBuffer buffer, long... sizes)
Returnsnew FloatBufferIndexer(buffer, sizes)
-
create
public static FloatIndexer create(FloatPointer pointer, long... sizes)
Returnsnew FloatRawIndexer(pointer, sizes)
-
create
public static FloatIndexer create(float[] array, long[] sizes, long[] strides)
Returnsnew FloatArrayIndexer(array, sizes, strides)
-
create
public static FloatIndexer create(java.nio.FloatBuffer buffer, long[] sizes, long[] strides)
Returnsnew FloatBufferIndexer(buffer, sizes, strides)
-
create
public static FloatIndexer create(FloatPointer pointer, long[] sizes, long[] strides)
Returnsnew FloatRawIndexer(pointer, sizes, strides)
-
create
public static FloatIndexer create(FloatPointer pointer, long[] sizes, long[] strides, boolean direct)
Returnscreate(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 arrayindex
- to usedirect
-true
to use a direct buffer, seeIndexer
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)
Returnsarray/buffer[index(i)]
-
get
public FloatIndexer get(long i, float[] f)
Returnsthis
wheref = array/buffer[index(i)]
-
get
public abstract FloatIndexer get(long i, float[] f, int offset, int length)
Returnsthis
wheref[offset:offset + length] = array/buffer[index(i)]
-
get
public abstract float get(long i, long j)
Returnsarray/buffer[index(i, j)]
-
get
public FloatIndexer get(long i, long j, float[] f)
Returnsthis
wheref = array/buffer[index(i, j)]
-
get
public abstract FloatIndexer get(long i, long j, float[] f, int offset, int length)
Returnsthis
wheref[offset:offset + length] = array/buffer[index(i, j)]
-
get
public abstract float get(long i, long j, long k)
Returnsarray/buffer[index(i, j, k)]
-
get
public abstract float get(long... indices)
Returnsarray/buffer[index(indices)]
-
get
public FloatIndexer get(long[] indices, float[] f)
Returnsthis
wheref = array/buffer[index(indices)]
-
get
public abstract FloatIndexer get(long[] indices, float[] f, int offset, int length)
Returnsthis
wheref[offset:offset + length] = array/buffer[index(indices)]
-
put
public abstract FloatIndexer put(long i, float f)
Returnsthis
wherearray/buffer[index(i)] = f
-
put
public FloatIndexer put(long i, float... f)
Returnsthis
wherearray/buffer[index(i)] = f
-
put
public abstract FloatIndexer put(long i, float[] f, int offset, int length)
Returnsthis
wherearray/buffer[index(i)] = f[offset:offset + length]
-
put
public abstract FloatIndexer put(long i, long j, float f)
Returnsthis
wherearray/buffer[index(i, j)] = f
-
put
public FloatIndexer put(long i, long j, float... f)
Returnsthis
wherearray/buffer[index(i, j)] = f
-
put
public abstract FloatIndexer put(long i, long j, float[] f, int offset, int length)
Returnsthis
wherearray/buffer[index(i, j)] = f[offset:offset + length]
-
put
public abstract FloatIndexer put(long i, long j, long k, float f)
Returnsthis
wherearray/buffer[index(i, j, k)] = f
-
put
public abstract FloatIndexer put(long[] indices, float f)
Returnsthis
wherearray/buffer[index(indices)] = f
-
put
public FloatIndexer put(long[] indices, float... f)
Returnsthis
wherearray/buffer[index(indices)] = f
-
put
public abstract FloatIndexer put(long[] indices, float[] f, int offset, int length)
Returnsthis
wherearray/buffer[index(indices)] = f[offset:offset + length]
-
getDouble
public double getDouble(long... indices)
Description copied from class:Indexer
Callsget(int...indices)
and returns the value as a double.
-
putDouble
public FloatIndexer putDouble(long[] indices, double f)
Description copied from class:Indexer
Casts value to primitive type and callsput(long[] indices, <type> value)
.
-
-