lucid  0.0.1
Lifting-based Uncertain Control Invariant Dynamics
Loading...
Searching...
No Matches
eigen.h File Reference
#include <fstream>
#include <ranges>
#include <span>
#include <string>
#include <Eigen/Cholesky>
#include <Eigen/Core>
#include <Eigen/LU>
#include <Eigen/SparseCore>
#include <unsupported/Eigen/CXX11/Tensor>
#include <unsupported/Eigen/FFT>
#include "lucid/lib/eigen_extension.h"

Namespaces

namespace  lucid
 Root namespace for the lucid library.
 

Macros

#define EIGEN_MATRIXBASE_PLUGIN   "lucid/lib/eigen_matrix_base_plugin.h"
 Define the Eigen MatrixBase plugin header file path.
 

Functions

void lucid::meshgrid (const Vector &x, const Vector &y, Matrix &X, Matrix &Y)
 Create a 2D grid coordinates based on the coordinates contained in vectors x and y.
 
void lucid::meshgrid (const Vector &x, Matrix &X, Matrix &Y)
 Create a 2D grid coordinates based on the coordinates contained in vector x.
 
Vector lucid::arange (const Scalar low, Scalar high, const Scalar step=1, const bool with_last=false)
 Create an evenly spaced values within a given interval.
 
Vector lucid::peaks (const Vector &x, const Vector &y)
 Peaks function defined over a pair of vectors.
 
Matrix lucid::peaks (const Matrix &x, const Matrix &y)
 Peaks function defined over a pair of meshgrids.
 
Matrix lucid::mvnrnd (const Vector &mu, const Matrix &sigma)
 The multivariate normal distribution is a generalization of the univariate normal distribution to two or more variables.
 
Matrix lucid::diff (ConstMatrixRef m, const int n=1, const bool rowwise=true)
 Calculates differences between adjacent elements of X n times.
 
template<class... Ms>
Matrix lucid::combvec (ConstMatrixRef m1, ConstMatrixRef m2, const Ms &... matrices)
 Given \( m \) inputs matrices, where matrix \( M_i \) has \( n_i \) columns, return a matrix with \( \Pi_{i = 0}^m n_i \) column vectors, where the columns consist of all combinations found by combining one column vector from each input matrix.
 
Matrix lucid::combvec (ConstMatrixRef m)
 Given a matrix m treat each row vector as a separate matrix and return their combination using combvec.
 
Scalar lucid::rms (ConstMatrixRef x)
 Calculate the root mean square of the elements of a vector.
 
Scalar lucid::median (Matrix x)
 Compute the median of a vector or matrix.
 
template<Dimension P = 2, bool Squared = false, bool TriangularMatrix = false, class Derived>
requires (P > 0) && (!Squared || P == 2)
auto lucid::pdist (const Eigen::MatrixBase< Derived > &x)
 Compute the p-norm distance between every pair of row vectors in the input.
 
template<Dimension P = 2, bool Squared = false, class DerivedX, class DerivedY>
requires (P > 0) && (!Squared || P == 2)
Matrix lucid::pdist (const Eigen::MatrixBase< DerivedX > &x, const Eigen::MatrixBase< DerivedY > &y)
 Compute the p-norm distance between every pair of row vectors in the input matrices.
 
Vector lucid::normal_cdf (ConstVectorRef x, Scalar sigma_f, Scalar sigma_l)
 Compute the Cumulative distribution function (CDF) of the normal distribution at oll point listed in \( \texttip{x}{Element of the vector space} \).
 
Eigen::MatrixXcd lucid::fft2 (const Matrix &x)
 Perform a 2D Fast Fourier Transform (FFT) on the input matrix.
 
Matrix lucid::ifft2 (const Eigen::MatrixXcd &x)
 Perform a 2D inverse Fast Fourier Transform (FFT) on the input matrix.
 
template<class Scalar>
Eigen::MatrixX< Scalar > lucid::read_matrix (const std::string_view file_name)
 Read a matrix from a file.
 

Detailed Description

Author
Room 6.030
Licence:
BSD 3-Clause License

Eigen wrapper. This header includes the eigen library and provides a various helpers. Other files in the library should depend on this header instead of the eigen library directly. Instead of including <eigen.h>, include "lucid/lib/eigen.h".

Macro Definition Documentation

◆ EIGEN_MATRIXBASE_PLUGIN

#define EIGEN_MATRIXBASE_PLUGIN   "lucid/lib/eigen_matrix_base_plugin.h"

Define the Eigen MatrixBase plugin header file path.

This plugin extends Eigen matrices with additional functionality like read/write methods. Must be defined before including any Eigen headers.