From 1e5f2aaf6b76dc5e912bd830f92b490f0a8962f8 Mon Sep 17 00:00:00 2001 From: Filip Znachor Date: Thu, 29 Sep 2022 19:14:19 +0200 Subject: [PATCH] Matrix class --- matrix.ts | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 matrix.ts diff --git a/matrix.ts b/matrix.ts new file mode 100644 index 0000000..95f49bc --- /dev/null +++ b/matrix.ts @@ -0,0 +1,97 @@ + +type RawMatrix = number[][]; + +class Matrix { + + rows: number; + cols: number; + matrix: RawMatrix; + + static zero(rows: number, cols: number) { + let matrix: RawMatrix = []; + for(let i=0; i