From 67fcfa134462d376d054beab2cd4bc9f0c520e2b Mon Sep 17 00:00:00 2001 From: Matthew Ellison Date: Thu, 17 Feb 2022 21:27:43 +0000 Subject: [PATCH] Fixed addCol bug --- src/main/java/com/mattrixwv/matrix/DoubleMatrix.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/mattrixwv/matrix/DoubleMatrix.java b/src/main/java/com/mattrixwv/matrix/DoubleMatrix.java index a9fcbae..8e4c9b0 100644 --- a/src/main/java/com/mattrixwv/matrix/DoubleMatrix.java +++ b/src/main/java/com/mattrixwv/matrix/DoubleMatrix.java @@ -1,7 +1,7 @@ //Matrix/src/main/java/com/mattrixwv/matrix/DoubleMatrix.java //Mattrixwv // Created: 02-07-22 -//Modified: 02-10-22 +//Modified: 02-17-22 package com.mattrixwv.matrix; @@ -60,7 +60,7 @@ public class DoubleMatrix{ //Return the new grid return newGrid; } - protected boolean isSquare(){ + public boolean isSquare(){ if(getNumRows() == 0){ return false; } @@ -296,7 +296,7 @@ public class DoubleMatrix{ public void addCol(double[] elements){ //Make sure the number of rows is valid if(grid.length == 0){ - grid = new double[1][elements.length]; + grid = new double[elements.length][1]; } else if(grid.length == elements.length){ //Copy all existing data into the new grid