votca 2024-dev
Loading...
Searching...
No Matches
eigensystem.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2020 The VOTCA Development Team (http://www.votca.org)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18#ifndef VOTCA_TOOLS_EIGENSYSTEM_H
19#define VOTCA_TOOLS_EIGENSYSTEM_H
20
21// Local VOTCA includes
22#include "eigen.h"
23
24namespace votca {
25namespace tools {
26
28 public:
29 // returns eigenvalues
30 const Eigen::VectorXd& eigenvalues() const { return eigenvalues_; }
31 Eigen::VectorXd& eigenvalues() { return eigenvalues_; }
32 // returns eigenvectors
33 const Eigen::MatrixXd& eigenvectors() const { return eigenvectors_; }
34 Eigen::MatrixXd& eigenvectors() { return eigenvectors_; }
35 // returns left eigenvectors or other in case of nonhermititan problem
36 const Eigen::MatrixXd& eigenvectors2() const { return eigenvectors_2_; }
37 Eigen::MatrixXd& eigenvectors2() { return eigenvectors_2_; }
38
39 Eigen::ComputationInfo info() const { return info_; }
40 Eigen::ComputationInfo& info() { return info_; }
41
42 void clear() {
43 info_ = Eigen::Success;
44 eigenvalues_.resize(0);
45 eigenvectors_.resize(0, 0);
46 eigenvectors_2_.resize(0, 0);
47 }
48
49 private:
50 Eigen::ComputationInfo info_ = Eigen::Success;
51 Eigen::VectorXd eigenvalues_;
52 Eigen::MatrixXd eigenvectors_;
53 Eigen::MatrixXd eigenvectors_2_;
54};
55
56} // namespace tools
57} // namespace votca
58#endif // VOTCA_TOOLS_EIGENSYSTEM_H
Eigen::MatrixXd eigenvectors_2_
Definition eigensystem.h:53
Eigen::VectorXd eigenvalues_
Definition eigensystem.h:51
Eigen::MatrixXd & eigenvectors2()
Definition eigensystem.h:37
const Eigen::MatrixXd & eigenvectors2() const
Definition eigensystem.h:36
Eigen::ComputationInfo info() const
Definition eigensystem.h:39
const Eigen::VectorXd & eigenvalues() const
Definition eigensystem.h:30
Eigen::VectorXd & eigenvalues()
Definition eigensystem.h:31
Eigen::MatrixXd & eigenvectors()
Definition eigensystem.h:34
Eigen::ComputationInfo info_
Definition eigensystem.h:50
Eigen::MatrixXd eigenvectors_
Definition eigensystem.h:52
const Eigen::MatrixXd & eigenvectors() const
Definition eigensystem.h:33
Eigen::ComputationInfo & info()
Definition eigensystem.h:40
base class for all analysis tools
Definition basebead.h:33