Mathematical Libraries

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u011178262/article/details/77587209

General

Mathematical libraries used in development and those usages with CMake.

GMP

GMP, the GNU Multiple Precision Arithmetic Library, is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating-point numbers. There is no practical limit to the precision except the ones implied by the available memory in the machine GMP runs on. GMP has a rich set of functions, and the functions have a regular interface.

GSL

The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers.
The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.
GSL Shell
GSL shell offers an interactive command-line interface that gives access to GSL collection of mathematical functions. GSL shell is based on the powerful and elegant scripting language Lua.
GSL shell is not just a wrapper over the C API of GSL but does offer much more simple and expressive way to use GSL.
The objective of GSL shell is to give the user the power of easily access GSL functions without having to write a complete C application.

Netlib

Netlib is a collection of mathematical software, papers, and databases.

Linear Algebra

BLAS

The BLAS (Basic Linear Algebra Subprograms) are routines that provide standard building blocks for performing basic vector and matrix operations. The Level 1 BLAS perform scalar, vector and vector-vector operations, the Level 2 BLAS perform matrix-vector operations, and the Level 3 BLAS perform matrix-matrix operations. Because the BLAS are efficient, portable, and widely available, they are commonly used in the development of high quality linear algebra software, LAPACK for example.
最常见的BLAS实现有Intel MKL、ATLAS、OpenBLAS等。

LAPACK

LAPACK is written in Fortran 90 and provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems.

  • Install scripts on Ubuntu
# LAPACK
echo -e "\n Installing LAPACK... \n"
wget http://www.netlib.org/lapack/lapack-3.6.0.tgz
tar xvzf lapack-3.6.0.tgz
cd lapack-3.6.0
cp make.inc.example make.inc
make all -j $(nproc)
sudo cp *.a /usr/local/lib/
  • Usages with CMake
# LAPACK
find_package(LAPACK REQUIRED)
if(LAPACK_FOUND)
    message(STATUS "LAPACK Libraries: ")
    foreach (lib ${LAPACK_LIBRARIES})
        message(STATUS "  " ${lib})
    endforeach()
    link_libraries( ${LAPACK_LIBRARIES} )
endif()

TooN

TooN: Tom’s Object-oriented numerics library.
The TooN library is a set of C++ header files which provide basic linear algebra facilities.

  • Install scripts on Ubuntu
# TooN
echo -e "\n Installing TooN... \n"
cd ${Path3rdParty}
# sudo git clone git://github.com/edrosten/TooN.git
wget https://www.edwardrosten.com/cvd/TooN-2.2.tar.xz
tar xvJf TooN-2.2.tar.xz
cd TooN-2.2
./configure && make && sudo make install
  • Usages with CMake
# TooN
# Require linking the LAPACK library

SuiteSparse

A Suite of Sparse matrix packages at http://www.suitesparse.com.

Eigen

Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.

  • Usages with CMake
# Eigen
find_package(Eigen3 REQUIRED)
if(EIGEN3_FOUND)
    include_directories( ${EIGEN3_INCLUDE_DIR} )
endif()

Sophus

C++ implementation of Lie Groups using Eigen commonly used for 2d and 3d geometric problems (i.e. for Computer Vision or Robotics applications).

  • Usages with CMake
# Sophus
find_package( Sophus REQUIRED )
if(Sophus_FOUND)
    include_directories( ${Sophus_INCLUDE_DIRS} )
    link_libraries( ${Sophus_LIBRARIES} )
endif()

Matrix Template Library

The Matrix Template Library 4 (MTL4) is a development library for scientific computing that combines high productivity with high performance in the execution.

Blitz++

Blitz++ is a C++ class library for scientific computing which provides performance on par with Fortran 77/90. It uses template techniques to achieve high performance. Blitz++ provides dense arrays and vectors, random number generators, and small vectors (useful for representing multicomponent or vector fields).

FFTW

FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).

Numerical Analysis and Data Processing

ALGLIB

ALGLIB is a cross-platform numerical analysis and data processing library. It supports several programming languages (C++, C#, Delphi) and several operating systems (Windows and POSIX, including Linux). ALGLIB features include:

  • Data analysis (classification/regression, statistics)
  • Optimization and nonlinear solvers
  • Interpolation and linear/nonlinear least-squares fitting
  • Linear algebra (direct algorithms, EVD/SVD), direct and iterative linear solvers
  • Fast Fourier Transform and many other algorithms

Geometry Processing

libigl

libigl is a simple C++ geometry processing library. We have a wide functionality including construction of sparse discrete differential geometry operators and finite-elements matrices such as the cotangent Laplacian and diagonalized mass matrix, simple facet and edge-based topology data structures, mesh-viewing utilities for OpenGL and GLSL, and many core functions for matrix manipulation which make Eigen feel a lot more like MATLAB.

Qhull

Qhull computes the convex hull, Delaunay triangulation, Voronoi diagram, halfspace intersection about a point, furthest-site Delaunay triangulation, and furthest-site Voronoi diagram. The source code runs in 2-d, 3-d, 4-d, and higher dimensions. Qhull implements the Quickhull algorithm for computing the convex hull. It handles roundoff errors from floating point arithmetic. It computes volumes, surface areas, and approximations to the convex hull.

Optimization

FLANN

FLANN (a.k.a. Fast Library for Approximate Nearest Neighbors) is a library for performing fast approximate nearest neighbor searches in high dimensional spaces. It contains a collection of algorithms we found to work best for nearest neighbor search and a system for automatically choosing the best algorithm and optimum parameters depending on the dataset.
FLANN is written in C++ and contains bindings for the following languages: C, MATLAB and Python.

Ceres Solver

Ceres Solver is an open source C++ library for modeling and solving large, complicated optimization problems. It can be used to solve Non-linear Least Squares problems with bounds constraints and general unconstrained optimization problems.

  • Usages with CMake
# Ceres
find_package( Ceres REQUIRED )
if(Ceres_FOUND)
    include_directories( ${CERES_INCLUDE_DIRS} )
    link_libraries( ${CERES_LIBRARIES} )
endif()

G2O

g2o is an open-source C++ framework for optimizing graph-based nonlinear error functions. g2o has been designed to be easily extensible to a wide range of problems and a new problem typically can be specified in a few lines of code. The current implementation provides solutions to several variants of SLAM and BA.

  • Install scripts on Ubuntu
# G2O
cd ${Path3rdParty}
git clone [email protected]:RainerKuemmerle/g2o.git
cd g2o
mkdir build && cd build && cmake ../ && make -j$(nproc) && sudo make install
  • Usages with CMake
# G2O
find_package( G2O REQUIRED )
if(G2O_FOUND)
    include_directories( ${G2O_INCLUDE_DIRS} )
    link_libraries( g2o_core g2o_stuff g2o_types_sba )
endif()

猜你喜欢

转载自blog.csdn.net/u011178262/article/details/77587209