Giter VIP home page Giter VIP logo

Comments (4)

JM-FRANCE avatar JM-FRANCE commented on August 20, 2024 1

Sounds good !

from basiclinearalgebra.

tomstewart89 avatar tomstewart89 commented on August 20, 2024

Hey @JM-FRANCE, thanks for the info, you're quite right. I've pushed a fix it's included in v3.4.

Regarding your second point:

Also I'm not sure why you say the matrix is singular only of all the elements are null.

We actually only mark the matrix as singular if there exists a row whose elements are all zero. In that case the matrix would be rank deficient and would have a determinant of zero.

Thanks again for the info, feel free to reopen this issue if you have any further problems

from basiclinearalgebra.

JM-FRANCE avatar JM-FRANCE commented on August 20, 2024

Hi

OK - yes indeed you check for a null row but that’s not necessary (just sufficient) to have a singular matrix. In order to return a correct status you would need to calculate the determinant - or update the documentation on this function to make it the responsibility of the caller to check this separately

from basiclinearalgebra.

tomstewart89 avatar tomstewart89 commented on August 20, 2024

Ah ok I see your point, indeed having a null row doesn't cover all singular matrices, thanks for the clarification.

I just pushed a small change (1c63223) which should correct for this. Basically in addition to the previous check we now also flag the matrix as singular if any of the diagonal elements in the LU decomposition are zero. This should be sufficient to detect singular matrices since the determinant of a matrix is the product of those diagonal elements.

As a result the Invert function now also correctly returns false for singular matrices so thanks again for the info.

from basiclinearalgebra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.