Article View: sci.math.num-analysis
Article #1057newmat07: a matrix package in C++
From: Robert Davies
Date: Sun, 24 Jan 1993 09:33
Date: Sun, 24 Jan 1993 09:33
52 lines
2645 bytes
2645 bytes
Newmat07 I have released a new version of my matrix package in C++. This version is called newmat07. This is largely a "maintenance" upgrade from newmat06. You should upgrade. There are some comments on its use with Gnu g++ at the end of this note. The package supports classes Matrix, UpperTriangularMatrix, LowerTriangularMatrix, DiagonalMatrix, SymmetricMatrix, BandMatrix, UpperBandMatrix, LowerBandMatrix, SymmetricBandMatrix, RowVector, ColumnVector. Only one element type (float or double) is supported. The package includes the operations *, +, -, inverse, transpose, conversion between types, submatrix, determinant, Cholesky decomposition, Householder triangularisation, singular value decomposition, symmetric eigenvalue analysis, fast Fourier transform, sort, print, an interface to "Numerical Recipes in C" programs, and an emulation of exceptions. It is suitable for matrices in the size range 15 by 15 up to the maximum size that can conveniently be stored in a single block of memory. It can be used with smaller matrices, but becomes less efficient. The package works with AT&T C++ (versions 2.1 and 3), Gnu G++ (version 2.2), Borland C++ (version 3.1), Microsoft C++ (7.0), and mostly with Zortech (version 3.04). It is available on Simtel20 (192.88.110.20) in the pd1:<msdos.cplusplus> directory in .zip format, and on the archives of comp.sources.misc, volume 34 issues 107 to 114 (shar format). Look for it on wuarchive.wustl.edu (128.252.135.4). It is also on Compuserve in the Borland forum. The package works under Gnu G++, version 2.2.2. There are a couple of problems under the 2.3.x series. There is an inline function Rectangular defined as part of class MatrixType in file newmat.h. Gnu 2.3.x is unable to compile this inline. This leads to an erroneous compilation in 2.3.1 and 2.3.2 and lots of warning messages in 2.3.3. The solution is to move the body of the function to one of the cxx files. The ReturnMatrix code does not work with versions 2.3.1 and 2.3.2. As a result Cholesky also does not work. There is a work-around, but I would really encourage you to upgrade to 2.3.3. Robert (robertd@kauri.vuw.ac.nz)
Technical Details
Message-ID:
<C1CqJB.G7F@comp.vuw.ac.nz>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!comp.vuw.ac.nz!kauri.vuw.ac.nz!robertdShow Full Headers
Complete Article Headers
Newsgroups: sci.math.num-analysis,comp.lang.c++ Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!comp.vuw.ac.nz!kauri.vuw.ac.nz!robertd From: robertd@kauri.vuw.ac.nz (Robert Davies) Subject: newmat07: a matrix package in C++ Nntp-Posting-Host: kauri.vuw.ac.nz Message-ID: <C1CqJB.G7F@comp.vuw.ac.nz> Organization: Victoria University of Wellington Sender: news@comp.vuw.ac.nz (News Admin) Date: Sun, 24 Jan 1993 09:33:10 GMT Lines: 53