Dev #194

Merged
altavir merged 266 commits from dev into master 2021-01-20 17:32:32 +03:00
2 changed files with 7 additions and 7 deletions
Showing only changes of commit 66d5df7a51 - Show all commits

View File

@ -40,13 +40,13 @@ public class EjmlMatrix(public val origin: SimpleMatrix, features: Set<MatrixFea
) )
} }
public override val l: FeaturedMatrix<Double> override val l: FeaturedMatrix<Double>
get() = lup.second get() = lup.second
public override val u: FeaturedMatrix<Double> override val u: FeaturedMatrix<Double>
get() = lup.third get() = lup.third
public override val p: FeaturedMatrix<Double> override val p: FeaturedMatrix<Double>
get() = lup.first get() = lup.first
} }
) union features.orEmpty() ) union features.orEmpty()

View File

@ -17,9 +17,9 @@ public class EjmlVector internal constructor(public val origin: SimpleMatrix) :
require(origin.numCols() == 1) { error("Only single column matrices are allowed") } require(origin.numCols() == 1) { error("Only single column matrices are allowed") }
} }
override operator fun get(index: Int): Double = origin[index] public override operator fun get(index: Int): Double = origin[index]
override operator fun iterator(): Iterator<Double> = object : Iterator<Double> { public override operator fun iterator(): Iterator<Double> = object : Iterator<Double> {
private var cursor: Int = 0 private var cursor: Int = 0
override fun next(): Double { override fun next(): Double {
@ -30,10 +30,10 @@ public class EjmlVector internal constructor(public val origin: SimpleMatrix) :
override fun hasNext(): Boolean = cursor < origin.numCols() * origin.numRows() override fun hasNext(): Boolean = cursor < origin.numCols() * origin.numRows()
} }
override fun contentEquals(other: Buffer<*>): Boolean { public override fun contentEquals(other: Buffer<*>): Boolean {
if (other is EjmlVector) return origin.isIdentical(other.origin, 0.0) if (other is EjmlVector) return origin.isIdentical(other.origin, 0.0)
return super.contentEquals(other) return super.contentEquals(other)
} }
override fun toString(): String = "EjmlVector(origin=$origin)" public override fun toString(): String = "EjmlVector(origin=$origin)"
} }