简体   繁体   中英

Linear Algebra Library

Where can I find similar function as numpy.linalg.norm (Python) for C++ or C#? This function is able to return one of seven different matrix norms, or one of an infinite number of vector norms, depending on the value of the ord parameter.

根据您的平台和口袋的深度,您可能对英特尔的 MKL感兴趣,它可以从 C++ 和 C# 调用

See if this library makes sense for you:

Boost

您可以使用 Fortran 编译器编译blaslapack ,并在您的 C++ 程序中链接它们。

也许alglib适合你?

For C# the numerics part of the Math.NET project may be what you want.

http://numerics.mathdotnet.com/

You can use Vector2.Length() Example:

using System.Numerics;

namespace LinearAlgebraCSharp
{
    class Program
    {
        static void Main(string[] args)
        {

            Vector2 vec1 = new Vector2(2, 3);

            // Equivalent of <numpy.linalg.norm>
            float vectorModule = vec1.Length();
        }
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM