www.pudn.com > Lapackpp1_1a.zip > blas++.h
// LAPACK++ (V. 1.1)
#ifndef _BLAS_PP_H_
#define _BLAS_PP_H_
// requires
//
#include "laexcp.h"
#include "blas1++.h"
#include "blas2++.h"
#include "blas3++.h"
double abs(double);
//-------------------------------------
// Vector/Vector operators
//-------------------------------------
#ifdef _LA_VECTOR_DOUBLE_H_
inline LaVectorDouble operator*(const LaVectorDouble &x, double a)
{
int N = x.size();
LaVectorDouble t(N);
for (int i=0; i max) max=R(i);
return max;
}
#endif
#ifdef _LA_SYMM_MAT_DOUBLE_H_
inline double Norm_Inf(const LaSymmMatDouble &S)
{
integer N = S.size(0); // square matrix
// slow version
LaVectorDouble R(N);
integer i;
integer j;
for (i=0; i max) max=R(i);
return max;
}
#endif
#ifdef _LA_SPD_MAT_DOUBLE_H_
inline double Norm_Inf(const LaSpdMatDouble &S)
{
integer N = S.size(0); //SPD matrices are square
// slow version
LaVectorDouble R(N);
integer i;
integer j;
for (i=0; i max) max=R(i);
return max;
}
#endif
#ifdef _LA_SYMM_TRIDIAG_MAT_DOUBLE_H_
inline double Norm_Inf(const LaSymmTridiagMatDouble &S)
{
integer N = S.size(); // S is square
LaVectorDouble R(N);
R(0) = abs(S(0,0)) + abs(S(0,1));
for (integer i=1; i