Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Quafadas committed Nov 20, 2024
1 parent 74ab79a commit 67224ff
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 39 deletions.
2 changes: 1 addition & 1 deletion site/docs/_docs/matrix.mdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ val result2 = mat1 @@ mat2
result2.printMat

// opperator precedence...
val result3 = Matrix.eye(2) + mat1 @@ mat2
val result3 = Matrix.eye[Double](2) + mat1 @@ mat2

result3.printMat

Expand Down
2 changes: 1 addition & 1 deletion site/docs/_docs/xPlatform.mdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import vecxtensions.MathTagsLaminar.*
import vecxt.BoundsCheck.DoBoundsCheck.yes

val base = NArray[Double](11, 12, 13, 14, 15)
val mat1 = Matrix.fromRows(
val mat1 = Matrix.fromRows[Double](
NArray(
base,
base +:+ 10.0,
Expand Down
36 changes: 0 additions & 36 deletions vecxt/src/MatrixHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -133,39 +133,3 @@ object MatrixHelper:
end extension

end MatrixHelper

// inline def +(m2: Matrix[Double])(using inline boundsCheck: BoundsCheck): Matrix[Double] =
// sameDimMatCheck(m, m2)
// val newArr = m.raw.add(m2.raw)
// Matrix(newArr, m.shape)(using BoundsCheck.DoBoundsCheck.no)
// end +

// inline def matmul(b: Matrix[Double])(using inline boundsCheck: BoundsCheck): Matrix[Double] =
// dimMatCheck(m, b)
// val newArr = Array.ofDim[Double](m.rows * b.cols)
// // Note, might need to deal with transpose later.
// blas.dgemm(
// "N",
// "N",
// m.rows,
// b.cols,
// m.cols,
// 1.0,
// m.raw,
// m.rows,
// b.raw,
// b.rows,
// 1.0,
// newArr,
// m.rows
// )
// Matrix(newArr, (m.rows, b.cols))
// end matmul

// inline def @@(b: Matrix[Double])(using inline boundsCheck: BoundsCheck): Matrix[Double] = m.matmul(b)

// inline def *:*=(d: Double): Unit = m.raw.multInPlace(d)

// end extension

// end DoubleMatrix
3 changes: 2 additions & 1 deletion vecxtensions/js/src/mathtags.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package vecxtensions
import scalatags.Text.all.* // Imports commonly used ScalaTags elements like `Tag`, `attrs`, etc.
import scalatags.Text.tags
import vecxt.all.*
import narr.*

import com.raquo.laminar.api.L.{*, given}
import com.raquo.laminar.tags.*
Expand All @@ -11,7 +12,7 @@ import vecxt.BoundsCheck.DoBoundsCheck.no

object MathTagsLaminar:

extension [A](m: Matrix[A])
extension (m: Matrix[Double])
def printMl =
mfenced(
mtable(
Expand Down

0 comments on commit 67224ff

Please sign in to comment.