Skip to content

Commit

Permalink
fixed files form Math #45
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 81f6807 commit fe45b96
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ public class OpenMapRealMatrix extends AbstractRealMatrix
*/
public OpenMapRealMatrix(int rowDimension, int columnDimension) {
super(rowDimension, columnDimension);
long lRow = (long) rowDimension;
long lCol = (long) columnDimension;
if (lRow * lCol >= (long) Integer.MAX_VALUE) {
throw new NumberIsTooLargeException(lRow * lCol, Integer.MAX_VALUE, false);
}
this.rows = rowDimension;
this.columns = columnDimension;
this.entries = new OpenIntToDoubleHashMap(0.0);
Expand Down

0 comments on commit fe45b96

Please sign in to comment.