java.lang.Object
uk.ac.manchester.tornado.api.types.collections.VectorFloat3
- All Implemented Interfaces:
Serializable,TornadoCollectionInterface<FloatBuffer>,PrimitiveStorage<FloatBuffer>
VectorFloat3 relies on preview features of the Java platform:
VectorFloat3refers 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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionVectorFloat3(int numElements) Creates an empty vector with.VectorFloat3(FloatArray array) Creates a vector using the provided backing array. -
Method Summary
Modifier and TypeMethodDescriptionasBuffer()voidclear()Duplicates this vector.voidfill(float value) get(int index) Returns the float at the given index of this vector.getArray()intlonglongvoidloadFromBuffer(FloatBuffer buffer) max()min()voidSets the float at the given index of this vector.voidset(FloatArray values) Sets the elements of this vector to that of the provided array.voidset(VectorFloat3 values) Sets the elements of this vector to that of the provided vector.intsize()sum()toString()int
-
Field Details
-
TYPE
-
-
Constructor Details
-
VectorFloat3
Creates a vector using the provided backing array. -
VectorFloat3
public VectorFloat3(int numElements) Creates an empty vector with.- Parameters:
numElements- Number of elements
-
-
Method Details
-
vectorWidth
public int vectorWidth() -
getArray
-
get
Returns the float at the given index of this vector.- Parameters:
index- Position- Returns:
Float3
-
set
Sets the float at the given index of this vector.- Parameters:
index- Positionvalue- Value to be set
-
set
Sets the elements of this vector to that of the provided vector.- Parameters:
values- set an input array into the internal array
-
set
Sets the elements of this vector to that of the provided array.- Parameters:
values- set an input array into the internal array
-
fill
public void fill(float value) -
duplicate
Duplicates this vector.- Returns:
- A new vector
-
toString
-
sum
-
min
-
max
-
loadFromBuffer
- Specified by:
loadFromBufferin interfacePrimitiveStorage<FloatBuffer>
-
asBuffer
- Specified by:
asBufferin interfacePrimitiveStorage<FloatBuffer>
-
size
public int size()- Specified by:
sizein interfacePrimitiveStorage<FloatBuffer>
-
getLength
public int getLength() -
clear
public void clear() -
getNumBytes
public long getNumBytes()- Specified by:
getNumBytesin interfaceTornadoCollectionInterface<FloatBuffer>
-
getNumBytesWithHeader
public long getNumBytesWithHeader()- Specified by:
getNumBytesWithHeaderin interfaceTornadoCollectionInterface<FloatBuffer>
-
getSegment
- Specified by:
getSegmentin interfaceTornadoCollectionInterface<FloatBuffer>
-
getSegmentWithHeader
- Specified by:
getSegmentWithHeaderin interfaceTornadoCollectionInterface<FloatBuffer>
-
VectorFloat3when preview features are enabled.