@Name(value="op::Array<float>") @NoOffset @Properties(inherit=openpose.class) public class FloatArray extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
FloatArray() |
FloatArray(FloatArray array)
Copy constructor.
|
FloatArray(FloatArray array,
int index) |
FloatArray(FloatArray array,
int index,
boolean noCopy)
Array constructor.
|
FloatArray(int size)
Array constructor.
|
FloatArray(int[] sizes) |
FloatArray(int[] sizes,
float value) |
FloatArray(int[] sizes,
float[] dataPtr) |
FloatArray(IntBuffer sizes) |
FloatArray(IntBuffer sizes,
float value) |
FloatArray(IntBuffer sizes,
FloatBuffer dataPtr) |
FloatArray(int size,
float value)
Array constructor.
|
FloatArray(int size,
float[] dataPtr) |
FloatArray(int size,
FloatBuffer dataPtr) |
FloatArray(int size,
FloatPointer dataPtr)
Array constructor.
|
FloatArray(IntPointer sizes)
Array constructor.
|
FloatArray(IntPointer sizes,
float value)
Array constructor.
|
FloatArray(IntPointer sizes,
FloatPointer dataPtr)
Array constructor.
|
FloatArray(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
FloatPointer |
at(int index)
at() function
Same functionality as operator[](const int index), but it always check whether the indexes are within the
data bounds.
|
float[] |
at(int[] indexes) |
FloatBuffer |
at(IntBuffer indexes) |
FloatPointer |
at(IntPointer indexes)
at() function
Same functionality as operator[](const std::vector
|
FloatArray |
clone()
Clone function.
|
boolean |
empty()
Check whether memory has been allocated.
|
FloatPointer |
get(int index)
[] operator
Similar to the [] operator for raw pointer data.
|
float[] |
get(int[] indexes) |
FloatBuffer |
get(IntBuffer indexes) |
FloatPointer |
get(IntPointer indexes)
[] operator
Same functionality as operator[](const int index), but it lets the user introduce the multi-dimensional
index.
|
Matrix |
getConstCvMat()
Return a Matrix wrapper to the data.
|
FloatPointer |
getConstPtr()
Similar to getPtr(), but it forbids the data to be edited.
|
Matrix |
getCvMat()
Analogous to getConstCvMat, but in this case it returns a editable Matrix.
|
long |
getNumberDimensions()
Return the total number of dimensions, equivalent to getSize().size().
|
FloatPointer |
getPseudoConstPtr()
Similar to getConstPtr(), but it allows the data to be edited.
|
FloatPointer |
getPtr()
Return a raw pointer to the data.
|
IntPointer |
getSize()
Return a vector with the size of each dimension allocated.
|
int |
getSize(int index)
Return a vector with the size of the desired dimension.
|
IntPointer |
getStride()
Return the stride or step size of the array.
|
int |
getStride(int index)
Return the stride or step size of the array at the index-th dimension.
|
long |
getVolume()
Return the total number of elements allocated, equivalent to multiply all the components from getSize().
|
long |
getVolume(int indexA) |
long |
getVolume(int indexA,
int indexB)
Similar to getVolume(), but in this case it just returns the volume between the desired dimensions.
|
BytePointer |
printSize()
Return a string with the size of each dimension allocated.
|
FloatArray |
put(FloatArray array)
Copy assignment.
|
void |
reset() |
void |
reset(int size)
Data allocation function.
|
void |
reset(int[] sizes) |
void |
reset(int[] sizes,
float value) |
void |
reset(int[] sizes,
float[] dataPtr) |
void |
reset(IntBuffer sizes) |
void |
reset(IntBuffer sizes,
float value) |
void |
reset(IntBuffer sizes,
FloatBuffer dataPtr) |
void |
reset(int size,
float value)
Data allocation function.
|
void |
reset(int size,
float[] dataPtr) |
void |
reset(int size,
FloatBuffer dataPtr) |
void |
reset(int size,
FloatPointer dataPtr)
Data allocation function.
|
void |
reset(IntPointer sizes)
Data allocation function.
|
void |
reset(IntPointer sizes,
float value)
Data allocation function.
|
void |
reset(IntPointer sizes,
FloatPointer dataPtr)
Data allocation function.
|
void |
setFrom(Matrix cvMat)
Data allocation function.
|
void |
setTo(float value)
Data allocation function.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic FloatArray(Pointer p)
Pointer(Pointer).public FloatArray(int size)
size - Integer with the number of T element to be allocated. E.g., size = 5 is internally similar to
new T[5].public FloatArray(@StdVector IntPointer sizes)
sizes - Vector with the size of each dimension. E.g., size = {3, 5, 2} is internally similar to
new T[3*5*2].public FloatArray()
public FloatArray(@StdVector IntBuffer sizes)
public FloatArray(@StdVector int[] sizes)
public FloatArray(int size,
float value)
size - Integer with the number of T element to be allocated. E.g., size = 5 is internally similar to
new T[5].value - Initial value for each component of the Array.public FloatArray(@StdVector IntPointer sizes, float value)
sizes - Vector with the size of each dimension. E.g., size = {3, 5, 2} is internally similar to:
new T[3*5*2].value - Initial value for each component of the Array.public FloatArray(@StdVector IntBuffer sizes, float value)
public FloatArray(@StdVector int[] sizes, float value)
public FloatArray(int size,
FloatPointer dataPtr)
size - Integer with the number of T element to be allocated. E.g., size = 5 is internally similar to
new T[5].dataPtr - Pointer to the memory to be used by the Array.public FloatArray(int size,
FloatBuffer dataPtr)
public FloatArray(int size,
float[] dataPtr)
public FloatArray(@StdVector IntPointer sizes, FloatPointer dataPtr)
sizes - Vector with the size of each dimension. E.g., size = {3, 5, 2} is internally similar to:
new T[3*5*2].dataPtr - Pointer to the memory to be used by the Array.public FloatArray(@StdVector IntBuffer sizes, FloatBuffer dataPtr)
public FloatArray(@StdVector int[] sizes, float[] dataPtr)
public FloatArray(@Const @ByRef FloatArray array, int index, @Cast(value="const bool") boolean noCopy)
array - Arrayindex - indicates the index of the array to extract.noCopy - indicates whether to perform a copy. Copy will never go to undefined behavior, however, if
noCopy == true, then:
1. It is faster, as no data copy is involved, but...
2. If the Array array goes out of scope, then the resulting Array will provoke an undefined behavior.
3. If the returned Array is modified, the information in the Array array will also be.public FloatArray(@Const @ByRef FloatArray array, int index)
public FloatArray(@Const @ByRef FloatArray array)
fast copy: For performance purpose, copying a Arrayarray - Array to be copied.@ByRef @Name(value="operator =") public FloatArray put(@Const @ByRef FloatArray array)
array - Array to be copied.@ByVal public FloatArray clone()
public void reset(int size)
size - Integer with the number of T element to be allocated. E.g., size = 5 is internally similar to
new T[5].public void reset(@StdVector IntPointer sizes)
sizes - Vector with the size of each dimension. E.g., size = {3, 5, 2} is internally similar to
new T[3*5*2].public void reset()
public void reset(@StdVector IntBuffer sizes)
public void reset(@StdVector int[] sizes)
public void reset(int size,
float value)
size - Integer with the number of T element to be allocated. E.g., size = 5 is internally similar to
new T[5].value - Initial value for each component of the Array.public void reset(@StdVector IntPointer sizes, float value)
sizes - Vector with the size of each dimension. E.g., size = {3, 5, 2} is internally similar to
new T[3*5*2].value - Initial value for each component of the Array.public void reset(@StdVector IntBuffer sizes, float value)
public void reset(@StdVector int[] sizes, float value)
public void reset(int size,
FloatPointer dataPtr)
size - Integer with the number of T element to be allocated. E.g., size = 5 is internally similar to
new T[5].dataPtr - Pointer to the memory to be used by the Array.public void reset(int size,
FloatBuffer dataPtr)
public void reset(int size,
float[] dataPtr)
public void reset(@StdVector IntPointer sizes, FloatPointer dataPtr)
sizes - Vector with the size of each dimension. E.g., size = {3, 5, 2} is internally similar to:
new T[3*5*2].dataPtr - Pointer to the memory to be used by the Array.public void reset(@StdVector IntBuffer sizes, FloatBuffer dataPtr)
public void reset(@StdVector int[] sizes, float[] dataPtr)
public void setFrom(@Const @ByRef Matrix cvMat)
cvMat - Matrix to be copied.public void setTo(float value)
value - Value for each component of the Array.@Cast(value="bool") public boolean empty()
@StdVector public IntPointer getSize()
public int getSize(int index)
index - Dimension to check its size.@StdString public BytePointer printSize()
@Cast(value="size_t") public long getNumberDimensions()
@Cast(value="size_t") public long getVolume()
@Cast(value="size_t") public long getVolume(int indexA, int indexB)
indexA - Dimension where to start.indexB - Dimension where to stop. If indexB == -1, then it will take up to the last dimension.@StdVector public IntPointer getStride()
public int getStride(int index)
public FloatPointer getPtr()
@Const public FloatPointer getConstPtr()
public FloatPointer getPseudoConstPtr()
@Const @ByRef public Matrix getConstCvMat()
@ByRef public Matrix getCvMat()
@ByRef @Name(value="operator []") public FloatPointer get(int index)
index - The desired memory location.@ByRef @Name(value="operator []") public FloatPointer get(@StdVector IntPointer indexes)
indexes - Vector with the desired memory location.@ByRef @Name(value="operator []") public FloatBuffer get(@StdVector IntBuffer indexes)
@ByRef @Name(value="operator []") public float[] get(@StdVector int[] indexes)
@ByRef public FloatPointer at(int index)
index - The desired memory location.@ByRef public FloatPointer at(@StdVector IntPointer indexes)
indexes - Vector with the desired memory location.@ByRef public FloatBuffer at(@StdVector IntBuffer indexes)
@ByRef public float[] at(@StdVector int[] indexes)
Copyright © 2022. All rights reserved.