42 template <
typename Scalar>
43 explicit Inertia(
const Eigen::Vector<Scalar, Eigen::Dynamic>&
D) {
44 for (
const auto&
elem :
D) {
45 if (
elem > Scalar(0)) {
47 }
else if (
elem < Scalar(0)) {
62 template <
typename Scalar>
64 const Eigen::Diagonal<
65 const Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>>&
D) {
66 for (
const auto&
elem :
D) {
67 if (
elem > Scalar(0)) {
69 }
else if (
elem < Scalar(0)) {
Definition inertia.hpp:13
int zero
The number of zero eigenvalues.
Definition inertia.hpp:20
Inertia(const Eigen::Diagonal< const Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > > &D)
Definition inertia.hpp:63
constexpr Inertia(int positive, int negative, int zero)
Definition inertia.hpp:32
bool operator==(const Inertia &) const =default
int positive
The number of positive eigenvalues.
Definition inertia.hpp:16
Inertia(const Eigen::Vector< Scalar, Eigen::Dynamic > &D)
Definition inertia.hpp:43
int negative
The number of negative eigenvalues.
Definition inertia.hpp:18
Definition intrusive_shared_ptr.hpp:29