Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,647 Location: Italy Was thanked: 1329 time(s) in 875 post(s)
|
boost c++ librariesNSWC Mathematics Subroutine Library
NSWC LIBRARY TABLE OF CONTENTS
Elementary Operations
|Machine Constants Q SPMPAR, DPMPAR, IPPMAR .................3 |Argument Bounds for the Exponential Function - | EPSLN, EXPARG, DEPSLN, DXPARG..........................5 |Sorting Lists Q ISHELL, SHELL, AORD, RISORT, SHELL2, DSORT, | DAORD, DISORT, DDSORT, QSORTI, QSORTR, QSORTD, IORDER, | RORDER, DORDER ........................................7 |Cube Root - CBRT, DCBRT ...................................11 Four Quadrant Arctangent - ARTNQ, DARTNQ...................11 Length of a Two-Dimensional Vector - CPABS, DCPABS ........11 Reciprocal of a Complex Number - CREC, DCREC ..............13 |Division of a Complex Number - CDVI,DIVID..................13 Square Root of a Double Precision Complex Number - DCSQR...13 Conversion of Polar to Cartesian Coordinates Q POCA .......15 Conversion of Cartesian to Polar Coordinates - CAPO .......15 Rotation of Axes - ROTA ...................................15 Planar Givens Rotations - SROTG, DROTG ....................17 Three Dimension Rotations - ROT3 ..........................19 Rotation of a Point on the Unit Sphere to the North Pole - CONSTR ...............................................21 |Computation of the Angle Between Two Vectors - ANG ........23 |Trigonometric Functions - SIN1, COS1, DSIN1, DCOS1 ........25 |Hyperbolic Sine and Cosine Functions SNHCSH ...............27 |Exponentials Q REXP, DREXP ................................29 Logarithms - ALNREL, RLOG, RLOG1, DLNREL, DRLOG, DRLOG1 ...31
Geometry
Determining if a Point is Inside or Outside a Polygon - LOCPT ................................................33 |Intersection of a Straight Line and Polygonal Path - PFIND.35 The Convex Hull for a Finite Planar Set Q HULL ............37 Areas of Planar Polygons - PAREA ..........................39 Hamiltonian Circuits - HC .................................41
Special Functions
Error Function - CERF, CERFC, ERF, ERFC, ERFC1, DCERF, DCERFC, DERF, DERFC, DERFC1 ...........................45 |Inverse Error Function - ERFI, DERFI ......................51 |Difference of Error Function - AERF, DAERF ................53 Normal Probability Distribution Function - PNDF ...........55 |Inverse Normal Probability Distribution Function - PNI,DPNI ..............................................57 |Dawson's Integral - DAW, DPDAW ............................59 Complex Fresnel Integral - CFRNLI .........................61 Real Fresnel Integrals - FRNL .............................63 Exponential Integral Function - CEXPLI, EXPLI, DEI, DEI1 ..65 Sine and Cosine Integral Functions - SI, CIN ..............69 |Exponential Exponential Integral Function - CEXEXI ........71 Dilogarithm Function - CLI, ALI ...........................73 Gamma Function - CGAMMA, GAMMA, GAMLN, DCGAMA, DGAMMA, DGAMLN .......................................75 Digamma Function - CPSI, PSI, DCPSI, DPSI .................79 |Derivatives of the Digamma Function - PSIDF ...............81 |Incomplete Gamma Ratio Functions - GRATIO, RCOMP, DGRAT, DRCOMP ...............................................83 |Inverse Incomplete Gamma Ratio Function - GAMINV, DGINV ...85 Logarithm of the Beta Function Q BETALN, DBETLN ...........87 Incomplete Beta Function - BRATIO, ISUBX, BRCOMP ..........89 Bessel Function Jv(z) - CBSSLJ,BSSLJ, BESJ ................91 Bessel Function Yv(z) - BSSLY .............................93 |Modified Bessel Function Iv(Z) - CBSSLI, BSSLI, BESI ......95 |Modified Bessel Function Kv(z) - CBESK, CBSSLK, BSSLK .....97 Airy Functions - CAI, CBI, AI, AIE, BI, BIE ...............99 Complete Complex Elliptic Integrals of the First and Second Kinds - CK, CKE ..............................103 Real Elliptic Integrals of the First and Second Kinds - ELLPI, RFVAL, RDVAL, DELLPI, DRFVAL, DRDVAL .........107 Real Elliptic Integrals of the Third Kind - EPI, RJVAL, DEPI, DRJVAL ............................111 Jacobian Elliptic Functions - ELLPF, ELPFC1 ..............115 Weierstrass Elliptic Function for the Equianharmonic and Lemniscatic Cases - PEQ, PEQ1, PLEM, PLEM1 ......119 Integral of the Bivariate Density Function over Arbitrary Polygons and Semi-infinite Angular Regions - VALR2 ..123 |Circular Coverage Function - CIRCV .......................125 |Elliptical Coverage Function Q PKILL .....................127
Polynomials
Copying Polynomials - PLCOPY, DPCOPY .....................129 Addition of Polynomials - PADD, DPADD ....................131 Subtraction of Polynomials - PSUBT, DPSUBST ..............133 Multiplication of Polynomials - PMULT, DPMULT ............135 Division of Polynomials Q PDIV, DPDIV ....................137 Real Powers of Polynomials - PLPWR, DPLPWR ...............139 Inverses of Power Series - PINV, DPINV ...................141 Derivatives and Integrals of Polynomials - MPLNMV ........143 Evaluation of Chebyshev Expansions - CSEVL, DCSEVL .......145 Lagrange Polynomials Q LGRNGN, LGRNGV, LRGNGX ............147 Orthogonal Polynomials on Finite Sets - ORTHOS, ORTHOV, ORTHOX ..............................................149
Solutions of Nonlinear Equations
|Zeros of Continuous Functions - ZEROIN, DZERO ............151 Solution of Systems of Nonlinear Equations - HBRD ........153 Solutions of Quadratic, Cubic, and Quartic Equations - QDCRT, CBCRT, QTCRT, DQDCRT, DCBCRT, DQTCRT ........155 Double Precision Roots of Polynomials - DRPOLY, DCPOLY ...157 |Accuracy of the Roots of Polynomial - RBND, CBND .........159
Vectors
Copying Vectors Q SCOPY, DCOPY, CCOPY ....................161 Interchanging Vectors - SSWAP, DSWAP, CSWAP ..............163 Planar Rotation of Vectors - SROT, DROT, CSROT ...........165 |Modified Givens Rotations - SROTMG, DROTMG, SROTM, DROTM .167 Dot Products of Vectors - SDOT, DDOT, CDOTC, CDOTU .......171 Scaling Vectors - SSCAL, DSCAL, CSCAL, CSSCAL ............173 Vector Addition - SAXPY, DAXPY, CAXPY ....................175 Ll Norm of a Vector - SASUM, DASUM, SCASUM ...............177 L2 Norm of a Vector Q SNRM2, DNRM2, SCNRM2 ...............179 L0 Norm of a Vector - ISAMAX, IDAMAX, ICAMAX .............181
Matrices
Packing and Unpacking Symmetric Matrices - MCVFS, DMCVFS, MCVSF, DMCVSF .......................................183 Conversion of Real Matrices to and from Double Precision Form - MCVRD, MDCVDR ................................185 Storage of Real Matrices in the Complex Matrix Format - MCVRC ...............................................187 The Real and Imaginary Parts of a Complex Matrix - CMREAL, CMIMAG.......................................189 Copying matrices - MCOPY, SMCOPY, DMCOPY, CMCOPY .........191 Computation of the Conjugate of a Complex Matrix - CMCONJ.193 Transposing Matrices Q TPOSE, DTPOSE, CTPOSE, TIP, DTIP, CTIP ..........................................195 Computing Adjoints of Complex Matrices - CMADJ, CTRANS ...197 Matrix Addition - MADD, SMADD, DMADD, CMADD ..............199 Matrix Subtraction - MSUBT, SMSUBT, DMSUBT, CMSUBT .......201 Matrix Multiplication - MTMS, DMTMS, CMTMS, MPROD, DMPROD, CMPROD ......................................203 Product of a Packed Symmetric Matrix and a Vector - SVPRD, DSVPRD .......................................205 Transpose Matrix Products - TMPROD .......................207 Symmetric Matrix Products - SMPROD .......................209 Kronecker Product of Matrices - KPROD, DKPROD, CKPROD ....211 |Rank of a Real Matrix - RNK, DRNK ........................213 |Inverting General Real Matrices and Solving General | Systems of Real Linear Equations - CROUT,KROUT, | NPIVOT, MSLV, DMSLV, MSLV1, DMSLV1 ............... 215 Solutions of Real Equations with Iterative Improvement - SLVMP ...............................................221 Solutions of Almost Block Diagonal Systems of Linear Equations - ARCECO, ARCESL ..........................223 Solution of Almost Block Tridiagonal Systems of Linear Equations Q BTSLV ...................................225 Inverting Symmetric Real Matrices and Solving Symmetric Systems of Real Linear Equations - SMSLV, DSMSLV ....227 Inverting Positive Definite Symmetric Matrices and Solving Positive Definite Symmetric Systems of Linear Equations - PCHOL,DPCHOL .....................231 Solution of Toeplitz Systems of Linear Equations - TOPLX, DTOPLX .......................................233 Inverting General Complex Matrices and Solving General Systems of Complex Linear Equations - CMSLV, CMSLV1, DCMSLV ...............................235 Solution of Complex Equations with Iterative Improvement - CSLVMP ..............................................239 Singular Value Decomposition of a Matrix - SSVDC,DSVDC, CSVDC ...............................................241 Evaluation of the Characteristic Polynomial of a Matrix - DET, DPDET, CDET ...........................243 Solution of the Matrix Equation AX + XB = C - ABSLV, DABSLV .......................................245 Solution of the Matrix Equation AtX + XA = C where C is Symmetric - TASLV, DTASLV ...........................247 Solution of the Matrix Equation - AX2 + BX + C = O - SQUINT ..............................................249 Exponential of a Real Matrix - MEXP, DMEXP ...............251
Large Dense Systems of Linear Equations
Solving systems of 200-400 Linear Equations - LE, DPLE, CLE .......................................253
Banded Matrices
Band Matrix Storage ......................................255 |Conversion of Banded Matrices to and from the | Standard Format - CVBR, CVBD, CVBC, CVRB, | CVDB, CVCB, CVRB1,CVDB1, CVCB1 ......................257 |Conversion of Banded Matrices to and from Sparse Form - | MCVBS, DMCVBS, CMCVBS, MCVSB, DMCVSB, CMCVSB ....... 259 |Conversion of Banded Real Matrices to and from | Double Precision Form - BCVRD, BCVDR ............... 261 |The Real and Imaginary Parts of a Banded | Complex Matrix - BREAL, BIMAG .................... 263 |Computing A + Bi for Banded Real Matrices A and B - BCVR..265 |Transposing Banded Matrices Q BPOSE, DBPOSE, CBPOSE ......267 |Addition of Banded Matrices - BADD, DBADD, CBADD .........269 |Subtraction of Banded Matrices - BSUBT, DBSUBT, CBSUBT ...271 |Multiplication of Banded Matrices - BPROD,DBPROD,CBPROD ..273 Product of a Real Banded Matrix and Vector - BVPRD, BVPRD1, BTPRD, BTPRD1 .................. 275 |Product of a Double Precision Banded Matrix and Vector - DBVPD, DBVPD1, DBTPD, DBTPD1 ........................277 Product of a Complex Banded Matrix and Vector - CBVPD, CBVPD1, CBTPD, CBTPD1 ..................... 279 |L1 Norm of a Real Banded Matrix - B1NRM, DB1NRM ..........281 |L0 Norm of a Real Banded Matrix - BNRM, DBNRM ............283 Solution of Banded Systems of Real Linear Equations - BSLV, BSLV1 .........................................285 |Computation of the Condition Number of a Real | Banded Matrix - B1CND ...............................287 |Double Precision Solution of Banded Systems of | Real Linear Equations - DBSLV, DBSLV1 ...............289 |Computation of the Condition Number of a Double Precision Banded Matrix - DB1CND .............291 Solution of Banded Systems of Complex Linear Equations - CBSLV, CBSLV1 .......................................293
Sparse Matrices
Storage of Sparse Matrices ...............................295 Conversion of Sparse Matrices to and from the Standard Format - CVRS, CVDS, CVCS, CVSR, CVSD, CVSC .........297 Conversion of Spase Real Matrices to and from Double Precision Form - SCVRD, SCVDR ................299 The Real and Imaginary Parts of a Sparse Complex Matrix - CSREAL, CSIMAG ......................................301 Computing A + Bi for Sparse Real Matrices A and B Q SCVRC ...............................................303 Copying Sparse Matrices - RSCOPY, DSCOPY, CSCOPY ........305 Computing Conjugates of Sparse Complex Matrices - SCONJ ..307 Transposing Sparse Real Matrices - RPSOE, RPOSE1 .........309 Transposing Sparse Double Precision Matrices - DPOSE, DPOSE1 .......................................311 Transposing Sparse Complex Matrices - CPOSE, CPOSE1 ......313 Addition of Sparse Matrices - SADD, DSADD, CSADD .........315 Subtraction of Sparse Matrices Q SSUBT, DSSUBT, CSSUBT ...317 Multiplication of Sparse Matrices - SPROD,DSPROD,CSPROD ..319 Product of a Real Sparse Matrix and Vector - MVPRD, MVPRD1, MTPRD, MTPRD1 ........................321 Product of a Double Precision Sparse Matrix and Vector Q DVPRD, DVPRD1, DTPRD, DTPRD1 ........................323 Product of a Complex Sparse Matrix and Vector - CVPRD, CVPRD1, CTPRD, CTPRD1 ........................325 |L1 Norm of a Sparse Real Matrix - S1NRM, DS1NRM ..........327 |L0 Norm of a Sparse Real Matrix - SNRM, DSNRM ............329 Ordering the Rows of a Sparse Matrix by Increasing Length Q SPORD ...........................331 Reordering Sparse Matrix into Block Triangular Form Q BLKORD ..............................................333 Solution of Sparse Systems of Real Linear Equations - SPSLV, RSLV, TSLV ...................................335 |Computation of the Condition Number of a Real | Sparse Matrix - S1CND ...............................339 Double Precision Solution of Sparse Systems of Real Linear Equation - DSPSLV, DSLV, DTSLV ..........341 |Computation of the Condition Number of a | Double Precision Sparse Matrix - DS1CND .............345 Solution of Sparse Systems of Complex Linear Equations - CSPSLV, CSLV, CTSLV .................................347
Eigenvalues and Eigenvectors
Computation of Eigenvalues of General Real Matrices - EIG, EIG1 ................................... .......351 Computation of Eigenvalues and Eigenvectors of General Real Matrices - EIGV, EIGV1 .................353 Double Precision Computation of Eigenvalues of Real Matrices - DEIG ................................355 Double Precision Computation of Eigenvalues and Eigenvectors of Real Matrices - DEIGV ...............357 Computation of Eigenvalues of Symmetric Real Matrices - SEIG, SEIG1 .........................................359 Computation of Eigenvalues and Eigenvectors of Symmetric Real Matrices - SEIGV, SEIGV1 .............361 |Double Precision Computation of Eigenvalues of | Symmetric Real Matrices - DSEIG .....................363 |Double Precision Computation of Eigenvalues and | Eigenvectors of Symmetric Real Matrices - DSEIGV ....365 Computation of Eigenvalues of Complex Matrices - CEIG ....367 Computation of Eigenvalues and Eigenvectors of Complex Matrices - CEIGV ............................369 Double Precision Computation of Eigenvalues of Complex Matrices - DCEIG ............................371 Double Precision Computation of Eigenvalues and Eigenvectors of Complex Matrices - DCEIGV ...........373
L1 Solution of Linear Equations
L1 Solution of Systems of Linear Equations with Equality and Inequality Constraints - CL1 ....................375
Least Squares Solution of Linear Equations
|Least Squares Solution of Systems of Linear Equations - | LLSQ, LSQR, HFTI, HFTI2 .......................... 377 Least Squares Solution of Overdetermined Systems of Linear Equations with Iterative Improvement - LLSQMP .......383 |Double Precision Least Squares Solution of Systems of | Linear Equations - DLLSQ, DLSQR, DHFTI, DHFTI2 .....385 Least Squares Solution of Systems of Linear Equations with Equality and Inequality Constraints - LSEI ..........391 Least Squares Solution of Systems of Linear Equations with Equality and Nonnegativity Constraints - WNNLS ......395 Least Squares Iterative Improvement Solution of Systems of Linear Equations with Equality Constraints - L2SLV ..399 Iterative Least Squares Solution of Banded Linear Equations - BLSQ ...................................403 Iterative Least Squares Solution of Sparse Linear Equations - SPLSQ, STLSQ ...........................405
Optimization
Minimization of Functions of a Single Variable - FMIN ....407 Minimization of Functions of n Variable - OPTF ...........409 Unconstrained Minimum of the Sum of Squares of Nonlinear Functions Q LMDIFF ..................................411 Linear Programming - SMPLX, SSPLX ........................413 The Assignment Problem - ASSGN ...........................417 0-1 Knapsack Problem MKP .................................419
Transforms
Inversion of the Laplace Transform - LAINV ...............421 Fast Fourier Transform - FFT, FFTl .......................425 Multivariate Fast Fourier Transform - MFFT, MFFTl ........427 Discrete Cosine and Sine Transforms - COSQI, COSQB, COSQF, SINQB, SINQF .................................429
Approximation of Functions
Rational Minimax Approximation of Functions Q CHEBY ......433 Lp Approximation of Functions Q ADAPT ....................435 Calculation of the Taylor Series of Complex Analytic Function - CPSC, DCPSC .....................439
Curve Fitting
Linear Interpolation - TRP ...............................443 Lagrange Interpolation Q LTRP ............................445 Hermite Interpolation - HTRP .............................447 Conversion of Real Polynomials from Newton to Taylor Series Form - PCOEFF ................................449 Least Squares Polynomial Fit - PFIT ......................451 Weighted Least Squares Polynomial Fit - WPFIT.............453 Cubic Spline Interpolation - CBSPL, SPLIFT ...............455 Weighted Least Squares Cubic Spline Fit - SPFIT ..........457 |Least Squares Cubic Spline Fitting with Equality and | Inequality Constraints - CSPFIT .....................459 Cubic Spline Evaluation - SCOMP, SCOMP1, SCOMP2 ..........461 Cubic Spline Evaluation and Differentiation - SEVAL, SEVAL1, SEVAL2 ..............................463 Integrals of Cubic Spline - CSINT, CSINT1, CSINT2 ........465 |Periodic Cubic Spline Interpolation - PDSPL ..............467 |Least Squares Periodic Cubic Spline Fitting - PDFIT ......469 |Periodic Cubic Spline Evaluation and Differentiation - | PSCMP, PSEVL ........................................471 N-Dimensional Cubic Spline Closed Curve Fitting - CSLOOP, LOPCMP, LOPDF ..............................473 Spline under Tension Interpolation - CURV1 ...............475 Spline under Tension Evaluation - CURV2 ..................477 Differentiation and Integrals of Splines under Tension Q CURVD, CURVI .......................................479 Two Dimensional Spline under Tension Curve Fitting - KURV1, KURV2 .......................................481 Two Dimensional Spline under Tension Closed Curve fitting - KURVP1,KURVP2 ............................483 Three Dimensional Spline under Tension Curve Fitting - QURV1, QURV2 .......................................485 |B-Splines ................................................487 |Finding the Interval that Contains a Point - INTRVL ......489 |Evaluation and Differentiation of Piecewise Polynomial | from its B-Spline Representation - BVAL .............491 |Evaluation of the Indefinite Integral of a Piecewise | Polynomial from its B-spline representation - BVALI..493 Conversion of Piecewise Polynomials from B-Spline to Taylor Series Form - BSPP ..........................495 Evaluation of Piecewise Polynomials from their Taylor Series Representation - PPVAL .......................497 Piecewise Polynomial Interpolation - BSTRP ...............499 |Weighted Least Squares Piecewise Polynomial Fitting - | BSLSQ ...............................................501 |Least Squares Piecewise Polynomial Fitting with | Equality and Inequality Constraints - BFIT ..........503
Surface Fitting over Rectangular Grids
|Bicubic Splines and Bisplines under Tension ..............505 |Weighted Least Squares Bicubic Spline Fitting - SPFIT2 ...507 |Evaluation and Differentiation of Bicubic Splines - | CSURF, CSURF1, CSRF, CSRF2 ..........................509 Bispline under Tension Surface Interpolation - SURF ......513 Bispline under Tension Evaluation - SURF2, NSURF2 ........515 |Bivariate B-Spline Piecewise Polynomial Interpolation - | BSTRP2 ..............................................517 |Bivariate B-Spline Piecewise Polynomial Least Squares | Fitting - BSLSQ2 ....................................519 |Evaluation and Differentiation of Bivariate Piecewise | Polynomials from their B-Spline Representation - | BVAL2................................................521
Surface Fitting over Arbitrarily Positioned Data Points
|Surface Interpolation for Arbitrarily Positioned | Data Points - TRMESH, GRADG, GRADL, SFVAL, SFVAL2 ...523
Manifold Fitting
Weighted Least Squares Fitting with Polynomials of n Variables - MFIT, DMFIT, MEVAL, DMEVAL .............527
Numerical Integration
|Evaluation of Integrals over Finite Intervals - | QAGS, QXGS, QSUBA, DQAGS, DQXGS .....................531 Evaluation of Integrals over Infinite Intervals - QAGI, DQAGI .........................................539 Evaluation of Double Integrals over Triangles Q CUBTRI ...543
Integral Equations
Solution of Fredholm Integral Equations of the Second Kind - IESLV .......................................545
Ordinary Differential Equations/Initial Value Problems
|The Initial Value Solvers - Introductory Comments ........549 Adaptive Adams Solution of Nonstiff Differential Equations - ODE .....................................551 |Adaptive Block RKF Solution of Nonstiff Differential Equations - BRKF45 ..................................555 Adaptive RFK Solution of Nonstiff Differential Equations - RFK45 ..................................559 Adaptive RFK Solution of Nonstiff Differebtial Equations with Global Error Estimation - GERK .................563 Adaptive Solution of Stiff Differential Equations - SFODE, SFODE1 .......................................567 Fourth-Order Runge-Kutta - RK ............................571 Eighth-Order Runge-Kutta - RK8 ...........................573
Partial Differential Equations
Separable Second-Order Elliptic Equations on Rectangular Domains - SEPDE ...................................575
Discrete Random Number Generation
|Uniform Random Selection of Values from a Finite Set of | Integers - URGET ....................................579
Continuous Random Number Generation
|Uniform Random Number Generator - URNG, DURNG.............581 |Generating Points Uniformly in a Square - URNG2, DURNG2 ..583 |Generating Points Uniformly in a Circle - RCIR, DRCIR ....585 |Normal Random Number Generator - RNOR, DRNOR, | NRNG, DNRNG .........................................587 |Multivariate Normal Random Vector Generator - | NRVG, DNRVG, NRVG1, DNRVG1 ..........................589 |Exponential Random Number Generator - RANEXP, DRNEXP .....593 |Gamma Random Number Generator and the Chi-Square | Distribution - RGAM, DRGAM ..........................595 |Beta Random Number Generator - RBETA, DRBETA .............597 |F-Distribution Random Number Generator - FRAN, DFRAN .....599 |Student t-Distribution Random Number Generator - | TRAN, DTRAN .........................................601 |First Order Markov Random Number Generator - RMK1,DRMK1 ..603
Special Functions Mathematical LibraryGNU MP ( C# Wrapper) <(--- arbitrary precisiion library, LGPL Edited by user 30 May 2014 02:28:27(UTC)
| Reason: Not specified |