Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
eigen_extensions.hpp File Reference

Bertini extensions of the Eigen linear algebra library. More...

#include "bertini2/num_traits.hpp"
#include <boost/serialization/complex.hpp>
#include <boost/serialization/array.hpp>
#include <boost/serialization/split_member.hpp>
#include <Eigen/Core>
#include <Eigen/Geometry>
#include <Eigen/Eigenvalues>
#include <Eigen/SVD>
#include <Eigen/Dense>
Include dependency graph for eigen_extensions.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Eigen
namespace  bertini

Macros

#define EIGEN_DENSEBASE_PLUGIN   "bertini2/eigen_serialization_addon.hpp"
 Tell Eigen to mix a Boost.serialization addon into every dense matrix/array.

Typedefs

template<typename NumT>
using bertini::Vec = Eigen::Matrix<NumT, Eigen::Dynamic, 1>
 A dynamically-sized column vector of NumT.
template<typename NumT>
using bertini::Mat = Eigen::Matrix<NumT, Eigen::Dynamic, Eigen::Dynamic>
 A dynamically-sized matrix of NumT.

Enumerations

enum class  bertini::MatrixSuccessCode { bertini::Success , bertini::LargeChange , bertini::SmallValue }
 Outcome of a matrix-decomposition sanity check (e.g. LU pivot magnitude). More...

Functions

template<typename Derived>
bool bertini::IsEmpty (Eigen::MatrixBase< Derived > const &v)
 Checks whether the number of rows and columns are either 0.
template<typename Derived>
bool bertini::ContainsNaN (Eigen::MatrixBase< Derived > const &v)
 True when any entry of a complex-valued Eigen object has a NaN real or imaginary part.
template<typename Derived>
unsigned bertini::Precision (Eigen::MatrixBase< Derived > const &v)
 Get the precision of an Eigen object.
template<typename Derived>
unsigned bertini::PrecisionRequireUniform (Eigen::MatrixBase< Derived > const &v)
 Query the precision of an Eigen object, requiring it to be non-empty, and of uniform precision.
template<typename Derived>
void bertini::Precision (Eigen::MatrixBase< Derived > &v, unsigned prec)
 Set the precision of an Eigen object.
template<typename T>
bool bertini::IsSmallValue (T const &testme)
 Test a numbers being very small.
template<typename T>
bool bertini::IsSymmRelDiffSmall (T const &a, T const &b, typename Eigen::NumTraits< T >::Real const &e)
 Check whether two values are very close to each other.
template<typename T>
bool bertini::IsLargeChange (T const &numerator, T const &denomenator)
 Test two numbers for having large ratio.
template<typename Derived>
MatrixSuccessCode bertini::LUPartialPivotDecompositionSuccessful (Eigen::MatrixBase< Derived > const &LU)
 Check the diagonal elements of an LU decomposition for small values and large ratios.
template<typename NumberType>
Eigen::Matrix< NumberType, Eigen::Dynamic, Eigen::Dynamic > bertini::KahanMatrix (unsigned int mat_size, NumberType c)
 Make a Kahan matrix with a given number type.
template<typename NumberType>
Mat< NumberType > bertini::RandomOfUnits (unsigned int rows, unsigned int cols)
 Make a random matrix of units (numbers with norm 1).
template<typename NumberType>
Mat< NumberType > bertini::RandomConjugateOrthonormalMatrix (unsigned int rows, unsigned int cols)
 Make a random conjugate-orthonormal matrix (orthonormal rows when rows<=cols, orthonormal columns when rows>=cols), to the current default precision.
template<typename NumberType>
Vec< NumberType > bertini::RandomOfUnits (unsigned int size)
 Make a random vector of units (numbers with norm 1).
template<typename DerivedA, typename DerivedB>
bool bertini::IsSamePoint (Eigen::MatrixBase< DerivedA > const &a, Eigen::MatrixBase< DerivedB > const &b, NumErrorT tol)
 True if two points are the same to within tol in the infinity norm.
template<typename DerivedA, typename DerivedB>
bool bertini::IsDistinct (Eigen::MatrixBase< DerivedA > const &a, Eigen::MatrixBase< DerivedB > const &b, NumErrorT tol)
 True if two points differ by more than tol in the infinity norm (the negation of :func:IsSamePoint).

Detailed Description

Bertini extensions of the Eigen linear algebra library.

Macro Definition Documentation

◆ EIGEN_DENSEBASE_PLUGIN

#define EIGEN_DENSEBASE_PLUGIN   "bertini2/eigen_serialization_addon.hpp"

Tell Eigen to mix a Boost.serialization addon into every dense matrix/array.