CPPLapack
 All Classes Files Functions Variables Friends
Functions
dgematrix_small-functions.hpp File Reference

Go to the source code of this file.

Functions

template<long m, long n>
std::ostream & operator<< (std::ostream &s, const dgematrix_small< m, n > &A)
template<long m, long n>
dgematrix_small< n, m > t (const dgematrix_small< m, n > &A)
template<long m, long n>
dgematrix_small< m, n > & operator+= (dgematrix_small< m, n > &A, const dgematrix_small< m, n > &B)
template<long m, long n>
dgematrix_small< m, n > & operator-= (dgematrix_small< m, n > &A, const dgematrix_small< m, n > &B)
template<long m, long l, long n>
dgematrix_small< m, n > & operator*= (dgematrix_small< m, l > &A, const dgematrix_small< l, n > &B)
template<long m, long n>
dgematrix_small< m, n > & operator*= (dgematrix_small< m, n > &A, const double &d)
template<long m, long n>
dgematrix_small< m, n > & operator/= (dgematrix_small< m, n > &A, const double &d)
template<long m, long n>
const dgematrix_small< m, n > & operator+ (const dgematrix_small< m, n > &A)
template<long m, long n>
dgematrix_small< m, n > operator- (const dgematrix_small< m, n > &A)
template<long m, long n>
dgematrix_small< m, n > operator+ (const dgematrix_small< m, n > &A, const dgematrix_small< m, n > &B)
template<long n>
dgematrix_small< n, n > operator+ (const dgematrix_small< n, n > &A, const dsymatrix_small< n > &B)
template<long m, long n>
dgematrix_small< m, n > operator- (const dgematrix_small< m, n > &A, const dgematrix_small< m, n > &B)
template<long n>
dgematrix_small< n, n > operator- (const dgematrix_small< n, n > &A, const dsymatrix_small< n > &B)
template<long m, long n>
dcovector_small< m > operator* (const dgematrix_small< m, n > &A, const dcovector_small< n > &B)
template<long m, long l, long n>
dgematrix_small< m, n > operator* (const dgematrix_small< m, l > &A, const dgematrix_small< l, n > &B)
template<long m, long n>
dgematrix_small< m, n > operator* (const dgematrix_small< m, n > &A, const dsymatrix_small< n > &B)
template<long m, long n>
dgematrix_small< m, n > operator* (const dgematrix_small< m, n > &A, const double &v)
template<long m, long n>
dgematrix_small< m, n > operator/ (const dgematrix_small< m, n > &A, const double &v)

Function Documentation

template<long m, long n>
std::ostream& operator<< ( std::ostream &  s,
const dgematrix_small< m, n > &  A 
) [inline]

Definition at line 47 of file dgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  s << std::setiosflags(std::ios::showpos);
  for(long i=0; i<m; i++){
    for(long j=0; j<n; j++){
      s << " " << A(i,j);
    }
    s << std::endl;
  }
  return s;
}
template<long m, long n>
dgematrix_small<n,m> t ( const dgematrix_small< m, n > &  A) [inline]

Definition at line 140 of file dgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  dgematrix_small<n,m> X;
  for(long i=0; i<m; i++){
    for(long j=0; j<n; j++){
      X(j,i) =A(i,j);
    }
  }
  return X;
}
template<long m, long n>
dgematrix_small<m,n>& operator+= ( dgematrix_small< m, n > &  A,
const dgematrix_small< m, n > &  B 
) [inline]

Definition at line 201 of file dgematrix_small-functions.hpp.

References dgematrix_small< m, n >::array.

{VERBOSE_REPORT;
  for(long k=0; k<m*n; k++){
    A.array[k] +=B.array[k];
  }
  return A;
}
template<long m, long n>
dgematrix_small<m,n>& operator-= ( dgematrix_small< m, n > &  A,
const dgematrix_small< m, n > &  B 
) [inline]

Definition at line 212 of file dgematrix_small-functions.hpp.

References dgematrix_small< m, n >::array.

{VERBOSE_REPORT;
  for(long k=0; k<m*n; k++){
    A.array[k] -=B.array[k];
  }
  return A;
}
template<long m, long l, long n>
dgematrix_small<m,n>& operator*= ( dgematrix_small< m, l > &  A,
const dgematrix_small< l, n > &  B 
) [inline]

Definition at line 223 of file dgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  dgematrix_small<m,n> X(0.);
  for(long i=0; i<m; i++){
    for(long j=0; j<n; j++){
      for(long k=0; k<l; k++){
        X(i,j) += A(i,k)*B(k,j);
      }
    }
  }
  return X;
}
template<long m, long n>
dgematrix_small<m,n>& operator*= ( dgematrix_small< m, n > &  A,
const double &  d 
) [inline]

Definition at line 239 of file dgematrix_small-functions.hpp.

References dgematrix_small< m, n >::array.

{VERBOSE_REPORT;
  for(long k=0; k<m*n; k++){
    A.array[k] *=d;
  }
  return A;
}
template<long m, long n>
dgematrix_small<m,n>& operator/= ( dgematrix_small< m, n > &  A,
const double &  d 
) [inline]

Definition at line 250 of file dgematrix_small-functions.hpp.

References dgematrix_small< m, n >::array.

{VERBOSE_REPORT;
  for(long k=0; k<m*n; k++){
    A.array[k] /=d;
  }
  return A;
}
template<long m, long n>
const dgematrix_small<m,n>& operator+ ( const dgematrix_small< m, n > &  A) [inline]

unary

Definition at line 265 of file dgematrix_small-functions.hpp.

{VERBOSE_REPORT;
  return A;
}
template<long m, long n>
dgematrix_small<m,n> operator- ( const dgematrix_small< m, n > &  A) [inline]

unary

Definition at line 273 of file dgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  dgematrix_small<m,n> X;
  for(long i=0; i<m; i++){
    for(long j=0; j<n; j++){
      X(i,j) =-A(i,j);
    }
  }
  return X;
}
template<long m, long n>
dgematrix_small<m,n> operator+ ( const dgematrix_small< m, n > &  A,
const dgematrix_small< m, n > &  B 
) [inline]

Definition at line 291 of file dgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  dgematrix_small<m,n> C;
  for(int i=0; i<m; i++){
    for(int j=0; j<n; j++){
      C(i,j) =A(i,j)+B(i,j);
    }
  }
  return C;
}
template<long n>
dgematrix_small<n,n> operator+ ( const dgematrix_small< n, n > &  A,
const dsymatrix_small< n > &  B 
) [inline]

Definition at line 305 of file dgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  dgematrix_small<n,n> X;
  for(long i=0; i<n; i++){
    for(long j=0; j<i; j++){
      X(i,j) =A(i,j)+B(i,j);
    }
    for(long j=i; j<n; j++){
      X(i,j) =A(i,j)+B(j,i);
    }
  }
  return X;
}
template<long m, long n>
dgematrix_small<m,n> operator- ( const dgematrix_small< m, n > &  A,
const dgematrix_small< m, n > &  B 
) [inline]

Definition at line 322 of file dgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  dgematrix_small<m,n> C;
  for(int i=0; i<m; i++){
    for(int j=0; j<n; j++){
      C(i,j)=A(i,j)-B(i,j);
    }
  }
  return C;
}
template<long n>
dgematrix_small<n,n> operator- ( const dgematrix_small< n, n > &  A,
const dsymatrix_small< n > &  B 
) [inline]

Definition at line 336 of file dgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  dgematrix_small<n,n> X;
  for(long i=0; i<n; i++){
    for(long j=0;   j<=i; j++){ X(i,j)=A(i,j)-B(i,j); }
    for(long j=i+1; j<n;  j++){ X(i,j)=A(i,j)-B(j,i); }
  }
  return X;
}
template<long m, long n>
dcovector_small<m> operator* ( const dgematrix_small< m, n > &  A,
const dcovector_small< n > &  B 
) [inline]

Definition at line 349 of file dgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  dcovector_small<m> C(0.);
  for(long i=0; i<m; i++){
    for(long j=0; j<n; j++){
      C(i) +=A(i,j)*B(j);
    }
  }
  return C;
}
template<long m, long l, long n>
dgematrix_small<m,n> operator* ( const dgematrix_small< m, l > &  A,
const dgematrix_small< l, n > &  B 
) [inline]

Definition at line 363 of file dgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  dgematrix_small<m,n> C(0.);
  for(int i=0; i<m; i++){
    for(int j=0; j<n; j++){
      for(int k=0; k<l; k++){
        C(i,j) +=A(i,k)*B(k,j);
      }
    }
  }
  return C;
}
template<long m, long n>
dgematrix_small<m,n> operator* ( const dgematrix_small< m, n > &  A,
const dsymatrix_small< n > &  B 
) [inline]

Definition at line 379 of file dgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  dgematrix_small<m,n> X(0.);
  for(long i=0; i<m; i++){
    for(long j=0; j<n; j++){
      for(long k=0; k<j; k++){ X(i,j)+=A(i,k)*B(j,k); }
      for(long k=j; k<n; k++){ X(i,j)+=A(i,k)*B(k,j); }
    }
  }
  return X;
}
template<long m, long n>
dgematrix_small<m,n> operator* ( const dgematrix_small< m, n > &  A,
const double &  v 
) [inline]

Definition at line 394 of file dgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  dgematrix_small<m,n> C;
  for(long i=0; i<m; i++){
    for(long j=0; j<n; j++){
      C(i,j) =A(i,j)*v;
    }
  }
  return C;
}
template<long m, long n>
dgematrix_small<m,n> operator/ ( const dgematrix_small< m, n > &  A,
const double &  v 
) [inline]

Definition at line 408 of file dgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  dgematrix_small<m,n> C;
  for(long i=0; i<m; i++){
    for(long j=0; j<n; j++){
      C(i,j) =A(i,j)/v;
    }
  }
  return C;
}
 All Classes Files Functions Variables Friends