Drop koma module, implement kmath-ejml module copying it, but for EJML SimpleMatrix #136

Merged
CommanderTvis merged 24 commits from ejml into dev 2020-10-01 21:30:40 +03:00
Showing only changes of commit 1c495759cd - Show all commits

View File

@ -23,7 +23,7 @@ class EjmlMatrix(val origin: SimpleMatrix, features: Set<MatrixFeature>? = null)
override val shape: IntArray override val shape: IntArray
get() = intArrayOf(origin.numRows(), origin.numCols()) get() = intArrayOf(origin.numRows(), origin.numCols())
override val features: Set<MatrixFeature> = features ?: hashSetOf( override val features: Set<MatrixFeature> = hashSetOf(
object : DeterminantFeature<Double> { object : DeterminantFeature<Double> {
override val determinant: Double override val determinant: Double
get() = origin.determinant() get() = origin.determinant()
@ -50,7 +50,7 @@ class EjmlMatrix(val origin: SimpleMatrix, features: Set<MatrixFeature>? = null)
override val p: FeaturedMatrix<Double> override val p: FeaturedMatrix<Double>
get() = lup.first get() = lup.first
} }
) ).addAll(features)
override fun suggestFeature(vararg features: MatrixFeature): FeaturedMatrix<Double> = override fun suggestFeature(vararg features: MatrixFeature): FeaturedMatrix<Double> =
EjmlMatrix(origin, this.features + features) EjmlMatrix(origin, this.features + features)