jbrown1618 / vector

A linear algebra library for TypeScript and JavaScript
MIT License
13 stars 1 forks source link

The eigenVectors seem not to be well calculated #125

Closed khayyam90 closed 3 years ago

khayyam90 commented 3 years ago

Hello, I have tried to compute the eigen vector & values and I am facing the following issue : `let m = mat([ [1,0,0], [0,2,0], [0,0,3] ]); let e = eig(m);

At runtime in my browser I get a "Uncaught Error: Unexpected error: unable to find a solution to the eigenvector equation". Did I something wrong ?

jbrown1618 commented 3 years ago

Sorry for taking so long to notice this - I haven't been keeping an eye on the project. I've reproduced the issue in a unit test and will get to it shortly.

jbrown1618 commented 3 years ago

Yikes - the bug is actually in the backward substitution code - it is not handling certain classes of underdetermined systems correctly. This is particularly a problem for eigenvector finding.

jbrown1618 commented 3 years ago

@khayyam90 This is fixed in version 4.0.0