• Main Page
  • Related Pages
  • Classes
  • Files
  • File List
  • File Members

MatrixTools.hh

Go to the documentation of this file.
00001 #ifndef _MATRIX_TOOLS_H_
00002 #define _MATRIX_TOOLS_H_
00003 
00004 #include <fstream.h>
00005 #include "ocsTools.hh"
00006 
00007 // Written by Ron Holzloehner. All Matrices are assumed to be square.
00008 
00009 
00011 
00012 void CopyMatrix(double ** LHS_Matrix, double ** RHS_Matrix, int dim);
00013 
00016 
00017 void DenseMatrixProduct(double **A, double **B, double **R,
00018                         bool Transpose_B, bool R_is_symmetric, int dim);
00019 
00020 
00023 
00024 void DenseMatrixSimilarityProduct(double **A, double **B, double **R,
00025                                   double ** Work, bool Transpose_A, 
00026                                   bool R_is_symmetric,int dim);
00027 
00029 
00030 void DenseMatrixScale(double **A, int dim, double scale);
00031 
00034  
00035 void CopyLowerToUpperHalf(double **A, int dim);
00036 
00038 
00039 void SymmetrizeMatrix(double **A, int dim);
00040 
00042 
00043 void TransposeMatrix(double **A, int dim);
00044 
00046 
00047 void ZeroMatrix(double **A, int dim);
00048 
00050 
00051 void DenseMatrixFilter(double **A, int dim, double *filter);
00052 
00054 
00055 void WriteMatrix(double **A, int dim, ofstream *F, double scaler);
00056 
00059 
00060 void ReadMatrix(double **A, int dim, ifstream *F, double scaling);
00061 
00064 
00065 void DenseMatrixVectorProduct(double * Out, double **A, double * In, int dim);
00066 
00067 
00070 
00071 void DenseVectorMatrixProduct(double *Out, double *In, double **A, int dim);
00072 
00074 
00075 void AddToPrincipalDiag(double **A, int dim, double add);
00076 
00079 
00080 void AddVectorToPrincipalDiag(double **A, double *V, 
00081                               double ScalarMultiple,int dim);
00082 
00086 
00087 double ScalarProductNormalized(cplx *aa, cplx *bb, int len);
00088 
00092 
00093 double VectorAngle(cplx *aa, cplx *bb, int len);
00094 
00103 
00104 
00105 void SchmidtOrthogonalizer(cplx **vec, int num, int len,
00106                            double *alpha);
00107 
00108 void SchmidtOrthogonalizer(cplx **vec, int num, int len, 
00109                            double *alpha, int k1);
00110 
00111 
00114 
00115 
00116 double InfNormMatrix(double **A,int dim);
00117 
00120 
00121 double OneNormMatrix(double **A,int dim);
00122 
00124 
00125 double InnerProduct(double * V, double *W, int Length);
00126 
00127 #endif // _MATRIX_TOOLS_H_
00128 
00129 
00130 
00131 
00132 
00133 

Generated on Fri Jul 2 2010 12:57:46 for OCS by  doxygen 1.7.1