public abstract class CharIndexer extends Indexer
char primitive type.| Modifier and Type | Field and Description |
|---|---|
static int |
VALUE_BYTES
The number of bytes used to represent a char.
|
indexable, ONE_STRIDE, sizes, strides| Modifier | Constructor and Description |
|---|---|
protected |
CharIndexer(long[] sizes,
long[] strides) |
| Modifier and Type | Method and Description |
|---|---|
static CharIndexer |
create(char[] array)
Returns
new CharArrayIndexer(array) |
static CharIndexer |
create(char[] array,
long[] sizes,
long[] strides)
Returns
new CharArrayIndexer(array, sizes, strides) |
static CharIndexer |
create(CharBuffer buffer)
Returns
new CharBufferIndexer(buffer) |
static CharIndexer |
create(CharBuffer buffer,
long[] sizes,
long[] strides)
Returns
new CharBufferIndexer(buffer, sizes, strides) |
static CharIndexer |
create(CharPointer pointer)
Returns
create(pointer, { pointer.limit() - pointer.position() }, { 1 }, true) |
static CharIndexer |
create(CharPointer pointer,
long[] sizes,
long[] strides)
Returns
create(pointer, sizes, strides, true) |
static CharIndexer |
create(CharPointer pointer,
long[] sizes,
long[] strides,
boolean direct)
Creates a char indexer to access efficiently the data of a pointer.
|
abstract char |
get(long... indices)
Returns
array/buffer[index(indices)] |
abstract char |
get(long i)
Returns
array/buffer[i] |
CharIndexer |
get(long[] indices,
char[] c)
Returns
this where c = array/buffer[index(indices)] |
abstract CharIndexer |
get(long[] indices,
char[] c,
int offset,
int length)
Returns
this where c[offset:offset + length] = array/buffer[index(indices)] |
CharIndexer |
get(long i,
char[] c)
Returns
this where c = array/buffer[i] |
abstract CharIndexer |
get(long i,
char[] c,
int offset,
int length)
Returns
this where c[offset:offset + length] = array/buffer[i] |
abstract char |
get(long i,
long j)
Returns
array/buffer[i * strides[0] + j] |
CharIndexer |
get(long i,
long j,
char[] c)
Returns
this where c = array/buffer[i * strides[0] + j] |
abstract CharIndexer |
get(long i,
long j,
char[] c,
int offset,
int length)
Returns
this where c[offset:offset + length] = array/buffer[i * strides[0] + j] |
abstract char |
get(long i,
long j,
long k)
Returns
array/buffer[i * strides[0] + j * strides[1] + k] |
double |
getDouble(long... indices)
Calls
get(int...indices) and returns the value as a double. |
CharIndexer |
put(long[] indices,
char... c)
Returns
this where array/buffer[index(indices)] = c |
abstract CharIndexer |
put(long[] indices,
char c)
Returns
this where array/buffer[index(indices)] = c |
abstract CharIndexer |
put(long[] indices,
char[] c,
int offset,
int length)
Returns
this where array/buffer[index(indices)] = c[offset:offset + length] |
CharIndexer |
put(long i,
char... c)
Returns
this where array/buffer[i] = c |
abstract CharIndexer |
put(long i,
char c)
Returns
this where array/buffer[i] = c |
abstract CharIndexer |
put(long i,
char[] c,
int offset,
int length)
Returns
this where array/buffer[i] = c[offset:offset + length] |
CharIndexer |
put(long i,
long j,
char... c)
Returns
this where array/buffer[i * strides[0] + j] = c |
abstract CharIndexer |
put(long i,
long j,
char c)
Returns
this where array/buffer[i * strides[0] + j] = c |
abstract CharIndexer |
put(long i,
long j,
char[] c,
int offset,
int length)
Returns
this where array/buffer[i * strides[0] + j] = c[offset:offset + length] |
abstract CharIndexer |
put(long i,
long j,
long k,
char c)
Returns
this where array/buffer[i * strides[0] + j * strides[1] + k] = c |
CharIndexer |
putDouble(long[] indices,
double c)
Casts value to primitive type and calls
put(long[] indices, <type> value). |
public static final int VALUE_BYTES
public static CharIndexer create(char[] array)
new CharArrayIndexer(array)public static CharIndexer create(CharBuffer buffer)
new CharBufferIndexer(buffer)public static CharIndexer create(CharPointer pointer)
create(pointer, { pointer.limit() - pointer.position() }, { 1 }, true)public static CharIndexer create(char[] array, long[] sizes, long[] strides)
new CharArrayIndexer(array, sizes, strides)public static CharIndexer create(CharBuffer buffer, long[] sizes, long[] strides)
new CharBufferIndexer(buffer, sizes, strides)public static CharIndexer create(CharPointer pointer, long[] sizes, long[] strides)
create(pointer, sizes, strides, true)public static CharIndexer create(CharPointer pointer, long[] sizes, long[] 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 char get(long i)
array/buffer[i]public CharIndexer get(long i, char[] c)
this where c = array/buffer[i]public abstract CharIndexer get(long i, char[] c, int offset, int length)
this where c[offset:offset + length] = array/buffer[i]public abstract char get(long i,
long j)
array/buffer[i * strides[0] + j]public CharIndexer get(long i, long j, char[] c)
this where c = array/buffer[i * strides[0] + j]public abstract CharIndexer get(long i, long j, char[] c, int offset, int length)
this where c[offset:offset + length] = array/buffer[i * strides[0] + j]public abstract char get(long i,
long j,
long k)
array/buffer[i * strides[0] + j * strides[1] + k]public abstract char get(long... indices)
array/buffer[index(indices)]public CharIndexer get(long[] indices, char[] c)
this where c = array/buffer[index(indices)]public abstract CharIndexer get(long[] indices, char[] c, int offset, int length)
this where c[offset:offset + length] = array/buffer[index(indices)]public abstract CharIndexer put(long i, char c)
this where array/buffer[i] = cpublic CharIndexer put(long i, char... c)
this where array/buffer[i] = cpublic abstract CharIndexer put(long i, char[] c, int offset, int length)
this where array/buffer[i] = c[offset:offset + length]public abstract CharIndexer put(long i, long j, char c)
this where array/buffer[i * strides[0] + j] = cpublic CharIndexer put(long i, long j, char... c)
this where array/buffer[i * strides[0] + j] = cpublic abstract CharIndexer put(long i, long j, char[] c, int offset, int length)
this where array/buffer[i * strides[0] + j] = c[offset:offset + length]public abstract CharIndexer put(long i, long j, long k, char c)
this where array/buffer[i * strides[0] + j * strides[1] + k] = cpublic abstract CharIndexer put(long[] indices, char c)
this where array/buffer[index(indices)] = cpublic CharIndexer put(long[] indices, char... c)
this where array/buffer[index(indices)] = cpublic abstract CharIndexer put(long[] indices, char[] c, int offset, int length)
this where array/buffer[index(indices)] = c[offset:offset + length]public double getDouble(long... indices)
Indexerget(int...indices) and returns the value as a double.public CharIndexer putDouble(long[] indices, double c)
Indexerput(long[] indices, <type> value).Copyright © 2016. All rights reserved.