From 34ea337069194f08678653fb2798af0b846f2813 Mon Sep 17 00:00:00 2001 From: Chris Watson Date: Fri, 23 Aug 2019 18:47:47 -0700 Subject: [PATCH] Add size method to Matrix --- src/apatite/linear_algebra/matrix.cr | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/apatite/linear_algebra/matrix.cr b/src/apatite/linear_algebra/matrix.cr index e16b71c..fc7d274 100644 --- a/src/apatite/linear_algebra/matrix.cr +++ b/src/apatite/linear_algebra/matrix.cr @@ -1403,6 +1403,11 @@ module Apatite::LinearAlgebra } end + # Return the row and column size as a `Tuple(Int32, Int32)` + def size + {row_count, column_count} + end + # Returns an array of arrays that describe the rows of the matrix. def to_a @rows.clone