Returns the trace of this Matrix.
double get trace { var result = 0.0; final count = math.min(rowCount, colCount); for (var i = 0; i < count; i++) { result += getUnchecked(i, i); } return result; }