*
* By default, no memory is allocated.
*/
- explicit LAPACKFullMatrix (const size_type n = 0);
+ explicit LAPACKFullMatrix (const size_type size = 0);
/**
LAPACKFullMatrix (const size_type rows,
const size_type cols);
+
/**
* Copy constructor. This constructor does a deep copy of the
* matrix. Therefore, it poses a possible efficiency problem, if for
template <class MATRIX>
void copy_from (const MATRIX &);
+ /**
+ * Regenerate the current matrix by one that has the same properties
+ * as if it were created by the constructor of this class with the
+ * same argument list as this present function.
+ */
+ void reinit (const size_type size);
+
+ /**
+ * Regenerate the current matrix by one that has the same properties
+ * as if it were created by the constructor of this class with the
+ * same argument list as this present function.
+ */
+ void reinit (const size_type rows,
+ const size_type cols);
+
/**
* Return the dimension of the range space. @note The matrix is of
* dimension $m \times n$.
const double threshold = 0.) const;
private:
-
+
/**
- * Since LAPACK operations notoriously change the meaning of the matrix
- * entries, we record the current state after the last operation here.
+ * Since LAPACK operations notoriously change the meaning of the
+ * matrix entries, we record the current state after the last
+ * operation here.
*/
LAPACKSupport::State state;
LAPACKFullMatrix<number>::LAPACKFullMatrix (const size_type m,
const size_type n)
:
- TransposeTable<number> (m,n),
+ TransposeTable<number> (m, n),
state (matrix)
{}
}
+template <typename number>
+void
+LAPACKFullMatrix<number>::reinit (const size_type n)
+{
+ this->TransposeTable<number>::reinit (n, n);
+ state = LAPACKSupport::matrix;
+}
+
+
+template <typename number>
+void
+LAPACKFullMatrix<number>::reinit (const size_type m,
+ const size_type n)
+{
+ this->TransposeTable<number>::reinit (m, n);
+ state = LAPACKSupport::matrix;
+}
+
+
template <typename number>
template <typename number2>
LAPACKFullMatrix<number> &
eigenvalues.reinit(n_eigenpairs);
eigenvectors.reinit(nn, n_eigenpairs, true);
+
for (size_type i=0; i < static_cast<size_type> (n_eigenpairs); ++i)
{
eigenvalues(i) = wr[i];
eigenvalues.reinit(n_eigenpairs);
eigenvectors.resize(n_eigenpairs);
+
for (size_type i=0; i < static_cast<size_type> (n_eigenpairs); ++i)
{
eigenvalues(i) = wr[i];