This commit is contained in:
Alexander Nozik 2021-03-14 09:59:53 +03:00
parent 8179be2f62
commit 0cc68e72ce

View File

@ -65,7 +65,7 @@ public class BufferLinearSpace<T : Any, A : Ring<T>>(
override fun Matrix<T>.dot(vector: Vector<T>): Vector<T> {
require(colNum == vector.size) { "Matrix dot vector operation dimension mismatch: ($rowNum, $colNum) x (${vector.size})" }
return elementAlgebra {
val rows = this@dot.rows
val rows = this@dot.rows.map { it.linearize() }
buildVector(rowNum) { i ->
val r = rows[i]
var res = zero