From 3219627cc584b743326bef42c4b96c90d67f9b03 Mon Sep 17 00:00:00 2001 From: Simon Parten Date: Wed, 20 Nov 2024 18:15:30 +0100 Subject: [PATCH] . --- site/docs/_docs/higherkinded.mdoc.md | 0 vecxt/jvm-native/src/array.scala | 4 +++- vecxt/src/matrixutil.scala | 7 +++++-- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 site/docs/_docs/higherkinded.mdoc.md diff --git a/site/docs/_docs/higherkinded.mdoc.md b/site/docs/_docs/higherkinded.mdoc.md new file mode 100644 index 0000000..e69de29 diff --git a/vecxt/jvm-native/src/array.scala b/vecxt/jvm-native/src/array.scala index 56e4be9..2c73664 100644 --- a/vecxt/jvm-native/src/array.scala +++ b/vecxt/jvm-native/src/array.scala @@ -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 diff --git a/vecxt/src/matrixutil.scala b/vecxt/src/matrixutil.scala index c1fba4f..fddf542 100644 --- a/vecxt/src/matrixutil.scala +++ b/vecxt/src/matrixutil.scala @@ -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