Array2

data class Array2<TGen>(val width: Int, val height: Int, val data: Array<TGen>) : IArray2<TGen>

Constructors

Link copied to clipboard
constructor(width: Int, height: Int, data: Array<TGen>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
open override val height: Int
Link copied to clipboard
open val size: Int
Link copied to clipboard
open override val width: Int

Functions

Link copied to clipboard
fun <T> Iterable<T>.associateByInt(block: (index: Int, value: T) -> Int): IntMap<T>
Link copied to clipboard
open fun asString(): String
open fun asString(margin: String = "", charMap: (TGen) -> Char): String
open fun asString(map: Map<TGen, Char>, margin: String = ""): String
Link copied to clipboard
fun Iterable<MRectangle>.bounds(target: MRectangle = MRectangle()): MRectangle
fun Iterable<MPoint>.bounds(out: MRectangle = MRectangle(), bb: MBoundsBuilder = MBoundsBuilder()): MRectangle
Link copied to clipboard
fun clone(): Array2<TGen>
Link copied to clipboard
open operator fun contains(v: TGen): Boolean
Link copied to clipboard
open fun dump()
Link copied to clipboard
inline fun <E> IArray2<E>.each(callback: (x: Int, y: Int, v: E) -> Unit)
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun equalsAt(idx: Int, value: TGen): Boolean
Link copied to clipboard
inline fun <E> IArray2<E>.fill(gen: (old: E) -> E)
Link copied to clipboard
operator fun get(x: Int, y: Int): TGen
Link copied to clipboard
inline operator fun <T> Array2<T>.get(p: Point): T
inline operator fun <T> Array2<T>.get(p: PointInt): T
Link copied to clipboard
open override fun getAt(idx: Int): TGen
open fun getAt(x: Int, y: Int): TGen
Link copied to clipboard
fun <T> Array2<T>.getCyclic(x: Int, y: Int): T
Link copied to clipboard
open fun getPositionsWithValue(value: TGen): List<Pair<Int, Int>>
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun <E> IArray2<E>.index(x: Int, y: Int): Int
Link copied to clipboard
open fun inside(x: Int, y: Int): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<TGen>
Link copied to clipboard
inline fun <TGen : Any, RGen : Any> IArray2<TGen>.map2(gen: (x: Int, y: Int, v: TGen) -> RGen): Array2<RGen>
Link copied to clipboard
inline fun <T> Iterable<T>.mapDouble(callback: (T) -> Double): DoubleArrayList
Link copied to clipboard
inline fun <T> Iterable<T>.mapFloat(callback: (T) -> Float): FloatArrayList
Link copied to clipboard
inline fun <T> Iterable<T>.mapInt(callback: (T) -> Int): IntArrayList
Link copied to clipboard
fun <T> Iterable<T>.multisorted(vararg props: KProperty1<T, Comparable<*>>): List<T>
Link copied to clipboard
open override fun printAt(idx: Int)
open fun printAt(x: Int, y: Int)
Link copied to clipboard
operator fun set(x: Int, y: Int, value: TGen)
open fun set(rows: List<List<TGen>>)
Link copied to clipboard
inline operator fun <T> Array2<T>.set(p: Point, value: T)
inline operator fun <T> Array2<T>.set(p: PointInt, value: T)
Link copied to clipboard
open override fun setAt(idx: Int, value: TGen)
open fun setAt(x: Int, y: Int, value: TGen)
Link copied to clipboard
@JvmName(name = "sumOfFloat")
inline fun <T> Iterable<T>.sumOfDouble(selector: (T) -> Double): Double
Link copied to clipboard
@JvmName(name = "sumOfFloat")
inline fun <T> Iterable<T>.sumOfFloat(selector: (T) -> Float): Float
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open fun toStringList(charMap: (TGen) -> Char, margin: String = ""): List<String>
Link copied to clipboard
fun tryGet(x: Int, y: Int): TGen?
Link copied to clipboard
inline fun <T> Array2<T>.tryGet(p: Point): T?
inline fun <T> Array2<T>.tryGet(p: PointInt): T?
Link copied to clipboard
fun trySet(x: Int, y: Int, value: TGen)
Link copied to clipboard
inline fun <T> Array2<T>.trySet(p: Point, value: T)
inline fun <T> Array2<T>.trySet(p: PointInt, value: T)