Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/netsaur/backends/native/mod.ts>Matrix

Powerful machine learning, accelerated by WebGPU
Go to Latest
class Matrix
Re-export
import { Matrix } from "https://deno.land/x/netsaur@0.1.5/backends/native/mod.ts";

Constructors

new
Matrix(ptr: Deno.PointerValue)
new
Matrix(
rows: number,
cols: number,
type: T,
)
new
Matrix(
rows: number,
cols: number,
)
new
Matrix(
rows: number,
cols: number,
type: T,
fill: number,
)
new
Matrix(
rows: number,
cols?: number,
type?: T | DataTypeArray<T>,
fill?: number | Deno.PointerValue,
)

Properties

readonly
cols: number
readonly
data: DataTypeArray<T>
readonly
rows: number
readonly
type: T
readonly
unsafePointer

Methods

add(b: Matrix<T> | number): Matrix<T>
div(b: number): Matrix<T>
mul(b: Matrix<T> | number): Matrix<T>
sub(b: Matrix<T> | number): Matrix<T>

Static Methods

column(data: number[]): Matrix<"f32">
of(data: number[][]): Matrix<"f32">
rand(rows: number, cols: number): Matrix<"f32">
row(data: number[]): Matrix<"f32">