Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Quafadas committed Nov 20, 2024
1 parent 40ed90e commit 3219627
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Empty file.
4 changes: 3 additions & 1 deletion vecxt/jvm-native/src/array.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package vecxt

import narr.*

object arrayUtil:

extension [A](d: Array[A]) def printArr: String = d.mkString("[", ",", "]")
extension [A](d: NArray[A]) def printArr: String = d.mkString("[", ",", "]")
end arrayUtil
7 changes: 5 additions & 2 deletions vecxt/src/matrixutil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ object matrixUtil:
val arrArr =
for i <- 0 until m.rows
yield
// println(m.row(i).printArr)
m.row(i).asInstanceOf[Array[Double]].printArr
val aRow = m.row(i)
val els =
for (el <- aRow)
yield el.toString
els.mkString(" ")
end arrArr
arrArr.mkString("\n")
end printMat
Expand Down

0 comments on commit 3219627

Please sign in to comment.