Skip to content

Commit

Permalink
feat: add isEmpty function
Browse files Browse the repository at this point in the history
  • Loading branch information
jobo322 committed Mar 2, 2021
1 parent e3e8f40 commit e0f8327
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ export class SparseMatrix {
});
return trans;
}

isEmpty() {
return this.rows === 0 || this.columns === 0;
}
}

SparseMatrix.prototype.klass = 'Matrix';
Expand Down

0 comments on commit e0f8327

Please sign in to comment.