public abstract class ByteIndexer extends Indexer
byte
primitive type.Modifier | Constructor and Description |
---|---|
protected |
ByteIndexer(int[] sizes,
int[] strides) |
Modifier and Type | Method and Description |
---|---|
static ByteIndexer |
create(byte[] array,
int[] sizes,
int[] strides) |
static ByteIndexer |
create(ByteBuffer buffer,
int[] sizes,
int[] strides) |
static ByteIndexer |
create(BytePointer pointer,
int[] sizes,
int[] strides) |
static ByteIndexer |
create(BytePointer pointer,
int[] sizes,
int[] strides,
boolean direct)
Creates a byte indexer to access efficiently the data of a pointer.
|
abstract byte |
get(int... indices) |
abstract byte |
get(int i) |
ByteIndexer |
get(int[] indices,
byte[] b) |
abstract ByteIndexer |
get(int[] indices,
byte[] b,
int offset,
int length) |
ByteIndexer |
get(int i,
byte[] b) |
abstract ByteIndexer |
get(int i,
byte[] b,
int offset,
int length) |
abstract byte |
get(int i,
int j) |
ByteIndexer |
get(int i,
int j,
byte[] b) |
abstract ByteIndexer |
get(int i,
int j,
byte[] b,
int offset,
int length) |
abstract byte |
get(int i,
int j,
int k) |
double |
getDouble(int... indices)
Calls
get(int...indices) and returns the value as a double. |
ByteIndexer |
put(int[] indices,
byte... b) |
abstract ByteIndexer |
put(int[] indices,
byte b) |
abstract ByteIndexer |
put(int[] indices,
byte[] b,
int offset,
int length) |
ByteIndexer |
put(int i,
byte... b) |
abstract ByteIndexer |
put(int i,
byte b) |
abstract ByteIndexer |
put(int i,
byte[] b,
int offset,
int length) |
ByteIndexer |
put(int i,
int j,
byte... b) |
abstract ByteIndexer |
put(int i,
int j,
byte b) |
abstract ByteIndexer |
put(int i,
int j,
byte[] b,
int offset,
int length) |
abstract ByteIndexer |
put(int i,
int j,
int k,
byte b) |
public static ByteIndexer create(byte[] array, int[] sizes, int[] strides)
new ByteArrayIndexer(array, sizes, strides)
public static ByteIndexer create(ByteBuffer buffer, int[] sizes, int[] strides)
new ByteBufferIndexer(buffer, sizes, strides)
public static ByteIndexer create(BytePointer pointer, int[] sizes, int[] strides)
create(pointer, sizes, strides, true)
public static ByteIndexer create(BytePointer pointer, int[] sizes, int[] strides, boolean direct)
pointer
- data to access via a buffer or to copy to an arraydirect
- true
to use a direct buffer, see Indexer
for detailspublic abstract byte get(int i)
array/buffer[i]
public ByteIndexer get(int i, byte[] b)
this
where b = array/buffer[i]
public abstract ByteIndexer get(int i, byte[] b, int offset, int length)
this
where b[offset:offset + length] = array/buffer[i]
public abstract byte get(int i, int j)
array/buffer[i * strides[0] + j]
public ByteIndexer get(int i, int j, byte[] b)
this
where b = array/buffer[i * strides[0] + j]
public abstract ByteIndexer get(int i, int j, byte[] b, int offset, int length)
this
where b[offset:offset + length] = array/buffer[i * strides[0] + j]
public abstract byte get(int i, int j, int k)
array/buffer[i * strides[0] + j * strides[1] + k]
public abstract byte get(int... indices)
array/buffer[index(indices)]
public ByteIndexer get(int[] indices, byte[] b)
this
where b = array/buffer[index(indices)]
public abstract ByteIndexer get(int[] indices, byte[] b, int offset, int length)
this
where b[offset:offset + length] = array/buffer[index(indices)]
public abstract ByteIndexer put(int i, byte b)
this
where array/buffer[i] = b
public ByteIndexer put(int i, byte... b)
this
where array/buffer[i] = b
public abstract ByteIndexer put(int i, byte[] b, int offset, int length)
this
where array/buffer[i] = b[offset:offset + length]
public abstract ByteIndexer put(int i, int j, byte b)
this
where array/buffer[i * strides[0] + j] = b
public ByteIndexer put(int i, int j, byte... b)
this
where array/buffer[i * strides[0] + j] = b
public abstract ByteIndexer put(int i, int j, byte[] b, int offset, int length)
this
where array/buffer[i * strides[0] + j] = b[offset:offset + length]
public abstract ByteIndexer put(int i, int j, int k, byte b)
this
where array/buffer[i * strides[0] + j * strides[1] + k] = b
public abstract ByteIndexer put(int[] indices, byte b)
this
where array/buffer[index(indices)] = b
public ByteIndexer put(int[] indices, byte... b)
this
where array/buffer[index(indices)] = b
public abstract ByteIndexer put(int[] indices, byte[] b, int offset, int length)
this
where array/buffer[index(indices)] = b[offset:offset + length]
Copyright © 2014. All Rights Reserved.