Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OrderedDelete ¶
func OrderedDelete(slicePtr interface{}, idx int)
OrderedDelete removes the indexed element from the slice and moves the following elements to fill its place.
The slicePtr argument must be a pointer to a slice.
This performs the deletion in O(N) time, with the benefit that it preserves the order of the slice. For a deletion that ignores order, see UnorderedDelete.
func UnorderedDelete ¶
func UnorderedDelete(slicePtr interface{}, idx int)
UnorderedDelete removes the indexed element from the slice, potentially changing the order of the slice in the process.
The slicePtr argument must be a pointer to a slice.
This performs the deletion in O(1) time, at the expense of re-ordering the set. For an order-preserving deletion, see OrderedDelete.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.