Uses of Class
squidpony.squidmath.K2V1
Package | Description |
---|---|
squidpony.squidmath |
A very broad package containing random number generators, geometry tools, data structures, and noise functions.
|
-
Uses of K2V1 in squidpony.squidmath
Methods in squidpony.squidmath that return K2V1 Modifier and Type Method Description K2V1<A,B,Q>
K2V1. alterA(A past, A future)
Changes an existing A key,past
, to another A key,future
, if past exists in this K2V1 and future does not yet exist in this K2V1.K2V1<A,B,Q>
K2V1. alterAAt(int index, A future)
Changes the A key atindex
to another A key,future
, if index is valid and future does not yet exist in this K2V1.K2V1<A,B,Q>
K2V1. alterB(B past, B future)
Changes an existing B key,past
, to another B key,future
, if past exists in this K2V1 and future does not yet exist in this K2V1.K2V1<A,B,Q>
K2V1. alterBAt(int index, B future)
Changes the B key atindex
to another B key,future
, if index is valid and future does not yet exist in this K2V1.K2V1<A,B,Q>
K2V1. alterQAt(int index, Q future)
Changes the Q value atindex
to another Q value,future
, if index is valid.K2V1<A,B,Q>
K2V1. removeA(A removing)
Removes a given A key, ifremoving
exists in this K2V1's A keys, and also removes any B key or Q value associated with its point in the ordering.K2V1<A,B,Q>
K2V1. removeAt(int index)
Removes a given point in the ordering, ifindex
is at least 0 and less thansize()
.K2V1<A,B,Q>
K2V1. removeB(B removing)
Removes a given B key, ifremoving
exists in this K2V1's B keys, and also removes any A key or Q value associated with its point in the ordering.K2V1<A,B,Q>
K2V1. reorder(int... ordering)
Reorders this K2V1 usingordering
, which have the same length as this K2V1'ssize()
and can be generated withArrayTools.range(int)
(which, if applied, would produce no change to the current ordering),IRNG.randomOrdering(int)
(which gives a random ordering, and if applied immediately would be the same as callingshuffle(IRNG)
), or made in some other way.K2V1<A,B,Q>
K2V1. shuffle(IRNG rng)
Generates a random ordering with rng and applies the same ordering to all keys and values this has; they will maintain their current association to other keys and values but their ordering/indices will change.