java.lang.Object
uk.ac.manchester.tornado.api.types.collections.VectorInt3
- All Implemented Interfaces:
Serializable,TornadoCollectionInterface<IntBuffer>,PrimitiveStorage<IntBuffer>
VectorInt3 relies on preview features of the Java platform:
VectorInt3refers to one or more preview APIs:MemorySegment.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final IntArraybacking array.static final Class<VectorInt3> -
Constructor Summary
ConstructorsConstructorDescriptionVectorInt3(int numElements) Creates an empty vector with.VectorInt3(IntArray array) Creates a vector using the provided backing array. -
Method Summary
Modifier and TypeMethodDescriptionasBuffer()voidclear()Duplicates this vector.voidfill(int value) get(int index) Returns the floatr at the given index of this vector.getArray()intlonglongvoidloadFromBuffer(IntBuffer buffer) max()min()voidSets the float at the given index of this vector.voidSets the elements of this vector to that of the provided array.voidset(VectorInt3 values) Sets the elements of this vector to that of the provided vector.intsize()sum()toString()int
-
Field Details
-
TYPE
-
storage
backing array.
-
-
Constructor Details
-
VectorInt3
Creates a vector using the provided backing array. -
VectorInt3
public VectorInt3(int numElements) Creates an empty vector with.- Parameters:
numElements-
-
-
Method Details
-
vectorWidth
public int vectorWidth() -
get
Returns the floatr at the given index of this vector.- Parameters:
index-- Returns:
- value
-
set
Sets the float at the given index of this vector.- Parameters:
index-value-
-
set
Sets the elements of this vector to that of the provided vector.- Parameters:
values-
-
set
Sets the elements of this vector to that of the provided array.- Parameters:
values-
-
fill
public void fill(int value) -
duplicate
Duplicates this vector.- Returns:
-
toString
-
sum
-
min
-
max
-
loadFromBuffer
- Specified by:
loadFromBufferin interfacePrimitiveStorage<IntBuffer>
-
asBuffer
- Specified by:
asBufferin interfacePrimitiveStorage<IntBuffer>
-
size
public int size()- Specified by:
sizein interfacePrimitiveStorage<IntBuffer>
-
getLength
public int getLength() -
getArray
-
clear
public void clear() -
getNumBytes
public long getNumBytes()- Specified by:
getNumBytesin interfaceTornadoCollectionInterface<IntBuffer>
-
getNumBytesWithHeader
public long getNumBytesWithHeader()- Specified by:
getNumBytesWithHeaderin interfaceTornadoCollectionInterface<IntBuffer>
-
getSegment
- Specified by:
getSegmentin interfaceTornadoCollectionInterface<IntBuffer>
-
getSegmentWithHeader
- Specified by:
getSegmentWithHeaderin interfaceTornadoCollectionInterface<IntBuffer>
-
VectorInt3when preview features are enabled.