@Namespace(value="arrow") @NoOffset @Properties(inherit=arrow.class) public class Tensor extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
Tensor(DataType type,
ArrowBuffer data,
long[] shape) |
Tensor(DataType type,
ArrowBuffer data,
long[] shape,
long[] strides) |
Tensor(DataType type,
ArrowBuffer data,
long[] shape,
long[] strides,
StringVector dim_names) |
Tensor(DataType type,
ArrowBuffer data,
LongBuffer shape) |
Tensor(DataType type,
ArrowBuffer data,
LongBuffer shape,
LongBuffer strides) |
Tensor(DataType type,
ArrowBuffer data,
LongBuffer shape,
LongBuffer strides,
StringVector dim_names) |
Tensor(DataType type,
ArrowBuffer data,
LongPointer shape)
Constructor with no dimension names or strides, data assumed to be row-major
|
Tensor(DataType type,
ArrowBuffer data,
LongPointer shape,
LongPointer strides)
Constructor with non-negative strides
|
Tensor(DataType type,
ArrowBuffer data,
LongPointer shape,
LongPointer strides,
StringVector dim_names)
Constructor with non-negative strides and dimension names
|
Tensor(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
long |
CalculateValueOffset(long[] index) |
static long |
CalculateValueOffset(long[] strides,
long[] index) |
long |
CalculateValueOffset(LongBuffer index) |
static long |
CalculateValueOffset(LongBuffer strides,
LongBuffer index) |
long |
CalculateValueOffset(LongPointer index) |
static long |
CalculateValueOffset(LongPointer strides,
LongPointer index)
Return the offset of the given index on the given strides
|
LongResult |
CountNonZero()
Compute the number of non-zero values in the tensor
|
Status |
CountNonZero(long[] result)
Deprecated.
|
Status |
CountNonZero(LongBuffer result)
Deprecated.
|
Status |
CountNonZero(LongPointer result)
Deprecated.
|
ArrowBuffer |
data() |
String |
dim_name(int i) |
StringVector |
dim_names() |
boolean |
Equals(Tensor other) |
boolean |
Equals(Tensor other,
EqualOptions arg1) |
boolean |
is_column_major()
AKA "Fortran order"
|
boolean |
is_contiguous()
Either row major or column major
|
boolean |
is_mutable()
Return true if the underlying data buffer is mutable
|
boolean |
is_row_major()
AKA "C order"
|
static TensorResult |
Make(DataType type,
ArrowBuffer data,
long[] shape) |
static TensorResult |
Make(DataType type,
ArrowBuffer data,
long[] shape,
long[] strides,
StringVector dim_names) |
static TensorResult |
Make(DataType type,
ArrowBuffer data,
LongBuffer shape) |
static TensorResult |
Make(DataType type,
ArrowBuffer data,
LongBuffer shape,
LongBuffer strides,
StringVector dim_names) |
static TensorResult |
Make(DataType type,
ArrowBuffer data,
LongPointer shape) |
static TensorResult |
Make(DataType type,
ArrowBuffer data,
LongPointer shape,
LongPointer strides,
StringVector dim_names)
\brief Create a Tensor with full parameters
This factory function will return Status::Invalid when the parameters are
inconsistent
|
int |
ndim() |
BytePointer |
raw_data() |
BytePointer |
raw_mutable_data() |
LongPointer |
shape() |
long |
size()
Total number of value cells in the tensor
|
LongPointer |
strides() |
int |
type_id() |
DataType |
type() |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getPointer, getPointer, getPointer, getPointer, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, offsetof, parseBytes, physicalBytes, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic Tensor(Pointer p)
Pointer(Pointer).public Tensor(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::DataType>"}) DataType type, @SharedPtr ArrowBuffer data, @Cast(value="int64_t*") @StdVector LongPointer shape)
public Tensor(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::DataType>"}) DataType type, @SharedPtr ArrowBuffer data, @Cast(value="int64_t*") @StdVector LongBuffer shape)
public Tensor(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::DataType>"}) DataType type, @SharedPtr ArrowBuffer data, @Cast(value="int64_t*") @StdVector long[] shape)
public Tensor(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::DataType>"}) DataType type, @SharedPtr ArrowBuffer data, @Cast(value="int64_t*") @StdVector LongPointer shape, @Cast(value="int64_t*") @StdVector LongPointer strides)
public Tensor(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::DataType>"}) DataType type, @SharedPtr ArrowBuffer data, @Cast(value="int64_t*") @StdVector LongBuffer shape, @Cast(value="int64_t*") @StdVector LongBuffer strides)
public Tensor(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::DataType>"}) DataType type, @SharedPtr ArrowBuffer data, @Cast(value="int64_t*") @StdVector long[] shape, @Cast(value="int64_t*") @StdVector long[] strides)
public Tensor(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::DataType>"}) DataType type, @SharedPtr ArrowBuffer data, @Cast(value="int64_t*") @StdVector LongPointer shape, @Cast(value="int64_t*") @StdVector LongPointer strides, @Const @ByRef StringVector dim_names)
public Tensor(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::DataType>"}) DataType type, @SharedPtr ArrowBuffer data, @Cast(value="int64_t*") @StdVector LongBuffer shape, @Cast(value="int64_t*") @StdVector LongBuffer strides, @Const @ByRef StringVector dim_names)
public Tensor(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::DataType>"}) DataType type, @SharedPtr ArrowBuffer data, @Cast(value="int64_t*") @StdVector long[] shape, @Cast(value="int64_t*") @StdVector long[] strides, @Const @ByRef StringVector dim_names)
@ByVal public static TensorResult Make(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::DataType>"}) DataType type, @SharedPtr ArrowBuffer data, @Cast(value="int64_t*") @StdVector LongPointer shape, @Cast(value="int64_t*") @StdVector LongPointer strides, @Const @ByRef(nullValue="std::vector<std::string>({})") StringVector dim_names)
type - [in] The data type of the tensor valuesdata - [in] The buffer of the tensor contentshape - [in] The shape of the tensorstrides - [in] The strides of the tensor
(if this is empty, the data assumed to be row-major)dim_names - [in] The names of the tensor dimensions@ByVal public static TensorResult Make(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::DataType>"}) DataType type, @SharedPtr ArrowBuffer data, @Cast(value="int64_t*") @StdVector LongPointer shape)
@ByVal public static TensorResult Make(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::DataType>"}) DataType type, @SharedPtr ArrowBuffer data, @Cast(value="int64_t*") @StdVector LongBuffer shape, @Cast(value="int64_t*") @StdVector LongBuffer strides, @Const @ByRef(nullValue="std::vector<std::string>({})") StringVector dim_names)
@ByVal public static TensorResult Make(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::DataType>"}) DataType type, @SharedPtr ArrowBuffer data, @Cast(value="int64_t*") @StdVector LongBuffer shape)
@ByVal public static TensorResult Make(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::DataType>"}) DataType type, @SharedPtr ArrowBuffer data, @Cast(value="int64_t*") @StdVector long[] shape, @Cast(value="int64_t*") @StdVector long[] strides, @Const @ByRef(nullValue="std::vector<std::string>({})") StringVector dim_names)
@ByVal public static TensorResult Make(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::DataType>"}) DataType type, @SharedPtr ArrowBuffer data, @Cast(value="int64_t*") @StdVector long[] shape)
@SharedPtr @Cast(value={"","std::shared_ptr<arrow::DataType>"}) public DataType type()
@SharedPtr public ArrowBuffer data()
@Cast(value="const uint8_t*") public BytePointer raw_data()
@Cast(value="uint8_t*") public BytePointer raw_mutable_data()
@Cast(value="int64_t*") @StdVector public LongPointer shape()
@Cast(value="int64_t*") @StdVector public LongPointer strides()
public int ndim()
@Const @ByRef public StringVector dim_names()
@StdString public String dim_name(int i)
@Cast(value="bool") public boolean is_mutable()
@Cast(value="bool") public boolean Equals(@Const @ByRef Tensor other, @Const @ByRef(nullValue="arrow::EqualOptions::Defaults()") EqualOptions arg1)
@ByVal public LongResult CountNonZero()
@Deprecated @ByVal public Status CountNonZero(@Cast(value="int64_t*") LongPointer result)
@Deprecated @ByVal public Status CountNonZero(@Cast(value="int64_t*") LongBuffer result)
@Deprecated @ByVal public Status CountNonZero(@Cast(value="int64_t*") long[] result)
@Cast(value="int64_t") public static long CalculateValueOffset(@Cast(value="int64_t*") @StdVector LongPointer strides, @Cast(value="int64_t*") @StdVector LongPointer index)
@Cast(value="int64_t") public static long CalculateValueOffset(@Cast(value="int64_t*") @StdVector LongBuffer strides, @Cast(value="int64_t*") @StdVector LongBuffer index)
@Cast(value="int64_t") public static long CalculateValueOffset(@Cast(value="int64_t*") @StdVector long[] strides, @Cast(value="int64_t*") @StdVector long[] index)
@Cast(value="int64_t") public long CalculateValueOffset(@Cast(value="int64_t*") @StdVector LongPointer index)
@Cast(value="int64_t") public long CalculateValueOffset(@Cast(value="int64_t*") @StdVector LongBuffer index)
@Cast(value="int64_t") public long CalculateValueOffset(@Cast(value="int64_t*") @StdVector long[] index)
Copyright © 2021. All rights reserved.