⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nm10.htm

📁 matrix library for linux and windos
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//SoftQuad Software//DTD HoTMetaL PRO 5.0::19981217::extensions to HTML 4.0//EN" "hmpro5.dtd"> <HTML> <HEAD><meta http-equiv="Content-Language" content="en-nz"><meta name="GENERATOR" content="Microsoft FrontPage 6.0"><meta name="ProgId" content="FrontPage.Editor.Document"><TITLE>Newmat10 documentation</TITLE><link rel="stylesheet" type="text/css" href="rbd.css"><link REL="SHORTCUT ICON" HREF="favicon.ico"></HEAD><BODY><H1><A NAME="top"></A>Documentation for newmat10D, a matrix library in C++</H1><P CLASS="small"><A HREF="#intro">next</A> - <A HREF="#top">skip</A> -<A HREF="ol_doc.htm">up</A> - <A HREF="#top">start</A><BR><A HREF="ol_doc.htm">return to online documentation page</A></P><P><B>Copyright (C) 2006: R B Davies</B></P><P><i>2 April, 2006</i></P><TABLE WIDTH=100%><TR><TD VALIGN="TOP" ALIGN="LEFT" WIDTH="50%"> <A HREF="#intro">1.Introduction</A><BR><A HREF="#starting">2. Getting started</A><BR><A HREF="#refer">3. Reference manual</A></TD><TD VALIGN="TOP" ALIGN="LEFT" WIDTH="50%"> <A HREF="#error">4.Error messages</A><BR><A HREF="#design">5. Design of the library</A></TD></TR></TABLE><P>This is the <I>how to use</I> documentation for <I>newmat</I> plus somebackground information on its design. </P><P>There is additional support material on my <A HREF="#where">web site</A>. </P><P CLASS="small">Navigation:&nbsp; This page is arranged in sections,sub-sections and sub-sub-sections; four cross-references are given at the topof these. <I>Next</I> takes you through the sections, sub-sections andsub-sub-sections in order. <I>Skip</I> goes to the next section, sub-section orsub-sub-section at the same level in the hierarchy as the section, sub-sectionor sub-sub-section that you are currently reading. <I>Up</I> takes you up onelevel in the hierarchy and <I>start</I> gets you back here.</P><P><B>Please read the sections on <A HREF="#custom">customising</A> and<a href="#compiler">compilers</a> beforeattempting to compile <i>newmat</i>.</B> </P><H2><A NAME="intro"></A>1. Introduction</H2><P CLASS="small"><A HREF="#use">next</A> - <A HREF="#starting">skip</A> -<A HREF="#top">up</A> - <A HREF="#top">start</A></P><TABLE WIDTH=100%><TR><TD VALIGN="TOP" ALIGN="LEFT" WIDTH="50%"> <A HREF="#use">1.1Conditions of use</A><BR><A HREF="#descript">1.2 Description</A><BR><A HREF="#which">1.3 Is this the library for you?</A><BR><A HREF="#other">1.4 Other matrix libraries</A></TD><TD VALIGN="TOP" ALIGN="LEFT" WIDTH="50%"> <A HREF="#where">1.5Where to find this library</A><BR><A HREF="#author">1.6 How to contact the author</A><BR><A HREF="#changes">1.7 Change history</A><BR><A HREF="#sources">1.8 References</A></TD></TR></TABLE><H2><A NAME="use"></A>1.1 Conditions of use</H2><P CLASS="small"><A HREF="#descript">next</A> - <A HREF="#descript">skip</A> -<A HREF="#intro">up</A> - <A HREF="#top">start</A></P><hr><p>I place no restrictions on the use of <i>newmat</i> except that I take no liability for any problems that may arise from its use,distribution or other dealings with it.<p><p>You can use it in your commercial projects.<p><p>You can make and distribute modified or merged versions. You caninclude parts of it in your own software.<p><p>If you distribute modified or merged versions, please make it clearwhich parts are mine and which parts are modified.<p><p>For a substantially modified version, simply note that it is, inpart, derived from my software. A comment in the code will besufficient.<p><p>The software is provided &quot;as is&quot;, without warranty of any kind.<p><p>Please understand that there may still be bugs and errors. Use atyour own risk. I (Robert Davies) take no responsibility for any errorsor omissions in this package or for any misfortune that may befall youor others as a result of your use, distribution or other dealings with it.<HR><P>Please report bugs to me at <B>robert (at) statsresearch.co.nz</B> </P><P>When reporting a bug please tell me which C++ compiler you are using, andwhat version. Also give me details of your computer. And tell me which versionof <I>newmat</I> (e.g. newmat03 or newmat04) you are using. Note any changesyou have made to my code. If at all possible give me a piece of codeillustrating the bug. See the <A HREF="#problem">problem report form</A>. </P><P><I>Please do report bugs to me.</I> </P><H2><A NAME="descript"></A>1.2 General description</H2><P CLASS="small"><A HREF="#which">next</A> - <A HREF="#which">skip</A> -<A HREF="#intro">up</A> - <A HREF="#top">start</A></P><P>The package is intended for scientists and engineers who need to manipulatea variety of types of matrices using standard matrix operations. Emphasis is onthe kind of operations needed in statistical calculations such as leastsquares, linear equation solve and eigenvalues. </P><P>It supports matrix types </P><BLOCKQUOTE>  <TABLE WIDTH="80%" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0"><TR><TD>Matrix</TD><TD>rectangular matrix</TD></TR><TR><TD>nricMatrix</TD><TD>for use with <I>Numerical Recipes in C</I> programs</TD></TR><TR><TD>UpperTriangularMatrix</TD><TD>&nbsp;</TD></TR><TR><TD>LowerTriangularMatrix</TD><TD>&nbsp;</TD></TR><TR><TD>DiagonalMatrix</TD><TD>&nbsp;</TD></TR><TR><TD>SymmetricMatrix</TD><TD>&nbsp;</TD></TR><TR><TD>BandMatrix</TD><TD>&nbsp;</TD></TR><TR><TD>UpperBandMatrix</TD><TD>upper triangular band matrix</TD></TR><TR><TD>LowerBandMatrix</TD><TD>lower triangular band matrix</TD></TR><TR><TD>SymmetricBandMatrix</TD><TD>&nbsp;</TD></TR><TR><TD>RowVector</TD><TD>derived from Matrix</TD></TR><TR><TD>ColumnVector</TD><TD>derived from Matrix</TD></TR><TR><TD>IdentityMatrix</TD><TD>diagonal matrix, elements have same value</TD></TR></TABLE></BLOCKQUOTE><P>Only one element type (float or double) is supported. </P><P>The package includes the operations <TT>*</TT>, <TT>+</TT>, <TT>-</TT>,Kronecker product, Schur product, concatenation, inverse, transpose, conversion between types, submatrix,determinant, Cholesky decomposition, QR triangularisation, singular valuedecomposition, eigenvalues of a symmetric matrix, sorting, fast Fouriertransform, printing and an interface with <I>Numerical Recipes in C</I>. </P><P>It is intended for matrices in the range 10 x 10 to the maximum size yourmachine will accommodate in a single array. The number of elements in an arraycannot exceed the maximum size of an <I>int</I>. The package will work for verysmall matrices but becomes rather inefficient. Some of the factorisationfunctions are not (yet) optimised for paged memory and so become inefficientwhen used with very large matrices. </P><P>A <I>lazy evaluation</I> approach to evaluating matrix expressions is usedto improve efficiency and reduce the use of temporary storage. </P><P>I have tested versions of the package on variety of compilers and platformsincluding  Borland, Gnu, Microsoft, Sun and Watcom. For more detailssee the section on <A HREF="#compiler">compilers</A>. </P><H2><A NAME="which"></A>1.3 Is this the library foryou?</H2><P CLASS="small"><A HREF="#other">next</A> - <A HREF="#other">skip</A> -<A HREF="#intro">up</A> - <A HREF="#top">start</A></P><P>Do you</P><UL><LI>understand <TT>*</TT> to mean matrix multiply and not element by elementmultiply </LI><LI>need matrix operators such as <TT>*</TT> and <TT>+</TT> defined asoperators so you can write things like <TT> X = A * (B + C);</TT></LI><LI>need a variety of types of matrices (but not sparse)</LI><LI>need only one element type (float or double)</LI><LI>work with matrices in the range 10 x 10 up to what can be stored in memory </LI><LI>tolerate a moderately large but not huge package</LI><LI>need high quality but not necessarily the latest numerical methods. </LI></UL><P>Then <I>newmat</I> may be the right matrix library for you. </P><H2><A NAME="other"></A>1.4 Other matrix libraries</H2><P CLASS="small"><A HREF="#where">next</A> - <A HREF="#where">skip</A> -<A HREF="#intro">up</A> - <A HREF="#top">start</A></P><P>For details of other C++ matrix libraries look at<A HREF="http://www.robertnz.net/cpp_site.html">http://www.robertnz.net/cpp_site.html</A>.Look at the section <I>lists of libraries</I> which gives the locations ofseveral very comprehensive lists of matrix and other C++ libraries and at thesection <I>source code</I>. </P><H2><A NAME="where"></A>1.5 Where to find thislibrary</H2><P CLASS="small"><A HREF="#author">next</A> - <A HREF="#author">skip</A> -<A HREF="#intro">up</A> - <A HREF="#top">start</A> </P><UL><LI><a href="http://www.robertnz.net">http://www.robertnz.net</a></LI></UL><H2><A NAME="author"></A>1.6 How to contact theauthor</H2><P CLASS="small"><A HREF="#changes">next</A> - <A HREF="#changes">skip</A> -<A HREF="#intro">up</A> - <A HREF="#top">start</A></P><PRE>   Robert Davies   16 Gloucester Street   Wilton   Wellington   New Zealand   <I>email:</I> robert<b> at </b>statsresearch.co.nz</PRE><H2><A NAME="changes"></A>1.7 Change history</H2><P CLASS="small"><A HREF="#sources">next</A> - <A HREF="#sources">skip</A> -<A HREF="#intro">up</A> - <A HREF="#top">start</A></P><P><b>Newmat10D - April, 2006:</b></P><P class="small">Compatibility fix for Gnu G++ 4.1.</P><P><b>Newmat10C - March, 2006:</b></P><P class="small">Update conditions of use to be acceptable for Debian distribution, a few minor fixes; additional <i>make</i> files; update include.h, myexpect.h, myexcept.cpp, precisio.h. </P><P><b>Newmat10B - January, 2005:</b></P><P class="small">Fix compatibility problems with Gnu G++ 3.4 and Intel 8.1 compilers; update include.h, myexpect.h, myexcept.cpp, precisio.h.</P><P><b>Newmat10A - October, 2002:</b></P><P CLASS="small">Fix error in Kronecker product; fixes for Intel and GCC3 compilers.</P><P><B>Newmat10 - January, 2002:</B> </P><P CLASS="small">Improve compatibility with GCC, fix errors in FFT andGenericMatrix, update simulated exceptions, maxima, minima, determinant, dotproduct and Frobenius norm functions, update make files for CC and GCC, fasterFFT, <TT>A.ReSize(B)</TT>, fix pointer arithmetic, <TT>&lt;&lt;</TT> for loading data into rows, IdentityMatrix, Kronecker product, sort singular values.</P><P><B>Newmat09 - September, 1997:</B> </P><P CLASS="small">Operator <TT>==</TT>, <TT>!=</TT>, <TT>+=</TT>, <TT>-=</TT>,<TT>*=</TT>, <TT>/=</TT>, <TT>|=</TT>, <TT>&amp;=</TT>. Follow new rules for<I>for (int i; ... )</I> construct. Change Boolean, TRUE, FALSE to bool, true,false. Change ReDimension to ReSize. SubMatrix allows zero rows and columns.Scalar <TT>+</TT>, <TT>-</TT> or <TT>*</TT> matrix is OK. Simplify simulatedexceptions. Fix non-linear programs for AT&amp;T compilers. Dummy inequalityoperators. Improve internal row/column operations. Improve matrix LUdecomposition. Improve sort. Reverse function. IsSingular function. Fast trigtransforms. Namespace definitions. </P><P><B>Newmat08A - July, 1995:</B> </P><P CLASS="small">Fix error in SVD. </P><P><B>Newmat08 - January, 1995:</B> </P><P CLASS="small">Corrections to improve compatibility with Gnu, Watcom.Concatenation of matrices. Elementwise products. Option to use compilerssupporting exceptions. Correction to exception module to allow globaldeclarations of matrices. Fix problem with inverse of symmetric matrices. Fixdivide-by-zero problem in SVD. Include new QR routines. Sum function.Non-linear optimisation. GenericMatrices. </P><P><B>Newmat07 - January, 1993</B> </P><P CLASS="small">Minor corrections to improve compatibility with Zortech,Microsoft and Gnu. Correction to exception module. Additional FFT functions.Some minor increases in efficiency. Submatrices can now be used on RHS of =.Option for allowing C type subscripts. Method for loading short lists ofnumbers. </P><P><B>Newmat06 - December 1992:</B> </P><P CLASS="small">Added band matrices; 'real' changed to 'Real' (to avoidpotential conflict in complex class); Inject doesn't check for no loss ofinformation; fixes for AT&amp;T C++ version 3.0; real(A) becomes A.AsScalar();CopyToMatrix becomes AsMatrix, etc; .c() is no longer required (to be deletedin next version); option for version 2.1 or later. Suffix for include fileschanged to .h; BOOL changed to Boolean (BOOL doesn't work in g++ v 2.0);modifications to allow for compilers that destroy temporaries very quickly;(Gnu users - see the section of compilers). Added CleanUp,LinearEquationSolver, primitive version of exceptions. </P><P><B>Newmat05 - June 1992:</B> </P><P CLASS="small">For private release only </P><P><B>Newmat04 - December 1991:</B> </P><P CLASS="small">Fix problem with G++1.40, some extra documentation  </P><P><B>Newmat03 - November 1991:</B> </P><P CLASS="small">Col and Cols become Column and Columns. Added Sort, SVD,Jacobi, Eigenvalues, FFT, real conversion of 1x1 matrix, <I>Numerical Recipes

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -