Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# LA Namespace Reference

## Classes
class | Eigenvalues
| Computes eigenvalues and eigenvectors of a real (non-complex) matrix. More...
class | Exception
| Represents an exception of the LinAlg package. More...
class | LU
| Performs a LU-decomposition of a matrix. More...
class | Matrix
| Represents a nxm Matrix with entries of type double. More...
class | QR
class | Vector
## Functions
Matrix | operator+ (const Matrix &M1, const Matrix &M2)
| Adds to matrices.
Matrix | operator- (const Matrix &M1, const Matrix &M2)
| Subtracts to matrices.
Matrix | operator * (const Matrix &M1, const Matrix &M2)
| Multiplies to matrices.
Vector | operator * (const Matrix &M, const Vector &v)
| Multiplies a matrix with a vector.
Matrix | operator * (const Matrix &M, const double &s)
| Multiplies a matrix with a scalar.
Matrix | operator * (const double &s, const Matrix &M)
| Multiplies a matrix with a scalar.
Matrix | operator/ (const Matrix &M, const double &s)
| Divides a matrix by a scalar.
Matrix | operator/ (const Matrix &M1, const Matrix &M2)
| Divides a matrix by another matrix (same as multiplying with the inverse).
Matrix | transpose (const Matrix &M)
| Returns the transposition of a matrix.
Matrix | invert (const Matrix &M)
| Returns the inverse of a matrix.
Matrix | inv (const Matrix &M)
| Returns the inverse of a matrix.
double | det (const Matrix &M)
| Returns the determinant of a matrix.
std::ostream & | operator<< (std::ostream &out, const Matrix &M)
| Prints a user-readable representation of a matrix.
Out & | operator<< (Out &stream, const Matrix &M)
| Out operator for GT-streams.
In & | operator>> (In &stream, Matrix &M)
| In operator for GT-streams.
Vector | operator+ (const Vector &v1, const Vector &v2)
| Adds to vectors.
Vector | operator- (const Vector &v1, const Vector &v2)
| Subtracts to vectors.
Vector | operator * (const double &s, const Vector &v)
| Multiplies a vector with a scalar.
Vector | operator * (const Vector &v, const double &s)
| Multiplies a vector with a scalar.
Vector | operator/ (const Vector &v, const double &s)
| Divides a vector by a scalar.
double | operator * (const Vector &v1, const Vector &v2)
| Calculates the inner product of two vector.
std::ostream & | operator<< (std::ostream &out, const Vector &v)
| Prints a user-readable representation of the vector.
Out & | operator<< (Out &stream, const Vector &v)
| Out operator for GT-streams.
In & | operator>> (In &stream, Vector &v)
| In operator for GT-streams.

## Function Documentation

Matrix LA::operator+ | ( | const Matrix & | M1,
|  | const Matrix & | M2
| ) |

  | Adds to matrices. Parameters:
  M1 | First matrix.
  M2 | Second matrix.
Returns: M1 + M2. Definition at line 319 of file LA_Matrix.cpp.

Matrix LA::operator- | ( | const Matrix & | M1,
|  | const Matrix & | M2
| ) |

  | Subtracts to matrices. Parameters:
  M1 | First matrix.
  M2 | Second matrix.
Returns: M1 - M2. Definition at line 326 of file LA_Matrix.cpp.

Matrix LA::operator * | ( | const Matrix & | M1,
|  | const Matrix & | M2
| ) |

  | Multiplies to matrices. Parameters:
  M1 | First matrix.
  M2 | Second matrix.
Returns: M1*M2. Definition at line 333 of file LA_Matrix.cpp. References LA::Matrix::c, LA::Vector::content, LA::Matrix::content, and LA::Matrix::r.

Vector LA::operator * | ( | const Matrix & | M,
|  | const Vector & | v
| ) |

  | Multiplies a matrix with a vector. Parameters:
  M | A matrix.
  v | A vector.
Returns: M*v. Definition at line 353 of file LA_Matrix.cpp. References LA::Matrix::c, LA::Matrix::content, LA::Vector::content, LA::Vector::n, and LA::Matrix::r.

Matrix LA::operator * | ( | const Matrix & | M,
|  | const double & | s
| ) |

  | Multiplies a matrix with a scalar. Parameters:
  M | Matrix.
  s | Scalar.
Returns: M*s. Definition at line 369 of file LA_Matrix.cpp.

Matrix LA::operator * | ( | const double & | s,
|  | const Matrix & | M
| ) |

  | Multiplies a matrix with a scalar. Parameters:
  s | Scalar.
  M | Matrix.
Returns: s*M. Definition at line 376 of file LA_Matrix.cpp.

Matrix LA::operator/ | ( | const Matrix & | M,
|  | const double & | s
| ) |

  | Divides a matrix by a scalar. Parameters:
  M | Matrix.
  s | Scalar.
Returns: M/s. Definition at line 383 of file LA_Matrix.cpp.

Matrix LA::operator/ | ( | const Matrix & | M1,
|  | const Matrix & | M2
| ) |

  | Divides a matrix by another matrix (same as multiplying with the inverse). Parameters:
  M1 | First matrix.
  M2 | Second matrix.
Returns: M1/M2 (M1*inv(M2)) Definition at line 390 of file LA_Matrix.cpp. References invert().

Here is the call graph for this function:

Matrix LA::transpose | ( | const Matrix & | M | ) |

  | Returns the transposition of a matrix. Parameters:
  M | Matrix.
Returns: Transposition of matrix. Definition at line 395 of file LA_Matrix.cpp. References LA::Matrix::transpose().

Here is the call graph for this function:

Matrix LA::invert | ( | const Matrix & | M | ) |

  | Returns the inverse of a matrix. Parameters:
  M | Matrix.
Returns: Inverse of matrix. Definition at line 402 of file LA_Matrix.cpp. References LA::Matrix::invert(). Referenced by LA::Matrix::inverse(), operator/(), and LA::Matrix::operator/=().

Here is the call graph for this function:

Matrix LA::inv | ( | const Matrix & | M | ) |

  | Returns the inverse of a matrix. Parameters:
  M | Matrix.
Returns: Inverse of matrix. Definition at line 409 of file LA_Matrix.cpp. References LA::Matrix::invert().

Here is the call graph for this function:

double LA::det | ( | const Matrix & | M | ) |

  | Returns the determinant of a matrix. Parameters:
  M | Matrix.
Returns: Determinant of matrix. Definition at line 416 of file LA_Matrix.cpp. References LA::Matrix::det().

Here is the call graph for this function:

std::ostream & LA::operator<< | ( | std::ostream & | out,
|  | const Matrix & | M
| ) |

  | Prints a user-readable representation of a matrix. Parameters:
  out | An ostream.
  M | Matrix to output.
Returns: Reference to passed ostream. Definition at line 421 of file LA_Matrix.cpp. References LA::Matrix::columns(), out, and LA::Matrix::rows().

Here is the call graph for this function:

Out & LA::operator<< | ( | Out & | stream,
|  | const Matrix & | M
| ) |

  | Out operator for GT-streams. Parameters:
  stream | Out-stream.
  v | Vector to output.
Returns: Reference to passed Out-stream. Definition at line 435 of file LA_Matrix.cpp. References LA::Matrix::c, LA::Vector::content, LA::Matrix::content, and LA::Matrix::r.

In & LA::operator>> | ( | In & | stream,
|  | Matrix & | M
| ) |

  | In operator for GT-streams. Parameters:
  stream | In-stream.
  v | Vector to read to.
Returns: Reference to passed In-stream. Definition at line 445 of file LA_Matrix.cpp. References LA::Vector::content, LA::Matrix::content, and LA::Matrix::create().

Here is the call graph for this function:

Vector LA::operator+ | ( | const Vector & | v1,
|  | const Vector & | v2
| ) |

  | Adds to vectors. Parameters:
  v1 | First vector.
  v2 | Second vector.
Returns: v1 + v2. Definition at line 176 of file LA_Vector.cpp.

Vector LA::operator- | ( | const Vector & | v1,
|  | const Vector & | v2
| ) |

  | Subtracts to vectors. Parameters:
  v1 | First vector.
  v2 | Second vector.
Returns: v1 - v2. Definition at line 183 of file LA_Vector.cpp.

Vector LA::operator * | ( | const double & | s,
|  | const Vector & | v
| ) |

  | Multiplies a vector with a scalar. Parameters:
  s | Scalar.
  v | Vector.
Returns: s*v. Definition at line 190 of file LA_Vector.cpp.

Vector LA::operator * | ( | const Vector & | v,
|  | const double & | s
| ) |

  | Multiplies a vector with a scalar. Parameters:
  v | Vector.
  s | Scalar.
Returns: v*s. Definition at line 197 of file LA_Vector.cpp.

Vector LA::operator/ | ( | const Vector & | v,
|  | const double & | s
| ) |

  | Divides a vector by a scalar. Parameters:
  v | Vector.
  s | Scalar.
Returns: v/s. Definition at line 204 of file LA_Vector.cpp.

double LA::operator * | ( | const Vector & | v1,
|  | const Vector & | v2
| ) |

  | Calculates the inner product of two vector. Parameters:
  v1 | First vector.
  v2 | Second vector.
Returns: <v1, v2>. Definition at line 211 of file LA_Vector.cpp. References LA::Vector::content, and LA::Vector::n.

std::ostream & LA::operator<< | ( | std::ostream & | out,
|  | const Vector & | v
| ) |

  | Prints a user-readable representation of the vector. Parameters:
  out | An ostream.
  v | Vector to output.
Returns: Reference to passed ostream. Definition at line 220 of file LA_Vector.cpp. References LA::Vector::dim(), and out.

Here is the call graph for this function:

Out & LA::operator<< | ( | Out & | stream,
|  | const Vector & | v
| ) |

  | Out operator for GT-streams. Parameters:
  stream | Out-stream.
  v | Vector to output.
Returns: Reference to passed Out-stream. Definition at line 231 of file LA_Vector.cpp. References LA::Vector::content, and LA::Vector::n.

In & LA::operator>> | ( | In & | stream,
|  | Vector & | v
| ) |

  | In operator for GT-streams. Parameters:
  stream | In-stream.
  v | Vector to read to.
Returns: Reference to passed In-stream. Definition at line 240 of file LA_Vector.cpp. References LA::Vector::content, and LA::Vector::create().

Here is the call graph for this function: