/* * Eigenspace.hpp * * Created on: Nov 22, 2010 * Author: heber */ #ifndef EIGENSPACE_HPP_ #define EIGENSPACE_HPP_ #include #include #include #include #include "MatrixContent.hpp" #include "VectorContent.hpp" /** Container for a matrix and its eigenvectors and -values. * * Note that a set of eigenvectors always forms a subspace within a vector * space, the so-called eigenspace. Hence, the name of this class is * eigenspace. * * Eigenvector are stored internally as a matrix. A returned set of * eigenvectors is just a set of VectorViewContent on row vectors in * this matrix. */ class Eigenspace { public: typedef std::vector< boost::shared_ptr > eigenvectorset; typedef std::vector< double > eigenvalueset; typedef std::set indexset; Eigenspace(const indexset &_Indices); Eigenspace(const indexset &_Indices, const MatrixContent &_matrix); virtual ~Eigenspace(); void calculateEigenSubspace(); // accessors const MatrixContent & getEigenspaceMatrix() const; const indexset & getIndices() const; void setEigenspaceMatrix(const MatrixContent &_content); bool contains(const Eigenspace &_indexset); protected: const indexset Indices; eigenvectorset Eigenvectors; eigenvalueset Eigenvalues; MatrixContent EigenspaceMatrix; MatrixContent EigenvectorMatrix; private: void createEigenvectorViews(); }; std::ostream & operator<<(std::ostream &ost, const Eigenspace &_s); #endif /* EIGENSPACE_HPP_ */