Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/LinearAlgebra/Matrix.hpp

    r57f243 r5b4605  
    5151
    5252  /**
     53   * Set all matrix entries to zero.
     54   */
     55  void zero();
     56
     57  /**
    5358   * Access the matrix at index (i,j)
    5459   */
     
    96101  Matrix invert() const;
    97102
     103  /**
     104   * Diagonalizes a matrix and sets its rows to the resulting eigenvalues.
     105   * The eigenvalues are returned as a vector.
     106   *
     107   * Rather costly, so use precomputation as often as possible.
     108   */
     109  Vector transformToEigenbasis();
     110
     111  /**
     112   * Calculate the transpose of the matrix.
     113   */
     114  Matrix transpose() const;
     115  void transpose();
     116
    98117  // operators
    99118  Matrix &operator=(const Matrix&);
    100119
    101   Matrix &operator+=(const Matrix&);
    102   Matrix &operator-=(const Matrix&);
    103   Matrix &operator*=(const Matrix&);
     120  const Matrix &operator+=(const Matrix&);
     121  const Matrix &operator-=(const Matrix&);
     122  const Matrix &operator*=(const Matrix&);
    104123
    105   Matrix &operator*=(const double);
     124  const Matrix &operator*=(const double);
    106125
    107   Matrix operator+(const Matrix&) const;
    108   Matrix operator-(const Matrix&) const;
    109   Matrix operator*(const Matrix&) const;
     126  const Matrix operator+(const Matrix&) const;
     127  const Matrix operator-(const Matrix&) const;
     128  const Matrix operator*(const Matrix&) const;
    110129
    111130  bool operator==(const Matrix&) const;
     
    121140};
    122141
    123 Matrix operator*(const double,const Matrix&);
    124 Matrix operator*(const Matrix&,const double);
     142const Matrix operator*(const double,const Matrix&);
     143const Matrix operator*(const Matrix&,const double);
    125144
    126145/**
Note: See TracChangeset for help on using the changeset viewer.