Package org.bytedeco.javacpp.indexer
Class ShortIndexer
- java.lang.Object
-
- org.bytedeco.javacpp.indexer.Indexer
-
- org.bytedeco.javacpp.indexer.ShortIndexer
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Direct Known Subclasses:
ShortArrayIndexer,ShortBufferIndexer,ShortRawIndexer
public abstract class ShortIndexer extends Indexer
Abstract indexer for theshortprimitive type.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedShortIndexer(long[] sizes, long[] strides)protectedShortIndexer(Index index)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ShortIndexercreate(short[] array)Returnsnew ShortArrayIndexer(array)static ShortIndexercreate(short[] array, long... sizes)Returnsnew ShortArrayIndexer(array, sizes)static ShortIndexercreate(short[] array, long[] sizes, long[] strides)Returnsnew ShortArrayIndexer(array, sizes, strides)static ShortIndexercreate(short[] array, Index index)Returnsnew ShortArrayIndexer(array, index)static ShortIndexercreate(java.nio.ShortBuffer buffer)Returnsnew ShortBufferIndexer(buffer)static ShortIndexercreate(java.nio.ShortBuffer buffer, long... sizes)Returnsnew ShortBufferIndexer(buffer, sizes)static ShortIndexercreate(java.nio.ShortBuffer buffer, long[] sizes, long[] strides)Returnsnew ShortBufferIndexer(buffer, sizes, strides)static ShortIndexercreate(java.nio.ShortBuffer buffer, Index index)Returnsnew ShortBufferIndexer(buffer, index)static ShortIndexercreate(ShortPointer pointer)Returnsnew ShortRawIndexer(pointer)static ShortIndexercreate(ShortPointer pointer, long... sizes)Returnsnew ShortRawIndexer(pointer, sizes)static ShortIndexercreate(ShortPointer pointer, long[] sizes, long[] strides)Returnsnew ShortRawIndexer(pointer, sizes, strides)static ShortIndexercreate(ShortPointer pointer, long[] sizes, long[] strides, boolean direct)Returnscreate(pointer, Index.create(sizes, strides), direct)static ShortIndexercreate(ShortPointer pointer, Index index)Returnsnew ShortRawIndexer(pointer, index)static ShortIndexercreate(ShortPointer pointer, Index index, boolean direct)Creates a short indexer to access efficiently the data of a pointer.abstract shortget(long i)Returnsarray/buffer[index(i)]abstract shortget(long... indices)Returnsarray/buffer[index(indices)]ShortIndexerget(long[] indices, short[] s)Returnsthiswheres = array/buffer[index(indices)]abstract ShortIndexerget(long[] indices, short[] s, int offset, int length)Returnsthiswheres[offset:offset + length] = array/buffer[index(indices)]abstract shortget(long i, long j)Returnsarray/buffer[index(i, j)]abstract shortget(long i, long j, long k)Returnsarray/buffer[index(i, j, k)]ShortIndexerget(long i, long j, short[] s)Returnsthiswheres = array/buffer[index(i, j)]abstract ShortIndexerget(long i, long j, short[] s, int offset, int length)Returnsthiswheres[offset:offset + length] = array/buffer[index(i, j)]ShortIndexerget(long i, short[] s)Returnsthiswheres = array/buffer[index(i)]abstract ShortIndexerget(long i, short[] s, int offset, int length)Returnsthiswheres[offset:offset + length] = array/buffer[index(i)]doublegetDouble(long... indices)Callsget(int...indices)and returns the value as a double.abstract ShortIndexerput(long[] indices, short s)Returnsthiswherearray/buffer[index(indices)] = sShortIndexerput(long[] indices, short... s)Returnsthiswherearray/buffer[index(indices)] = sabstract ShortIndexerput(long[] indices, short[] s, int offset, int length)Returnsthiswherearray/buffer[index(indices)] = s[offset:offset + length]abstract ShortIndexerput(long i, long j, long k, short s)Returnsthiswherearray/buffer[index(i, j, k)] = sabstract ShortIndexerput(long i, long j, short s)Returnsthiswherearray/buffer[index(i, j)] = sShortIndexerput(long i, long j, short... s)Returnsthiswherearray/buffer[index(i, j)] = sabstract ShortIndexerput(long i, long j, short[] s, int offset, int length)Returnsthiswherearray/buffer[index(i, j)] = s[offset:offset + length]abstract ShortIndexerput(long i, short s)Returnsthiswherearray/buffer[index(i)] = sShortIndexerput(long i, short... s)Returnsthiswherearray/buffer[index(i)] = sabstract ShortIndexerput(long i, short[] s, int offset, int length)Returnsthiswherearray/buffer[index(i)] = s[offset:offset + length]ShortIndexerputDouble(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
-
ShortIndexer
protected ShortIndexer(Index index)
-
ShortIndexer
protected ShortIndexer(long[] sizes, long[] strides)
-
-
Method Detail
-
create
public static ShortIndexer create(short[] array)
Returnsnew ShortArrayIndexer(array)
-
create
public static ShortIndexer create(java.nio.ShortBuffer buffer)
Returnsnew ShortBufferIndexer(buffer)
-
create
public static ShortIndexer create(ShortPointer pointer)
Returnsnew ShortRawIndexer(pointer)
-
create
public static ShortIndexer create(short[] array, Index index)
Returnsnew ShortArrayIndexer(array, index)
-
create
public static ShortIndexer create(java.nio.ShortBuffer buffer, Index index)
Returnsnew ShortBufferIndexer(buffer, index)
-
create
public static ShortIndexer create(ShortPointer pointer, Index index)
Returnsnew ShortRawIndexer(pointer, index)
-
create
public static ShortIndexer create(short[] array, long... sizes)
Returnsnew ShortArrayIndexer(array, sizes)
-
create
public static ShortIndexer create(java.nio.ShortBuffer buffer, long... sizes)
Returnsnew ShortBufferIndexer(buffer, sizes)
-
create
public static ShortIndexer create(ShortPointer pointer, long... sizes)
Returnsnew ShortRawIndexer(pointer, sizes)
-
create
public static ShortIndexer create(short[] array, long[] sizes, long[] strides)
Returnsnew ShortArrayIndexer(array, sizes, strides)
-
create
public static ShortIndexer create(java.nio.ShortBuffer buffer, long[] sizes, long[] strides)
Returnsnew ShortBufferIndexer(buffer, sizes, strides)
-
create
public static ShortIndexer create(ShortPointer pointer, long[] sizes, long[] strides)
Returnsnew ShortRawIndexer(pointer, sizes, strides)
-
create
public static ShortIndexer create(ShortPointer pointer, long[] sizes, long[] strides, boolean direct)
Returnscreate(pointer, Index.create(sizes, strides), direct)
-
create
public static ShortIndexer 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-trueto use a direct buffer, seeIndexerfor details- Returns:
- the new short indexer backed by the raw memory interface, a buffer, or an array
-
get
public abstract short get(long i)
Returnsarray/buffer[index(i)]
-
get
public ShortIndexer get(long i, short[] s)
Returnsthiswheres = array/buffer[index(i)]
-
get
public abstract ShortIndexer get(long i, short[] s, int offset, int length)
Returnsthiswheres[offset:offset + length] = array/buffer[index(i)]
-
get
public abstract short get(long i, long j)Returnsarray/buffer[index(i, j)]
-
get
public ShortIndexer get(long i, long j, short[] s)
Returnsthiswheres = array/buffer[index(i, j)]
-
get
public abstract ShortIndexer get(long i, long j, short[] s, int offset, int length)
Returnsthiswheres[offset:offset + length] = array/buffer[index(i, j)]
-
get
public abstract short get(long i, long j, long k)Returnsarray/buffer[index(i, j, k)]
-
get
public abstract short get(long... indices)
Returnsarray/buffer[index(indices)]
-
get
public ShortIndexer get(long[] indices, short[] s)
Returnsthiswheres = array/buffer[index(indices)]
-
get
public abstract ShortIndexer get(long[] indices, short[] s, int offset, int length)
Returnsthiswheres[offset:offset + length] = array/buffer[index(indices)]
-
put
public abstract ShortIndexer put(long i, short s)
Returnsthiswherearray/buffer[index(i)] = s
-
put
public ShortIndexer put(long i, short... s)
Returnsthiswherearray/buffer[index(i)] = s
-
put
public abstract ShortIndexer put(long i, short[] s, int offset, int length)
Returnsthiswherearray/buffer[index(i)] = s[offset:offset + length]
-
put
public abstract ShortIndexer put(long i, long j, short s)
Returnsthiswherearray/buffer[index(i, j)] = s
-
put
public ShortIndexer put(long i, long j, short... s)
Returnsthiswherearray/buffer[index(i, j)] = s
-
put
public abstract ShortIndexer put(long i, long j, short[] s, int offset, int length)
Returnsthiswherearray/buffer[index(i, j)] = s[offset:offset + length]
-
put
public abstract ShortIndexer put(long i, long j, long k, short s)
Returnsthiswherearray/buffer[index(i, j, k)] = s
-
put
public abstract ShortIndexer put(long[] indices, short s)
Returnsthiswherearray/buffer[index(indices)] = s
-
put
public ShortIndexer put(long[] indices, short... s)
Returnsthiswherearray/buffer[index(indices)] = s
-
put
public abstract ShortIndexer put(long[] indices, short[] s, int offset, int length)
Returnsthiswherearray/buffer[index(indices)] = s[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 ShortIndexer putDouble(long[] indices, double s)
Description copied from class:IndexerCasts value to primitive type and callsput(long[] indices, <type> value).
-
-