CPPLapack
 All Classes Files Functions Variables Friends
Functions
zgematrix_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 zgematrix_small< m, n > &A)
template<long m, long n>
zgematrix_small< n, m > t (const zgematrix_small< m, n > &A)
template<long m, long n>
zgematrix_small< m, n > & operator+= (zgematrix_small< m, n > &A, const zgematrix_small< m, n > &B)
template<long m, long n>
zgematrix_small< m, n > & operator-= (zgematrix_small< m, n > &A, const zgematrix_small< m, n > &B)
template<long m, long l, long n>
zgematrix_small< m, n > & operator*= (zgematrix_small< m, l > &A, const zgematrix_small< l, n > &B)
template<long m, long n>
zgematrix_small< m, n > & operator*= (zgematrix_small< m, n > &A, const double &d)
template<long m, long n>
zgematrix_small< m, n > & operator*= (zgematrix_small< m, n > &A, const comple &d)
template<long m, long n>
zgematrix_small< m, n > & operator/= (zgematrix_small< m, n > &A, const double &d)
template<long m, long n>
zgematrix_small< m, n > & operator/= (zgematrix_small< m, n > &A, const comple &d)
template<long m, long n>
const zgematrix_small< m, n > & operator+ (const zgematrix_small< m, n > &A)
template<long m, long n>
zgematrix_small< m, n > operator- (const zgematrix_small< m, n > &A)
template<long m, long n>
zgematrix_small< m, n > operator+ (const zgematrix_small< m, n > &A, const zgematrix_small< m, n > &B)
template<long n>
zgematrix_small< n, n > operator+ (const zgematrix_small< n, n > &A, const zhematrix_small< n > &B)
template<long m, long n>
zgematrix_small< m, n > operator- (const zgematrix_small< m, n > &A, const zgematrix_small< m, n > &B)
template<long n>
zgematrix_small< n, n > operator- (const zgematrix_small< n, n > &A, const zhematrix_small< n > &B)
template<long m, long n>
zcovector_small< m > operator* (const zgematrix_small< m, n > &A, const zcovector_small< n > &B)
template<long m, long l, long n>
zgematrix_small< m, n > operator* (const zgematrix_small< m, l > &A, const zgematrix_small< l, n > &B)
template<long m, long n>
zgematrix_small< m, n > operator* (const zgematrix_small< m, n > &A, const zhematrix_small< n > &B)
template<long m, long n>
zgematrix_small< m, n > operator* (const zgematrix_small< m, n > &A, const double &v)
template<long m, long n>
zgematrix_small< m, n > operator* (const zgematrix_small< m, n > &A, const comple &v)
template<long m, long n>
zgematrix_small< m, n > operator/ (const zgematrix_small< m, n > &A, const double &v)
template<long m, long n>
zgematrix_small< m, n > operator/ (const zgematrix_small< m, n > &A, const comple &v)

Function Documentation

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

Definition at line 47 of file zgematrix_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>
zgematrix_small<n,m> t ( const zgematrix_small< m, n > &  A) [inline]

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

References i().

{VERBOSE_REPORT;
  zgematrix_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>
zgematrix_small<m,n>& operator+= ( zgematrix_small< m, n > &  A,
const zgematrix_small< m, n > &  B 
) [inline]

Definition at line 209 of file zgematrix_small-functions.hpp.

References zgematrix_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>
zgematrix_small<m,n>& operator-= ( zgematrix_small< m, n > &  A,
const zgematrix_small< m, n > &  B 
) [inline]

Definition at line 220 of file zgematrix_small-functions.hpp.

References zgematrix_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>
zgematrix_small<m,n>& operator*= ( zgematrix_small< m, l > &  A,
const zgematrix_small< l, n > &  B 
) [inline]

Definition at line 231 of file zgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zgematrix_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>
zgematrix_small<m,n>& operator*= ( zgematrix_small< m, n > &  A,
const double &  d 
) [inline]

Definition at line 247 of file zgematrix_small-functions.hpp.

References zgematrix_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>
zgematrix_small<m,n>& operator*= ( zgematrix_small< m, n > &  A,
const comple &  d 
) [inline]

Definition at line 258 of file zgematrix_small-functions.hpp.

References zgematrix_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>
zgematrix_small<m,n>& operator/= ( zgematrix_small< m, n > &  A,
const double &  d 
) [inline]

Definition at line 269 of file zgematrix_small-functions.hpp.

References zgematrix_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>
zgematrix_small<m,n>& operator/= ( zgematrix_small< m, n > &  A,
const comple &  d 
) [inline]

Definition at line 279 of file zgematrix_small-functions.hpp.

References zgematrix_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 zgematrix_small<m,n>& operator+ ( const zgematrix_small< m, n > &  A) [inline]

unary

Definition at line 294 of file zgematrix_small-functions.hpp.

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

unary

Definition at line 302 of file zgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zgematrix_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>
zgematrix_small<m,n> operator+ ( const zgematrix_small< m, n > &  A,
const zgematrix_small< m, n > &  B 
) [inline]

Definition at line 320 of file zgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zgematrix_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>
zgematrix_small<n,n> operator+ ( const zgematrix_small< n, n > &  A,
const zhematrix_small< n > &  B 
) [inline]

Definition at line 334 of file zgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zgematrix_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>
zgematrix_small<m,n> operator- ( const zgematrix_small< m, n > &  A,
const zgematrix_small< m, n > &  B 
) [inline]

Definition at line 351 of file zgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zgematrix_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>
zgematrix_small<n,n> operator- ( const zgematrix_small< n, n > &  A,
const zhematrix_small< n > &  B 
) [inline]

Definition at line 365 of file zgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zgematrix_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>
zcovector_small<m> operator* ( const zgematrix_small< m, n > &  A,
const zcovector_small< n > &  B 
) [inline]

Definition at line 382 of file zgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zcovector_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>
zgematrix_small<m,n> operator* ( const zgematrix_small< m, l > &  A,
const zgematrix_small< l, n > &  B 
) [inline]

Definition at line 396 of file zgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zgematrix_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>
zgematrix_small<m,n> operator* ( const zgematrix_small< m, n > &  A,
const zhematrix_small< n > &  B 
) [inline]

Definition at line 412 of file zgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zgematrix_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>
zgematrix_small<m,n> operator* ( const zgematrix_small< m, n > &  A,
const double &  v 
) [inline]

Definition at line 431 of file zgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zgematrix_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>
zgematrix_small<m,n> operator* ( const zgematrix_small< m, n > &  A,
const comple &  v 
) [inline]

Definition at line 445 of file zgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zgematrix_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>
zgematrix_small<m,n> operator/ ( const zgematrix_small< m, n > &  A,
const double &  v 
) [inline]

Definition at line 459 of file zgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zgematrix_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>
zgematrix_small<m,n> operator/ ( const zgematrix_small< m, n > &  A,
const comple &  v 
) [inline]

Definition at line 473 of file zgematrix_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zgematrix_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