Package georegression.struct.packed
Class PackedArrayPoint2D_I32
java.lang.Object
georegression.struct.packed.PackedArrayPoint2D_I32
- All Implemented Interfaces:
PackedArray<Point2D_I32>,LArrayAccessor<Point2D_I32>,MapFormattable
public class PackedArrayPoint2D_I32
extends Object
implements PackedArray<Point2D_I32>, MapFormattable
Packed array of
Point2D_I32. Internally the point is stored in an interleaved format.-
Nested Class Summary
Nested classes/interfaces inherited from interface georegression.struct.packed.PackedArray
PackedArray.ProcessIndex<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidappend(int x, int y) voidappend(Point2D_I32 element) Appends a copy to the end of the arrayvoidcopy(Point2D_I32 src, Point2D_I32 dst) voidforIdx(int idx0, int idx1, PackedArray.ProcessIndex<Point2D_I32> op) Passes in each object and index within the specified range.protected Stringformat(MapPrintFormat format, String[] keys) format(MatrixPrintFormat format) formatMap(MapPrintFormat format) voidgetCopy(int index, Point2D_I32 dst) getTemp(int index) booleanChecks to see if the two data structures are equalvoidremoveSwap(int index) Removes the index and copies in the last element.reserve(int numTuples) Ensure there is enough space to store 'numElements' before the internal array needs to grow.reset()Resets the array's size to be zerovoidresize(int size) Resizes the array.voidset(int index, int x, int y) voidset(int index, Point2D_I32 element) Sets an element's valueMakes this array have a value identical to 'src'intsize()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ddogleg.struct.LArrayAccessor
isEmpty, isNotEmptyMethods inherited from interface org.ejml.MapFormattable
formatMap
-
Constructor Details
-
PackedArrayPoint2D_I32
public PackedArrayPoint2D_I32()
-
-
Method Details
-
reset
Description copied from interface:PackedArrayResets the array's size to be zero- Specified by:
resetin interfacePackedArray<Point2D_I32>- Returns:
- An instance of 'this' for chaining
-
resize
public void resize(int size) Description copied from interface:PackedArrayResizes the array. If the size has increased then new elements are given the default value- Specified by:
resizein interfacePackedArray<Point2D_I32>
-
reserve
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<Point2D_I32>- Parameters:
numTuples- Minimum number of elements allocated to the array- Returns:
- An instance of 'this' for chaining
-
removeSwap
public void removeSwap(int index) Description copied from interface:PackedArrayRemoves the index and copies in the last element. O(1), but changes the order- Specified by:
removeSwapin interfacePackedArray<Point2D_I32>
-
append
public final void append(int x, int y) -
set
public void set(int index, int x, int y) -
append
Description copied from interface:PackedArrayAppends a copy to the end of the array- Specified by:
appendin interfacePackedArray<Point2D_I32>- Parameters:
element- (Input) The element which is copied then added
-
set
Description copied from interface:PackedArraySets an element's value- Specified by:
setin interfacePackedArray<Point2D_I32>
-
getTemp
- Specified by:
getTempin interfaceLArrayAccessor<Point2D_I32>
-
getCopy
- Specified by:
getCopyin interfaceLArrayAccessor<Point2D_I32>
-
copy
- Specified by:
copyin interfaceLArrayAccessor<Point2D_I32>
-
size
public int size()- Specified by:
sizein interfaceLArrayAccessor<Point2D_I32>
-
getElementType
- Specified by:
getElementTypein interfaceLArrayAccessor<Point2D_I32>
-
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<Point2D_I32>- Parameters:
idx0- Initial index. Inclusiveidx1- Last index, Exclusiveop- The operation to process each element
-
isEquals
Description copied from interface:PackedArrayChecks to see if the two data structures are equal- Specified by:
isEqualsin interfacePackedArray<Point2D_I32>
-
format
-
formatMap
- Specified by:
formatMapin interfaceMapFormattable
-
format
-
setTo
Makes this array have a value identical to 'src'- Parameters:
src- original array being copies- Returns:
- Reference to 'this'
-