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 thefloatprimitive type.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFloatIndexer(long[] sizes, long[] strides)protectedFloatIndexer(Index index)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static FloatIndexercreate(float[] array)Returnsnew FloatArrayIndexer(array)static FloatIndexercreate(float[] array, long... sizes)Returnsnew FloatArrayIndexer(array, sizes)static FloatIndexercreate(float[] array, long[] sizes, long[] strides)Returnsnew FloatArrayIndexer(array, sizes, strides)static FloatIndexercreate(float[] array, Index index)Returnsnew FloatArrayIndexer(array, index)static FloatIndexercreate(java.nio.FloatBuffer buffer)Returnsnew FloatBufferIndexer(buffer)static FloatIndexercreate(java.nio.FloatBuffer buffer, long... sizes)Returnsnew FloatBufferIndexer(buffer, sizes)static FloatIndexercreate(java.nio.FloatBuffer buffer, long[] sizes, long[] strides)Returnsnew FloatBufferIndexer(buffer, sizes, strides)static FloatIndexercreate(java.nio.FloatBuffer buffer, Index index)Returnsnew FloatBufferIndexer(buffer, index)static FloatIndexercreate(FloatPointer pointer)Returnsnew FloatRawIndexer(pointer)static FloatIndexercreate(FloatPointer pointer, long... sizes)Returnsnew FloatRawIndexer(pointer, sizes)static FloatIndexercreate(FloatPointer pointer, long[] sizes, long[] strides)Returnsnew FloatRawIndexer(pointer, sizes, strides)static FloatIndexercreate(FloatPointer pointer, long[] sizes, long[] strides, boolean direct)Returnscreate(pointer, Index.create(sizes, strides), direct)static FloatIndexercreate(FloatPointer pointer, Index index)Returnsnew FloatRawIndexer(pointer, index)static FloatIndexercreate(FloatPointer pointer, Index index, boolean direct)Creates a float indexer to access efficiently the data of a pointer.abstract floatget(long i)Returnsarray/buffer[index(i)]abstract floatget(long... indices)Returnsarray/buffer[index(indices)]FloatIndexerget(long[] indices, float[] f)Returnsthiswheref = array/buffer[index(indices)]abstract FloatIndexerget(long[] indices, float[] f, int offset, int length)Returnsthiswheref[offset:offset + length] = array/buffer[index(indices)]FloatIndexerget(long i, float[] f)Returnsthiswheref = array/buffer[index(i)]abstract FloatIndexerget(long i, float[] f, int offset, int length)Returnsthiswheref[offset:offset + length] = array/buffer[index(i)]abstract floatget(long i, long j)Returnsarray/buffer[index(i, j)]FloatIndexerget(long i, long j, float[] f)Returnsthiswheref = array/buffer[index(i, j)]abstract FloatIndexerget(long i, long j, float[] f, int offset, int length)Returnsthiswheref[offset:offset + length] = array/buffer[index(i, j)]abstract floatget(long i, long j, long k)Returnsarray/buffer[index(i, j, k)]doublegetDouble(long... indices)Callsget(int...indices)and returns the value as a double.abstract FloatIndexerput(long[] indices, float f)Returnsthiswherearray/buffer[index(indices)] = fFloatIndexerput(long[] indices, float... f)Returnsthiswherearray/buffer[index(indices)] = fabstract FloatIndexerput(long[] indices, float[] f, int offset, int length)Returnsthiswherearray/buffer[index(indices)] = f[offset:offset + length]abstract FloatIndexerput(long i, float f)Returnsthiswherearray/buffer[index(i)] = fFloatIndexerput(long i, float... f)Returnsthiswherearray/buffer[index(i)] = fabstract FloatIndexerput(long i, float[] f, int offset, int length)Returnsthiswherearray/buffer[index(i)] = f[offset:offset + length]abstract FloatIndexerput(long i, long j, float f)Returnsthiswherearray/buffer[index(i, j)] = fFloatIndexerput(long i, long j, float... f)Returnsthiswherearray/buffer[index(i, j)] = fabstract FloatIndexerput(long i, long j, float[] f, int offset, int length)Returnsthiswherearray/buffer[index(i, j)] = f[offset:offset + length]abstract FloatIndexerput(long i, long j, long k, float f)Returnsthiswherearray/buffer[index(i, j, k)] = fFloatIndexerputDouble(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-trueto use a direct buffer, seeIndexerfor 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)
Returnsthiswheref = array/buffer[index(i)]
-
get
public abstract FloatIndexer get(long i, float[] f, int offset, int length)
Returnsthiswheref[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)
Returnsthiswheref = array/buffer[index(i, j)]
-
get
public abstract FloatIndexer get(long i, long j, float[] f, int offset, int length)
Returnsthiswheref[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)
Returnsthiswheref = array/buffer[index(indices)]
-
get
public abstract FloatIndexer get(long[] indices, float[] f, int offset, int length)
Returnsthiswheref[offset:offset + length] = array/buffer[index(indices)]
-
put
public abstract FloatIndexer put(long i, float f)
Returnsthiswherearray/buffer[index(i)] = f
-
put
public FloatIndexer put(long i, float... f)
Returnsthiswherearray/buffer[index(i)] = f
-
put
public abstract FloatIndexer put(long i, float[] f, int offset, int length)
Returnsthiswherearray/buffer[index(i)] = f[offset:offset + length]
-
put
public abstract FloatIndexer put(long i, long j, float f)
Returnsthiswherearray/buffer[index(i, j)] = f
-
put
public FloatIndexer put(long i, long j, float... f)
Returnsthiswherearray/buffer[index(i, j)] = f
-
put
public abstract FloatIndexer put(long i, long j, float[] f, int offset, int length)
Returnsthiswherearray/buffer[index(i, j)] = f[offset:offset + length]
-
put
public abstract FloatIndexer put(long i, long j, long k, float f)
Returnsthiswherearray/buffer[index(i, j, k)] = f
-
put
public abstract FloatIndexer put(long[] indices, float f)
Returnsthiswherearray/buffer[index(indices)] = f
-
put
public FloatIndexer put(long[] indices, float... f)
Returnsthiswherearray/buffer[index(indices)] = f
-
put
public abstract FloatIndexer put(long[] indices, float[] f, int offset, int length)
Returnsthiswherearray/buffer[index(indices)] = f[offset:offset + length]
-
getDouble
public double getDouble(long... indices)
Description copied from class:IndexerCallsget(int...indices)and returns the value as a double.
-
putDouble
public FloatIndexer putDouble(long[] indices, double f)
Description copied from class:IndexerCasts value to primitive type and callsput(long[] indices, <type> value).
-
-