36 template <
typename Scalar>
37 explicit Inertia(
const Eigen::Vector<Scalar, Eigen::Dynamic>&
D) {
38 for (
const auto&
elem :
D) {
39 if (
elem > Scalar(0)) {
41 }
else if (
elem < Scalar(0)) {
54 template <
typename Scalar>
56 const Eigen::Diagonal<
57 const Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>>&
D) {
58 for (
const auto&
elem :
D) {
59 if (
elem > Scalar(0)) {
61 }
else if (
elem < Scalar(0)) {
Definition inertia.hpp:11
int zero
The number of zero eigenvalues.
Definition inertia.hpp:18
Inertia(const Eigen::Diagonal< const Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > > &D)
Definition inertia.hpp:55
constexpr Inertia(int positive, int negative, int zero)
Definition inertia.hpp:28
bool operator==(const Inertia &) const =default
int positive
The number of positive eigenvalues.
Definition inertia.hpp:14
Inertia(const Eigen::Vector< Scalar, Eigen::Dynamic > &D)
Definition inertia.hpp:37
int negative
The number of negative eigenvalues.
Definition inertia.hpp:16
Definition intrusive_shared_ptr.hpp:27