Package boofcv.struct.feature
Class PackedTupleBigArray_B
java.lang.Object
boofcv.struct.feature.PackedTupleBigArray_B
- All Implemented Interfaces:
PackedTupleArray<TupleDesc_B>
,PackedArray<TupleDesc_B>
,LArrayAccessor<TupleDesc_B>
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
Modifier and TypeFieldDescriptionfinal BigDogArray_I32
final int
protected int
protected final int
final TupleDesc_B
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
append
(TupleDesc_B element) Appends a copy to the end of the arrayvoid
copy
(TupleDesc_B src, TupleDesc_B dst) void
forIdx
(int idx0, int idx1, BoofLambdas.ProcessIndex<TupleDesc_B> op) Passes in each object and index within the specified range.void
getCopy
(int index, TupleDesc_B dst) int
getDOF()
Returns the Tuple's degree-of-freedom (DOF)getTemp
(int index) void
reserve
(int numTuples) Ensure there is enough space to store 'numElements' before the internal array needs to grow.void
reset()
Resets the array's size to be zerovoid
set
(int index, TupleDesc_B element) Sets an element's valueint
size()
-
Field Details
-
dof
public final int dof -
array
-
temp
-
numElements
protected int numElements -
numInts
protected final int numInts
-
-
Constructor Details
-
PackedTupleBigArray_B
public PackedTupleBigArray_B(int dof)
-
-
Method Details
-
reset
public void reset()Description copied from interface:PackedArray
Resets the array's size to be zero- Specified by:
reset
in interfacePackedArray<TupleDesc_B>
-
reserve
public void reserve(int numTuples) Description copied from interface:PackedArray
Ensure there is enough space to store 'numElements' before the internal array needs to grow. Does not change the size- Specified by:
reserve
in interfacePackedArray<TupleDesc_B>
- Parameters:
numTuples
- Minimum number of elements allocated to the array
-
append
Description copied from interface:PackedArray
Appends a copy to the end of the array- Specified by:
append
in interfacePackedArray<TupleDesc_B>
- Parameters:
element
- (Input) The element which is copied then added
-
set
Description copied from interface:PackedArray
Sets an element's value- Specified by:
set
in interfacePackedArray<TupleDesc_B>
-
getTemp
- Specified by:
getTemp
in interfaceLArrayAccessor<TupleDesc_B>
-
getCopy
- Specified by:
getCopy
in interfaceLArrayAccessor<TupleDesc_B>
-
copy
- Specified by:
copy
in interfaceLArrayAccessor<TupleDesc_B>
-
size
public int size()- Specified by:
size
in interfaceLArrayAccessor<TupleDesc_B>
-
getElementType
- Specified by:
getElementType
in interfaceLArrayAccessor<TupleDesc_B>
-
forIdx
Description copied from interface:PackedArray
Passes in each object and index within the specified range. Modifications to the passed in objcet will be saved in the array.- Specified by:
forIdx
in interfacePackedArray<TupleDesc_B>
- Parameters:
idx0
- Initial index. Inclusiveidx1
- Last index, Exclusiveop
- The operation to process each element
-
getDOF
public int getDOF()Description copied from interface:PackedTupleArray
Returns the Tuple's degree-of-freedom (DOF)- Specified by:
getDOF
in interfacePackedTupleArray<TupleDesc_B>
-