Uses of Class
squidpony.squidmath.K2

Packages that use K2 
Package Description
squidpony
Utilities that don't fit elsewhere in SquidLib; mostly text manipulation, compression, and helper code.
squidpony.squidmath
A very broad package containing random number generators, geometry tools, data structures, and noise functions.
  • Uses of K2 in squidpony

    Fields in squidpony declared as K2 
    Modifier and Type Field Description
    static K2<StringConvert,​CharSequence[]> StringConvert.registry  
    Methods in squidpony that return K2 
    Modifier and Type Method Description
    static <A,​ B> K2<A,​B> Maker.makeK2()
    Makes an empty K2 (two-key set/bimap); needs A and B key types to be specified in order to work.
    static <A,​ B> K2<A,​B> Maker.makeK2​(float factor, A a0, B b0, Object... rest)
    Makes a K2 (two-key set/bimap) with the given load factor (which should be between 0.1 and 0.9), A and B key types inferred from the types of a0 and b0, and considers all parameters A-B pairs, casting the Objects at positions 0, 2, 4...
    static <A,​ B> K2<A,​B> Maker.makeK2​(A a0, B b0, Object... rest)
    Makes a K2 (two-key set/bimap) with A and B key types inferred from the types of a0 and b0, and considers all parameters A-B pairs, casting the Objects at positions 0, 2, 4...
  • Uses of K2 in squidpony.squidmath

    Fields in squidpony.squidmath declared as K2 
    Modifier and Type Field Description
    K2<A,​B> K2V1.keys  
    Methods in squidpony.squidmath that return K2 
    Modifier and Type Method Description
    K2<A,​B> K2.alterA​(A past, A future)
    Changes an existing A key, past, to another A key, future, if past exists in this K2 and future does not yet exist in this K2.
    K2<A,​B> K2.alterAAt​(int index, A future)
    Changes the A key at index to another A key, future, if index is valid and future does not yet exist in this K2.
    K2<A,​B> K2.alterB​(B past, B future)
    Changes an existing B key, past, to another B key, future, if past exists in this K2 and future does not yet exist in this K2.
    K2<A,​B> K2.alterBAt​(int index, B future)
    Changes the B key at index to another B key, future, if index is valid and future does not yet exist in this K2.
    K2<A,​B> K2.removeA​(A removing)
    Removes a given A key, if removing exists in this K2's A keys, and also removes any keys associated with its point in the ordering.
    K2<A,​B> K2.removeAt​(int index)
    Removes a given point in the ordering, if index is at least 0 and less than size().
    K2<A,​B> K2.removeB​(B removing)
    Removes a given B key, if removing exists in this K2's B keys, and also removes any keys associated with its point in the ordering.
    K2<A,​B> K2.reorder​(int... ordering)
    Reorders this K2 using ordering, which have the same length as this K2's size() and can be generated with ArrayTools.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 calling shuffle(IRNG)), or made in some other way.
    K2<A,​B> K2.shuffle​(IRNG rng)
    Generates a random ordering with rng and applies the same ordering to all kinds of keys this has; they will maintain their current association to other keys but their ordering/indices will change.
    Methods in squidpony.squidmath with parameters of type K2 
    Modifier and Type Method Description
    boolean K2.putAll​(K2<? extends A,​? extends B> other)
    Puts all unique A and B keys in other into this K2, respecting other's ordering.
    Constructors in squidpony.squidmath with parameters of type K2 
    Constructor Description
    K2​(K2<? extends A,​? extends B> other)