*** empty log message ***

This commit is contained in:
jiri
2005-01-31 23:08:03 +00:00
parent 46d841aabf
commit 2af0920423
12 changed files with 150 additions and 31 deletions

19
smat.cc
View File

@@ -34,7 +34,7 @@ NRSMat<T>::NRSMat(const NRMat<T> &rhs)
// assing to diagonal
// assign to diagonal
template <typename T>
NRSMat<T> & NRSMat<T>::operator=(const T &a)
{
@@ -43,6 +43,17 @@ NRSMat<T> & NRSMat<T>::operator=(const T &a)
return *this;
}
//get diagonal
template <typename T>
void NRSMat<T>::diagonalof(NRVec<T> &r) const
{
#ifdef DEBUG
if(r.size()!=nn) laerror("incompatible vector in diagonalof()");
#endif
for (int i=0; i<nn; i++) r[i] = v[i*(i+1)/2+i];
}
// unary minus
template <typename T>
const NRSMat<T> NRSMat<T>::operator-() const
@@ -71,7 +82,7 @@ void NRSMat<T>::fprintf(FILE *file, const char *format, const int modulo) const
}
// read matrix from the file with specific format
template <class T>
template <typename T>
void NRSMat<T>::fscanf(FILE *f, const char *format)
{
int n, m;
@@ -268,7 +279,7 @@ void NRSMat< complex<double> >::axpy(const complex<double> alpha,
}
export template <class T>
export template <typename T>
ostream& operator<<(ostream &s, const NRSMat<T> &x)
{
int i,j,n;
@@ -282,7 +293,7 @@ ostream& operator<<(ostream &s, const NRSMat<T> &x)
}
export template <class T>
export template <typename T>
istream& operator>>(istream &s, NRSMat<T> &x)
{
int i,j,n,m;