Package edu.duke.cs.osprey.gui.tools

Types

Link copied to clipboard
class ArrayMap<T : Any> : MutableMap<Int, T>

An array list that implements a map keyed by integers. Very efficient map implementation for get/put when using consecutive keys in [0,N).

Link copied to clipboard
class CombineCollisionException(key: String, val1: String, val2: String) : RuntimeException
Link copied to clipboard
data class IntPair(i1: Int, i2: Int)
Link copied to clipboard
class UnsupportedClassException(msg: String, obj: Any) : RuntimeException

Functions

Link copied to clipboard
fun <K, V> combineMaps(map1: Map<K, V>, preferKeys1: Set<K>, ignoreKeys1: Set<K>, map2: Map<K, V>, preferKeys2: Set<K>, ignoreKeys2: Set<K>, into: MutableMap<K, V> = HashMap()): Map<K, V>

Combine two maps together. Duplicate entries are collapsed into a single entry. It the same key maps to multiple values, an exception is thrown.

Link copied to clipboard
fun Random.nextFloatIn(min: Float, max: Float): Float
Link copied to clipboard
fun <T> List<T>.pairs(): List<Pair<T, T>>

Returns all unique pairs of things in the list