@Name(value="c10::ArrayRef<double>") @NoOffset @Properties(inherit=torch.class) public class DoubleArrayRef extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
DoubleArrayRef()
\name Constructors
\{
|
DoubleArrayRef(double[] begin,
double[] end) |
DoubleArrayRef(double[] data,
long length) |
DoubleArrayRef(DoubleBuffer begin,
DoubleBuffer end) |
DoubleArrayRef(DoubleBuffer data,
long length) |
DoubleArrayRef(DoublePointer begin,
DoublePointer end)
Construct an ArrayRef from a range.
|
DoubleArrayRef(DoublePointer data,
long length)
Construct an ArrayRef from a pointer and length.
|
DoubleArrayRef(DoubleVector vec)
Construct an ArrayRef from a std::vector.
|
DoubleArrayRef(long size)
Native array allocator.
|
DoubleArrayRef(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
at(long Index)
Vector compatibility
|
double |
back()
back - Get the last element.
|
DoublePointer |
begin()
\}
\name Simple Operations
\{
|
DoublePointer |
cbegin() |
DoublePointer |
cend() |
DoublePointer |
data() |
boolean |
empty()
empty - Check if the array is empty.
|
DoublePointer |
end() |
boolean |
equals(DoubleArrayRef RHS)
equals - Check for element-wise equality.
|
double |
front()
front - Get the first element.
|
double |
get(long Index)
\}
\name Operator Overloads
\{
|
DoubleArrayRef |
getPointer(long i) |
DoubleArrayRef |
position(long position) |
long |
size()
size - Get the array size.
|
DoubleArrayRef |
slice(long N)
slice(n) - Chop off the first N elements of the array.
|
DoubleArrayRef |
slice(long N,
long M)
slice(n, m) - Take M elements of the array starting at element N
|
DoubleVector |
vec()
\}
\name Expensive Operations
\{
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public DoubleArrayRef(Pointer p)
Pointer(Pointer)
.public DoubleArrayRef(long size)
Pointer.position(long)
.public DoubleArrayRef()
Construct an empty ArrayRef.
public DoubleArrayRef(@Const DoublePointer data, @Cast(value="size_t") long length)
public DoubleArrayRef(@Const DoubleBuffer data, @Cast(value="size_t") long length)
public DoubleArrayRef(@Const DoublePointer begin, @Const DoublePointer end)
public DoubleArrayRef(@Const DoubleBuffer begin, @Const DoubleBuffer end)
public DoubleArrayRef(@ByRef DoubleVector vec)
public DoubleArrayRef position(long position)
public DoubleArrayRef getPointer(long i)
getPointer
in class Pointer
@Const public DoublePointer begin()
@Const public DoublePointer end()
@Const public DoublePointer cbegin()
@Const public DoublePointer cend()
@Const public DoublePointer data()
public double front()
public double back()
@Cast(value="const bool") public boolean equals(@ByVal DoubleArrayRef RHS)
@Const @ByVal public DoubleArrayRef slice(@Cast(value="size_t") long N, @Cast(value="size_t") long M)
@Const @ByVal public DoubleArrayRef slice(@Cast(value="size_t") long N)
@Name(value="operator []") public double get(@Cast(value="size_t") long Index)
@ByVal @Cast(value="std::vector<double>*") public DoubleVector vec()
Copyright © 2024. All rights reserved.