Re: Is this an okay representation of a dynamically sized Matrix, to be used for HMM matrices m = (A,B)
On Thursday, 28 December 2017 at 01:34:10 UTC, Enjoys Math wrote: Code: module matrix; import std.array; struct Matrix(E) { private: E[][]; this() { } void deleteRow(int i) { E = E[0..i] ~ E[i..$]; } void deleteColumn(int j) { for (int i=0; i <
Is this an okay representation of a dynamically sized Matrix, to be used for HMM matrices m = (A,B)
Code: module matrix; import std.array; struct Matrix(E) { private: E[][]; this() { } void deleteRow(int i) { E = E[0..i] ~ E[i..$]; } void deleteColumn(int j) { for (int i=0; i < E.length; i++) { E[i] = E[i][0..j] ~ E[i][j..$];