pre-0.0.3 #46

Merged
altavir merged 75 commits from dev into master 2019-02-20 13:05:39 +03:00
3 changed files with 16 additions and 6 deletions
Showing only changes of commit 4c1547ba5c - Show all commits

View File

@ -56,9 +56,7 @@ data class Complex(val re: Double, val im: Double) : FieldElement<Complex, Compl
val abs: Double
get() = kotlin.math.sqrt(square)
companion object {
}
companion object
}
fun Double.toComplex() = Complex(this, 0.0)

View File

@ -24,9 +24,7 @@ inline class Real(val value: Double) : FieldElement<Double, Real, RealField> {
override val context get() = RealField
companion object {
}
companion object
}
/**

View File

@ -102,6 +102,20 @@ class DefaultStrides private constructor(override val shape: IntArray) : Strides
override val linearSize: Int
get() = strides[shape.size]
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other !is DefaultStrides) return false
if (!shape.contentEquals(other.shape)) return false
return true
}
override fun hashCode(): Int {
return shape.contentHashCode()
}
companion object {
private val defaultStridesCache = HashMap<IntArray, Strides>()