numbers / numbers.js

Advanced Mathematics Library for Node.js and JavaScript
Apache License 2.0
1.77k stars 167 forks source link

added diagonal dominance functions, update src #128

Closed Dakkers closed 9 years ago

Dakkers commented 9 years ago

yep:

cc @LarryBattle

KartikTalwar commented 9 years ago

LGTM

Dakkers commented 9 years ago

@LarryBattle :

I've noticed that we're kind of hacky with the square matrix checking. most functions we have don't actually use matrix.isSquare(M) to check if it's a matrix, we just check the first row and hope that the user didn't enter it incorrectly. we should be checking properly. I'll fix this today. a lot of functions also throw the exact same errors, so we could have a private function throw an error if needed.

as for the private method for the for-loops, that's reasonable too. I'll throw that in today as well.

sorry for jumping the gun!

Dakkers commented 9 years ago

there's also a lot of inconsistency with the way errors are thrown. I'll be fixing that too.