Package edu.duke.cs.osprey.molscope.tools

Types

Link copied to clipboard
open class Bijection<T>

A generic bijection map, where the two related sets are named A and B

Link copied to clipboard
class IdentityChangeTracker<T>

Tracks a collection of things for changes over time. Things are compared by identity, not value The tracker is insensitive to the order of the collection.

Link copied to clipboard
class SphereGrid : Iterable<Vector3d>

Sample points on a sphere quasi-uniformly by choosing the midpoionts of the faces of a regular icosohedron. Subdivide faces of the icosohedron (and project back to the sphere) as needed to get the desired resolution.

Functions

Link copied to clipboard
fun assert(lazyMessage: () -> Any = { "Assertion failed" }, lazyCondition: () -> Boolean)

A lazy version of assert() that only evaluates its condition if assertions are enabled.

Link copied to clipboard
fun <T, K, V> Iterable<T>.associateIdentity(transform: (T) -> Pair<K, V>): MutableMap<K, V>
Link copied to clipboard
fun <T, K, V> Iterable<T>.associateIdentityIndexed(transform: (Int, T) -> Pair<K, V>): MutableMap<K, V>
Link copied to clipboard
fun <T, K, V, M : MutableMap<in K, in V>> Iterable<T>.associateIndexedTo(destination: M, transform: (Int, T) -> Pair<K, V>): M
Link copied to clipboard
fun Any?.identityHashCode(): Int
Link copied to clipboard
fun <K, V> identityHashMapOf(vararg pairs: Pair<K, V>): IdentityHashMap<K, V>
Link copied to clipboard
fun <T> identityHashSet(): MutableSet<T>
Link copied to clipboard
fun <T> identityHashSetOf(vararg values: T): MutableSet<T>
Link copied to clipboard
fun main()
Link copied to clipboard
fun <K1, K2, V> Map<K1, V>.mapKeysIdentity(transform: (Map.Entry<K1, V>) -> K2): MutableMap<K2, V>
Link copied to clipboard
fun <K, V1, V2> Map<K, V1>.mapValuesIdentity(transform: (Map.Entry<K, V1>) -> V2): MutableMap<K, V2>
Link copied to clipboard
fun Double.normalizeMinusPIToPI(): Double

Normalizes the radians into the range (-pi,pi]

Link copied to clipboard
fun Double.normalizeZeroToTwoPI(): Double

Normalizes the radians into the range [0,2pi)

Link copied to clipboard
inline fun <R> time(label: String, block: () -> R): R
Link copied to clipboard
fun <T> Collection<T>.toIdentitySet(): MutableSet<T>
Link copied to clipboard
fun Float.toStringAngstroms(): String
fun AABBf.toStringAngstroms(): String
fun Vector3f.toStringAngstroms(): String

Properties

Link copied to clipboard
val Boolean.toYesNo: String
Link copied to clipboard
const val TwoPI: Double