Package org.bytedeco.javacpp.indexer
Class FloatArrayIndexer
- java.lang.Object
-
- org.bytedeco.javacpp.indexer.Indexer
-
- org.bytedeco.javacpp.indexer.FloatIndexer
-
- org.bytedeco.javacpp.indexer.FloatArrayIndexer
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class FloatArrayIndexer extends FloatIndexer
An indexer for afloat[]
array.
-
-
Field Summary
Fields Modifier and Type Field Description protected float[]
array
The backing array.-
Fields inherited from class org.bytedeco.javacpp.indexer.FloatIndexer
VALUE_BYTES
-
-
Constructor Summary
Constructors Constructor Description FloatArrayIndexer(float[] array)
CallsFloatArrayIndexer(array, Index.create(array.length))
.FloatArrayIndexer(float[] array, long... sizes)
CallsFloatArrayIndexer(array, Index.create(sizes))
.FloatArrayIndexer(float[] array, long[] sizes, long[] strides)
CallsFloatArrayIndexer(array, Index.create(sizes, strides))
.FloatArrayIndexer(float[] array, Index index)
Constructor to set thearray
andIndexer.index
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float[]
array()
Returns the backing array, ornull
if nonefloat
get(long i)
Returnsarray/buffer[index(i)]
float
get(long... indices)
Returnsarray/buffer[index(indices)]
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, int offset, int length)
Returnsthis
wheref[offset:offset + length] = array/buffer[index(i)]
float
get(long i, long j)
Returnsarray/buffer[index(i, j)]
FloatIndexer
get(long i, long j, float[] f, int offset, int length)
Returnsthis
wheref[offset:offset + length] = array/buffer[index(i, j)]
float
get(long i, long j, long k)
Returnsarray/buffer[index(i, j, k)]
FloatIndexer
put(long[] indices, float f)
Returnsthis
wherearray/buffer[index(indices)] = f
FloatIndexer
put(long[] indices, float[] f, int offset, int length)
Returnsthis
wherearray/buffer[index(indices)] = f[offset:offset + length]
FloatIndexer
put(long i, float f)
Returnsthis
wherearray/buffer[index(i)] = f
FloatIndexer
put(long i, float[] f, int offset, int length)
Returnsthis
wherearray/buffer[index(i)] = f[offset:offset + length]
FloatIndexer
put(long i, long j, float f)
Returnsthis
wherearray/buffer[index(i, j)] = f
FloatIndexer
put(long i, long j, float[] f, int offset, int length)
Returnsthis
wherearray/buffer[index(i, j)] = f[offset:offset + length]
FloatIndexer
put(long i, long j, long k, float f)
Returnsthis
wherearray/buffer[index(i, j, k)] = f
FloatIndexer
reindex(Index index)
Returns a new Indexer using the same data, but with a different Index.void
release()
Makes sure changes are reflected onto the backing memory and clears any references.-
Methods inherited from class org.bytedeco.javacpp.indexer.FloatIndexer
create, create, create, create, create, create, create, create, create, create, create, create, create, create, get, get, get, getDouble, put, put, put, putDouble
-
-
-
-
Constructor Detail
-
FloatArrayIndexer
public FloatArrayIndexer(float[] array)
CallsFloatArrayIndexer(array, Index.create(array.length))
.
-
FloatArrayIndexer
public FloatArrayIndexer(float[] array, long... sizes)
CallsFloatArrayIndexer(array, Index.create(sizes))
.
-
FloatArrayIndexer
public FloatArrayIndexer(float[] array, long[] sizes, long[] strides)
CallsFloatArrayIndexer(array, Index.create(sizes, strides))
.
-
FloatArrayIndexer
public FloatArrayIndexer(float[] array, Index index)
Constructor to set thearray
andIndexer.index
.
-
-
Method Detail
-
array
public float[] array()
Description copied from class:Indexer
Returns the backing array, ornull
if none
-
reindex
public FloatIndexer reindex(Index index)
Description copied from class:Indexer
Returns a new Indexer using the same data, but with a different Index.
-
get
public float get(long i)
Description copied from class:FloatIndexer
Returnsarray/buffer[index(i)]
- Specified by:
get
in classFloatIndexer
-
get
public FloatIndexer get(long i, float[] f, int offset, int length)
Description copied from class:FloatIndexer
Returnsthis
wheref[offset:offset + length] = array/buffer[index(i)]
- Specified by:
get
in classFloatIndexer
-
get
public float get(long i, long j)
Description copied from class:FloatIndexer
Returnsarray/buffer[index(i, j)]
- Specified by:
get
in classFloatIndexer
-
get
public FloatIndexer get(long i, long j, float[] f, int offset, int length)
Description copied from class:FloatIndexer
Returnsthis
wheref[offset:offset + length] = array/buffer[index(i, j)]
- Specified by:
get
in classFloatIndexer
-
get
public float get(long i, long j, long k)
Description copied from class:FloatIndexer
Returnsarray/buffer[index(i, j, k)]
- Specified by:
get
in classFloatIndexer
-
get
public float get(long... indices)
Description copied from class:FloatIndexer
Returnsarray/buffer[index(indices)]
- Specified by:
get
in classFloatIndexer
-
get
public FloatIndexer get(long[] indices, float[] f, int offset, int length)
Description copied from class:FloatIndexer
Returnsthis
wheref[offset:offset + length] = array/buffer[index(indices)]
- Specified by:
get
in classFloatIndexer
-
put
public FloatIndexer put(long i, float f)
Description copied from class:FloatIndexer
Returnsthis
wherearray/buffer[index(i)] = f
- Specified by:
put
in classFloatIndexer
-
put
public FloatIndexer put(long i, float[] f, int offset, int length)
Description copied from class:FloatIndexer
Returnsthis
wherearray/buffer[index(i)] = f[offset:offset + length]
- Specified by:
put
in classFloatIndexer
-
put
public FloatIndexer put(long i, long j, float f)
Description copied from class:FloatIndexer
Returnsthis
wherearray/buffer[index(i, j)] = f
- Specified by:
put
in classFloatIndexer
-
put
public FloatIndexer put(long i, long j, float[] f, int offset, int length)
Description copied from class:FloatIndexer
Returnsthis
wherearray/buffer[index(i, j)] = f[offset:offset + length]
- Specified by:
put
in classFloatIndexer
-
put
public FloatIndexer put(long i, long j, long k, float f)
Description copied from class:FloatIndexer
Returnsthis
wherearray/buffer[index(i, j, k)] = f
- Specified by:
put
in classFloatIndexer
-
put
public FloatIndexer put(long[] indices, float f)
Description copied from class:FloatIndexer
Returnsthis
wherearray/buffer[index(indices)] = f
- Specified by:
put
in classFloatIndexer
-
put
public FloatIndexer put(long[] indices, float[] f, int offset, int length)
Description copied from class:FloatIndexer
Returnsthis
wherearray/buffer[index(indices)] = f[offset:offset + length]
- Specified by:
put
in classFloatIndexer
-
-