nric.html
来自「矩阵算法库newmat10.tar.gz的帮助文件」· HTML 代码 · 共 53 行
HTML
53 行
<HTML><HEAD><TITLE>Newmat09 - Numerical Recipes in C</TITLE></HEAD><BODY><H2>Interface to Numerical Recipes in C</H2><A HREF="except.html"> next</A> - <A HREF="except.html"> skip</A> - <A HREF="refer.html"> up</A> - <A HREF="index.html"> start</A><P>This package can be used with the vectors and matrices defined in<I>Numerical Recipes in C</I>. You need to edit the routines in NumericalRecipes so that the elements are of the same type as used in thispackage. Eg replace float by double, vector by dvector and matrix bydmatrix, etc. You may need to edit the function definitions to usethe version acceptable to your compiler (if you are using the first editionof NRIC). You may need to enclose the code fromNumerical Recipes in <TT>extern "C" { ... }</TT>. You will also need to includethe matrix and vector utility routines.<P>Then any vector in Numerical Recipes with subscripts starting from 1 ina function call can be accessed by a RowVector, ColumnVector orDiagonalMatrix in the present package. Similarly any matrix withsubscripts starting from 1 can be accessed by an nricMatrix in thepresent package. The class nricMatrix is derived from Matrix and can beused in place of Matrix. In each case, if you wish to refer to aRowVector, ColumnVector, DiagonalMatrix or nricMatrix X in an functionfrom Numerical Recipes, use <TT>X.nric()</TT> in the function call.<P>Numerical Recipes cannot change the dimensions of a matrix or vector. Somatrices or vectors must be correctly dimensioned before a NumericalRecipes routine is called.<P>For example<PRE> SymmetricMatrix B(44); ..... // load values into B nricMatrix BX = B; // copy values to an nricMatrix DiagonalMatrix D(44); // Matrices for output nricMatrix V(44,44); // correctly dimensioned int nrot; jacobi(BX.nric(),44,D.nric(),V.nric(),&nrot); // jacobi from NRIC cout << D; // print eigenvalues</PRE><P><A HREF="except.html"> next</A> - <A HREF="except.html"> skip</A> - <A HREF="refer.html"> up</A> - <A HREF="index.html"> start</A><P></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?