Package org.bytedeco.javacpp.indexer
Class UShortIndexer
- java.lang.Object
-
- org.bytedeco.javacpp.indexer.Indexer
-
- org.bytedeco.javacpp.indexer.UShortIndexer
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Direct Known Subclasses:
UShortArrayIndexer
,UShortBufferIndexer
,UShortRawIndexer
public abstract class UShortIndexer extends Indexer
Abstract indexer for theshort
primitive type, treated as unsigned.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
UShortIndexer(long[] sizes, long[] strides)
protected
UShortIndexer(Index index)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static UShortIndexer
create(short[] array)
Returnsnew UShortArrayIndexer(array)
static UShortIndexer
create(short[] array, long... sizes)
Returnsnew UShortArrayIndexer(array, sizes)
static UShortIndexer
create(short[] array, long[] sizes, long[] strides)
Returnsnew UShortArrayIndexer(array, sizes, strides)
static UShortIndexer
create(short[] array, Index index)
Returnsnew UShortArrayIndexer(array, index)
static UShortIndexer
create(java.nio.ShortBuffer buffer)
Returnsnew UShortBufferIndexer(buffer)
static UShortIndexer
create(java.nio.ShortBuffer buffer, long... sizes)
Returnsnew UShortBufferIndexer(buffer, sizes)
static UShortIndexer
create(java.nio.ShortBuffer buffer, long[] sizes, long[] strides)
Returnsnew UShortBufferIndexer(buffer, sizes, strides)
static UShortIndexer
create(java.nio.ShortBuffer buffer, Index index)
Returnsnew UShortBufferIndexer(buffer, index)
static UShortIndexer
create(ShortPointer pointer)
Returnsnew UShortRawIndexer(pointer)
static UShortIndexer
create(ShortPointer pointer, long... sizes)
Returnsnew UShortRawIndexer(pointer, sizes)
static UShortIndexer
create(ShortPointer pointer, long[] sizes, long[] strides)
Returnsnew UShortRawIndexer(pointer, sizes, strides)
static UShortIndexer
create(ShortPointer pointer, long[] sizes, long[] strides, boolean direct)
Returnscreate(pointer, Index.create(sizes, strides), direct)
static UShortIndexer
create(ShortPointer pointer, Index index)
Returnsnew UShortRawIndexer(pointer, index)
static UShortIndexer
create(ShortPointer pointer, Index index, boolean direct)
Creates a short indexer to access efficiently the data of a pointer.abstract int
get(long i)
Returnsarray/buffer[index(i)]
abstract int
get(long... indices)
Returnsarray/buffer[index(indices)]
UShortIndexer
get(long[] indices, int[] s)
Returnsthis
wheres = array/buffer[index(indices)]
abstract UShortIndexer
get(long[] indices, int[] s, int offset, int length)
Returnsthis
wheres[offset:offset + length] = array/buffer[index(indices)]
UShortIndexer
get(long i, int[] s)
Returnsthis
wheres = array/buffer[index(i)]
abstract UShortIndexer
get(long i, int[] s, int offset, int length)
Returnsthis
wheres[offset:offset + length] = array/buffer[index(i)]
abstract int
get(long i, long j)
Returnsarray/buffer[index(i, j)]
UShortIndexer
get(long i, long j, int[] s)
Returnsthis
wheres = array/buffer[index(i, j)]
abstract UShortIndexer
get(long i, long j, int[] s, int offset, int length)
Returnsthis
wheres[offset:offset + length] = array/buffer[index(i, j)]
abstract int
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 UShortIndexer
put(long[] indices, int s)
Returnsthis
wherearray/buffer[index(indices)] = s
UShortIndexer
put(long[] indices, int... s)
Returnsthis
wherearray/buffer[index(indices)] = s
abstract UShortIndexer
put(long[] indices, int[] s, int offset, int length)
Returnsthis
wherearray/buffer[index(indices)] = s[offset:offset + length]
abstract UShortIndexer
put(long i, int s)
Returnsthis
wherearray/buffer[index(i)] = s
UShortIndexer
put(long i, int... s)
Returnsthis
wherearray/buffer[index(i)] = s
abstract UShortIndexer
put(long i, int[] s, int offset, int length)
Returnsthis
wherearray/buffer[index(i)] = s[offset:offset + length]
abstract UShortIndexer
put(long i, long j, int s)
Returnsthis
wherearray/buffer[index(i, j)] = s
UShortIndexer
put(long i, long j, int... s)
Returnsthis
wherearray/buffer[index(i, j)] = s
abstract UShortIndexer
put(long i, long j, int[] s, int offset, int length)
Returnsthis
wherearray/buffer[index(i, j)] = s[offset:offset + length]
abstract UShortIndexer
put(long i, long j, long k, int s)
Returnsthis
wherearray/buffer[index(i, j, k)] = s
UShortIndexer
putDouble(long[] indices, double s)
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 short.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UShortIndexer
protected UShortIndexer(Index index)
-
UShortIndexer
protected UShortIndexer(long[] sizes, long[] strides)
-
-
Method Detail
-
create
public static UShortIndexer create(short[] array)
Returnsnew UShortArrayIndexer(array)
-
create
public static UShortIndexer create(java.nio.ShortBuffer buffer)
Returnsnew UShortBufferIndexer(buffer)
-
create
public static UShortIndexer create(ShortPointer pointer)
Returnsnew UShortRawIndexer(pointer)
-
create
public static UShortIndexer create(short[] array, Index index)
Returnsnew UShortArrayIndexer(array, index)
-
create
public static UShortIndexer create(java.nio.ShortBuffer buffer, Index index)
Returnsnew UShortBufferIndexer(buffer, index)
-
create
public static UShortIndexer create(ShortPointer pointer, Index index)
Returnsnew UShortRawIndexer(pointer, index)
-
create
public static UShortIndexer create(short[] array, long... sizes)
Returnsnew UShortArrayIndexer(array, sizes)
-
create
public static UShortIndexer create(java.nio.ShortBuffer buffer, long... sizes)
Returnsnew UShortBufferIndexer(buffer, sizes)
-
create
public static UShortIndexer create(ShortPointer pointer, long... sizes)
Returnsnew UShortRawIndexer(pointer, sizes)
-
create
public static UShortIndexer create(short[] array, long[] sizes, long[] strides)
Returnsnew UShortArrayIndexer(array, sizes, strides)
-
create
public static UShortIndexer create(java.nio.ShortBuffer buffer, long[] sizes, long[] strides)
Returnsnew UShortBufferIndexer(buffer, sizes, strides)
-
create
public static UShortIndexer create(ShortPointer pointer, long[] sizes, long[] strides)
Returnsnew UShortRawIndexer(pointer, sizes, strides)
-
create
public static UShortIndexer create(ShortPointer pointer, long[] sizes, long[] strides, boolean direct)
Returnscreate(pointer, Index.create(sizes, strides), direct)
-
create
public static UShortIndexer create(ShortPointer pointer, Index index, boolean direct)
Creates a short 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 short indexer backed by the raw memory interface, a buffer, or an array
-
get
public abstract int get(long i)
Returnsarray/buffer[index(i)]
-
get
public UShortIndexer get(long i, int[] s)
Returnsthis
wheres = array/buffer[index(i)]
-
get
public abstract UShortIndexer get(long i, int[] s, int offset, int length)
Returnsthis
wheres[offset:offset + length] = array/buffer[index(i)]
-
get
public abstract int get(long i, long j)
Returnsarray/buffer[index(i, j)]
-
get
public UShortIndexer get(long i, long j, int[] s)
Returnsthis
wheres = array/buffer[index(i, j)]
-
get
public abstract UShortIndexer get(long i, long j, int[] s, int offset, int length)
Returnsthis
wheres[offset:offset + length] = array/buffer[index(i, j)]
-
get
public abstract int get(long i, long j, long k)
Returnsarray/buffer[index(i, j, k)]
-
get
public abstract int get(long... indices)
Returnsarray/buffer[index(indices)]
-
get
public UShortIndexer get(long[] indices, int[] s)
Returnsthis
wheres = array/buffer[index(indices)]
-
get
public abstract UShortIndexer get(long[] indices, int[] s, int offset, int length)
Returnsthis
wheres[offset:offset + length] = array/buffer[index(indices)]
-
put
public abstract UShortIndexer put(long i, int s)
Returnsthis
wherearray/buffer[index(i)] = s
-
put
public UShortIndexer put(long i, int... s)
Returnsthis
wherearray/buffer[index(i)] = s
-
put
public abstract UShortIndexer put(long i, int[] s, int offset, int length)
Returnsthis
wherearray/buffer[index(i)] = s[offset:offset + length]
-
put
public abstract UShortIndexer put(long i, long j, int s)
Returnsthis
wherearray/buffer[index(i, j)] = s
-
put
public UShortIndexer put(long i, long j, int... s)
Returnsthis
wherearray/buffer[index(i, j)] = s
-
put
public abstract UShortIndexer put(long i, long j, int[] s, int offset, int length)
Returnsthis
wherearray/buffer[index(i, j)] = s[offset:offset + length]
-
put
public abstract UShortIndexer put(long i, long j, long k, int s)
Returnsthis
wherearray/buffer[index(i, j, k)] = s
-
put
public abstract UShortIndexer put(long[] indices, int s)
Returnsthis
wherearray/buffer[index(indices)] = s
-
put
public UShortIndexer put(long[] indices, int... s)
Returnsthis
wherearray/buffer[index(indices)] = s
-
put
public abstract UShortIndexer put(long[] indices, int[] s, int offset, int length)
Returnsthis
wherearray/buffer[index(indices)] = s[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 UShortIndexer putDouble(long[] indices, double s)
Description copied from class:Indexer
Casts value to primitive type and callsput(long[] indices, <type> value)
.
-
-