Package boofcv.struct.feature
Class PackedTupleBigArray_S8
java.lang.Object
boofcv.struct.feature.PackedTupleBigArray_S8
- All Implemented Interfaces:
PackedTupleArray<TupleDesc_S8>,PackedArray<TupleDesc_S8>,LArrayAccessor<TupleDesc_S8>
Stores a set of tuples in a single continuous array. This is intended to make storage of a large number of tuples
more memory efficient by removing all the packaging that Java adds to a class. The memory is also continuous,
opening the possibility of further optimizations.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(TupleDesc_S8 element) Appends a copy to the end of the arrayvoidcopy(TupleDesc_S8 src, TupleDesc_S8 dst) voidforIdx(int idx0, int idx1, BoofLambdas.ProcessIndex<TupleDesc_S8> op) Passes in each object and index within the specified range.voidgetCopy(int index, TupleDesc_S8 dst) intgetDOF()Returns the Tuple's degree-of-freedom (DOF)getTemp(int index) voidreserve(int numTuples) Ensure there is enough space to store 'numElements' before the internal array needs to grow.voidreset()Resets the array's size to be zerovoidset(int index, TupleDesc_S8 element) Sets an element's valueintsize()
-
Field Details
-
dof
public final int dof -
array
-
temp
-
numElements
protected int numElements
-
-
Constructor Details
-
PackedTupleBigArray_S8
public PackedTupleBigArray_S8(int dof)
-
-
Method Details
-
reset
public void reset()Description copied from interface:PackedArrayResets the array's size to be zero- Specified by:
resetin interfacePackedArray<TupleDesc_S8>
-
reserve
public void reserve(int numTuples) Description copied from interface:PackedArrayEnsure there is enough space to store 'numElements' before the internal array needs to grow. Does not change the size- Specified by:
reservein interfacePackedArray<TupleDesc_S8>- Parameters:
numTuples- Minimum number of elements allocated to the array
-
append
Description copied from interface:PackedArrayAppends a copy to the end of the array- Specified by:
appendin interfacePackedArray<TupleDesc_S8>- Parameters:
element- (Input) The element which is copied then added
-
set
Description copied from interface:PackedArraySets an element's value- Specified by:
setin interfacePackedArray<TupleDesc_S8>
-
getTemp
- Specified by:
getTempin interfaceLArrayAccessor<TupleDesc_S8>
-
getCopy
- Specified by:
getCopyin interfaceLArrayAccessor<TupleDesc_S8>
-
copy
- Specified by:
copyin interfaceLArrayAccessor<TupleDesc_S8>
-
size
public int size()- Specified by:
sizein interfaceLArrayAccessor<TupleDesc_S8>
-
getElementType
- Specified by:
getElementTypein interfaceLArrayAccessor<TupleDesc_S8>
-
forIdx
Description copied from interface:PackedArrayPasses in each object and index within the specified range. Modifications to the passed in objcet will be saved in the array.- Specified by:
forIdxin interfacePackedArray<TupleDesc_S8>- Parameters:
idx0- Initial index. Inclusiveidx1- Last index, Exclusiveop- The operation to process each element
-
getDOF
public int getDOF()Description copied from interface:PackedTupleArrayReturns the Tuple's degree-of-freedom (DOF)- Specified by:
getDOFin interfacePackedTupleArray<TupleDesc_S8>
-