Search Unity

Question Is there a package out with complex linear algebra operations, such as singular value decomposition?

Discussion in 'Scripting' started by jordanpeper, May 26, 2023.

  1. jordanpeper

    jordanpeper

    Joined:
    May 8, 2023
    Posts:
    5
    I know this is quite a ridiculous request, but I am looking for a way to perform linear algebra operations on C# arrays, such as singular value decomposition, normalization, determinant, etc. Is there any such package out there? Simple operations like range scaling aren't too bad to code up, but I would appreciate not having to write an SVD code.
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,911
    jordanpeper likes this.
  3. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,539
    So I haven't personally used any of this in my Unity projects but...

    Math.Net exists, I don't know how compatible with Unity it is though:
    https://numerics.mathdotnet.com/
    https://numerics.mathdotnet.com/api/MathNet.Numerics.LinearAlgebra.Factorization/Svd`1.htm

    Also Unity has their own Unity.Mathematics:
    https://docs.unity3d.com/Packages/com.unity.mathematics@1.0/manual/index.html

    And in it there is some allusions to svd:
    https://github.com/Unity-Technologi...a7495db5005b96bd/src/Unity.Mathematics/svd.cs
    https://github.com/search?q=repo:Unity-Technologies/Unity.Mathematics svd&type=code

    Not sure what exactly you're hoping to do though. Maybe this will help.
     
  4. Kobix

    Kobix

    Joined:
    Jan 23, 2014
    Posts:
    146