

This is the API documentation for Eigen3. You can [download](https://eigen.tuxfamily.org/dox/eigen-doc.tgz) it as a tgz archive for offline reading.

 For a first contact with [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."), the best place is to have a look at the [getting started](gettingstarted)  page that show you how to write and compile your first program with [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.").

 Then, the **quick** **reference** **pages** give you a quite complete description of the API in a very condensed format that is specially useful to recall the syntax of a particular feature, or to have a quick look at the API. They currently cover the two following feature sets, and more will come in the future:


* [[QuickRef] Dense matrix and array manipulations](group__quickrefpage)
* [[QuickRef] Sparse linear algebra](group__sparsequickrefpage)

 You're a MatLab user? There is also a [short ASCII reference](https://eigen.tuxfamily.org/dox/AsciiQuickReference.txt) with Matlab translations.

 The **main** **documentation** is organized into *chapters* covering different domains of features. They are themselves composed of *user* *manual* pages describing the different features in a comprehensive way, and *reference* pages that gives you access to the API documentation through the related [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s *modules* and *classes*.

 Under the [Extending/Customizing Eigen](usermanual_customizingeigen) section, you will find discussions and examples on extending Eigen's features and supporting custom scalar types.

 Under the [General topics](usermanual_generalities) section, you will find documentation on more general topics such as preprocessor directives, controlling assertions, multi-threading, MKL support, some [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s internal insights, and much more...

 Finally, do not miss the search engine, useful to quickly get to the documentation of a given class or function.

 Want more? Checkout the [*unsupported* *modules*](unsupported/index)  documentation. 

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/index.html>

Getting started
===============

   
This is a very short guide on how to get started with [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."). It has a dual purpose. It serves as a minimal introduction to the [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") library for people who want to start coding as soon as possible. You can also read this page as the first part of the Tutorial, which explains the library in more detail; in this case you will continue with [The Matrix class](group__tutorialmatrixclass).

 
 How to "install" Eigen?
=========================

 In order to use [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."), you just need to download and extract [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s source code (see [the wiki](http://eigen.tuxfamily.org/index.php?title=Main_Page#Download) for download instructions). In fact, the header files in the `[Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")` subdirectory are the only files required to compile programs using [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."). The header files are the same for all platforms. It is not necessary to use CMake or install anything.

 
 A simple first program
========================

 Here is a rather simple program to get you started.

 
```
#include <iostream>
#include <Eigen/Dense>
 
using [Eigen::MatrixXd](classeigen_1_1matrix);
 
int main()
{
  MatrixXd m(2,2);
  m(0,0) = 3;
  m(1,0) = 2.5;
  m(0,1) = -1;
  m(1,1) = m(1,0) + m(0,1);
  std::cout << m << std::endl;
}
```

We will explain the program after telling you how to compile it.

 
 Compiling and running your first program
==========================================

 There is no library to link to. The only thing that you need to keep in mind when compiling the above program is that the compiler must be able to find the [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") header files. The directory in which you placed [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s source code must be in the include path. With GCC you use the -I option to achieve this, so you can compile the program with a command like this:

 
```
g++ -I /path/to/eigen/ my_program.cpp -o my_program 

```

On Linux or Mac OS X, another option is to symlink or copy the [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") folder into /usr/local/include/. This way, you can compile the program with:

 
```
g++ my_program.cpp -o my_program 

```

When you run the program, it produces the following output:

 
```
  3  -1
2.5 1.5

```


 Explanation of the first program
==================================

 The [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") header files define many types, but for simple applications it may be enough to use only the `MatrixXd` type. This represents a matrix of arbitrary size (hence the `X` in `MatrixXd`), in which every entry is a `double` (hence the `d` in `MatrixXd`). See the [quick reference guide](group__quickrefpage#QuickRef_Types) for an overview of the different types you can use to represent a matrix.

 The `Eigen/Dense` header file defines all member functions for the MatrixXd type and related types (see also the [table of header files](group__quickrefpage#QuickRef_Headers)). All classes and functions defined in this header file (and other [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") header files) are in the `[Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")` namespace.

 The first line of the `main` function declares a variable of type `MatrixXd` and specifies that it is a matrix with 2 rows and 2 columns (the entries are not initialized). The statement `m(0,0) = 3` sets the entry in the top-left corner to 3. You need to use round parentheses to refer to entries in the matrix. As usual in computer science, the index of the first index is 0, as opposed to the convention in mathematics that the first index is 1.

 The following three statements sets the other three entries. The final line outputs the matrix `m` to the standard output stream.

 
 Example 2: Matrices and vectors
=================================

 Here is another example, which combines matrices with vectors. Concentrate on the left-hand program for now; we will talk about the right-hand program later.

 

| Size set at run time: | Size set at compile time:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace [Eigen](namespaceeigen);
using namespace std;
 
int main()
{
  MatrixXd m = [MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3,3);
  m = (m + [MatrixXd::Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd)(3,3,1.2)) * 50;
  cout << "m =" << endl << m << endl;
  VectorXd v(3);
  v << 1, 2, 3;
  cout << "m \* v =" << endl << m * v << endl;
}
```
 | 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace [Eigen](namespaceeigen);
using namespace std;
 
int main()
{
  Matrix3d m = [Matrix3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
  m = (m + [Matrix3d::Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd)(1.2)) * 50;
  cout << "m =" << endl << m << endl;
  Vector3d v(1,2,3);
  
  cout << "m \* v =" << endl << m * v << endl;
}

```
 |

 The output is as follows:

 
```
m =
  94 89.8 43.5
49.4  101 86.8
88.3 29.8 37.8
m * v =
404
512
261

```


 Explanation of the second example
===================================

 The second example starts by declaring a 3-by-3 matrix `m` which is initialized using the [Random()](classeigen_1_1densebase#ae97f8d9d08f969c733c8144be6225756)  method with random values between -1 and 1. The next line applies a linear mapping such that the values are between 10 and 110. The function call [MatrixXd::Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd)(3,3,1.2) returns a 3-by-3 matrix expression having all coefficients equal to 1.2. The rest is standard arithmetic.

 The next line of the `main` function introduces a new type: `VectorXd`. This represents a (column) vector of arbitrary size. Here, the vector `v` is created to contain `3` coefficients which are left uninitialized. The one but last line uses the so-called comma-initializer, explained in [Advanced initialization](group__tutorialadvancedinitialization), to set all coefficients of the vector `v` to be as follows:

  \[ v = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}. \] 

 The final line of the program multiplies the matrix `m` with the vector `v` and outputs the result.

 Now look back at the second example program. We presented two versions of it. In the version in the left column, the matrix is of type `MatrixXd` which represents matrices of arbitrary size. The version in the right column is similar, except that the matrix is of type `Matrix3d`, which represents matrices of a fixed size (here 3-by-3). Because the type already encodes the size of the matrix, it is not necessary to specify the size in the constructor; compare `MatrixXd m(3,3)` with `Matrix3d m`. Similarly, we have `VectorXd` on the left (arbitrary size) versus `Vector3d` on the right (fixed size). Note that here the coefficients of vector `v` are directly set in the constructor, though the same syntax of the left example could be used too.

 The use of fixed-size matrices and vectors has two advantages. The compiler emits better (faster) code because it knows the size of the matrices and vectors. Specifying the size in the type also allows for more rigorous checking at compile-time. For instance, the compiler will complain if you try to multiply a `Matrix4d` (a 4-by-4 matrix) with a `Vector3d` (a vector of size 3). However, the use of many types increases compilation time and the size of the executable. The size of the matrix may also not be known at compile-time. A rule of thumb is to use fixed-size matrices for size 4-by-4 and smaller.

 
 Where to go from here?
========================

 It's worth taking the time to read the [long tutorial](group__tutorialmatrixclass).

 However if you think you don't need it, you can directly use the classes documentation and our [Quick reference guide](group__quickrefpage).

 * **Next:** [The Matrix class](group__tutorialmatrixclass)

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/GettingStarted.html>

Extending/Customizing Eigen
===========================

   
Eigen can be extended in several ways, for instance, by defining global methods, by inserting custom methods within main Eigen's classes through the [plugin](topiccustomizing_plugins) mechanism, by adding support to [custom scalar types](topiccustomizing_customscalar) etc. See below for the respective sub-topics.


* [Extending MatrixBase (and other classes)](topiccustomizing_plugins)
* [Inheriting from Matrix](topiccustomizing_inheritingmatrix)
* [Using custom scalar types](topiccustomizing_customscalar)
* [Matrix manipulation via nullary-expressions](topiccustomizing_nullaryexpr)
* [Adding a new expression type](topicnewexpressiontype) 
See also

[Preprocessor directives](topicpreprocessordirectives)

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/UserManual_CustomizingEigen.html>

General topics
==============

   
* [Writing Functions Taking Eigen Types as Parameters](topicfunctiontakingeigentypes)
* [Preprocessor directives](topicpreprocessordirectives)
* [Assertions](topicassertions)
* [Eigen and multi-threading](topicmultithreading)
* [Using BLAS/LAPACK from Eigen](topicusingblaslapack)
* [Using Intel® MKL from Eigen](topicusingintelmkl)
* [Using Eigen in CUDA kernels](topiccuda)
* [Common pitfalls](topicpitfalls)
* [The template and typename keywords in C++](topictemplatekeyword)
* [Understanding Eigen](usermanual_understandingeigen)
* [Using Eigen in CMake Projects](topiccmakeguide)

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/UserManual_Generalities.html>

Eigen's unsupported modules
===========================

   
This is the API documentation for Eigen's unsupported modules.

 These modules are contributions from various users. They are provided "as is", without any support.

 Click on the *Modules* tab at the top of this page to get a list of all unsupported modules.

 Don't miss the [official Eigen documentation](../index).

 [SYCL backend for Eigen](sycl_eigen) 

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/index.html>

Quick reference guide for sparse matrices
=========================================

  

---

 In this page, we give a quick summary of the main operations available for sparse matrices in the class [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation."). First, it is recommended to read the introductory tutorial at [Sparse matrix manipulations](group__tutorialsparse). The important point to have in mind when working on sparse matrices is how they are stored : i.e either row major or column major. The default is column major. Most arithmetic operations on sparse matrices will assert that they have the same storage order.

 
 Sparse Matrix Initialization
==============================

 

| Category  | Operations  | Notes  |
| --- | --- | --- |
| Constructor  | 
```
SparseMatrix<double> sm1(1000,1000); 
SparseMatrix<std::complex<double>,[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f)> sm2;
```
 | Default is ColMajor  |
| Resize/Reserve  | 
```
sm1.resize(m,n);      // Change sm1 to a m x n matrix.
sm1.reserve(nnz);     // Allocate room for nnz nonzeros elements. 

```
 | Note that when calling reserve(), it is not required that nnz is the exact number of nonzero elements in the final matrix. However, an exact estimation will avoid multiple reallocations during the insertion phase.  |
| Assignment  | 
```
 SparseMatrix<double,Colmajor> sm1;
// Initialize sm2 with sm1.
 SparseMatrix<double,Rowmajor> sm2(sm1), sm3;        
 // Assignment and evaluations modify the storage order.
 sm3 = sm1; 

```
 | The copy constructor can be used to convert from a storage order to another  |
| Element-wise Insertion  | 
```
// Insert a new element; 
 sm1.insert(i, j) = v_ij;  
 
// Update the value v\_ij
 sm1.coeffRef(i,j) = v_ij;
 sm1.coeffRef(i,j) += v_ij;
 sm1.coeffRef(i,j) -= v_ij;

```
 | insert() assumes that the element does not already exist; otherwise, use coeffRef()  |
| Batch insertion  | 
```
std::vector< Eigen::Triplet<double> > tripletList;
tripletList.reserve(estimation_of_entries);
// -- Fill tripletList with nonzero elements...
sm1.setFromTriplets(TripletList.begin(), TripletList.end());

```
 | A complete example is available at [Triplet Insertion](group__tutorialsparse#TutorialSparseFilling) .  |
| Constant or Random Insertion  | 
```
sm1.setZero();

```
 | Remove all non-zero coefficients  |

 
 Matrix properties
===================

 Beyond the basic functions rows() and cols(), there are some useful functions that are available to easily get some information from the matrix. 




|  |
| --- |
| 
```
sm1.rows();         // Number of rows
sm1.cols();         // Number of columns 
sm1.nonZeros();     // Number of non zero values 
sm1.outerSize();    // Number of columns (resp. rows) for a column major (resp. row major )
sm1.innerSize();    // Number of rows (resp. columns) for a row major (resp. column major)
sm1.norm();         // Euclidian norm of the matrix
sm1.squaredNorm();  // Squared norm of the matrix
sm1.blueNorm();
sm1.isVector();     // Check if sm1 is a sparse vector or a sparse matrix
sm1.isCompressed(); // Check if sm1 is in compressed form
...

```
 |

 
 Arithmetic operations
=======================

 It is easy to perform arithmetic operations on sparse matrices provided that the dimensions are adequate and that the matrices have the same storage order. Note that the evaluation can always be done in a matrix with a different storage order. In the following, **sm** denotes a sparse matrix, **dm** a dense matrix and **dv** a dense vector. 




| Operations  | Code  | Notes   |
| --- | --- | --- |
| add subtract  | 
```
sm3 = sm1 + sm2; 
sm3 = sm1 - sm2;
sm2 += sm1; 
sm2 -= sm1; 

```
 | sm1 and sm2 should have the same storage order   |
| scalar product | 
```
sm3 = sm1 * s1;   sm3 *= s1; 
sm3 = s1 * sm1 + s2 * sm2; sm3 /= s1;

```
 | Many combinations are possible if the dimensions and the storage order agree.   |
| Sparse Product  | 
```
sm3 = sm1 * sm2;
dm2 = sm1 * dm1;
dv2 = sm1 * dv1;

```
 |   |
| transposition, adjoint  | 
```
sm2 = sm1.transpose();
sm2 = sm1.adjoint();

```
 | Note that the transposition change the storage order. There is no support for transposeInPlace().  |
| Permutation  | 
```
perm.indices();      // Reference to the vector of indices
sm1.twistedBy(perm); // Permute rows and columns
sm2 = sm1 * perm;    // Permute the columns
sm2 = perm * sm1;    // Permute the columns

```
 |   |
| Component-wise ops  | 
```
sm1.cwiseProduct(sm2);
sm1.cwiseQuotient(sm2);
sm1.cwiseMin(sm2);
sm1.cwiseMax(sm2);
sm1.cwiseAbs();
sm1.cwiseSqrt();

```
 | sm1 and sm2 should have the same storage order  |

 
 Other supported operations
============================

 

| Code  | Notes  |
| --- | --- |
| Sub-matrices  |
| 
```
sm1.block(startRow, startCol, rows, cols); 
sm1.block(startRow, startCol); 
sm1.topLeftCorner(rows, cols); 
sm1.topRightCorner(rows, cols);
sm1.bottomLeftCorner( rows, cols);
sm1.bottomRightCorner( rows, cols);

```
 | Contrary to dense matrices, here **all these methods are read-only**. See [Block operations](group__tutorialsparse#TutorialSparse_SubMatrices) and below for read-write sub-matrices.  |
| Range  |
| 
```
sm1.innerVector(outer);           // RW
sm1.innerVectors(start, size);    // RW
sm1.leftCols(size);               // RW
sm2.rightCols(size);              // RO because sm2 is row-major
sm1.middleRows(start, numRows);   // RO because sm1 is column-major
sm1.middleCols(start, numCols);   // RW
sm1.col(j);                       // RW

```
 | A inner vector is either a row (for row-major) or a column (for column-major). As stated earlier, for a read-write sub-matrix (RW), the evaluation can be done in a matrix with different storage order.  |
| Triangular and selfadjoint views  |
| 
```
sm2 = sm1.triangularview<[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>();
sm2 = sm1.selfadjointview<[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>();
```
 | Several combination between triangular views and blocks views are possible  |
| Triangular solve  |
| 
```
dv2 = sm1.triangularView<[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>().solve(dv1);
dv2 = sm1.topLeftCorner(size, size)
         .triangularView<[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>().solve(dv1);
```
 | For general sparse solve, Use any suitable module described at [Solving Sparse Linear Systems](group__topicsparsesystems) |
| Low-level API  |
| 
```
sm1.valuePtr();      // Pointer to the values
sm1.innerIndexPtr();  // Pointer to the indices.
sm1.outerIndexPtr(); // Pointer to the beginning of each inner vector

```
 | If the matrix is not in compressed form, makeCompressed() should be called before. Note that these functions are mostly provided for interoperability purposes with external libraries. A better access to the values of the matrix is done by using the InnerIterator class as described in [the Tutorial Sparse](group__tutorialsparse)  section  |
| Mapping external buffers  |
| 
```
int outerIndexPtr[cols+1];
int innerIndices[nnz];
double values[nnz];
Map<SparseMatrix<double> > sm1(rows,cols,nnz,outerIndexPtr, // read-write
                               innerIndices,values);
Map<const SparseMatrix<double> > sm2(...);                  // read-only

```
 | As for dense matrices, class [Map<SparseMatrixType>](classeigen_1_1map_3_01sparsematrixtype_01_4 "Specialization of class Map for SparseMatrix-like storage.") can be used to see external buffers as an Eigen's [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.") object.  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__SparseQuickRefPage.html>

Chapters
========

  Here is a list of all modules:
 

|  |  |
| --- | --- |
|  ▼[Dense matrix and array manipulation](https://eigen.tuxfamily.org/dox/group__DenseMatrixManipulation__chapter.html) |  |
|  [The Matrix class](group__tutorialmatrixclass) |  |
|  [Matrix and vector arithmetic](group__tutorialmatrixarithmetic) |  |
|  [The Array class and coefficient-wise operations](group__tutorialarrayclass) |  |
|  [Block operations](group__tutorialblockoperations) |  |
|  [Slicing and Indexing](group__tutorialslicingindexing) |  |
|  [Advanced initialization](group__tutorialadvancedinitialization) |  |
|  [Reductions, visitors and broadcasting](group__tutorialreductionsvisitorsbroadcasting) |  |
|  [Reshape](group__tutorialreshape) |  |
|  [STL iterators and algorithms](group__tutorialstl) |  |
|  [Interfacing with raw buffers: the Map class](group__tutorialmapclass) |  |
|  [Aliasing](group__topicaliasing) |  |
|  [Storage orders](group__topicstorageorders) |  |
|  ▼[Alignment issues](group__densematrixmanipulation__alignement) |  |
|  [Explanation of the assertion on unaligned arrays](group__topicunalignedarrayassert) |  |
|  [Fixed-size vectorizable %Eigen objects](group__topicfixedsizevectorizable) |  |
|  [Structures Having Eigen Members](group__topicstructhavingeigenmembers) |  |
|  [Using STL Containers with Eigen](group__topicstlcontainers) |  |
|  [Passing Eigen objects by value to functions](group__topicpassingbyvalue) |  |
|  [Compiler making a wrong assumption on stack alignment](group__topicwrongstackalignment) |  |
|  ▼[Reference](https://eigen.tuxfamily.org/dox/group__DenseMatrixManipulation__Reference.html) |  |
|  ▼[Core module](group__core__module) |  |
|  [Global array typedefs](group__arraytypedefs) |  |
|  [Global matrix typedefs](group__matrixtypedefs) |  |
|  [Flags](group__flags) |  |
|  [Enumerations](group__enums) |  |
|  [Jacobi module](group__jacobi__module) |  |
|  [Householder module](group__householder__module) |  |
|  [Catalog of coefficient-wise math functions](group__coeffwisemathfunctions) |  |
|  [Quick reference guide](group__quickrefpage) |  |
|  ▼[Dense linear problems and decompositions](https://eigen.tuxfamily.org/dox/group__DenseLinearSolvers__chapter.html) |  |
|  [Linear algebra and decompositions](group__tutoriallinearalgebra) |  |
|  [Catalogue of dense decompositions](group__topiclinearalgebradecompositions) |  |
|  [Solving linear least squares systems](group__leastsquares) |  |
|  [Inplace matrix decompositions](group__inplacedecomposition) |  |
|  [Benchmark of dense decompositions](group__densedecompositionbenchmark) |  |
|  ▼[Reference](https://eigen.tuxfamily.org/dox/group__DenseLinearSolvers__Reference.html) |  |
|  [Cholesky module](group__cholesky__module) |  |
|  [LU module](group__lu__module) |  |
|  [QR module](group__qr__module) |  |
|  [SVD module](group__svd__module) |  |
|  [Eigenvalues module](group__eigenvalues__module) |  |
|  ▼[Sparse linear algebra](https://eigen.tuxfamily.org/dox/group__Sparse__chapter.html) |  |
|  [Sparse matrix manipulations](group__tutorialsparse) |  |
|  [Solving Sparse Linear Systems](group__topicsparsesystems) |  |
|  [Matrix-free solvers](group__matrixfreesolverexample) |  |
|  ▼[Reference](https://eigen.tuxfamily.org/dox/group__Sparse__Reference.html) |  |
|  [SparseCore module](group__sparsecore__module) |  |
|  [OrderingMethods module](group__orderingmethods__module) |  |
|  [SparseCholesky module](group__sparsecholesky__module) |  |
|  [SparseLU module](group__sparselu__module) |  |
|  [SparseQR module](group__sparseqr__module) | Provides QR decomposition for sparse matrices  |
|  [IterativeLinearSolvers module](group__iterativelinearsolvers__module) |  |
|  [Sparse meta-module](group__sparse__module) |  |
|  ▼[Support modules](group__support__modules) |  |
|  [CholmodSupport module](group__cholmodsupport__module) |  |
|  [KLUSupport module](group__klusupport__module) |  |
|  [MetisSupport module](group__metissupport__module) |  |
|  [PardisoSupport module](group__pardisosupport__module) |  |
|  [PaStiXSupport module](group__pastixsupport__module) |  |
|  [SuiteSparseQR module](group__spqrsupport__module) |  |
|  [SuperLUSupport module](group__superlusupport__module) |  |
|  [UmfPackSupport module](group__umfpacksupport__module) |  |
|  [Quick reference guide for sparse matrices](group__sparsequickrefpage) |  |
|  ▼[Geometry](https://eigen.tuxfamily.org/dox/group__Geometry__chapter.html) |  |
|  [Space transformations](group__tutorialgeometry) |  |
|  ▼[Reference](https://eigen.tuxfamily.org/dox/group__Geometry__Reference.html) |  |
|  ▼[Geometry module](group__geometry__module) |  |
|  [Global aligned box typedefs](group__alignedboxtypedefs) |  |
|  [Splines\_Module](group__splines__module) |  |

   

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/modules.html>

Common pitfalls
===============

   

 Compilation error with template methods
=========================================

 See this [page](topictemplatekeyword) .

 
 Aliasing
==========

 Don't miss this [page](group__topicaliasing)  on aliasing, especially if you got wrong results in statements where the destination appears on the right hand side of the expression.

 
 Alignment Issues (runtime assertion)
======================================

 Eigen does explicit vectorization, and while that is appreciated by many users, that also leads to some issues in special situations where data alignment is compromised. Indeed, prior to C++17, C++ does not have quite good enough support for explicit data alignment. In that case your program hits an assertion failure (that is, a "controlled crash") with a message that tells you to consult this page: 



```
http://eigen.tuxfamily.org/dox/group\_\_TopicUnalignedArrayAssert.html

```

 Have a look at [it](group__topicunalignedarrayassert)  and see for yourself if that's something that you can cope with. It contains detailed information about how to deal with each known cause for that issue.

 Now what if you don't care about vectorization and so don't want to be annoyed with these alignment issues? Then read [how to get rid of them](group__topicunalignedarrayassert#getrid) .

 
 C++11 and the auto keyword
============================

 In short: do not use the auto keywords with Eigen's expressions, unless you are 100% sure about what you are doing. In particular, do not use the auto keyword as a replacement for a `Matrix<>` type. Here is an example:

 
```
MatrixXd A, B;
auto C = A*B;
for(...) { ... w = C * v;  ...}

```

In this example, the type of C is not a `MatrixXd` but an abstract expression representing a matrix product and storing references to `A` and `B`. Therefore, the product of `A*B` will be carried out multiple times, once per iteration of the for loop. Moreover, if the coefficients of `A` or `B` change during the iteration, then `C` will evaluate to different values as in the following example:

 
```
MatrixXd A = ..., B = ...;
auto C = A*B;
MatrixXd R1 = C;
A = ...;
MatrixXd R2 = C;

```

 for which we end up with `R1` ≠ `R2`.

 Here is another example leading to a segfault: 



```
auto C = ((A+B).eval()).transpose();
// do something with C

```

 The problem is that `eval()` returns a temporary object (in this case a `MatrixXd`) which is then referenced by the `Transpose<>` expression. However, this temporary is deleted right after the first line, and then the `C` expression references a dead object. One possible fix consists in applying `eval()` on the whole expression: 



```
auto C = (A+B).transpose().eval();

```

The same issue might occur when sub expressions are automatically evaluated by Eigen as in the following example: 



```
VectorXd u, v;
auto C = u + (A*v).normalized();
// do something with C

```

 Here the `normalized()` method has to evaluate the expensive product `A*v` to avoid evaluating it twice. Again, one possible fix is to call .eval() on the whole expression: 



```
auto C = (u + (A*v).normalized()).eval();

```

 In this case, `C` will be a regular `VectorXd` object. Note that [DenseBase::eval()](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b) is smart enough to avoid copies when the underlying expression is already a plain `Matrix<>`.

 
 Header Issues (failure to compile)
====================================

 With all libraries, one must check the documentation for which header to include. The same is true with Eigen, but slightly worse: with Eigen, a method in a class may require an additional `#include` over what the class itself requires! For example, if you want to use the `cross()` method on a vector (it computes a cross-product) then you need to: 



```
#include<Eigen/Geometry>

```

 We try to always document this, but do tell us if we forgot an occurrence.

 
 Ternary operator
==================

 In short: avoid the use of the ternary operator `(COND ? THEN : ELSE)` with Eigen's expressions for the `THEN` and `ELSE` statements. To see why, let's consider the following example: 



```
Vector3f A;
A << 1, 2, 3;
Vector3f B = ((1 < 0) ? (A.reverse()) : A);

```

 This example will return `B = 3, 2, 1`. Do you see why? The reason is that in c++ the type of the `ELSE` statement is inferred from the type of the `THEN` expression such that both match. Since `THEN` is a `Reverse<Vector3f>`, the `ELSE` statement A is converted to a `Reverse<Vector3f>`, and the compiler thus generates: 



```
Vector3f B = ((1 < 0) ? (A.reverse()) : Reverse<Vector3f>(A));

```

 In this very particular case, a workaround would be to call A.reverse().eval() for the `THEN` statement, but the safest and fastest is really to avoid this ternary operator with Eigen's expressions and use a if/else construct.

 
 Pass-by-value
===============

 If you don't know why passing-by-value is wrong with Eigen, read this [page](group__topicpassingbyvalue)  first.

 While you may be extremely careful and use care to make sure that all of your code that explicitly uses Eigen types is pass-by-reference you have to watch out for templates which define the argument types at compile time.

 If a template has a function that takes arguments pass-by-value, and the relevant template parameter ends up being an Eigen type, then you will of course have the same alignment problems that you would in an explicitly defined function passing Eigen types by reference.

 Using Eigen types with other third party libraries or even the STL can present the same problem. `boost::bind` for example uses pass-by-value to store arguments in the returned functor. This will of course be a problem.

 There are at least two ways around this:


* If the value you are passing is guaranteed to be around for the life of the functor, you can use boost::ref() to wrap the value as you pass it to boost::bind. Generally this is not a solution for values on the stack as if the functor ever gets passed to a lower or independent scope, the object may be gone by the time it's attempted to be used.
* The other option is to make your functions take a reference counted pointer like boost::shared\_ptr as the argument. This avoids needing to worry about managing the lifetime of the object being passed.

 
 Matrices with boolean coefficients
====================================

 The current behaviour of using `[Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.")` with boolean coefficients is inconsistent and likely to change in future versions of [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."), so please use it carefully!

 A simple example for such an inconsistency is

 
```
template<int Size>
void foo() {
  [Eigen::Matrix<bool, Size, Size>](classeigen_1_1matrix) A, B, C;
  A.[setOnes](classeigen_1_1plainobjectbase#a8700dc6d8e05436c0b34ae15ca9274a5)();
  B.[setOnes](classeigen_1_1plainobjectbase#a8700dc6d8e05436c0b34ae15ca9274a5)();
 
  C = A * B - A * B;
  std::cout << C << "\n";
}
```

since calling `foo<3>()` prints the zero matrix while calling `foo<10>()` prints the identity matrix. 

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicPitfalls.html>

The Matrix class
================

  In [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."), all matrices and vectors are objects of the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") template class. Vectors are just a special case of matrices, with either 1 row or 1 column.

 
 The first three template parameters of Matrix
===============================================

 The [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class takes six template parameters, but for now it's enough to learn about the first three first parameters. The three remaining parameters have default values, which for now we will leave untouched, and which we [discuss below](group__tutorialmatrixclass#TutorialMatrixOptTemplParams).

 The three mandatory template parameters of [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") are: 



```
Matrix<typename Scalar, int RowsAtCompileTime, int ColsAtCompileTime>

```
 * `Scalar` is the scalar type, i.e. the type of the coefficients. That is, if you want a matrix of floats, choose `float` here. See [Scalar types](topicscalartypes) for a list of all supported scalar types and for how to extend support to new types.
* `RowsAtCompileTime` and `ColsAtCompileTime` are the number of rows and columns of the matrix as known at compile time (see [below](group__tutorialmatrixclass#TutorialMatrixDynamic) for what to do if the number is not known at compile time).

 We offer a lot of convenience typedefs to cover the usual cases. For example, `Matrix4f` is a 4x4 matrix of floats. Here is how it is defined by [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."): 



```
typedef Matrix<float, 4, 4> Matrix4f;

```

 We discuss [below](group__tutorialmatrixclass#TutorialMatrixTypedefs) these convenience typedefs.

 
 Vectors
=========

 As mentioned above, in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."), vectors are just a special case of matrices, with either 1 row or 1 column. The case where they have 1 column is the most common; such vectors are called column-vectors, often abbreviated as just vectors. In the other case where they have 1 row, they are called row-vectors.

 For example, the convenience typedef `Vector3f` is a (column) vector of 3 floats. It is defined as follows by [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."): 



```
typedef Matrix<float, 3, 1> Vector3f;

```

 We also offer convenience typedefs for row-vectors, for example: 



```
typedef Matrix<int, 1, 2> RowVector2i;

```


 The special value Dynamic
===========================

 Of course, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") is not limited to matrices whose dimensions are known at compile time. The `RowsAtCompileTime` and `ColsAtCompileTime` template parameters can take the special value `Dynamic` which indicates that the size is unknown at compile time, so must be handled as a run-time variable. In [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") terminology, such a size is referred to as a *dynamic* *size*; while a size that is known at compile time is called a *fixed* *size*. For example, the convenience typedef `MatrixXd`, meaning a matrix of doubles with dynamic size, is defined as follows: 



```
typedef Matrix<double, Dynamic, Dynamic> MatrixXd;

```

 And similarly, we define a self-explanatory typedef `VectorXi` as follows: 



```
typedef Matrix<int, Dynamic, 1> VectorXi;

```

 You can perfectly have e.g. a fixed number of rows with a dynamic number of columns, as in: 



```
Matrix<float, 3, Dynamic>

```


 Constructors
==============

 A default constructor is always available, never performs any dynamic memory allocation, and never initializes the matrix coefficients. You can do: 



```
Matrix3f a;
MatrixXf b;

```

 Here, 


* `a` is a 3-by-3 matrix, with a plain float[9] array of uninitialized coefficients,
* `b` is a dynamic-size matrix whose size is currently 0-by-0, and whose array of coefficients hasn't yet been allocated at all.

 Constructors taking sizes are also available. For matrices, the number of rows is always passed first. For vectors, just pass the vector size. They allocate the array of coefficients with the given size, but don't initialize the coefficients themselves: 



```
MatrixXf a(10,15);
VectorXf b(30);

```

 Here, 


* `a` is a 10x15 dynamic-size matrix, with allocated but currently uninitialized coefficients.
* `b` is a dynamic-size vector of size 30, with allocated but currently uninitialized coefficients.

 In order to offer a uniform API across fixed-size and dynamic-size matrices, it is legal to use these constructors on fixed-size matrices, even if passing the sizes is useless in this case. So this is legal: 



```
Matrix3f a(3,3);

```

 and is a no-operation.

 Matrices and vectors can also be initialized from lists of coefficients. Prior to C++11, this feature is limited to small fixed-size column or vectors up to size 4: 



```
Vector2d a(5.0, 6.0);
Vector3d b(5.0, 6.0, 7.0);
Vector4d c(5.0, 6.0, 7.0, 8.0);

```

If C++11 is enabled, fixed-size column or row vectors of arbitrary size can be initialized by passing an arbitrary number of coefficients: 



```
Vector2i a(1, 2);                      // A column vector containing the elements {1, 2}
Matrix<int, 5, 1> b {1, 2, 3, 4, 5};   // A row-vector containing the elements {1, 2, 3, 4, 5}
Matrix<int, 1, 5> c = {1, 2, 3, 4, 5}; // A column vector containing the elements {1, 2, 3, 4, 5}

```

In the general case of matrices and vectors with either fixed or runtime sizes, coefficients have to be grouped by rows and passed as an initializer list of initializer list ([details](classeigen_1_1matrix#afaad3c2d97f248465fa63ce43ac9eb42) ): 



```
MatrixXi a {      // construct a 2x2 matrix
      {1, 2},     // first row
      {3, 4}      // second row
};
Matrix<double, 2, 3> b {
      {2, 3, 4},
      {5, 6, 7},
};

```

For column or row vectors, implicit transposition is allowed. This means that a column vector can be initialized from a single row: 



```
VectorXd a {{1.5, 2.5, 3.5}};             // A column-vector with 3 coefficients
RowVectorXd b {{1.0, 2.0, 3.0, 4.0}};     // A row-vector with 4 coefficients

```


 Coefficient accessors
=======================

 The primary coefficient accessors and mutators in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") are the overloaded parenthesis operators. For matrices, the row index is always passed first. For vectors, just pass one index. The numbering starts at 0. This example is self-explanatory:

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace [Eigen](namespaceeigen);
 
int main()
{
  MatrixXd m(2,2);
  m(0,0) = 3;
  m(1,0) = 2.5;
  m(0,1) = -1;
  m(1,1) = m(1,0) + m(0,1);
  std::cout << "Here is the matrix m:\n" << m << std::endl;
  VectorXd v(2);
  v(0) = 4;
  v(1) = v(0) - 1;
  std::cout << "Here is the vector v:\n" << v << std::endl;
}
```
 | 
```
Here is the matrix m:
  3  -1
2.5 1.5
Here is the vector v:
4
3

```
 |

 Note that the syntax  `m(index)`  is not restricted to vectors, it is also available for general matrices, meaning index-based access in the array of coefficients. This however depends on the matrix's storage order. All [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") matrices default to column-major storage order, but this can be changed to row-major, see [Storage orders](group__topicstorageorders).

 The operator[] is also overloaded for index-based access in vectors, but keep in mind that C++ doesn't allow operator[] to take more than one argument. We restrict operator[] to vectors, because an awkwardness in the C++ language would make matrix[i,j] compile to the same thing as matrix[j] !

 
 Comma-initialization
======================

 Matrix and vector coefficients can be conveniently set using the so-called *comma-initializer* syntax. For now, it is enough to know this example:

 

| Example: | Output:  |
| --- | --- |
| 
```
Matrix3f m;
m << 1, 2, 3,
     4, 5, 6,
     7, 8, 9;
std::cout << m;

```
 | 
```
1 2 3
4 5 6
7 8 9
```
 |

 The right-hand side can also contain matrix expressions as discussed in [this page](group__tutorialadvancedinitialization).

 
 Resizing
==========

 The current size of a matrix can be retrieved by [rows()](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2), [cols()](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe)  and [size()](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9). These methods return the number of rows, the number of columns and the number of coefficients, respectively. Resizing a dynamic-size matrix is done by the [resize()](classeigen_1_1plainobjectbase#a9fd0703bd7bfe89d6dc80e2ce87c312a)  method.

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace [Eigen](namespaceeigen);
 
int main()
{
  MatrixXd m(2,5);
  m.resize(4,3);
  std::cout << "The matrix m is of size "
            << m.rows() << "x" << m.cols() << std::endl;
  std::cout << "It has " << m.size() << " coefficients" << std::endl;
  VectorXd v(2);
  v.resize(5);
  std::cout << "The vector v is of size " << v.size() << std::endl;
  std::cout << "As a matrix, v is of size "
            << v.rows() << "x" << v.cols() << std::endl;
}

```
 | 
```
The matrix m is of size 4x3
It has 12 coefficients
The vector v is of size 5
As a matrix, v is of size 5x1

```
 |

 The resize() method is a no-operation if the actual matrix size doesn't change; otherwise it is destructive: the values of the coefficients may change. If you want a conservative variant of resize() which does not change the coefficients, use [conservativeResize()](classeigen_1_1plainobjectbase#a712c25be1652e5a64a00f28c8ed11462), see [this page](topicresizing) for more details.

 All these methods are still available on fixed-size matrices, for the sake of API uniformity. Of course, you can't actually resize a fixed-size matrix. Trying to change a fixed size to an actually different value will trigger an assertion failure; but the following code is legal:

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace [Eigen](namespaceeigen);
 
int main()
{
  Matrix4d m;
  m.resize(4,4); // no operation
  std::cout << "The matrix m is of size "
            << m.rows() << "x" << m.cols() << std::endl;
}

```
 | 
```
The matrix m is of size 4x4

```
 |

 
 Assignment and resizing
=========================

 Assignment is the action of copying a matrix into another, using `operator=`. [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") resizes the matrix on the left-hand side automatically so that it matches the size of the matrix on the right-hand size. For example:

 

| Example: | Output:  |
| --- | --- |
| 
```
MatrixXf a(2,2);
std::cout << "a is of size " << a.rows() << "x" << a.cols() << std::endl;
MatrixXf b(3,3);
a = b;
std::cout << "a is now of size " << a.rows() << "x" << a.cols() << std::endl;

```
 | 
```
a is of size 2x2
a is now of size 3x3

```
 |

 Of course, if the left-hand side is of fixed size, resizing it is not allowed.

 If you do not want this automatic resizing to happen (for example for debugging purposes), you can disable it, see [this page](topicresizing).

 
 Fixed vs. Dynamic size
========================

 When should one use fixed sizes (e.g. `Matrix4f`), and when should one prefer dynamic sizes (e.g. `MatrixXf`)? The simple answer is: use fixed sizes for very small sizes where you can, and use dynamic sizes for larger sizes or where you have to. For small sizes, especially for sizes smaller than (roughly) 16, using fixed sizes is hugely beneficial to performance, as it allows [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") to avoid dynamic memory allocation and to unroll loops. Internally, a fixed-size [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") matrix is just a plain array, i.e. doing 



```
Matrix4f mymatrix; 

```

 really amounts to just doing 



```
float mymatrix[16]; 

```

 so this really has zero runtime cost. By contrast, the array of a dynamic-size matrix is always allocated on the heap, so doing 



```
MatrixXf mymatrix(rows,columns); 

```

 amounts to doing 



```
float *mymatrix = new float[rows*columns]; 

```

 and in addition to that, the MatrixXf object stores its number of rows and columns as member variables.

 The limitation of using fixed sizes, of course, is that this is only possible when you know the sizes at compile time. Also, for large enough sizes, say for sizes greater than (roughly) 32, the performance benefit of using fixed sizes becomes negligible. Worse, trying to create a very large matrix using fixed sizes inside a function could result in a stack overflow, since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") will try to allocate the array automatically as a local variable, and this is normally done on the stack. Finally, depending on circumstances, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") can also be more aggressive trying to vectorize (use SIMD instructions) when dynamic sizes are used, see [Vectorization](topicvectorization).

 
 Optional template parameters
==============================

 We mentioned at the beginning of this page that the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class takes six template parameters, but so far we only discussed the first three. The remaining three parameters are optional. Here is the complete list of template parameters: 



```
Matrix<typename Scalar,
       int RowsAtCompileTime,
       int ColsAtCompileTime,
       int Options = 0,
       int MaxRowsAtCompileTime = RowsAtCompileTime,
       int MaxColsAtCompileTime = ColsAtCompileTime>

```
 * `Options` is a bit field. Here, we discuss only one bit: `RowMajor`. It specifies that the matrices of this type use row-major storage order; by default, the storage order is column-major. See the page on [storage orders](group__topicstorageorders). For example, this type means row-major 3x3 matrices: 
```
Matrix<float, 3, 3, RowMajor>

```
* `MaxRowsAtCompileTime` and `MaxColsAtCompileTime` are useful when you want to specify that, even though the exact sizes of your matrices are not known at compile time, a fixed upper bound is known at compile time. The biggest reason why you might want to do that is to avoid dynamic memory allocation. For example the following matrix type uses a plain array of 12 floats, without dynamic memory allocation: 
```
Matrix<float, Dynamic, Dynamic, 0, 3, 4>

```

 
 Convenience typedefs
======================

 [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") defines the following [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") typedefs: 


* MatrixNt for Matrix<type, N, N>. For example, MatrixXi for Matrix<int, Dynamic, Dynamic>.
* VectorNt for Matrix<type, N, 1>. For example, Vector2f for Matrix<float, 2, 1>.
* RowVectorNt for Matrix<type, 1, N>. For example, RowVector3d for Matrix<double, 1, 3>.

 Where: 


* N can be any one of `2`, `3`, `4`, or `X` (meaning `Dynamic`).
* t can be any one of `i` (meaning int), `f` (meaning float), `d` (meaning double), `cf` (meaning complex<float>), or `cd` (meaning complex<double>). The fact that typedefs are only defined for these five types doesn't mean that they are the only supported scalar types. For example, all standard integer types are supported, see [Scalar types](topicscalartypes).

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TutorialMatrixClass.html>

Advanced initialization
=======================

  This page discusses several advanced methods for initializing matrices. It gives more details on the comma-initializer, which was introduced before. It also explains how to get special matrices such as the identity matrix and the zero matrix.

 
 The comma initializer
=======================

 [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") offers a comma initializer syntax which allows the user to easily set all the coefficients of a matrix, vector or array. Simply list the coefficients, starting at the top-left corner and moving from left to right and from the top to the bottom. The size of the object needs to be specified beforehand. If you list too few or too many coefficients, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") will complain.

 

| Example: | Output:  |
| --- | --- |
| 
```
Matrix3f m;
m << 1, 2, 3,
     4, 5, 6,
     7, 8, 9;
std::cout << m;

```
 | 
```
1 2 3
4 5 6
7 8 9
```
 |

 Moreover, the elements of the initialization list may themselves be vectors or matrices. A common use is to join vectors or matrices together. For example, here is how to join two row vectors together. Remember that you have to set the size before you can use the comma initializer.

 

| Example: | Output:  |
| --- | --- |
| 
```
RowVectorXd vec1(3);
vec1 << 1, 2, 3;
std::cout << "vec1 = " << vec1 << std::endl;
 
RowVectorXd vec2(4);
vec2 << 1, 4, 9, 16;
std::cout << "vec2 = " << vec2 << std::endl;
 
RowVectorXd joined(7);
joined << vec1, vec2;
std::cout << "joined = " << joined << std::endl;

```
 | 
```
vec1 = 1 2 3
vec2 =  1  4  9 16
joined =  1  2  3  1  4  9 16

```
 |

 We can use the same technique to initialize matrices with a block structure.

 

| Example: | Output:  |
| --- | --- |
| 
```
MatrixXf matA(2, 2);
matA << 1, 2, 3, 4;
MatrixXf matB(4, 4);
matB << matA, matA/10, matA/10, matA;
std::cout << matB << std::endl;

```
 | 
```
  1   2 0.1 0.2
  3   4 0.3 0.4
0.1 0.2   1   2
0.3 0.4   3   4

```
 |

 The comma initializer can also be used to fill block expressions such as `m.row(i)`. Here is a more complicated way to get the same result as in the first example above:

 

| Example: | Output:  |
| --- | --- |
| 
```
Matrix3f m;
m.row(0) << 1, 2, 3;
m.block(1,0,2,2) << 4, 5, 7, 8;
m.col(2).tail(2) << 6, 9;                   
std::cout << m;

```
 | 
```
1 2 3
4 5 6
7 8 9
```
 |

 
 Special matrices and arrays
=============================

 The [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") and [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") classes have static methods like [Zero()](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761), which can be used to initialize all coefficients to zero. There are three variants. The first variant takes no arguments and can only be used for fixed-size objects. If you want to initialize a dynamic-size object to zero, you need to specify the size. Thus, the second variant requires one argument and can be used for one-dimensional dynamic-size objects, while the third variant requires two arguments and can be used for two-dimensional objects. All three variants are illustrated in the following example:

 

| Example: | Output:  |
| --- | --- |
| 
```
std::cout << "A fixed-size array:\n";
Array33f a1 = [Array33f::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)();
std::cout << a1 << "\n\n";
 
 
std::cout << "A one-dimensional dynamic-size array:\n";
ArrayXf a2 = [ArrayXf::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)(3);
std::cout << a2 << "\n\n";
 
 
std::cout << "A two-dimensional dynamic-size array:\n";
ArrayXXf a3 = [ArrayXXf::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)(3, 4);
std::cout << a3 << "\n";
```
 | 
```
A fixed-size array:
0 0 0
0 0 0
0 0 0

A one-dimensional dynamic-size array:
0
0
0

A two-dimensional dynamic-size array:
0 0 0 0
0 0 0 0
0 0 0 0

```
 |

 Similarly, the static method [Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd)(value) sets all coefficients to `value`. If the size of the object needs to be specified, the additional arguments go before the `value` argument, as in `MatrixXd::Constant(rows, cols, value)`. The method [Random()](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)  fills the matrix or array with random coefficients. The identity matrix can be obtained by calling [Identity()](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f); this method is only available for [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."), not for [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations."), because "identity matrix" is a linear algebra concept. The method [LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(size, low, high) is only available for vectors and one-dimensional arrays; it yields a vector of the specified size whose coefficients are equally spaced between `low` and `high`. The method `LinSpaced()` is illustrated in the following example, which prints a table with angles in degrees, the corresponding angle in radians, and their sine and cosine.

 

| Example: | Output:  |
| --- | --- |
| 
```
ArrayXXf table(10, 4);
table.col(0) = [ArrayXf::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(10, 0, 90);
table.col(1) = M_PI / 180 * table.col(0);
table.col(2) = table.col(1).sin();
table.col(3) = table.col(1).cos();
std::cout << " Degrees Radians Sine Cosine\n";
std::cout << table << std::endl;
```
 | 
```
  Degrees   Radians      Sine    Cosine
        0         0         0         1
       10     0.175     0.174     0.985
       20     0.349     0.342      0.94
       30     0.524       0.5     0.866
       40     0.698     0.643     0.766
       50     0.873     0.766     0.643
       60      1.05     0.866       0.5
       70      1.22      0.94     0.342
       80       1.4     0.985     0.174
       90      1.57         1 -4.37e-08

```
 |

 This example shows that objects like the ones returned by LinSpaced() can be assigned to variables (and expressions). [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") defines utility functions like [setZero()](classeigen_1_1densebase#af230a143de50695d2d1fae93db7e4dcb), [MatrixBase::setIdentity()](classeigen_1_1matrixbase#a18e969adfdf2db4ac44c47fbdc854683) and [DenseBase::setLinSpaced()](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a) to do this conveniently. The following example contrasts three ways to construct the matrix \( J = \bigl[ \begin{smallmatrix} O & I \\ I & O \end{smallmatrix} \bigr] \): using static methods and assignment, using static methods and the comma-initializer, or using the setXxx() methods.

 

| Example: | Output:  |
| --- | --- |
| 
```
const int size = 6;
MatrixXd mat1(size, size);
mat1.topLeftCorner(size/2, size/2)     = [MatrixXd::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)(size/2, size/2);
mat1.topRightCorner(size/2, size/2)    = [MatrixXd::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)(size/2, size/2);
mat1.bottomLeftCorner(size/2, size/2)  = [MatrixXd::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)(size/2, size/2);
mat1.bottomRightCorner(size/2, size/2) = [MatrixXd::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)(size/2, size/2);
std::cout << mat1 << std::endl << std::endl;
 
MatrixXd mat2(size, size);
mat2.topLeftCorner(size/2, size/2).setZero();
mat2.topRightCorner(size/2, size/2).setIdentity();
mat2.bottomLeftCorner(size/2, size/2).setIdentity();
mat2.bottomRightCorner(size/2, size/2).setZero();
std::cout << mat2 << std::endl << std::endl;
 
MatrixXd mat3(size, size);
mat3 << [MatrixXd::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)(size/2, size/2), [MatrixXd::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)(size/2, size/2),
        [MatrixXd::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)(size/2, size/2), [MatrixXd::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)(size/2, size/2);
std::cout << mat3 << std::endl;
 
```
 | 
```
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0

0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0

0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0

```
 |

 A summary of all pre-defined matrix, vector and array objects can be found in the [Quick reference guide](group__quickrefpage).

 
 Usage as temporary objects
============================

 As shown above, static methods as Zero() and Constant() can be used to initialize variables at the time of declaration or at the right-hand side of an assignment operator. You can think of these methods as returning a matrix or array; in fact, they return so-called [expression objects](topiceigenexpressiontemplates) which evaluate to a matrix or array when needed, so that this syntax does not incur any overhead.

 These expressions can also be used as a temporary object. The second example in the [Getting started](gettingstarted) guide, which we reproduce here, already illustrates this.

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace [Eigen](namespaceeigen);
using namespace std;
 
int main()
{
  MatrixXd m = [MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3,3);
  m = (m + [MatrixXd::Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd)(3,3,1.2)) * 50;
  cout << "m =" << endl << m << endl;
  VectorXd v(3);
  v << 1, 2, 3;
  cout << "m \* v =" << endl << m * v << endl;
}
```
 | 
```
m =
  94 89.8 43.5
49.4  101 86.8
88.3 29.8 37.8
m * v =
404
512
261

```
 |

 The expression `m + [MatrixXf::Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd)(3,3,1.2)` constructs the 3-by-3 matrix expression with all its coefficients equal to 1.2 plus the corresponding coefficient of *m*.

 The comma-initializer, too, can also be used to construct temporary objects. The following example constructs a random matrix of size 2-by-3, and then multiplies this matrix on the left with \( \bigl[ \begin{smallmatrix} 0 & 1 \\ 1 & 0 \end{smallmatrix} \bigr] \).

 

| Example: | Output:  |
| --- | --- |
| 
```
MatrixXf mat = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(2, 3);
std::cout << mat << std::endl << std::endl;
mat = (MatrixXf(2,2) << 0, 1, 1, 0).finished() * mat;
std::cout << mat << std::endl;

```
 | 
```
  0.68  0.566  0.823
-0.211  0.597 -0.605

-0.211  0.597 -0.605
  0.68  0.566  0.823

```
 |

 The [finished()](structeigen_1_1commainitializer#a3cf9e2b8a227940f50103130b2d2859a)  method is necessary here to get the actual matrix object once the comma initialization of our temporary submatrix is done. 

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TutorialAdvancedInitialization.html>

The template and typename keywords in C++
=========================================

   
There are two uses for the `template` and `typename` keywords in C++. One of them is fairly well known amongst programmers: to define templates. The other use is more obscure: to specify that an expression refers to a template function or a type. This regularly trips up programmers that use the Eigen library, often leading to error messages from the compiler that are difficult to understand, such as "expected expression" or "no match for operator<".

 
 Using the template and typename keywords to define templates
==============================================================

 The `template` and `typename` keywords are routinely used to define templates. This is not the topic of this page as we assume that the reader is aware of this (otherwise consult a C++ book). The following example should illustrate this use of the `template` keyword.

 
```
template <typename T>
bool isPositive(T x)
{
    return x > 0;
}

```

We could just as well have written `template <class T>`; the keywords `typename` and `class` have the same meaning in this context.

 
 An example showing the second use of the template keyword
===========================================================

 Let us illustrate the second use of the `template` keyword with an example. Suppose we want to write a function which copies all entries in the upper triangular part of a matrix into another matrix, while keeping the lower triangular part unchanged. A straightforward implementation would be as follows:

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <Eigen/Dense>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
 
void copyUpperTriangularPart(MatrixXf& dst, const MatrixXf& src)
{
  dst.triangularView<[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>() = src.triangularView<[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>();
}
 
int main()
{
  MatrixXf m1 = [MatrixXf::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)(4,4);
  MatrixXf m2 = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
  std::cout << "m2 before copy:" << std::endl;
  std::cout << m2 << std::endl << std::endl;
  copyUpperTriangularPart(m2, m1);
  std::cout << "m2 after copy:" << std::endl;
  std::cout << m2 << std::endl << std::endl;
}
```
 | 
```
m2 before copy:
   0.68   0.823  -0.444   -0.27
 -0.211  -0.605   0.108  0.0268
  0.566   -0.33 -0.0452   0.904
  0.597   0.536   0.258   0.832

m2 after copy:
     1      1      1      1
-0.211      1      1      1
 0.566  -0.33      1      1
 0.597  0.536  0.258      1


```
 |

 That works fine, but it is not very flexible. First, it only works with dynamic-size matrices of single-precision floats; the function `copyUpperTriangularPart()` does not accept static-size matrices or matrices with double-precision numbers. Second, if you use an expression such as `mat.topLeftCorner(3,3)` as the parameter `src`, then this is copied into a temporary variable of type MatrixXf; this copy can be avoided.

 As explained in [Writing Functions Taking Eigen Types as Parameters](topicfunctiontakingeigentypes), both issues can be resolved by making `copyUpperTriangularPart()` accept any object of type [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions."). This leads to the following code:

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <Eigen/Dense>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
 
template <typename Derived1, typename Derived2>
void copyUpperTriangularPart(MatrixBase<Derived1>& dst, const MatrixBase<Derived2>& src)
{
  /\* Note the 'template' keywords in the following line! \*/
  dst.template triangularView<Upper>() = src.template triangularView<Upper>();
}
 
int main()
{
  MatrixXi m1 = [MatrixXi::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)(5,5);
  MatrixXi m2 = [MatrixXi::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
  std::cout << "m2 before copy:" << std::endl;
  std::cout << m2 << std::endl << std::endl;
  copyUpperTriangularPart(m2, m1.topLeftCorner(4,4));
  std::cout << "m2 after copy:" << std::endl;
  std::cout << m2 << std::endl << std::endl;
}

```
 | 
```
m2 before copy:
 7  9 -5 -3
-2 -6  1  0
 6 -3  0  9
 6  6  3  9

m2 after copy:
 1  1  1  1
-2  1  1  1
 6 -3  1  1
 6  6  3  1


```
 |

 The one line in the body of the function `copyUpperTriangularPart()` shows the second, more obscure use of the `template` keyword in C++. Even though it may look strange, the `template` keywords are necessary according to the standard. Without it, the compiler may reject the code with an error message like "no match for operator<".

 
 Explanation
=============

 The reason that the `template` keyword is necessary in the last example has to do with the rules for how templates are supposed to be compiled in C++. The compiler has to check the code for correct syntax at the point where the template is defined, without knowing the actual value of the template arguments (`Derived1` and `Derived2` in the example). That means that the compiler cannot know that `dst.triangularView` is a member template and that the following < symbol is part of the delimiter for the template parameter. Another possibility would be that `dst.triangularView` is a member variable with the < symbol referring to the `operator<()` function. In fact, the compiler should choose the second possibility, according to the standard. If `dst.triangularView` is a member template (as in our case), the programmer should specify this explicitly with the `template` keyword and write `dst.template triangularView`.

 The precise rules are rather complicated, but ignoring some subtleties we can summarize them as follows:


* A *dependent name* is name that depends (directly or indirectly) on a template parameter. In the example, `dst` is a dependent name because it is of type `[MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.")<Derived1>` which depends on the template parameter `Derived1`.
* If the code contains either one of the constructs `xxx.yyy` or `xxx->yyy` and `xxx` is a dependent name and `yyy` refers to a member template, then the `template` keyword must be used before `yyy`, leading to `xxx.template yyy` or `xxx->template yyy`.
* If the code contains the construct `xxx::yyy` and `xxx` is a dependent name and `yyy` refers to a member typedef, then the `typename` keyword must be used before the whole construct, leading to `typename xxx::yyy`.

 As an example where the `typename` keyword is required, consider the following code in [Sparse matrix manipulations](group__tutorialsparse) for iterating over the non-zero entries of a sparse matrix type:

 
```
SparseMatrixType mat(rows,cols);
for (int k=0; k<mat.outerSize(); ++k)
  for (SparseMatrixType::InnerIterator it(mat,k); it; ++it)
  {
    /\* ... \*/
  }

```

If `SparseMatrixType` depends on a template parameter, then the `typename` keyword is required:

 
```
template <typename T>
void iterateOverSparseMatrix(const SparseMatrix<T>& mat;
{
  for (int k=0; k<m1.outerSize(); ++k)
    for (typename SparseMatrix<T>::InnerIterator it(mat,k); it; ++it)
    {
      /\* ... \*/
    }
}

```


 Resources for further reading
===============================

 For more information and a fuller explanation of this topic, the reader may consult the following sources:


* The book "C++ Template Metaprogramming" by David Abrahams and Aleksey Gurtovoy contains a very good explanation in Appendix B ("The typename and template Keywords") which formed the basis for this page.
* <http://pages.cs.wisc.edu/~driscoll/typename.html>
* <http://www.parashift.com/c++-faq-lite/templates.html#faq-35.18>
* <http://www.comeaucomputing.com/techtalk/templates/#templateprefix>
* <http://www.comeaucomputing.com/techtalk/templates/#typename>

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicTemplateKeyword.html>

Quick reference guide
=====================

  

---

  

 
 Modules and Header files
==========================

 The [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") library is divided in a Core module and several additional modules. Each module has a corresponding header file which has to be included in order to use the module. The `Dense` and `[Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")` header files are provided to conveniently gain access to several modules at once.

 

| Module | Header file | Contents  |
| --- | --- | --- |
| [Core](group__core__module)  | 
```
#include <Eigen/Core>

```
 | [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") and [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") classes, basic linear algebra (including triangular and selfadjoint products), array manipulation  |
| [Geometry](group__geometry__module)  | 
```
#include <Eigen/Geometry>

```
 | [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space."), [Translation](classeigen_1_1translation "Represents a translation transformation."), Scaling, [Rotation2D](classeigen_1_1rotation2d "Represents a rotation/orientation in a 2 dimensional space.") and 3D rotations ([Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations."), [AngleAxis](classeigen_1_1angleaxis "Represents a 3D rotation as a rotation angle around an arbitrary 3D axis."))  |
| [LU](group__lu__module)  | 
```
#include <Eigen/LU>

```
 | [Inverse](classeigen_1_1inverse "Expression of the inverse of another expression."), determinant, LU decompositions with solver ([FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features."), [PartialPivLU](classeigen_1_1partialpivlu "LU decomposition of a matrix with partial pivoting, and related features."))  |
| [Cholesky](group__cholesky__module)  | 
```
#include <Eigen/Cholesky>

```
 | [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") and [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") Cholesky factorization with solver  |
| [Householder](group__householder__module)  | 
```
#include <Eigen/Householder>

```
 | Householder transformations; this module is used by several linear algebra modules  |
| [SVD](group__svd__module)  | 
```
#include <Eigen/SVD>

```
 | SVD decompositions with least-squares solver ([JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix."), [BDCSVD](classeigen_1_1bdcsvd "class Bidiagonal Divide and Conquer SVD"))  |
| [QR](group__qr__module)  | 
```
#include <Eigen/QR>

```
 | QR decomposition with solver ([HouseholderQR](classeigen_1_1householderqr "Householder QR decomposition of a matrix."), [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting."), [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with full pivoting."))  |
| [Eigenvalues](group__eigenvalues__module)  | 
```
#include <Eigen/Eigenvalues>

```
 | Eigenvalue, eigenvector decompositions ([EigenSolver](classeigen_1_1eigensolver "Computes eigenvalues and eigenvectors of general matrices."), [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver "Computes eigenvalues and eigenvectors of selfadjoint matrices."), [ComplexEigenSolver](classeigen_1_1complexeigensolver "Computes eigenvalues and eigenvectors of general complex matrices."))  |
| [Sparse](group__sparse__module)  | 
```
#include <Eigen/Sparse>

```
 | Sparse matrix storage and related basic linear algebra ([SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation."), [SparseVector](classeigen_1_1sparsevector "a sparse vector class"))  (see [Quick reference guide for sparse matrices](group__sparsequickrefpage) for details on sparse modules)  |
|  | 
```
#include <Eigen/Dense>

```
 | Includes Core, Geometry, LU, Cholesky, SVD, QR, and Eigenvalues header files  |
|  | 
```
#include <Eigen/Eigen>

```
 | Includes Dense and Sparse header files (the whole [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") library)  |

  

 
 Array, matrix and vector types
================================

 **Recall:** [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") provides two kinds of dense objects: mathematical matrices and vectors which are both represented by the template class [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."), and general 1D and 2D arrays represented by the template class [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations."): 



```
typedef Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime, Options> MyMatrixType;
typedef Array<Scalar, RowsAtCompileTime, ColsAtCompileTime, Options> MyArrayType;

```

* `Scalar` is the scalar type of the coefficients (e.g., `float`, `double`, `bool`, `int`, etc.).
* `RowsAtCompileTime` and `ColsAtCompileTime` are the number of rows and columns of the matrix as known at compile-time or `Dynamic`.
* `Options` can be `ColMajor` or `RowMajor`, default is `ColMajor`. (see class [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") for more options)

 All combinations are allowed: you can have a matrix with a fixed number of rows and a dynamic number of columns, etc. The following are all valid: 



```
Matrix<double, 6, Dynamic>                  // Dynamic number of columns (heap allocation)
Matrix<double, Dynamic, 2>                  // Dynamic number of rows (heap allocation)
Matrix<double, Dynamic, Dynamic, RowMajor>  // Fully dynamic, row major (heap allocation)
Matrix<double, 13, 3>                       // Fully fixed (usually allocated on stack)

```

In most cases, you can simply use one of the convenience typedefs for [matrices](group__matrixtypedefs) and [arrays](group__arraytypedefs). Some examples: 




| Matrices | Arrays  |
| --- | --- |
| 
```
Matrix<float,Dynamic,Dynamic>   <=>   MatrixXf
Matrix<double,Dynamic,1>        <=>   VectorXd
Matrix<int,1,Dynamic>           <=>   RowVectorXi
Matrix<float,3,3>               <=>   Matrix3f
Matrix<float,4,1>               <=>   Vector4f

```
 | 
```
Array<float,Dynamic,Dynamic>    <=>   ArrayXXf
Array<double,Dynamic,1>         <=>   ArrayXd
Array<int,1,Dynamic>            <=>   RowArrayXi
Array<float,3,3>                <=>   Array33f
Array<float,4,1>                <=>   Array4f

```
 |

 Conversion between the matrix and array worlds: 



```
Array44f a1, a2;
Matrix4f m1, m2;
m1 = a1 * a2;                     // coeffwise product, implicit conversion from array to matrix.
a1 = m1 * m2;                     // matrix product, implicit conversion from matrix to array.
a2 = a1 + m1.array();             // mixing array and matrix is forbidden
m2 = a1.matrix() + m1;            // and explicit conversion is required.
ArrayWrapper<Matrix4f> m1a(m1);   // m1a is an alias for m1.array(), they share the same coefficients
MatrixWrapper<Array44f> a1m(a1);

```

In the rest of this document we will use the following symbols to emphasize the features which are specifics to a given kind of object: 


* [\*](#matrixonly) linear algebra matrix and vector only
* [\*](#arrayonly) array objects only

 
 Basic matrix manipulation
---------------------------

 

|  | 1D objects | 2D objects | Notes  |
| --- | --- | --- | --- |
| Constructors  | 
```
Vector4d  v4;
Vector2f  v1(x, y);
Array3i   v2(x, y, z);
Vector4d  v3(x, y, z, w);
 
VectorXf  v5; // empty object
ArrayXf   v6(size);

```
 | 
```
Matrix4f  m1;
 
 
 
 
MatrixXf  m5; // empty object
MatrixXf  m6(nb_rows, nb_columns);

```
 | By default, the coefficients  are left uninitialized  |
| Comma initializer  | 
```
Vector3f  v1;     v1 << x, y, z;
ArrayXf   v2(4);  v2 << 1, 2, 3, 4;

```
 | 
```
Matrix3f  m1;   m1 << 1, 2, 3,
                      4, 5, 6,
                      7, 8, 9;

```
 |   |
| Comma initializer (bis)  | 
```
int rows=5, cols=5;
MatrixXf m(rows,cols);
m << (Matrix3f() << 1, 2, 3, 4, 5, 6, 7, 8, 9).finished(),
     [MatrixXf::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)(3,cols-3),
     [MatrixXf::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)(rows-3,3),
     [MatrixXf::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)(rows-3,cols-3);
cout << m;
```
 | output: 

```
1 2 3 0 0
4 5 6 0 0
7 8 9 0 0
0 0 0 1 0
0 0 0 0 1
```
  |
| Runtime info  | 
```
vector.size();
 
vector.innerStride();
vector.data();

```
 | 
```
matrix.rows();          matrix.cols();
matrix.innerSize();     matrix.outerSize();
matrix.innerStride();   matrix.outerStride();
matrix.data();

```
 | Inner/Outer\* are storage order dependent  |
| Compile-time info  | 
```
ObjectType::Scalar              ObjectType::RowsAtCompileTime
ObjectType::RealScalar          ObjectType::ColsAtCompileTime
ObjectType::Index               ObjectType::SizeAtCompileTime

```
 |  |
| Resizing  | 
```
vector.resize(size);
 
 
vector.resizeLike(other_vector);
vector.conservativeResize(size);

```
 | 
```
matrix.resize(nb_rows, nb_cols);
matrix.resize(Eigen::NoChange, nb_cols);
matrix.resize(nb_rows, Eigen::NoChange);
matrix.resizeLike(other_matrix);
matrix.conservativeResize(nb_rows, nb_cols);

```
 | no-op if the new sizes match, otherwise data are lost  resizing with data preservation  |
| Coeff access with  range checking  | 
```
vector(i)     vector.x()
vector[i]     vector.y()
              vector.z()
              vector.w()

```
 | 
```
matrix(i,j)

```
 | Range checking is disabled if  NDEBUG or EIGEN\_NO\_DEBUG is defined  |
| Coeff access without  range checking  | 
```
vector.coeff(i)
vector.coeffRef(i)

```
 | 
```
matrix.coeff(i,j)
matrix.coeffRef(i,j)

```
 |   |
| Assignment/copy  | 
```
object = expression;
object_of_float = expression_of_double.cast<float>();

```
 | the destination is automatically resized (if possible)  |

 
 Predefined Matrices
---------------------

 

| Fixed-size matrix or vector  | Dynamic-size matrix  | Dynamic-size vector  |
| --- | --- | --- |
| 
```
typedef {Matrix3f|Array33f} FixedXD;
FixedXD x;
 
x = FixedXD::Zero();
x = FixedXD::Ones();
x = FixedXD::Constant(value);
x = FixedXD::Random();
x = FixedXD::LinSpaced(size, low, high);
 
x.setZero();
x.setOnes();
x.setConstant(value);
x.setRandom();
x.setLinSpaced(size, low, high);

```
 | 
```
typedef {MatrixXf|ArrayXXf} Dynamic2D;
Dynamic2D x;
 
x = Dynamic2D::Zero(rows, cols);
x = Dynamic2D::Ones(rows, cols);
x = Dynamic2D::Constant(rows, cols, value);
x = Dynamic2D::Random(rows, cols);
N/A
 
x.setZero(rows, cols);
x.setOnes(rows, cols);
x.setConstant(rows, cols, value);
x.setRandom(rows, cols);
N/A

```
 | 
```
typedef {VectorXf|ArrayXf} Dynamic1D;
Dynamic1D x;
 
x = Dynamic1D::Zero(size);
x = Dynamic1D::Ones(size);
x = Dynamic1D::Constant(size, value);
x = Dynamic1D::Random(size);
x = Dynamic1D::LinSpaced(size, low, high);
 
x.setZero(size);
x.setOnes(size);
x.setConstant(size, value);
x.setRandom(size);
x.setLinSpaced(size, low, high);

```
  |
| Identity and [basis vectors](classeigen_1_1matrixbase#ac7a03a61014f37ddd2fe61ebac0c9539)  [\*](#matrixonly) |
| 
```
x = FixedXD::Identity();
x.setIdentity();
 
[Vector3f::UnitX](classeigen_1_1matrixbase#a8a555b7cf626cced54670b98668c4e6d)() // 1 0 0
Vector3f::UnitY() // 0 1 0
Vector3f::UnitZ() // 0 0 1
Vector4f::Unit(i)
x.setUnit(i);
```
 | 
```
x = Dynamic2D::Identity(rows, cols);
x.setIdentity(rows, cols);
 
 
 
N/A

```
 | 
```
N/A
 
 
[VectorXf::Unit](classeigen_1_1matrixbase#ac7a03a61014f37ddd2fe61ebac0c9539)(size,i)
x.setUnit(size,i);
[VectorXf::Unit](classeigen_1_1matrixbase#ac7a03a61014f37ddd2fe61ebac0c9539)(4,1) == Vector4f(0,1,0,0)
                    == [Vector4f::UnitY](classeigen_1_1matrixbase#a00850083489e20249b1d05b394fc5efc)()
```
 |

 Note that it is allowed to call any of the `set*` functions to a dynamic-sized vector or matrix without passing new sizes. For instance: 



```
MatrixXi M(3,3);
M.setIdentity();

```


 Mapping external arrays
-------------------------

 

|  |  |
| --- | --- |
| Contiguous  memory  | 
```
float data[] = {1,2,3,4};
Map<Vector3f> v1(data);       // uses v1 as a Vector3f object
Map<ArrayXf>  v2(data,3);     // uses v2 as a ArrayXf object
Map<Array22f> m1(data);       // uses m1 as a Array22f object
Map<MatrixXf> m2(data,2,2);   // uses m2 as a MatrixXf object

```
 |
| Typical usage  of strides  | 
```
float data[] = {1,2,3,4,5,6,7,8,9};
Map<VectorXf,0,InnerStride<2> >  v1(data,3);                      // = [1,3,5]
Map<VectorXf,0,InnerStride<> >   v2(data,3,InnerStride<>(3));     // = [1,4,7]
Map<MatrixXf,0,OuterStride<3> >  m2(data,2,3);                    // both lines |1,4,7|
Map<MatrixXf,0,OuterStride<> >   m1(data,2,3,OuterStride<>(3));   // are equal to: |2,5,8|

```
 |

  

 
 Arithmetic Operators
======================

 

|  |  |
| --- | --- |
| add  subtract | 
```
mat3 = mat1 + mat2;           mat3 += mat1;
mat3 = mat1 - mat2;           mat3 -= mat1;

```
 |
| scalar product | 
```
mat3 = mat1 * s1;             mat3 *= s1;           mat3 = s1 * mat1;
mat3 = mat1 / s1;             mat3 /= s1;

```
 |
| matrix/vector  products [\*](#matrixonly) | 
```
col2 = mat1 * col1;
row2 = row1 * mat1;           row1 *= mat1;
mat3 = mat1 * mat2;           mat3 *= mat1; 

```
 |
| transposition  adjoint [\*](#matrixonly) | 
```
mat1 = mat2.transpose();      mat1.transposeInPlace();
mat1 = mat2.adjoint();        mat1.adjointInPlace();

```
 |
| [dot](classeigen_1_1matrixbase#adfd32bf5fcf6ee603c924dde9bf7bc39)  product  inner product [\*](#matrixonly) | 
```
scalar = vec1.dot(vec2);
scalar = col1.adjoint() * col2;
scalar = (col1.adjoint() * col2).value();

```
 |
| outer product [\*](#matrixonly) | 
```
mat = col1 * col2.transpose();

```
  |
| [norm](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975)   [normalization](classeigen_1_1matrixbase#a5cf2fd4c57e59604fd4116158fd34308)  [\*](#matrixonly) | 
```
scalar = vec1.norm();         scalar = vec1.squaredNorm()
vec2 = vec1.normalized();     vec1.normalize(); // inplace 

```
  |
| [cross product](group__geometry__module#ga0024b44eca99cb7135887c2aaf319d28)  [\*](#matrixonly) | 
```
#include <Eigen/Geometry>
vec3 = vec1.cross(vec2);

```
 |

  

 
 Coefficient-wise & Array operators
====================================

 In addition to the aforementioned operators, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") supports numerous coefficient-wise operator and functions. Most of them unambiguously makes sense in array-world[\*](#arrayonly). The following operators are readily available for arrays, or available through .array() for vectors and matrices:

 

|  |  |
| --- | --- |
| Arithmetic operators | 
```
array1 * array2     array1 / array2     array1 *= array2    array1 /= array2
array1 + scalar     array1 - scalar     array1 += scalar    array1 -= scalar

```
 |
| Comparisons | 
```
array1 < array2     array1 > array2     array1 < scalar     array1 > scalar
array1 <= array2    array1 >= array2    array1 <= scalar    array1 >= scalar
array1 == array2    array1 != array2    array1 == scalar    array1 != scalar
array1.min(array2)  array1.max(array2)  array1.min(scalar)  array1.max(scalar)

```
 |
| Trigo, power, and  misc functions  and the STL-like variants | 
```
array1.abs2()
array1.abs()                  [abs](namespaceeigen#ae27242789e7e62a8c42579b79be59b1a)(array1)
array1.sqrt()                 [sqrt](namespaceeigen#af4f536e8ea56702e63088efb3706d1f0)(array1)
array1.log()                  [log](namespaceeigen#ae8bb75ba4f5f30a7571146dbfa653c6d)(array1)
array1.log10()                [log10](namespaceeigen#a25256faeec3ffd0f3615a0e1e45dfb14)(array1)
array1.exp()                  [exp](namespaceeigen#ae491aecf7dab66ac7e11008c5766694d)(array1)
array1.pow(array2)            pow(array1,array2)
array1.pow(scalar)            pow(array1,scalar)
                              pow(scalar,array2)
array1.square()
array1.cube()
array1.inverse()
 
array1.sin()                  [sin](namespaceeigen#ae6e8ad270ff41c088d7651567594f796)(array1)
array1.cos()                  [cos](namespaceeigen#ad01d50a42869218f1d54af13f71517a6)(array1)
array1.tan()                  [tan](namespaceeigen#a3bc116a6243f38c22f851581aa7b521a)(array1)
array1.asin()                 [asin](namespaceeigen#a6c5c246b877ac331495d21e7a5d51616)(array1)
array1.acos()                 [acos](namespaceeigen#a3fe3a136370fefae062591304c6a7ebd)(array1)
array1.atan()                 [atan](namespaceeigen#a230744e17147d12e8ef3f2fc3796f64f)(array1)
array1.sinh()                 [sinh](namespaceeigen#af284ce359b6efd4b594a9f8a1f5e5d96)(array1)
array1.cosh()                 [cosh](namespaceeigen#a34b99a26a2a1e7ff985a5ace16eedfcb)(array1)
array1.tanh()                 [tanh](namespaceeigen#a0110c233d357169fd58fdf5656992a98)(array1)
array1.arg()                  [arg](namespaceeigen#aa539408a09481d35961e11ee78793db1)(array1)
 
array1.floor()                [floor](namespaceeigen#abf03d773a87830bc7fde51bcd94c89a0)(array1)
array1.ceil()                 [ceil](namespaceeigen#aa73e38be0689a463ae14141b9cf89c35)(array1)
array1.round()                [round](namespaceeigen#ad9eaa98e8016ef17024a18a2f3e5bef3)(aray1)
 
array1.isFinite()             [isfinite](namespaceeigen#aba24ec81dec745a00b7f33adead89811)(array1)
array1.isInf()                [isinf](namespaceeigen#a1f1103712e337c4c96a05f949637a4c8)(array1)
array1.isNaN()                [isnan](namespaceeigen#a99adfc5178f3fd5488304284388b2a10)(array1)
```
 |

 The following coefficient-wise operators are available for all kind of expressions (matrices, vectors, and arrays), and for both real or complex scalar types:

 

| [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s API | STL-like APIs[\*](#arrayonly) | Comments  |
| --- | --- | --- |
| 
```
mat1.real()
mat1.imag()
mat1.conjugate()

```
 | 
```
[real](namespaceeigen#ac74dc920119b1eba45e9218d9f402afc)(array1)
[imag](namespaceeigen#a04d60a3c8a266f63c08e03615c1985c9)(array1)
[conj](namespaceeigen#ab84f39a06a18e1ebb23f8be80345b79d)(array1)
```
 | 
```
// read-write, no-op for real expressions
// read-only for real, read-write for complexes
// no-op for real expressions

```
 |

 Some coefficient-wise operators are readily available for for matrices and vectors through the following cwise\* methods: 




| [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") API [\*](#matrixonly) | Via [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") conversions  |
| --- | --- |
| 
```
mat1.cwiseMin(mat2)         mat1.cwiseMin(scalar)
mat1.cwiseMax(mat2)         mat1.cwiseMax(scalar)
mat1.cwiseAbs2()
mat1.cwiseAbs()
mat1.cwiseSqrt()
mat1.cwiseInverse()
mat1.cwiseProduct(mat2)
mat1.cwiseQuotient(mat2)
mat1.cwiseEqual(mat2)       mat1.cwiseEqual(scalar)
mat1.cwiseNotEqual(mat2)

```
 | 
```
mat1.array().min(mat2.array())    mat1.array().min(scalar)
mat1.array().max(mat2.array())    mat1.array().max(scalar)
mat1.array().abs2()
mat1.array().abs()
mat1.array().sqrt()
mat1.array().inverse()
mat1.array() * mat2.array()
mat1.array() / mat2.array()
mat1.array() == mat2.array()      mat1.array() == scalar
mat1.array() != mat2.array()

```
 |

 The main difference between the two API is that the one based on cwise\* methods returns an expression in the matrix world, while the second one (based on .array()) returns an array expression. Recall that .array() has no cost, it only changes the available API and interpretation of the data.

 It is also very simple to apply any user defined function `foo` using DenseBase::unaryExpr together with [std::ptr\_fun](http://en.cppreference.com/w/cpp/utility/functional/ptr_fun) (c++03, deprecated or removed in newer C++ versions), [std::ref](http://en.cppreference.com/w/cpp/utility/functional/ref) (c++11), or [lambdas](http://en.cppreference.com/w/cpp/language/lambda) (c++11): 



```
mat1.unaryExpr(std::ptr_fun(foo));
mat1.unaryExpr(std::ref(foo));
mat1.unaryExpr([](double x) { return foo(x); });

```

Please note that it's not possible to pass a raw function pointer to `unaryExpr`, so please warp it as shown above.

  

 
 Reductions
============

 [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") provides several reduction methods such as: [minCoeff()](classeigen_1_1densebase#a0739f9c868c331031c7810e21838dcb2) , [maxCoeff()](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1) , [sum()](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c) , [prod()](classeigen_1_1densebase#af119d9a4efe5a15cd83c1ccdf01b3a4f) , [trace()](classeigen_1_1matrixbase#a544b609f65eb2bd3e368b3fc2d79479e)  [\*](#matrixonly), [norm()](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975)  [\*](#matrixonly), [squaredNorm()](classeigen_1_1matrixbase#ac8da566526419f9742a6c471bbd87e0a)  [\*](#matrixonly), [all()](classeigen_1_1densebase#ae42ab60296c120e9f45ce3b44e1761a4) , and [any()](classeigen_1_1densebase#abfbf4cb72dd577e62fbe035b1c53e695) . All reduction operations can be done matrix-wise, [column-wise](classeigen_1_1densebase#a1c0e1b6067ec1de6cb8799da55aa7d30)  or [row-wise](classeigen_1_1densebase#a6daa3a3156ca0e0722bf78638e1c7f28) . Usage example: 




|  |  |  |
| --- | --- | --- |
| 
```
      5 3 1
mat = 2 7 8
      9 4 6 

```
 | 
```
mat.minCoeff(); 

```
 | 
```
1 

```
 |
| 
```
mat.colwise().minCoeff(); 

```
 | 
```
2 3 1 

```
 |
| 
```
mat.rowwise().minCoeff(); 

```
 | 
```
1
2
4

```
 |

 Special versions of [minCoeff](classeigen_1_1densebase#aa28152ba4a42b2d112e5fec5469ec4c1)  and [maxCoeff](classeigen_1_1densebase#a3780b7a9cd184d0b4f3ea797eba9e2b3) : 



```
int i, j;
s = vector.minCoeff(&i);        // s == vector[i]
s = matrix.maxCoeff(&i, &j);    // s == matrix(i,j)

```

 Typical use cases of [all()](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14) and any(): 



```
if((array1 > 0).[all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14)()) ...      // if all coefficients of array1 are greater than 0 ...
if((array1 < array2).any()) ... // if there exist a pair i,j such that array1(i,j) < array2(i,j) ...
```

 
 Sub-matrices
==============

  **PLEASE HELP US IMPROVING THIS SECTION.** Eigen 3.4 supports a much improved API for sub-matrices, including, slicing and indexing from arrays: [Slicing and Indexing](group__tutorialslicingindexing) 
Read-write access to a [column](group__quickrefpage)  or a [row](group__quickrefpage)  of a matrix (or array): 



```
mat1.row(i) = mat2.col(j);
mat1.col(j1).swap(mat1.col(j2));

```

Read-write access to sub-vectors: 




| Default versions  | Optimized versions when the size  is known at compile time  |   |
| --- | --- | --- |
| 
```
vec1.head(n)

```
 | 
```
vec1.head<n>()

```
 | the first `n` coeffs  |
| 
```
vec1.tail(n)

```
 | 
```
vec1.tail<n>()

```
 | the last `n` coeffs  |
| 
```
vec1.segment(pos,n)

```
 | 
```
vec1.segment<n>(pos)

```
 | the `n` coeffs in the  range [`pos` : `pos` + `n` - 1]  |
|  Read-write access to sub-matrices:  |
| 
```
mat1.block(i,j,rows,cols)

```
 [(more)](group__quickrefpage)  | 
```
mat1.block<rows,cols>(i,j)

```
 [(more)](group__quickrefpage)  | the `rows` x `cols` sub-matrix  starting from position (`i`,`j`)  |
| 
```
mat1.topLeftCorner(rows,cols)
mat1.topRightCorner(rows,cols)
mat1.bottomLeftCorner(rows,cols)
mat1.bottomRightCorner(rows,cols)

```
 | 
```
mat1.topLeftCorner<rows,cols>()
mat1.topRightCorner<rows,cols>()
mat1.bottomLeftCorner<rows,cols>()
mat1.bottomRightCorner<rows,cols>()

```
 | the `rows` x `cols` sub-matrix  taken in one of the four corners  |
| 
```
mat1.topRows(rows)
mat1.bottomRows(rows)
mat1.leftCols(cols)
mat1.rightCols(cols)

```
 | 
```
mat1.topRows<rows>()
mat1.bottomRows<rows>()
mat1.leftCols<cols>()
mat1.rightCols<cols>()

```
 | specialized versions of block()  when the block fit two corners  |

  
 Miscellaneous operations
==========================

  **PLEASE HELP US IMPROVING THIS SECTION.** Eigen 3.4 supports a new API for reshaping: [Reshape](group__tutorialreshape) 

 Reverse
---------

 Vectors, rows, and/or columns of a matrix can be reversed (see [DenseBase::reverse()](classeigen_1_1densebase#a38ea394036d8b096abf322469c80198f), [DenseBase::reverseInPlace()](classeigen_1_1densebase#adb8045155ea45f7961fc2a5170e1d921), [VectorwiseOp::reverse()](classeigen_1_1vectorwiseop#ab8caf5367e2bd636536c8a0e0c89fe15)). 



```
vec.reverse()           mat.colwise().reverse()   mat.rowwise().reverse()
vec.reverseInPlace()

```


 Replicate
-----------

 Vectors, matrices, rows, and/or columns can be replicated in any direction (see [DenseBase::replicate()](classeigen_1_1densebase#a60dadfe80b813d808e91e4521c722a8e), [VectorwiseOp::replicate()](classeigen_1_1vectorwiseop#a5f0c8dc9e9c4aeaa2057f15800f5c18c)) 



```
vec.replicate(times)                                          vec.replicate<Times>
mat.replicate(vertical_times, horizontal_times)               mat.replicate<VerticalTimes, HorizontalTimes>()
mat.colwise().replicate(vertical_times, horizontal_times)     mat.colwise().replicate<VerticalTimes, HorizontalTimes>()
mat.rowwise().replicate(vertical_times, horizontal_times)     mat.rowwise().replicate<VerticalTimes, HorizontalTimes>()

```

 
 Diagonal, Triangular, and Self-adjoint matrices
=================================================

 (matrix world [\*](#matrixonly))

 
 Diagonal matrices
-------------------

 

| Operation | Code  |
| --- | --- |
| view a vector [as a diagonal matrix](classeigen_1_1matrixbase#a14235b62c90f93fe910070b4743782d0)   | 
```
mat1 = vec1.asDiagonal();

```
 |
| Declare a diagonal matrix | 
```
DiagonalMatrix<Scalar,SizeAtCompileTime> diag1(size);
diag1.diagonal() = vector;

```
 |
| Access the [diagonal](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3)  and [super/sub diagonals](classeigen_1_1matrixbase#a8a13d4b8efbd7797ee8efd3dd988a7f7)  of a matrix as a vector (read/write)  | 
```
vec1 = mat1.diagonal();        mat1.diagonal() = vec1;      // main diagonal
vec1 = mat1.diagonal(+n);      mat1.diagonal(+n) = vec1;    // n-th super diagonal
vec1 = mat1.diagonal(-n);      mat1.diagonal(-n) = vec1;    // n-th sub diagonal
vec1 = mat1.diagonal<1>();     mat1.diagonal<1>() = vec1;   // first super diagonal
vec1 = mat1.diagonal<-2>();    mat1.diagonal<-2>() = vec1;  // second sub diagonal

```
  |
| Optimized products and inverse  | 
```
mat3  = scalar * diag1 * mat1;
mat3 += scalar * mat1 * vec1.asDiagonal();
mat3 = vec1.asDiagonal().inverse() * mat1
mat3 = mat1 * diag1.inverse()

```
  |

 
 Triangular views
------------------

 [TriangularView](classeigen_1_1triangularview "Expression of a triangular part in a matrix.") gives a view on a triangular part of a dense matrix and allows to perform optimized operations on it. The opposite triangular part is never referenced and can be used to store other information.

 
Note
The .triangularView() template member function requires the `template` keyword if it is used on an object of a type that depends on a template parameter; see [The template and typename keywords in C++](topictemplatekeyword) for details.
 

| Operation | Code  |
| --- | --- |
| Reference to a triangular with optional  unit or null diagonal (read/write):  | 
```
m.triangularView<Xxx>()

```
  `Xxx` = [Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1), [Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749), [StrictlyUpper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda7b37877e0b9b0df28c9c2b669a633265), [StrictlyLower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda2424988b6fca98be70b595632753ba81), [UnitUpper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdadd28224d7ea92689930be73c1b50b0ad), [UnitLower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda8f40b928c10a71ba03e5f75ad2a72fda) |
| Writing to a specific triangular part: (only the referenced triangular part is evaluated)  | 
```
m1.triangularView<[Eigen::Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>() = m2 + m3 
```
 |
| Conversion to a dense matrix setting the opposite triangular part to zero:  | 
```
m2 = m1.triangularView<[Eigen::UnitUpper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdadd28224d7ea92689930be73c1b50b0ad)>()
```
 |
| Products:  | 
```
m3 += s1 * m1.adjoint().triangularView<[Eigen::UnitUpper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdadd28224d7ea92689930be73c1b50b0ad)>() * m2
m3 -= s1 * m2.conjugate() * m1.adjoint().triangularView<[Eigen::Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>() 

```
 |
| Solving linear equations: \( M\_2 := L\_1^{-1} M\_2 \)  \( M\_3 := {L\_1^\*}^{-1} M\_3 \)  \( M\_4 := M\_4 U\_1^{-1} \)  |  
```
L1.triangularView<[Eigen::UnitLower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda8f40b928c10a71ba03e5f75ad2a72fda)>().solveInPlace(M2)
L1.triangularView<[Eigen::Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>().adjoint().solveInPlace(M3)
U1.triangularView<[Eigen::Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>().solveInPlace<OnTheRight>(M4)
```
 |

 
 Symmetric/selfadjoint views
-----------------------------

 Just as for triangular matrix, you can reference any triangular part of a square matrix to see it as a selfadjoint matrix and perform special and optimized operations. Again the opposite triangular part is never referenced and can be used to store other information.

 
Note
The .selfadjointView() template member function requires the `template` keyword if it is used on an object of a type that depends on a template parameter; see [The template and typename keywords in C++](topictemplatekeyword) for details.
 

| Operation | Code  |
| --- | --- |
| Conversion to a dense matrix:  | 
```
m2 = m.selfadjointView<[Eigen::Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>();

```
 |
| [Product](classeigen_1_1product "Expression of the product of two arbitrary matrices or vectors.") with another general matrix or vector:  | 
```
m3  = s1 * m1.conjugate().selfadjointView<[Eigen::Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>() * m3;
m3 -= s1 * m3.adjoint() * m1.selfadjointView<[Eigen::Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>();

```
 |
| Rank 1 and rank K update:  \( upper(M\_1) \mathrel{{+}{=}} s\_1 M\_2 M\_2^\* \)  \( lower(M\_1) \mathbin{{-}{=}} M\_2^\* M\_2 \)  |  
```
M1.selfadjointView<[Eigen::Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>().rankUpdate(M2,s1);
M1.selfadjointView<[Eigen::Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>().rankUpdate(M2.adjoint(),-1); 

```
 |
| Rank 2 update: ( \( M \mathrel{{+}{=}} s u v^\* + s v u^\* \))  | 
```
M.selfadjointView<[Eigen::Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>().rankUpdate(u,v,s);

```
 |
| Solving linear equations: ( \( M\_2 := M\_1^{-1} M\_2 \))  | 
```
// via a standard Cholesky factorization
m2 = m1.selfadjointView<[Eigen::Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>().llt().solve(m2);
// via a Cholesky factorization with pivoting
m2 = m1.selfadjointView<[Eigen::Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>().ldlt().solve(m2);

```
 |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__QuickRefPage.html>

Understanding Eigen
===================

   
* [What happens inside Eigen, on a simple example](topicinsideeigenexample)
* [The class hierarchy](topicclasshierarchy)
* [Lazy Evaluation and Aliasing](topiclazyevaluation)

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/UserManual_UnderstandingEigen.html>

Eigen
=====

  Namespace containing all symbols from the Eigen library. [More...](namespaceeigen#details)

 

|  |
| --- |
|  |
|  | [indexing](namespaceeigen_1_1indexing) |
|  |
|  | [symbolic](namespaceeigen_1_1symbolic) |
|  |




|  |
| --- |
|  |
| class  | [aligned\_allocator](classeigen_1_1aligned__allocator) |
|  | STL compatible allocator to use with types requiring a non standrad alignment. [More...](classeigen_1_1aligned__allocator#details) |
|  |
| class  | [AlignedBox](classeigen_1_1alignedbox) |
|  | An axis aligned box. [More...](classeigen_1_1alignedbox#details) |
|  |
| class  | [AMDOrdering](classeigen_1_1amdordering) |
|  |
| class  | [AngleAxis](classeigen_1_1angleaxis) |
|  | Represents a 3D rotation as a rotation angle around an arbitrary 3D axis. [More...](classeigen_1_1angleaxis#details) |
|  |
| class  | [ArithmeticSequence](classeigen_1_1arithmeticsequence) |
|  |
| class  | [Array](classeigen_1_1array) |
|  | General-purpose arrays with easy API for coefficient-wise operations. [More...](classeigen_1_1array#details) |
|  |
| class  | [ArrayBase](classeigen_1_1arraybase) |
|  | Base class for all 1D and 2D array, and related expressions. [More...](classeigen_1_1arraybase#details) |
|  |
| class  | [ArrayWrapper](classeigen_1_1arraywrapper) |
|  | Expression of a mathematical vector or matrix as an array object. [More...](classeigen_1_1arraywrapper#details) |
|  |
| struct  | [ArrayXpr](structeigen_1_1arrayxpr) |
|  |
| class  | [BDCSVD](classeigen_1_1bdcsvd) |
|  | class Bidiagonal Divide and Conquer SVD [More...](classeigen_1_1bdcsvd#details) |
|  |
| class  | [BiCGSTAB](classeigen_1_1bicgstab) |
|  | A bi conjugate gradient stabilized solver for sparse square problems. [More...](classeigen_1_1bicgstab#details) |
|  |
| class  | [Block](classeigen_1_1block) |
|  | Expression of a fixed-size or dynamic-size block. [More...](classeigen_1_1block#details) |
|  |
| class  | [BlockImpl< XprType, BlockRows, BlockCols, InnerPanel, Sparse >](classeigen_1_1blockimpl_3_01xprtype_00_01blockrows_00_01blockcols_00_01innerpanel_00_01sparse_01_4) |
|  |
| class  | [CholmodBase](classeigen_1_1cholmodbase) |
|  | The base class for the direct Cholesky factorization of Cholmod. [More...](classeigen_1_1cholmodbase#details) |
|  |
| class  | [CholmodDecomposition](classeigen_1_1cholmoddecomposition) |
|  | A general Cholesky factorization and solver based on Cholmod. [More...](classeigen_1_1cholmoddecomposition#details) |
|  |
| class  | [CholmodSimplicialLDLT](classeigen_1_1cholmodsimplicialldlt) |
|  | A simplicial direct Cholesky ([LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.")) factorization and solver based on Cholmod. [More...](classeigen_1_1cholmodsimplicialldlt#details) |
|  |
| class  | [CholmodSimplicialLLT](classeigen_1_1cholmodsimplicialllt) |
|  | A simplicial direct Cholesky ([LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.")) factorization and solver based on Cholmod. [More...](classeigen_1_1cholmodsimplicialllt#details) |
|  |
| class  | [CholmodSupernodalLLT](classeigen_1_1cholmodsupernodalllt) |
|  | A supernodal Cholesky ([LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.")) factorization and solver based on Cholmod. [More...](classeigen_1_1cholmodsupernodalllt#details) |
|  |
| class  | [COLAMDOrdering](classeigen_1_1colamdordering) |
|  |
| class  | [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr) |
|  | Householder rank-revealing QR decomposition of a matrix with column-pivoting. [More...](classeigen_1_1colpivhouseholderqr#details) |
|  |
| class  | [CommaInitializer](structeigen_1_1commainitializer) |
|  | Helper class used by the comma initializer operator. [More...](structeigen_1_1commainitializer#details) |
|  |
| class  | [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition) |
|  | Complete orthogonal decomposition (COD) of a matrix. [More...](classeigen_1_1completeorthogonaldecomposition#details) |
|  |
| class  | [ComplexEigenSolver](classeigen_1_1complexeigensolver) |
|  | Computes eigenvalues and eigenvectors of general complex matrices. [More...](classeigen_1_1complexeigensolver#details) |
|  |
| class  | [ComplexSchur](classeigen_1_1complexschur) |
|  | Performs a complex Schur decomposition of a real or complex square matrix. [More...](classeigen_1_1complexschur#details) |
|  |
| class  | [ConjugateGradient](classeigen_1_1conjugategradient) |
|  | A conjugate gradient solver for sparse (or dense) self-adjoint problems. [More...](classeigen_1_1conjugategradient#details) |
|  |
| class  | [CwiseBinaryOp](classeigen_1_1cwisebinaryop) |
|  | Generic expression where a coefficient-wise binary operator is applied to two expressions. [More...](classeigen_1_1cwisebinaryop#details) |
|  |
| class  | [CwiseNullaryOp](classeigen_1_1cwisenullaryop) |
|  | Generic expression of a matrix where all coefficients are defined by a functor. [More...](classeigen_1_1cwisenullaryop#details) |
|  |
| class  | [CwiseTernaryOp](classeigen_1_1cwiseternaryop) |
|  | Generic expression where a coefficient-wise ternary operator is applied to two expressions. [More...](classeigen_1_1cwiseternaryop#details) |
|  |
| class  | [CwiseUnaryOp](classeigen_1_1cwiseunaryop) |
|  | Generic expression where a coefficient-wise unary operator is applied to an expression. [More...](classeigen_1_1cwiseunaryop#details) |
|  |
| class  | [CwiseUnaryView](classeigen_1_1cwiseunaryview) |
|  | Generic lvalue expression of a coefficient-wise unary operator of a matrix or a vector. [More...](classeigen_1_1cwiseunaryview#details) |
|  |
| struct  | [Dense](structeigen_1_1dense) |
|  |
| class  | [DenseBase](classeigen_1_1densebase) |
|  | Base class for all dense matrices, vectors, and arrays. [More...](classeigen_1_1densebase#details) |
|  |
| class  | [DenseCoeffsBase< Derived, DirectAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4) |
|  | Base class providing direct read-only coefficient access to matrices and arrays. [More...](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4#details) |
|  |
| class  | [DenseCoeffsBase< Derived, DirectWriteAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4) |
|  | Base class providing direct read/write coefficient access to matrices and arrays. [More...](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#details) |
|  |
| class  | [DenseCoeffsBase< Derived, ReadOnlyAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4) |
|  | Base class providing read-only coefficient access to matrices and arrays. [More...](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#details) |
|  |
| class  | [DenseCoeffsBase< Derived, WriteAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4) |
|  | Base class providing read/write coefficient access to matrices and arrays. [More...](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#details) |
|  |
| class  | [Diagonal](classeigen_1_1diagonal) |
|  | Expression of a diagonal/subdiagonal/superdiagonal in a matrix. [More...](classeigen_1_1diagonal#details) |
|  |
| class  | [DiagonalMatrix](classeigen_1_1diagonalmatrix) |
|  | Represents a diagonal matrix with its storage. [More...](classeigen_1_1diagonalmatrix#details) |
|  |
| class  | [DiagonalPreconditioner](classeigen_1_1diagonalpreconditioner) |
|  | A preconditioner based on the digonal entries. [More...](classeigen_1_1diagonalpreconditioner#details) |
|  |
| class  | [DiagonalWrapper](classeigen_1_1diagonalwrapper) |
|  | Expression of a diagonal matrix. [More...](classeigen_1_1diagonalwrapper#details) |
|  |
| class  | [EigenBase](structeigen_1_1eigenbase) |
|  |
| class  | [EigenSolver](classeigen_1_1eigensolver) |
|  | Computes eigenvalues and eigenvectors of general matrices. [More...](classeigen_1_1eigensolver#details) |
|  |
| class  | [ForceAlignedAccess](classeigen_1_1forcealignedaccess) |
|  | Enforce aligned packet loads and stores regardless of what is requested. [More...](classeigen_1_1forcealignedaccess#details) |
|  |
| class  | [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr) |
|  | Householder rank-revealing QR decomposition of a matrix with full pivoting. [More...](classeigen_1_1fullpivhouseholderqr#details) |
|  |
| class  | [FullPivLU](classeigen_1_1fullpivlu) |
|  | LU decomposition of a matrix with complete pivoting, and related features. [More...](classeigen_1_1fullpivlu#details) |
|  |
| class  | [GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver) |
|  | Computes the generalized eigenvalues and eigenvectors of a pair of general matrices. [More...](classeigen_1_1generalizedeigensolver#details) |
|  |
| class  | [GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver) |
|  | Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem. [More...](classeigen_1_1generalizedselfadjointeigensolver#details) |
|  |
| class  | [HessenbergDecomposition](classeigen_1_1hessenbergdecomposition) |
|  | Reduces a square matrix to Hessenberg form by an orthogonal similarity transformation. [More...](classeigen_1_1hessenbergdecomposition#details) |
|  |
| class  | [Homogeneous](classeigen_1_1homogeneous) |
|  | Expression of one (or a set of) homogeneous vector(s) [More...](classeigen_1_1homogeneous#details) |
|  |
| class  | [HouseholderQR](classeigen_1_1householderqr) |
|  | Householder QR decomposition of a matrix. [More...](classeigen_1_1householderqr#details) |
|  |
| class  | [HouseholderSequence](classeigen_1_1householdersequence) |
|  | Sequence of Householder reflections acting on subspaces with decreasing size. [More...](classeigen_1_1householdersequence#details) |
|  |
| class  | [Hyperplane](classeigen_1_1hyperplane) |
|  | A hyperplane. [More...](classeigen_1_1hyperplane#details) |
|  |
| class  | [IdentityPreconditioner](classeigen_1_1identitypreconditioner) |
|  | A naive preconditioner which approximates any matrix as the identity matrix. [More...](classeigen_1_1identitypreconditioner#details) |
|  |
| class  | [IncompleteCholesky](classeigen_1_1incompletecholesky) |
|  | Modified Incomplete Cholesky with dual threshold. [More...](classeigen_1_1incompletecholesky#details) |
|  |
| class  | [IncompleteLUT](classeigen_1_1incompletelut) |
|  | Incomplete LU factorization with dual-threshold strategy. [More...](classeigen_1_1incompletelut#details) |
|  |
| class  | [IndexedView](classeigen_1_1indexedview) |
|  | Expression of a non-sequential sub-matrix defined by arbitrary sequences of row and column indices. [More...](classeigen_1_1indexedview#details) |
|  |
| class  | [InnerStride](classeigen_1_1innerstride) |
|  | Convenience specialization of [Stride](classeigen_1_1stride "Holds strides information for Map.") to specify only an inner stride See class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") for some examples. [More...](classeigen_1_1innerstride#details) |
|  |
| class  | [Inverse](classeigen_1_1inverse) |
|  | Expression of the inverse of another expression. [More...](classeigen_1_1inverse#details) |
|  |
| class  | [IOFormat](structeigen_1_1ioformat) |
|  | Stores a set of parameters controlling the way matrices are printed. [More...](structeigen_1_1ioformat#details) |
|  |
| class  | [IterativeSolverBase](classeigen_1_1iterativesolverbase) |
|  | Base class for linear iterative solvers. [More...](classeigen_1_1iterativesolverbase#details) |
|  |
| class  | [JacobiRotation](classeigen_1_1jacobirotation) |
|  | Rotation given by a cosine-sine pair. [More...](classeigen_1_1jacobirotation#details) |
|  |
| class  | [JacobiSVD](classeigen_1_1jacobisvd) |
|  | Two-sided Jacobi SVD decomposition of a rectangular matrix. [More...](classeigen_1_1jacobisvd#details) |
|  |
| class  | [LDLT](classeigen_1_1ldlt) |
|  | Robust Cholesky decomposition of a matrix with pivoting. [More...](classeigen_1_1ldlt#details) |
|  |
| class  | [LeastSquareDiagonalPreconditioner](classeigen_1_1leastsquarediagonalpreconditioner) |
|  | Jacobi preconditioner for [LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient "A conjugate gradient solver for sparse (or dense) least-square problems."). [More...](classeigen_1_1leastsquarediagonalpreconditioner#details) |
|  |
| class  | [LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient) |
|  | A conjugate gradient solver for sparse (or dense) least-square problems. [More...](classeigen_1_1leastsquaresconjugategradient#details) |
|  |
| class  | [LLT](classeigen_1_1llt) |
|  | Standard Cholesky decomposition (LL^T) of a matrix and associated features. [More...](classeigen_1_1llt#details) |
|  |
| class  | [Map](classeigen_1_1map) |
|  | A matrix or vector expression mapping an existing array of data. [More...](classeigen_1_1map#details) |
|  |
| class  | [Map< const Quaternion< \_Scalar >, \_Options >](classeigen_1_1map_3_01const_01quaternion_3_01__scalar_01_4_00_01__options_01_4) |
|  | [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") expression mapping a constant memory buffer. [More...](classeigen_1_1map_3_01const_01quaternion_3_01__scalar_01_4_00_01__options_01_4#details) |
|  |
| class  | [Map< Quaternion< \_Scalar >, \_Options >](classeigen_1_1map_3_01quaternion_3_01__scalar_01_4_00_01__options_01_4) |
|  | Expression of a quaternion from a memory buffer. [More...](classeigen_1_1map_3_01quaternion_3_01__scalar_01_4_00_01__options_01_4#details) |
|  |
| class  | [Map< SparseMatrixType >](classeigen_1_1map_3_01sparsematrixtype_01_4) |
|  | Specialization of class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") for SparseMatrix-like storage. [More...](classeigen_1_1map_3_01sparsematrixtype_01_4#details) |
|  |
| class  | [MapBase< Derived, ReadOnlyAccessors >](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4) |
|  | Base class for dense [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") and [Block](classeigen_1_1block "Expression of a fixed-size or dynamic-size block.") expression with direct access. [More...](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#details) |
|  |
| class  | [MapBase< Derived, WriteAccessors >](classeigen_1_1mapbase_3_01derived_00_01writeaccessors_01_4) |
|  | Base class for non-const dense [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") and [Block](classeigen_1_1block "Expression of a fixed-size or dynamic-size block.") expression with direct access. [More...](classeigen_1_1mapbase_3_01derived_00_01writeaccessors_01_4#details) |
|  |
| class  | [MappedSparseMatrix](classeigen_1_1mappedsparsematrix) |
|  | [Sparse](structeigen_1_1sparse) matrix. [More...](classeigen_1_1mappedsparsematrix#details) |
|  |
| class  | [Matrix](classeigen_1_1matrix) |
|  | The matrix class, also used for vectors and row-vectors. [More...](classeigen_1_1matrix#details) |
|  |
| class  | [MatrixBase](classeigen_1_1matrixbase) |
|  | Base class for all dense matrices, vectors, and expressions. [More...](classeigen_1_1matrixbase#details) |
|  |
| class  | [MatrixWrapper](classeigen_1_1matrixwrapper) |
|  | Expression of an array as a mathematical vector or matrix. [More...](classeigen_1_1matrixwrapper#details) |
|  |
| struct  | [MatrixXpr](structeigen_1_1matrixxpr) |
|  |
| class  | [MetisOrdering](classeigen_1_1metisordering) |
|  |
| class  | [NaturalOrdering](classeigen_1_1naturalordering) |
|  |
| class  | [NestByValue](classeigen_1_1nestbyvalue) |
|  | Expression which must be nested by value. [More...](classeigen_1_1nestbyvalue#details) |
|  |
| class  | [NoAlias](classeigen_1_1noalias) |
|  | Pseudo expression providing an operator = assuming no aliasing. [More...](classeigen_1_1noalias#details) |
|  |
| class  | [NumTraits](structeigen_1_1numtraits) |
|  | Holds information about the various numeric (i.e. scalar) types allowed by [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."). [More...](structeigen_1_1numtraits#details) |
|  |
| class  | [OuterStride](classeigen_1_1outerstride) |
|  | Convenience specialization of [Stride](classeigen_1_1stride "Holds strides information for Map.") to specify only an outer stride See class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") for some examples. [More...](classeigen_1_1outerstride#details) |
|  |
| class  | [ParametrizedLine](classeigen_1_1parametrizedline) |
|  | A parametrized line. [More...](classeigen_1_1parametrizedline#details) |
|  |
| class  | [PardisoLDLT](classeigen_1_1pardisoldlt) |
|  | A sparse direct Cholesky ([LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.")) factorization and solver based on the PARDISO library. [More...](classeigen_1_1pardisoldlt#details) |
|  |
| class  | [PardisoLLT](classeigen_1_1pardisollt) |
|  | A sparse direct Cholesky ([LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.")) factorization and solver based on the PARDISO library. [More...](classeigen_1_1pardisollt#details) |
|  |
| class  | [PardisoLU](classeigen_1_1pardisolu) |
|  | A sparse direct LU factorization and solver based on the PARDISO library. [More...](classeigen_1_1pardisolu#details) |
|  |
| class  | [PartialPivLU](classeigen_1_1partialpivlu) |
|  | LU decomposition of a matrix with partial pivoting, and related features. [More...](classeigen_1_1partialpivlu#details) |
|  |
| class  | [PartialReduxExpr](classeigen_1_1partialreduxexpr) |
|  | Generic expression of a partially reduxed matrix. [More...](classeigen_1_1partialreduxexpr#details) |
|  |
| class  | [PastixLDLT](classeigen_1_1pastixldlt) |
|  | A sparse direct supernodal Cholesky ([LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.")) factorization and solver based on the PaStiX library. [More...](classeigen_1_1pastixldlt#details) |
|  |
| class  | [PastixLLT](classeigen_1_1pastixllt) |
|  | A sparse direct supernodal Cholesky ([LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.")) factorization and solver based on the PaStiX library. [More...](classeigen_1_1pastixllt#details) |
|  |
| class  | [PastixLU](classeigen_1_1pastixlu) |
|  | Interface to the PaStix solver. [More...](classeigen_1_1pastixlu#details) |
|  |
| class  | [PermutationBase](classeigen_1_1permutationbase) |
|  | Base class for permutations. [More...](classeigen_1_1permutationbase#details) |
|  |
| class  | [PermutationMatrix](classeigen_1_1permutationmatrix) |
|  | Permutation matrix. [More...](classeigen_1_1permutationmatrix#details) |
|  |
| struct  | [PermutationStorage](structeigen_1_1permutationstorage) |
|  |
| class  | [PermutationWrapper](classeigen_1_1permutationwrapper) |
|  | Class to view a vector of integers as a permutation matrix. [More...](classeigen_1_1permutationwrapper#details) |
|  |
| class  | [PlainObjectBase](classeigen_1_1plainobjectbase) |
|  | Dense storage base class for matrices and arrays. [More...](classeigen_1_1plainobjectbase#details) |
|  |
| class  | [Product](classeigen_1_1product) |
|  | Expression of the product of two arbitrary matrices or vectors. [More...](classeigen_1_1product#details) |
|  |
| class  | [Quaternion](classeigen_1_1quaternion) |
|  | The quaternion class used to represent 3D orientations and rotations. [More...](classeigen_1_1quaternion#details) |
|  |
| class  | [QuaternionBase](classeigen_1_1quaternionbase) |
|  | Base class for quaternion expressions. [More...](classeigen_1_1quaternionbase#details) |
|  |
| class  | [RealQZ](classeigen_1_1realqz) |
|  | Performs a real QZ decomposition of a pair of square matrices. [More...](classeigen_1_1realqz#details) |
|  |
| class  | [RealSchur](classeigen_1_1realschur) |
|  | Performs a real Schur decomposition of a square matrix. [More...](classeigen_1_1realschur#details) |
|  |
| class  | [Ref](classeigen_1_1ref) |
|  | A matrix or vector expression mapping an existing expression. [More...](classeigen_1_1ref#details) |
|  |
| class  | [Ref< SparseMatrixType, Options >](classeigen_1_1ref_3_01sparsematrixtype_00_01options_01_4) |
|  | A sparse matrix expression referencing an existing sparse expression. [More...](classeigen_1_1ref_3_01sparsematrixtype_00_01options_01_4#details) |
|  |
| class  | [Ref< SparseVectorType >](classeigen_1_1ref_3_01sparsevectortype_01_4) |
|  | A sparse vector expression referencing an existing sparse vector expression. [More...](classeigen_1_1ref_3_01sparsevectortype_01_4#details) |
|  |
| class  | [Replicate](classeigen_1_1replicate) |
|  | Expression of the multiple replication of a matrix or vector. [More...](classeigen_1_1replicate#details) |
|  |
| class  | [Reshaped](classeigen_1_1reshaped) |
|  | Expression of a fixed-size or dynamic-size reshape. [More...](classeigen_1_1reshaped#details) |
|  |
| class  | [Reverse](classeigen_1_1reverse) |
|  | Expression of the reverse of a vector or matrix. [More...](classeigen_1_1reverse#details) |
|  |
| class  | [Rotation2D](classeigen_1_1rotation2d) |
|  | Represents a rotation/orientation in a 2 dimensional space. [More...](classeigen_1_1rotation2d#details) |
|  |
| class  | [RotationBase](classeigen_1_1rotationbase) |
|  | Common base class for compact rotation representations. [More...](classeigen_1_1rotationbase#details) |
|  |
| class  | [ScalarBinaryOpTraits](structeigen_1_1scalarbinaryoptraits) |
|  | Determines whether the given binary operation of two numeric types is allowed and what the scalar return type is. [More...](structeigen_1_1scalarbinaryoptraits#details) |
|  |
| class  | [Select](classeigen_1_1select) |
|  | Expression of a coefficient wise version of the C++ ternary operator ?: [More...](classeigen_1_1select#details) |
|  |
| class  | [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver) |
|  | Computes eigenvalues and eigenvectors of selfadjoint matrices. [More...](classeigen_1_1selfadjointeigensolver#details) |
|  |
| class  | [SelfAdjointView](classeigen_1_1selfadjointview) |
|  | Expression of a selfadjoint matrix from a triangular part of a dense matrix. [More...](classeigen_1_1selfadjointview#details) |
|  |
| class  | [SimplicialCholesky](classeigen_1_1simplicialcholesky) |
|  |
| class  | [SimplicialCholeskyBase](classeigen_1_1simplicialcholeskybase) |
|  | A base class for direct sparse Cholesky factorizations. [More...](classeigen_1_1simplicialcholeskybase#details) |
|  |
| class  | [SimplicialLDLT](classeigen_1_1simplicialldlt) |
|  | A direct sparse [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") Cholesky factorizations without square root. [More...](classeigen_1_1simplicialldlt#details) |
|  |
| class  | [SimplicialLLT](classeigen_1_1simplicialllt) |
|  | A direct sparse [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") Cholesky factorizations. [More...](classeigen_1_1simplicialllt#details) |
|  |
| class  | [Solve](classeigen_1_1solve) |
|  | Pseudo expression representing a solving operation. [More...](classeigen_1_1solve#details) |
|  |
| class  | [SolverBase](classeigen_1_1solverbase) |
|  | A base class for matrix decomposition and solvers. [More...](classeigen_1_1solverbase#details) |
|  |
| struct  | [SolverStorage](structeigen_1_1solverstorage) |
|  |
| class  | [SolveWithGuess](classeigen_1_1solvewithguess) |
|  | Pseudo expression representing a solving operation. [More...](classeigen_1_1solvewithguess#details) |
|  |
| struct  | [Sparse](structeigen_1_1sparse) |
|  |
| class  | [SparseCompressedBase](classeigen_1_1sparsecompressedbase) |
|  | Common base class for sparse [compressed]-{row|column}-storage format. [More...](classeigen_1_1sparsecompressedbase#details) |
|  |
| class  | [SparseLU](classeigen_1_1sparselu) |
|  | [Sparse](structeigen_1_1sparse) supernodal LU factorization for general matrices. [More...](classeigen_1_1sparselu#details) |
|  |
| class  | [SparseMapBase< Derived, ReadOnlyAccessors >](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4) |
|  | Common base class for [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") and [Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.") instance of sparse matrix and vector. [More...](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#details) |
|  |
| class  | [SparseMapBase< Derived, WriteAccessors >](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4) |
|  | Common base class for writable [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") and [Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.") instance of sparse matrix and vector. [More...](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#details) |
|  |
| class  | [SparseMatrix](classeigen_1_1sparsematrix) |
|  | A versatible sparse matrix representation. [More...](classeigen_1_1sparsematrix#details) |
|  |
| class  | [SparseMatrixBase](classeigen_1_1sparsematrixbase) |
|  | Base class of any sparse matrices or sparse expressions. [More...](classeigen_1_1sparsematrixbase#details) |
|  |
| class  | [SparseQR](classeigen_1_1sparseqr) |
|  | [Sparse](structeigen_1_1sparse) left-looking QR factorization with numerical column pivoting. [More...](classeigen_1_1sparseqr#details) |
|  |
| class  | [SparseSelfAdjointView](classeigen_1_1sparseselfadjointview) |
|  | Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix. [More...](classeigen_1_1sparseselfadjointview#details) |
|  |
| class  | [SparseSolverBase](classeigen_1_1sparsesolverbase) |
|  | A base class for sparse solvers. [More...](classeigen_1_1sparsesolverbase#details) |
|  |
| class  | [SparseVector](classeigen_1_1sparsevector) |
|  | a sparse vector class [More...](classeigen_1_1sparsevector#details) |
|  |
| class  | [SparseView](classeigen_1_1sparseview) |
|  | Expression of a dense or sparse matrix with zero or too small values removed. [More...](classeigen_1_1sparseview#details) |
|  |
| class  | [SPQR](classeigen_1_1spqr) |
|  | [Sparse](structeigen_1_1sparse) QR factorization based on SuiteSparseQR library. [More...](classeigen_1_1spqr#details) |
|  |
| class  | [Stride](classeigen_1_1stride) |
|  | Holds strides information for [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data."). [More...](classeigen_1_1stride#details) |
|  |
| class  | [SuperILU](classeigen_1_1superilu) |
|  | A sparse direct **incomplete** LU factorization and solver based on the [SuperLU](classeigen_1_1superlu "A sparse direct LU factorization and solver based on the SuperLU library.") library. [More...](classeigen_1_1superilu#details) |
|  |
| class  | [SuperLU](classeigen_1_1superlu) |
|  | A sparse direct LU factorization and solver based on the [SuperLU](classeigen_1_1superlu "A sparse direct LU factorization and solver based on the SuperLU library.") library. [More...](classeigen_1_1superlu#details) |
|  |
| class  | [SuperLUBase](classeigen_1_1superlubase) |
|  | The base class for the direct and incomplete LU factorization of [SuperLU](classeigen_1_1superlu "A sparse direct LU factorization and solver based on the SuperLU library."). [More...](classeigen_1_1superlubase#details) |
|  |
| class  | [SVDBase](classeigen_1_1svdbase) |
|  | Base class of SVD algorithms. [More...](classeigen_1_1svdbase#details) |
|  |
| class  | [Transform](classeigen_1_1transform) |
|  | Represents an homogeneous transformation in a N dimensional space. [More...](classeigen_1_1transform#details) |
|  |
| class  | [Translation](classeigen_1_1translation) |
|  | Represents a translation transformation. [More...](classeigen_1_1translation#details) |
|  |
| class  | [Transpose](classeigen_1_1transpose) |
|  | Expression of the transpose of a matrix. [More...](classeigen_1_1transpose#details) |
|  |
| class  | [Transpositions](classeigen_1_1transpositions) |
|  | Represents a sequence of transpositions (row/column interchange) [More...](classeigen_1_1transpositions#details) |
|  |
| struct  | [TranspositionsStorage](structeigen_1_1transpositionsstorage) |
|  |
| class  | [TriangularBase](classeigen_1_1triangularbase) |
|  | Base class for triangular part in a matrix. [More...](classeigen_1_1triangularbase#details) |
|  |
| class  | [TriangularView](classeigen_1_1triangularview) |
|  | Expression of a triangular part in a matrix. [More...](classeigen_1_1triangularview#details) |
|  |
| class  | [TriangularViewImpl< \_MatrixType, \_Mode, Dense >](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4) |
|  | Base class for a triangular part in a **dense** matrix. [More...](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#details) |
|  |
| class  | [TriangularViewImpl< MatrixType, Mode, Sparse >](classeigen_1_1triangularviewimpl_3_01matrixtype_00_01mode_00_01sparse_01_4) |
|  | Base class for a triangular part in a **sparse** matrix. [More...](classeigen_1_1triangularviewimpl_3_01matrixtype_00_01mode_00_01sparse_01_4#details) |
|  |
| class  | [Tridiagonalization](classeigen_1_1tridiagonalization) |
|  | Tridiagonal decomposition of a selfadjoint matrix. [More...](classeigen_1_1tridiagonalization#details) |
|  |
| class  | [Triplet](classeigen_1_1triplet) |
|  | A small structure to hold a non zero as a triplet (i,j,value). [More...](classeigen_1_1triplet#details) |
|  |
| class  | [UmfPackLU](classeigen_1_1umfpacklu) |
|  | A sparse LU factorization and solver based on UmfPack. [More...](classeigen_1_1umfpacklu#details) |
|  |
| class  | [UniformScaling](classeigen_1_1uniformscaling) |
|  | Represents a generic uniform scaling transformation. [More...](classeigen_1_1uniformscaling#details) |
|  |
| class  | [VectorBlock](classeigen_1_1vectorblock) |
|  | Expression of a fixed-size or dynamic-size sub-vector. [More...](classeigen_1_1vectorblock#details) |
|  |
| class  | [VectorwiseOp](classeigen_1_1vectorwiseop) |
|  | Pseudo expression providing broadcasting and partial reduction operations. [More...](classeigen_1_1vectorwiseop#details) |
|  |
| class  | [WithFormat](classeigen_1_1withformat) |
|  | Pseudo expression providing matrix output with given format. [More...](classeigen_1_1withformat#details) |
|  |




|  |
| --- |
|  |
| typedef [DiagonalMatrix](classeigen_1_1diagonalmatrix)< double, 2 >  | [AlignedScaling2d](namespaceeigen#af8975289b8134a5021e806029516e82c) |
|  |
| typedef [DiagonalMatrix](classeigen_1_1diagonalmatrix)< float, 2 >  | [AlignedScaling2f](namespaceeigen#af2440178a1f5f6abef6ee0231bc49184) |
|  |
| typedef [DiagonalMatrix](classeigen_1_1diagonalmatrix)< double, 3 >  | [AlignedScaling3d](namespaceeigen#a0aff001d5740f13797c9acd4e3276673) |
|  |
| typedef [DiagonalMatrix](classeigen_1_1diagonalmatrix)< float, 3 >  | [AlignedScaling3f](namespaceeigen#a45caf8b0e6da378885f4ae3f06c5cde3) |
|  |
| typedef [AngleAxis](classeigen_1_1angleaxis)< double >  | [AngleAxisd](group__geometry__module#gaed936d6e9192d97f00a9608081fa9b64) |
|  |
| typedef [AngleAxis](classeigen_1_1angleaxis)< float >  | [AngleAxisf](group__geometry__module#gad823b9c674644b14d950fbfe165dfdbf) |
|  |
|  template<typename Type >  |
| using  | [Array2](group__arraytypedefs#ga27e36e9e1da10f2c17d69bbfa7ead870) = [Array](classeigen_1_1array)< Type, 2, 1 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Array22](group__arraytypedefs#gad5e10990863f064300d78e80b4537a0b) = [Array](classeigen_1_1array)< Type, 2, 2 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Array2X](group__arraytypedefs#ga995df558b61646d505b9feabd30a28d0) = [Array](classeigen_1_1array)< Type, 2, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Array3](group__arraytypedefs#ga7ca781ec91d7b715d226d5057d50b250) = [Array](classeigen_1_1array)< Type, 3, 1 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Array33](group__arraytypedefs#gafb8560ef95ce6a7284131d91da82cf8a) = [Array](classeigen_1_1array)< Type, 3, 3 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Array3X](group__arraytypedefs#gaf24f8bd443138027dd02599e7c58ef60) = [Array](classeigen_1_1array)< Type, 3, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Array4](group__arraytypedefs#ga2b5e91e45a496f9893059ab4f298a9ee) = [Array](classeigen_1_1array)< Type, 4, 1 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Array44](group__arraytypedefs#gabcb97c1d614be824fd355ca29632e30f) = [Array](classeigen_1_1array)< Type, 4, 4 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Array4X](group__arraytypedefs#gaab59985198663295e89134835783bd0d) = [Array](classeigen_1_1array)< Type, 4, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [ArrayX](group__arraytypedefs#ga9f9db3ea1c9715a30ed77c6cd434bbd3) = [Array](classeigen_1_1array)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 1 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [ArrayX2](group__arraytypedefs#ga273e82d1306290af7e02aeb75a831fca) = [Array](classeigen_1_1array)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 2 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [ArrayX3](group__arraytypedefs#ga428c78ad433d2f285650ccee8fc0f29f) = [Array](classeigen_1_1array)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 3 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [ArrayX4](group__arraytypedefs#gaad02550dee7a18c7a74941be73de327d) = [Array](classeigen_1_1array)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 4 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [ArrayXX](group__arraytypedefs#ga6a3ca2b2a8694c17ed25ac03cafdaa04) = [Array](classeigen_1_1array)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |
| typedef EIGEN\_DEFAULT\_DENSE\_INDEX\_TYPE  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) |
|  | The Index type as used for the API. [More...](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) |
|  |
|  template<typename Type >  |
| using  | [Matrix2](group__matrixtypedefs#ga73a2c673745de956e66d30ad61fd4a7e) = [Matrix](classeigen_1_1matrix)< Type, 2, 2 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Matrix2X](group__matrixtypedefs#ga9fc5afaeb88d6cd4f2503dd6127b1ba8) = [Matrix](classeigen_1_1matrix)< Type, 2, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Matrix3](group__matrixtypedefs#ga6d61b8a0039eeb04e6faf382b8635a7a) = [Matrix](classeigen_1_1matrix)< Type, 3, 3 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Matrix3X](group__matrixtypedefs#gab22d239b05eafe7ac235325d454e7530) = [Matrix](classeigen_1_1matrix)< Type, 3, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Matrix4](group__matrixtypedefs#ga946841161df693bb792644ba410aa0f0) = [Matrix](classeigen_1_1matrix)< Type, 4, 4 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Matrix4X](group__matrixtypedefs#ga93eea03ee4428402191f86ef2239975e) = [Matrix](classeigen_1_1matrix)< Type, 4, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [MatrixX](group__matrixtypedefs#ga8a779d79defc9f822fa6ff5869c2ba6b) = [Matrix](classeigen_1_1matrix)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [MatrixX2](group__matrixtypedefs#ga1d162ebb520e589b3a5a5f4024aa3ae4) = [Matrix](classeigen_1_1matrix)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 2 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [MatrixX3](group__matrixtypedefs#gacdb4b32de62bf47373eec29612b73657) = [Matrix](classeigen_1_1matrix)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 3 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [MatrixX4](group__matrixtypedefs#gabe35b438cb4f39d72092d1fbb16153b8) = [Matrix](classeigen_1_1matrix)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 4 > |
|  | [c++11]  |
|  |
| typedef [Quaternion](classeigen_1_1quaternion)< double >  | [Quaterniond](group__geometry__module#ga5daab8e66aa480465000308455578830) |
|  |
| typedef [Quaternion](classeigen_1_1quaternion)< float >  | [Quaternionf](group__geometry__module#ga66aa915a26d698c60ed206818c3e4c9b) |
|  |
| typedef [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< double >, [Aligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ae12d0f8f869c40c76128260af2242bc8) >  | [QuaternionMapAlignedd](group__geometry__module#ga4289f38cc6ecf302e07d2365abc6a902) |
|  |
| typedef [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< float >, [Aligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ae12d0f8f869c40c76128260af2242bc8) >  | [QuaternionMapAlignedf](group__geometry__module#gadaf7f3ee984d9828ca94d66355f0b226) |
|  |
| typedef [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< double >, 0 >  | [QuaternionMapd](group__geometry__module#ga89412d1dcf23537e5990dfb3089ace76) |
|  |
| typedef [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< float >, 0 >  | [QuaternionMapf](group__geometry__module#ga867ff508ac860bdf7cab3b8a8fc1048d) |
|  |
| typedef [Rotation2D](classeigen_1_1rotation2d)< double >  | [Rotation2Dd](group__geometry__module#gab7af1ccdfb6c865c27fe1fd6bd9e759f) |
|  |
| typedef [Rotation2D](classeigen_1_1rotation2d)< float >  | [Rotation2Df](group__geometry__module#ga35e2cace3ada497794734edb8bc33b6e) |
|  |
|  template<typename Type , int Size>  |
| using  | [RowVector](group__matrixtypedefs#ga181118570e7a0bb1cf3366180061f14f) = [Matrix](classeigen_1_1matrix)< Type, 1, Size > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [RowVector2](group__matrixtypedefs#gafbd00706e87859d2f0ad68b54e825809) = [Matrix](classeigen_1_1matrix)< Type, 1, 2 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [RowVector3](group__matrixtypedefs#gaaedec7d966e8dafd1611d106333bf461) = [Matrix](classeigen_1_1matrix)< Type, 1, 3 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [RowVector4](group__matrixtypedefs#gafb7f5975c1c3be1237e7f0bf589c6add) = [Matrix](classeigen_1_1matrix)< Type, 1, 4 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [RowVectorX](group__matrixtypedefs#gacbfe7eb9c070bcb75ef42aec7a6fbafe) = [Matrix](classeigen_1_1matrix)< Type, 1, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |
|  template<typename Type , int Size>  |
| using  | [Vector](group__matrixtypedefs#ga2623c0d4641dda067fbdb9a009ef0c91) = [Matrix](classeigen_1_1matrix)< Type, Size, 1 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Vector2](group__matrixtypedefs#ga5c7551c08d7b0ca055e4abdc37b05a80) = [Matrix](classeigen_1_1matrix)< Type, 2, 1 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Vector3](group__matrixtypedefs#ga0af1f95a68328299e1e9b273e4934c7a) = [Matrix](classeigen_1_1matrix)< Type, 3, 1 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Vector4](group__matrixtypedefs#ga299db30993dd4e9ca74c7691ad32d50b) = [Matrix](classeigen_1_1matrix)< Type, 4, 1 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [VectorX](group__matrixtypedefs#ga7e589e92f0ae4929f5540a578cfd2bac) = [Matrix](classeigen_1_1matrix)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 1 > |
|  | [c++11]  |
|  |




|  |
| --- |
|  |
| enum  | { [StandardCompressedFormat](namespaceeigen#aaec054b156d7e5de1d19a4b2c125ce6aabd3632507a3697fb48c77eff79851a74) } |
|  |
| enum  | [AccessorLevels](group__enums#ga9f93eac38eb83deb0e8dbd42ddf11d5d) {  [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) ,  [WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) ,  [DirectAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5da50108ad00095928de06228470ceab09e) ,  [DirectWriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dacbe59d09ba2fdf8eac127bff1a1f0234)  } |
|  |
| enum  | [AlignmentType](group__enums#ga45fe06e29902b7a2773de05ba27b47a1) {  [Unaligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a4e19dd09d5ff42295ba1d72d12a46686) ,  [Aligned8](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a9d99d7a9ff1da5c949bec22733bfba14) ,  [Aligned16](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ad0b140cd97bc74365b51843d28379655) ,  [Aligned32](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a8a380b1cd0c3e5a6cceac06f8235157a) ,  [Aligned64](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a2639cfa1e8faac751556bc0009fe95a4) ,  [Aligned128](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a60057da2408e499b5656244d0b26cc20) ,  **AlignedMask** ,  [Aligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ae12d0f8f869c40c76128260af2242bc8) ,  **AlignedMax**  } |
|  |
| enum  | [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) {  [Success](group__enums#gga85fad7b87587764e5cf6b513a9e0ee5ea671a2aeb0f527802806a441d58a80fcf) ,  [NumericalIssue](group__enums#gga85fad7b87587764e5cf6b513a9e0ee5ea1c6e20706575a629b27a105f07f1883b) ,  [NoConvergence](group__enums#gga85fad7b87587764e5cf6b513a9e0ee5ea6a68dfb88a8336108a30588bdf356c57) ,  [InvalidInput](group__enums#gga85fad7b87587764e5cf6b513a9e0ee5ea580b2a3cafe585691e789f768fb729bf)  } |
|  |
| enum  | [DecompositionOptions](group__enums#gae3e239fb70022eb8747994cf5d68b4a9) {  } |
|  |
| enum  | [DirectionType](group__enums#gad49a7b3738e273eb00932271b36127f7) {  [Vertical](group__enums#ggad49a7b3738e273eb00932271b36127f7ae2efac6e74ecab5e3b0b1561c5ddf83e) ,  [Horizontal](group__enums#ggad49a7b3738e273eb00932271b36127f7a961c62410157b64033839488f4d7f7e4) ,  [BothDirections](group__enums#ggad49a7b3738e273eb00932271b36127f7a04fefd61992e941d509a57bc44c59794)  } |
|  |
| enum  | [NaNPropagationOptions](group__enums#ga7f4e3f96895bdb325eab1a0b651e211f) {  [PropagateFast](group__enums#gga7f4e3f96895bdb325eab1a0b651e211fa917fa8982b7eb0cbb440d38ee50e0b9c) ,  [PropagateNaN](group__enums#gga7f4e3f96895bdb325eab1a0b651e211fa1d414f9966ecba69cd840b8def472c4a) ,  [PropagateNumbers](group__enums#gga7f4e3f96895bdb325eab1a0b651e211fa5bfaff916ad4913fd04fe2e92c5c32ae)  } |
|  |
| enum  | [QRPreconditioners](group__enums#ga46eba0d5c621f590b8cf1b53af31d56e) {  [NoQRPreconditioner](group__enums#gga46eba0d5c621f590b8cf1b53af31d56ea2e95bc818f975b19def01e93d240dece) ,  [HouseholderQRPreconditioner](group__enums#gga46eba0d5c621f590b8cf1b53af31d56ea9c660eb3336bf8c77ce9d081ca07cbdd) ,  [ColPivHouseholderQRPreconditioner](group__enums#gga46eba0d5c621f590b8cf1b53af31d56eabd2e2f4875c5b4b6e602a433d90c4e5e) ,  [FullPivHouseholderQRPreconditioner](group__enums#gga46eba0d5c621f590b8cf1b53af31d56eabd745dcaff7019c5f918c68809e5ea50)  } |
|  |
| enum  | [SideType](group__enums#gac22de43beeac7a78b384f99bed5cee0b) {  [OnTheLeft](group__enums#ggac22de43beeac7a78b384f99bed5cee0ba21b30a61e9cb10c967aec17567804007) ,  [OnTheRight](group__enums#ggac22de43beeac7a78b384f99bed5cee0ba329fc3a54ceb2b6e0e73b400998b8a82)  } |
|  |
| enum  | [StorageOptions](group__enums#gaacded1a18ae58b0f554751f6cdf9eb13) {  [ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62) ,  [RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f) ,  [AutoAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea) ,  [DontAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a56908522e51443a0aa0567f879c2e78a)  } |
|  |
| enum  | [TransformTraits](group__enums#gaee59a86102f150923b0cac6d4ff05107) {  [Isometry](group__enums#ggaee59a86102f150923b0cac6d4ff05107a84413028615d2d718bafd2dfb93dafef) ,  [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb) ,  [AffineCompact](group__enums#ggaee59a86102f150923b0cac6d4ff05107a8192e8fdb2ec3ec46d92956cc83ef490) ,  [Projective](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0f7338b8672884554e8642bce9e44183)  } |
|  |
| enum  | [UpLoType](group__enums#ga39e3366ff5554d731e7dc8bb642f83cd) {  [Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749) ,  [Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1) ,  [UnitDiag](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda2ef430bff6cc12c2d1e0ef01b95f7ff3) ,  [ZeroDiag](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdac4dc554a61510151ddd5bafaf6040223) ,  [UnitLower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda8f40b928c10a71ba03e5f75ad2a72fda) ,  [UnitUpper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdadd28224d7ea92689930be73c1b50b0ad) ,  [StrictlyLower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda2424988b6fca98be70b595632753ba81) ,  [StrictlyUpper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda7b37877e0b9b0df28c9c2b669a633265) ,  [SelfAdjoint](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdacf9ccb2016f8b9c0f3268f05a1e75821) ,  [Symmetric](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdad5381b2d1c8973a08303c94e7da02333)  } |
|  |




|  |
| --- |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_abs\_op< typename Derived::Scalar >, const Derived >  | [abs](namespaceeigen#ae27242789e7e62a8c42579b79be59b1a) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_abs2\_op< typename Derived::Scalar >, const Derived >  | [abs2](namespaceeigen#a54cc34b64b4935307efc06d56cd531df) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_acos\_op< typename Derived::Scalar >, const Derived >  | [acos](namespaceeigen#a3fe3a136370fefae062591304c6a7ebd) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_acosh\_op< typename Derived::Scalar >, const Derived >  | [acosh](namespaceeigen#a97676fabe9a7466cc2ccb6a2d0f83471) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_arg\_op< typename Derived::Scalar >, const Derived >  | [arg](namespaceeigen#aa539408a09481d35961e11ee78793db1) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_asin\_op< typename Derived::Scalar >, const Derived >  | [asin](namespaceeigen#a6c5c246b877ac331495d21e7a5d51616) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_asinh\_op< typename Derived::Scalar >, const Derived >  | [asinh](namespaceeigen#a727dd851cc82a62574145bc5abdc7aed) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_atan\_op< typename Derived::Scalar >, const Derived >  | [atan](namespaceeigen#a230744e17147d12e8ef3f2fc3796f64f) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_atanh\_op< typename Derived::Scalar >, const Derived >  | [atanh](namespaceeigen#a45d37a9f1c784eb8ab61ed24f07f436f) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_ceil\_op< typename Derived::Scalar >, const Derived >  | [ceil](namespaceeigen#aa73e38be0689a463ae14141b9cf89c35) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_conjugate\_op< typename Derived::Scalar >, const Derived >  | [conj](namespaceeigen#ab84f39a06a18e1ebb23f8be80345b79d) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_cos\_op< typename Derived::Scalar >, const Derived >  | [cos](namespaceeigen#ad01d50a42869218f1d54af13f71517a6) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_cosh\_op< typename Derived::Scalar >, const Derived >  | [cosh](namespaceeigen#a34b99a26a2a1e7ff985a5ace16eedfcb) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_cube\_op< typename Derived::Scalar >, const Derived >  | [cube](namespaceeigen#ae04fac7e3068f05c3f01982554a21d80) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_digamma\_op< typename Derived::Scalar >, const Derived >  | [digamma](namespaceeigen#af40db84b3db19fe25fe2f77c429420e5) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_erf\_op< typename Derived::Scalar >, const Derived >  | [erf](namespaceeigen#ac336e0eba2b12dca8b01da1a006566c3) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_erfc\_op< typename Derived::Scalar >, const Derived >  | [erfc](namespaceeigen#a17bcfbd19ed883ecf581f06ac1eeeb8c) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_exp\_op< typename Derived::Scalar >, const Derived >  | [exp](namespaceeigen#ae491aecf7dab66ac7e11008c5766694d) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_expm1\_op< typename Derived::Scalar >, const Derived >  | [expm1](namespaceeigen#ae7cb2544e4e745bc0067fe793e3f2f81) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<int N>  |
| static const auto  | [fix](group__core__module#gac01f234bce100e39e6928fdc470e5194) () |
|  |
| template<int N>  |
| static const auto  | [fix](group__core__module#ga3ce50da8ca83238949c06afce1a4f3c7) (int val) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_floor\_op< typename Derived::Scalar >, const Derived >  | [floor](namespaceeigen#abf03d773a87830bc7fde51bcd94c89a0) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename VectorsType , typename CoeffsType >  |
| [HouseholderSequence](classeigen_1_1householdersequence)< VectorsType, CoeffsType >  | [householderSequence](group__householder__module#ga5f2b3f80cdf7ae96609e4a8d2e55e371) (const VectorsType &v, const CoeffsType &h) |
|  | Convenience function for constructing a Householder sequence. [More...](group__householder__module#ga5f2b3f80cdf7ae96609e4a8d2e55e371) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_imag\_op< typename Derived::Scalar >, const Derived >  | [imag](namespaceeigen#a04d60a3c8a266f63c08e03615c1985c9) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_inverse\_op< typename Derived::Scalar >, const Derived >  | [inverse](namespaceeigen#ae9de9064c3b832ee804c0e0957e80334) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_isfinite\_op< typename Derived::Scalar >, const Derived >  | [isfinite](namespaceeigen#aba24ec81dec745a00b7f33adead89811) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_isinf\_op< typename Derived::Scalar >, const Derived >  | [isinf](namespaceeigen#a1f1103712e337c4c96a05f949637a4c8) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_isnan\_op< typename Derived::Scalar >, const Derived >  | [isnan](namespaceeigen#a99adfc5178f3fd5488304284388b2a10) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| int  | [klu\_solve](group__klusupport__module#gad6d0ed07a6ee97fcef4fe3bce6a674d4) (klu\_symbolic \*Symbolic, klu\_numeric \*Numeric, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) ldim, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) nrhs, double B[], klu\_common \*Common, double) |
|  | A sparse LU factorization and solver based on KLU. [More...](group__klusupport__module#gad6d0ed07a6ee97fcef4fe3bce6a674d4) |
|  |
| template<typename SizeType >  |
| auto  | [lastN](namespaceeigen#a5564b99b116c725ef571f1a2f859acb1) (SizeType size) -> decltype([seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)([Eigen::last](group__core__module#ga2dd8b20d08336af23947e054a17415ee)+[fix](group__core__module#gac01f234bce100e39e6928fdc470e5194)< 1 >() -size, size)) |
|  |
| template<typename SizeType , typename IncrType >  |
| auto  | [lastN](namespaceeigen#acc01e5c7293dd3af76e79ae68cc87f77) (SizeType size, IncrType incr) -> decltype([seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)([Eigen::last](group__core__module#ga2dd8b20d08336af23947e054a17415ee)-(size-[fix](group__core__module#gac01f234bce100e39e6928fdc470e5194)< 1 >()) \*incr, size, incr)) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_lgamma\_op< typename Derived::Scalar >, const Derived >  | [lgamma](namespaceeigen#ac2e6331628bb1989b7be6d7e42827649) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_log\_op< typename Derived::Scalar >, const Derived >  | [log](namespaceeigen#ae8bb75ba4f5f30a7571146dbfa653c6d) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_log10\_op< typename Derived::Scalar >, const Derived >  | [log10](namespaceeigen#a25256faeec3ffd0f3615a0e1e45dfb14) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_log1p\_op< typename Derived::Scalar >, const Derived >  | [log1p](namespaceeigen#ac5c8a2cded6b59628f2de04f24d2fff4) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_log2\_op< typename Derived::Scalar >, const Derived >  | [log2](namespaceeigen#ad2d0241ffaaa3b0b04ec70b59ab066d4) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_logistic\_op< typename Derived::Scalar >, const Derived >  | [logistic](namespaceeigen#adb0b668da3480346f2fc81f229b570a6) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_ndtri\_op< typename Derived::Scalar >, const Derived >  | [ndtri](namespaceeigen#ab7ed113a2dd4a4342c72b550faea308d) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename SparseDerived , typename PermutationType >  |
| const [Product](classeigen_1_1product)< [Inverse](classeigen_1_1inverse)< PermutationType >, SparseDerived, AliasFreeProduct >  | [operator\*](namespaceeigen#ad225313de8037d40c2d26c17edf1a9fd) (const InverseImpl< PermutationType, [PermutationStorage](structeigen_1_1permutationstorage) > &tperm, const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< SparseDerived > &matrix) |
|  |
| template<typename MatrixDerived , typename PermutationDerived >  |
| const [Product](classeigen_1_1product)< MatrixDerived, PermutationDerived, AliasFreeProduct >  | [operator\*](namespaceeigen#a9723b3ff0f2c99fe1081e3eb14380d4c) (const [MatrixBase](classeigen_1_1matrixbase)< MatrixDerived > &matrix, const [PermutationBase](classeigen_1_1permutationbase)< PermutationDerived > &permutation) |
|  |
| template<typename MatrixDerived , typename TranspositionsDerived >  |
| const [Product](classeigen_1_1product)< MatrixDerived, TranspositionsDerived, AliasFreeProduct >  | [operator\*](namespaceeigen#a06ca1e6b1a30b4dd0f2633664fe4d956) (const [MatrixBase](classeigen_1_1matrixbase)< MatrixDerived > &matrix, const TranspositionsBase< TranspositionsDerived > &transpositions) |
|  |
| template<typename OtherDerived , typename VectorsType , typename CoeffsType , int Side>  |
| internal::matrix\_type\_times\_scalar\_type< typename VectorsType::Scalar, OtherDerived >::Type  | [operator\*](namespaceeigen#a634bfd5e206a2e77f799b4c3956ea49e) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other, const [HouseholderSequence](classeigen_1_1householdersequence)< VectorsType, CoeffsType, Side > &h) |
|  | Computes the product of a matrix with a Householder sequence. [More...](namespaceeigen#a634bfd5e206a2e77f799b4c3956ea49e) |
|  |
| template<typename SparseDerived , typename PermDerived >  |
| const [Product](classeigen_1_1product)< PermDerived, SparseDerived, AliasFreeProduct >  | [operator\*](namespaceeigen#a02fbb1bbd915b899b34a56a3cd64c438) (const [PermutationBase](classeigen_1_1permutationbase)< PermDerived > &perm, const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< SparseDerived > &matrix) |
|  |
| template<typename PermutationDerived , typename MatrixDerived >  |
| const [Product](classeigen_1_1product)< PermutationDerived, MatrixDerived, AliasFreeProduct >  | [operator\*](namespaceeigen#a4d2abe28092f8070e971494c7e0b507a) (const [PermutationBase](classeigen_1_1permutationbase)< PermutationDerived > &permutation, const [MatrixBase](classeigen_1_1matrixbase)< MatrixDerived > &matrix) |
|  |
| template<typename SparseDerived , typename PermutationType >  |
| const [Product](classeigen_1_1product)< SparseDerived, [Inverse](classeigen_1_1inverse)< PermutationType >, AliasFreeProduct >  | [operator\*](namespaceeigen#a8b7051d2f98498d619044089949f931d) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< SparseDerived > &matrix, const InverseImpl< PermutationType, [PermutationStorage](structeigen_1_1permutationstorage) > &tperm) |
|  |
| template<typename SparseDerived , typename PermDerived >  |
| const [Product](classeigen_1_1product)< SparseDerived, PermDerived, AliasFreeProduct >  | [operator\*](namespaceeigen#a429958a0e6bd27168f3935d3100c55cf) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< SparseDerived > &matrix, const [PermutationBase](classeigen_1_1permutationbase)< PermDerived > &perm) |
|  |
| template<typename TranspositionsDerived , typename MatrixDerived >  |
| const [Product](classeigen_1_1product)< TranspositionsDerived, MatrixDerived, AliasFreeProduct >  | [operator\*](namespaceeigen#a02b783ce2d2464d4f4a0bc0d1dc494f0) (const TranspositionsBase< TranspositionsDerived > &transpositions, const [MatrixBase](classeigen_1_1matrixbase)< MatrixDerived > &matrix) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_real\_op< typename Derived::Scalar >, const Derived >  | [real](namespaceeigen#ac74dc920119b1eba45e9218d9f402afc) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename VectorsType , typename CoeffsType >  |
| [HouseholderSequence](classeigen_1_1householdersequence)< VectorsType, CoeffsType, [OnTheRight](group__enums#ggac22de43beeac7a78b384f99bed5cee0ba329fc3a54ceb2b6e0e73b400998b8a82) >  | [rightHouseholderSequence](group__householder__module#ga897ebce658762148f706f73a05525e89) (const VectorsType &v, const CoeffsType &h) |
|  | Convenience function for constructing a Householder sequence. [More...](group__householder__module#ga897ebce658762148f706f73a05525e89) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_rint\_op< typename Derived::Scalar >, const Derived >  | [rint](namespaceeigen#a0211fe61b9e390dfd8ca213fe9c7fca3) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_round\_op< typename Derived::Scalar >, const Derived >  | [round](namespaceeigen#ad9eaa98e8016ef17024a18a2f3e5bef3) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_rsqrt\_op< typename Derived::Scalar >, const Derived >  | [rsqrt](namespaceeigen#a6374a6a9e972e9358d7ab3fced32d7d5) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [DiagonalWrapper](classeigen_1_1diagonalwrapper)< const Derived >  | [Scaling](namespaceeigen#a109425bca2048c3df19249c04e73715c) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &coeffs) |
|  |
| template<typename Scalar >  |
| [DiagonalMatrix](classeigen_1_1diagonalmatrix)< Scalar, 2 >  | [Scaling](namespaceeigen#aafd4d881e7a6c2a68c1db03e261c767b) (const Scalar &sx, const Scalar &sy) |
|  |
| template<typename Scalar >  |
| [DiagonalMatrix](classeigen_1_1diagonalmatrix)< Scalar, 3 >  | [Scaling](namespaceeigen#a162d759175d7c5214f33fefb30862815) (const Scalar &sx, const Scalar &sy, const Scalar &sz) |
|  |
| template<typename RealScalar >  |
| [UniformScaling](classeigen_1_1uniformscaling)< std::complex< RealScalar > >  | [Scaling](namespaceeigen#a76386154f2cdb77190759744830422d1) (const std::complex< RealScalar > &s) |
|  |
| [UniformScaling](classeigen_1_1uniformscaling)< double >  | [Scaling](namespaceeigen#ad2e71727718ca788680b3aa9eb485f98) (double s) |
|  |
| [UniformScaling](classeigen_1_1uniformscaling)< float >  | [Scaling](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b) (float s) |
|  |
| template<typename FirstType , typename LastType >  |
| auto  | [seq](namespaceeigen#ad87fbafd4a91f5c1ed6a768987a1b74d) (FirstType f, LastType l) |
|  |
| template<typename FirstType , typename LastType , typename IncrType >  |
| auto  | [seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969) (FirstType f, LastType l, IncrType incr) |
|  |
| template<typename FirstType , typename SizeType >  |
| [ArithmeticSequence](classeigen_1_1arithmeticsequence)< typename internal::cleanup\_index\_type< FirstType >::type, typename internal::cleanup\_index\_type< SizeType >::type >  | [seqN](namespaceeigen#ade9f918902511b83512a8e6dde5cad7a) (FirstType first, SizeType size) |
|  |
| template<typename FirstType , typename SizeType , typename IncrType >  |
| [ArithmeticSequence](classeigen_1_1arithmeticsequence)< typename internal::cleanup\_index\_type< FirstType >::type, typename internal::cleanup\_index\_type< SizeType >::type, typename internal::cleanup\_seq\_incr< IncrType >::type >  | [seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda) (FirstType first, SizeType size, IncrType incr) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_sign\_op< typename Derived::Scalar >, const Derived >  | [sign](namespaceeigen#a831e88e0403a42d0dfb328d8acd3e56f) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_sin\_op< typename Derived::Scalar >, const Derived >  | [sin](namespaceeigen#ae6e8ad270ff41c088d7651567594f796) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_sinh\_op< typename Derived::Scalar >, const Derived >  | [sinh](namespaceeigen#af284ce359b6efd4b594a9f8a1f5e5d96) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_sqrt\_op< typename Derived::Scalar >, const Derived >  | [sqrt](namespaceeigen#af4f536e8ea56702e63088efb3706d1f0) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_square\_op< typename Derived::Scalar >, const Derived >  | [square](namespaceeigen#af28ef8cae3b37bcf1b47910cd6f20d4c) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_tan\_op< typename Derived::Scalar >, const Derived >  | [tan](namespaceeigen#a3bc116a6243f38c22f851581aa7b521a) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_tanh\_op< typename Derived::Scalar >, const Derived >  | [tanh](namespaceeigen#a0110c233d357169fd58fdf5656992a98) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived , typename OtherDerived >  |
| internal::umeyama\_transform\_matrix\_type< Derived, OtherDerived >::type  | [umeyama](group__geometry__module#gab3f5a82a24490b936f8694cf8fef8e60) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &src, const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &dst, bool with\_scaling=true) |
|  | Returns the transformation between two point sets. [More...](group__geometry__module#gab3f5a82a24490b936f8694cf8fef8e60) |
|  |
| template<typename \_Scalar , int \_Options, typename \_Index , unsigned int UpLo>  |
| cholmod\_sparse  | [viewAsCholmod](namespaceeigen#afacb818b18280e2e1ab73836ab74cab5) (const [SparseSelfAdjointView](classeigen_1_1sparseselfadjointview)< const [SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_Index >, UpLo > &mat) |
|  |
| template<typename Derived >  |
| cholmod\_dense  | [viewAsCholmod](namespaceeigen#a92fe7b595099051fa1d1c443641a6de3) ([MatrixBase](classeigen_1_1matrixbase)< Derived > &mat) |
|  |
| template<typename \_Scalar , int \_Options, typename \_StorageIndex >  |
| cholmod\_sparse  | [viewAsCholmod](namespaceeigen#ac9fb9e40cfc9ddbdc7da84ee01bb7545) ([Ref](classeigen_1_1ref)< [SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex > > mat) |
|  |
| template<typename Scalar , int Flags, typename StorageIndex >  |
| [MappedSparseMatrix](classeigen_1_1mappedsparsematrix)< Scalar, Flags, StorageIndex >  | [viewAsEigen](namespaceeigen#aad43574b96b756041bd8037c4b61e0d9) (cholmod\_sparse &cm) |
|  |




|  |
| --- |
|  |
| const unsigned int  | [ActualPacketAccessBit](group__flags#ga020f88dc24a123b9afbd756c4b220db2) |
|  |
| EIGEN\_DEPRECATED const unsigned int  | [AlignedBit](group__flags#gac5795adacd266512a26890973503ed88) |
|  |
| static const Eigen::internal::all\_t  | [all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14) |
|  |
| const unsigned int  | [CompressedAccessBit](group__flags#gaed0244284da47a2b8661261431173caf) |
|  |
| const unsigned int  | [DirectAccessBit](group__flags#gabf1e9d0516a933445a4c307ad8f14915) |
|  |
| const int  | [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) |
|  |
| const int  | [DynamicIndex](namespaceeigen#a73c597189a4a99127175e8167c456fff) |
|  |
| EIGEN\_DEPRECATED const unsigned int  | [EvalBeforeAssigningBit](group__flags#ga0972b20dc004d13984e642b3bd12532e) |
|  |
| const unsigned int  | [EvalBeforeNestingBit](group__flags#gaa34e83bae46a8eeae4e69ebe3aaecbed) |
|  |
| const int  | [HugeCost](namespaceeigen#a3163430a1c13173faffde69016b48aaf) |
|  |
| const int  | [Infinity](namespaceeigen#a7951593b031e13d90223c83d022ce99e) |
|  |
| static const [symbolic::SymbolExpr](classeigen_1_1symbolic_1_1symbolexpr)< internal::symbolic\_last\_tag >  | [last](group__core__module#ga2dd8b20d08336af23947e054a17415ee) |
|  |
| static const auto  | [lastp1](group__core__module#ga662ffa801d746b972453080c648765f9) |
|  |
| const unsigned int  | [LinearAccessBit](group__flags#ga4b983a15d57cd55806df618ac544d09e) |
|  |
| const unsigned int  | [LvalueBit](group__flags#gae2c323957f20dfdc6cb8f44428eaec1a) |
|  |
| const unsigned int  | [NoPreferredStorageOrderBit](group__flags#ga3c186ad80ddcf5e2ed3d7ee31cca1860) |
|  |
| const unsigned int  | [PacketAccessBit](group__flags#ga1a306a438e1ab074e8be59512e887b9f) |
|  |
| const unsigned int  | [RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762) |
|  |
| const int  | [UndefinedIncr](namespaceeigen#a06808a853a9baa38b23a5368e7491abd) |
|  |

 
Namespace containing all symbols from the Eigen library. 

   AlignedScaling2d
----------------

   

|  |
| --- |
| typedef [DiagonalMatrix](classeigen_1_1diagonalmatrix)<double,2> [Eigen::AlignedScaling2d](namespaceeigen#af8975289b8134a5021e806029516e82c) |

 
 
**[Deprecated:](deprecated#_deprecated000028)**

    AlignedScaling2f
----------------

   

|  |
| --- |
| typedef [DiagonalMatrix](classeigen_1_1diagonalmatrix)<float, 2> [Eigen::AlignedScaling2f](namespaceeigen#af2440178a1f5f6abef6ee0231bc49184) |

 
 
**[Deprecated:](deprecated#_deprecated000027)**

    AlignedScaling3d
----------------

   

|  |
| --- |
| typedef [DiagonalMatrix](classeigen_1_1diagonalmatrix)<double,3> [Eigen::AlignedScaling3d](namespaceeigen#a0aff001d5740f13797c9acd4e3276673) |

 
 
**[Deprecated:](deprecated#_deprecated000030)**

    AlignedScaling3f
----------------

   

|  |
| --- |
| typedef [DiagonalMatrix](classeigen_1_1diagonalmatrix)<float, 3> [Eigen::AlignedScaling3f](namespaceeigen#a45caf8b0e6da378885f4ae3f06c5cde3) |

 
 
**[Deprecated:](deprecated#_deprecated000029)**

    Index
-----

   

|  |
| --- |
| typedef EIGEN\_DEFAULT\_DENSE\_INDEX\_TYPE [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) |

 
 The Index type as used for the API. 

 To change this, `#define` the preprocessor symbol `EIGEN_DEFAULT_DENSE_INDEX_TYPE`. 



See also

[Preprocessor directives](topicpreprocessordirectives), StorageIndex. 
    anonymous enum
--------------

   

|  |
| --- |
| anonymous enum |

 
 

| Enumerator |
| --- |
| StandardCompressedFormat  | used by Ref<SparseMatrix> to specify whether the input storage must be in standard compressed form  |

    abs()
-----

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_abs\_op <typename Derived::Scalar>, const Derived> Eigen::abs  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise absolute value of *x* 
 
See also
ArrayBase::abs , MatrixBase::cwiseAbs   [Math functions](group__coeffwisemathfunctions#cwisetable_abs), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    abs2()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_abs2\_op <typename Derived::Scalar>, const Derived> Eigen::abs2  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise squared absolute value of *x* 
 
See also
ArrayBase::abs2 , MatrixBase::cwiseAbs2   [Math functions](group__coeffwisemathfunctions#cwisetable_abs2), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    acos()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_acos\_op <typename Derived::Scalar>, const Derived> Eigen::acos  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise arc-consine of *x* 
 
See also
ArrayBase::acos   [Math functions](group__coeffwisemathfunctions#cwisetable_acos), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    acosh()
-------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_acosh\_op <typename Derived::Scalar>, const Derived> Eigen::acosh  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise inverse hyperbolic cosine of *x* 
 
See also
ArrayBase::acosh   [Math functions](group__coeffwisemathfunctions#cwisetable_acosh), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    arg()
-----

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_arg\_op <typename Derived::Scalar>, const Derived> Eigen::arg  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise complex argument of *x* 
 
See also
ArrayBase::arg , MatrixBase::cwiseArg   [Math functions](group__coeffwisemathfunctions#cwisetable_arg), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    asin()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_asin\_op <typename Derived::Scalar>, const Derived> Eigen::asin  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise arc-sine of *x* 
 
See also
ArrayBase::asin   [Math functions](group__coeffwisemathfunctions#cwisetable_asin), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    asinh()
-------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_asinh\_op <typename Derived::Scalar>, const Derived> Eigen::asinh  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise inverse hyperbolic sine of *x* 
 
See also
ArrayBase::asinh   [Math functions](group__coeffwisemathfunctions#cwisetable_asinh), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    atan()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_atan\_op <typename Derived::Scalar>, const Derived> Eigen::atan  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise arc-tangent of *x* 
 
See also
ArrayBase::atan   [Math functions](group__coeffwisemathfunctions#cwisetable_atan), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    atanh()
-------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_atanh\_op <typename Derived::Scalar>, const Derived> Eigen::atanh  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise inverse hyperbolic tangent of *x* 
 
See also
ArrayBase::atanh   [Math functions](group__coeffwisemathfunctions#cwisetable_atanh), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    ceil()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_ceil\_op <typename Derived::Scalar>, const Derived> Eigen::ceil  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise nearest integer not less than the giben value of *x* 
 
See also

[Eigen::floor](namespaceeigen#abf03d773a87830bc7fde51bcd94c89a0) , ArrayBase::ceil   [Math functions](group__coeffwisemathfunctions#cwisetable_ceil), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    conj()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_conjugate\_op <typename Derived::Scalar>, const Derived> Eigen::conj  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise complex conjugate of *x* 
 
See also
ArrayBase::conjugate   [Math functions](group__coeffwisemathfunctions#cwisetable_conj), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    cos()
-----

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_cos\_op <typename Derived::Scalar>, const Derived> Eigen::cos  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise cosine of *x* 
 
See also
ArrayBase::cos   [Math functions](group__coeffwisemathfunctions#cwisetable_cos), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    cosh()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_cosh\_op <typename Derived::Scalar>, const Derived> Eigen::cosh  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise hyperbolic cosine of *x* 
 
See also
ArrayBase::cosh   [Math functions](group__coeffwisemathfunctions#cwisetable_cosh), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    cube()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_cube\_op <typename Derived::Scalar>, const Derived> Eigen::cube  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise cube (power 3) of *x* 
 
See also
Eigen::pow , ArrayBase::cube   [Math functions](group__coeffwisemathfunctions#cwisetable_cube), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    digamma()
---------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_digamma\_op <typename Derived::Scalar>, const Derived> Eigen::digamma  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise derivative of lgamma of *x* 
 
See also
ArrayBase::digamma   [Math functions](group__coeffwisemathfunctions#cwisetable_digamma), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    erf()
-----

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_erf\_op <typename Derived::Scalar>, const Derived> Eigen::erf  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise error function of *x* 
 
See also
ArrayBase::erf   [Math functions](group__coeffwisemathfunctions#cwisetable_erf), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    erfc()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_erfc\_op <typename Derived::Scalar>, const Derived> Eigen::erfc  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise complement error function of *x* 
 
See also
ArrayBase::erfc   [Math functions](group__coeffwisemathfunctions#cwisetable_erfc), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    exp()
-----

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_exp\_op <typename Derived::Scalar>, const Derived> Eigen::exp  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise exponential of *x* 
 
See also
ArrayBase::exp   [Math functions](group__coeffwisemathfunctions#cwisetable_exp), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    expm1()
-------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_expm1\_op <typename Derived::Scalar>, const Derived> Eigen::expm1  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise exponential of a value minus 1 of *x* 
 
See also
ArrayBase::expm1   [Math functions](group__coeffwisemathfunctions#cwisetable_expm1), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    floor()
-------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_floor\_op <typename Derived::Scalar>, const Derived> Eigen::floor  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise nearest integer not greater than the giben value of *x* 
 
See also

[Eigen::ceil](namespaceeigen#aa73e38be0689a463ae14141b9cf89c35) , ArrayBase::floor   [Math functions](group__coeffwisemathfunctions#cwisetable_floor), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    imag()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_imag\_op <typename Derived::Scalar>, const Derived> Eigen::imag  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise imaginary part of *x* 
 
See also
ArrayBase::imag   [Math functions](group__coeffwisemathfunctions#cwisetable_imag), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    inverse()
---------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_inverse\_op <typename Derived::Scalar>, const Derived> Eigen::inverse  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise inverse of *x* 
 
See also
ArrayBase::inverse   [Math functions](group__coeffwisemathfunctions#cwisetable_inverse), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    isfinite()
----------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_isfinite\_op <typename Derived::Scalar>, const Derived> Eigen::isfinite  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise finite value test of *x* 
 
See also

[Eigen::isinf](namespaceeigen#a1f1103712e337c4c96a05f949637a4c8) , [Eigen::isnan](namespaceeigen#a99adfc5178f3fd5488304284388b2a10) , ArrayBase::isfinite   [Math functions](group__coeffwisemathfunctions#cwisetable_isfinite), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    isinf()
-------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_isinf\_op <typename Derived::Scalar>, const Derived> Eigen::isinf  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise infinite value test of *x* 
 
See also

[Eigen::isnan](namespaceeigen#a99adfc5178f3fd5488304284388b2a10) , [Eigen::isfinite](namespaceeigen#aba24ec81dec745a00b7f33adead89811) , ArrayBase::isinf   [Math functions](group__coeffwisemathfunctions#cwisetable_isinf), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    isnan()
-------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_isnan\_op <typename Derived::Scalar>, const Derived> Eigen::isnan  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise not-a-number test of *x* 
 
See also

[Eigen::isinf](namespaceeigen#a1f1103712e337c4c96a05f949637a4c8) , [Eigen::isfinite](namespaceeigen#aba24ec81dec745a00b7f33adead89811) , ArrayBase::isnan   [Math functions](group__coeffwisemathfunctions#cwisetable_isnan), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    lastN() [1/2]
-------------

    template<typename SizeType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| auto Eigen::lastN  | ( | SizeType  | *size* | ) |  -> decltype([seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)([Eigen::last](group__core__module#ga2dd8b20d08336af23947e054a17415ee)+[fix](group__core__module#gac01f234bce100e39e6928fdc470e5194)<1>()-size, size))  |

 
 [c++11] 



Returns
a symbolic [ArithmeticSequence](classeigen_1_1arithmeticsequence) representing the last *size* elements with a unit increment.
 It is a shortcut for:



```
[seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969)([last](group__core__module#ga2dd8b20d08336af23947e054a17415ee)+fix<1>-size, [last](group__core__module#ga2dd8b20d08336af23947e054a17415ee)) 
```


See also

[lastN](namespaceeigen#acc01e5c7293dd3af76e79ae68cc87f77)(SizeType,IncrType, [seqN(FirstType,SizeType)](namespaceeigen#ade9f918902511b83512a8e6dde5cad7a), [seq(FirstType,LastType)](namespaceeigen#ad87fbafd4a91f5c1ed6a768987a1b74d) 
    lastN() [2/2]
-------------

    template<typename SizeType , typename IncrType >  

|  |  |  |  |
| --- | --- | --- | --- |
| auto Eigen::lastN  | ( | SizeType  | *size*,  |
|  |  | IncrType  | *incr* |
|  | ) |  |  -> decltype([seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)([Eigen::last](group__core__module#ga2dd8b20d08336af23947e054a17415ee)-(size-[fix](group__core__module#gac01f234bce100e39e6928fdc470e5194)<1>())\*incr, size, incr))  |

 
 [c++11] 



Returns
a symbolic [ArithmeticSequence](classeigen_1_1arithmeticsequence) representing the last *size* elements with increment *incr*.
 It is a shortcut for:



```
[seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)([last](group__core__module#ga2dd8b20d08336af23947e054a17415ee)-(size-fix<1>)*incr, size, incr) 
```


See also

[lastN(SizeType)](namespaceeigen#a5564b99b116c725ef571f1a2f859acb1), [seqN(FirstType,SizeType)](namespaceeigen#ade9f918902511b83512a8e6dde5cad7a), [seq(FirstType,LastType,IncrType)](namespaceeigen#a0c04400203ca9b414e13c9c721399969) 
    lgamma()
--------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_lgamma\_op <typename Derived::Scalar>, const Derived> Eigen::lgamma  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise natural logarithm of the gamma function of *x* 
 
See also
ArrayBase::lgamma   [Math functions](group__coeffwisemathfunctions#cwisetable_lgamma), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    log()
-----

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_log\_op <typename Derived::Scalar>, const Derived> Eigen::log  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise natural logarithm of *x* 
 
See also

[Eigen::log10](namespaceeigen#a25256faeec3ffd0f3615a0e1e45dfb14) , ArrayBase::log   [Math functions](group__coeffwisemathfunctions#cwisetable_log), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    log10()
-------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_log10\_op <typename Derived::Scalar>, const Derived> Eigen::log10  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise base 10 logarithm of *x* 
 
See also

[Eigen::log](namespaceeigen#ae8bb75ba4f5f30a7571146dbfa653c6d) , ArrayBase::log10   [Math functions](group__coeffwisemathfunctions#cwisetable_log10), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    log1p()
-------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_log1p\_op <typename Derived::Scalar>, const Derived> Eigen::log1p  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise natural logarithm of 1 plus the value of *x* 
 
See also
ArrayBase::log1p   [Math functions](group__coeffwisemathfunctions#cwisetable_log1p), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    log2()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_log2\_op <typename Derived::Scalar>, const Derived> Eigen::log2  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise base 2 logarithm of *x* 
 
See also

[Eigen::log](namespaceeigen#ae8bb75ba4f5f30a7571146dbfa653c6d) , ArrayBase::log2   [Math functions](group__coeffwisemathfunctions#cwisetable_log2), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    logistic()
----------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_logistic\_op <typename Derived::Scalar>, const Derived> Eigen::logistic  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise logistic function of *x* 
 
See also
ArrayBase::logistic   [Math functions](group__coeffwisemathfunctions#cwisetable_logistic), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    ndtri()
-------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_ndtri\_op <typename Derived::Scalar>, const Derived> Eigen::ndtri  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise inverse normal distribution function of *x* 
 
See also
ArrayBase::ndtri   [Math functions](group__coeffwisemathfunctions#cwisetable_ndtri), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    operator\*() [1/9]
------------------

    template<typename SparseDerived , typename PermutationType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [Product](classeigen_1_1product)<[Inverse](classeigen_1_1inverse)<PermutationType>, SparseDerived, AliasFreeProduct> Eigen::operator\*  | ( | const InverseImpl< PermutationType, [PermutationStorage](structeigen_1_1permutationstorage) > &  | *tperm*,  |
|  |  | const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< SparseDerived > &  | *matrix* |
|  | ) |  |  |

 | inline |

 
 
Returns
the matrix with the inverse permutation applied to the rows. 
    operator\*() [2/9]
------------------

    template<typename MatrixDerived , typename PermutationDerived >  

|  |  |  |  |
| --- | --- | --- | --- |
| const [Product](classeigen_1_1product)<MatrixDerived, PermutationDerived, AliasFreeProduct> Eigen::operator\*  | ( | const [MatrixBase](classeigen_1_1matrixbase)< MatrixDerived > &  | *matrix*,  |
|  |  | const [PermutationBase](classeigen_1_1permutationbase)< PermutationDerived > &  | *permutation* |
|  | ) |  |  |

 
 
Returns
the matrix with the permutation applied to the columns. 
    operator\*() [3/9]
------------------

    template<typename MatrixDerived , typename TranspositionsDerived >  

|  |  |  |  |
| --- | --- | --- | --- |
| const [Product](classeigen_1_1product)<MatrixDerived, TranspositionsDerived, AliasFreeProduct> Eigen::operator\*  | ( | const [MatrixBase](classeigen_1_1matrixbase)< MatrixDerived > &  | *matrix*,  |
|  |  | const TranspositionsBase< TranspositionsDerived > &  | *transpositions* |
|  | ) |  |  |

 
 
Returns
the *matrix* with the *transpositions* applied to the columns. 
    operator\*() [4/9]
------------------

    template<typename OtherDerived , typename VectorsType , typename CoeffsType , int Side>  

|  |  |  |  |
| --- | --- | --- | --- |
| internal::matrix\_type\_times\_scalar\_type<typename VectorsType::Scalar,OtherDerived>::Type Eigen::operator\*  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other*,  |
|  |  | const [HouseholderSequence](classeigen_1_1householdersequence)< VectorsType, CoeffsType, Side > &  | *h* |
|  | ) |  |  |

 
 Computes the product of a matrix with a Householder sequence. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | other | Matrix being multiplied.  |
| [in] | h | HouseholderSequence being multiplied.  |

   
Returns
Expression object representing the product.
 This function computes \( MH \) where \( M \) is the matrix `other` and \( H \) is the Householder sequence represented by `h`. 

    operator\*() [5/9]
------------------

    template<typename SparseDerived , typename PermDerived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [Product](classeigen_1_1product)<PermDerived, SparseDerived, AliasFreeProduct> Eigen::operator\*  | ( | const [PermutationBase](classeigen_1_1permutationbase)< PermDerived > &  | *perm*,  |
|  |  | const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< SparseDerived > &  | *matrix* |
|  | ) |  |  |

 | inline |

 
 
Returns
the matrix with the permutation applied to the rows 
    operator\*() [6/9]
------------------

    template<typename PermutationDerived , typename MatrixDerived >  

|  |  |  |  |
| --- | --- | --- | --- |
| const [Product](classeigen_1_1product)<PermutationDerived, MatrixDerived, AliasFreeProduct> Eigen::operator\*  | ( | const [PermutationBase](classeigen_1_1permutationbase)< PermutationDerived > &  | *permutation*,  |
|  |  | const [MatrixBase](classeigen_1_1matrixbase)< MatrixDerived > &  | *matrix* |
|  | ) |  |  |

 
 
Returns
the matrix with the permutation applied to the rows. 
    operator\*() [7/9]
------------------

    template<typename SparseDerived , typename PermutationType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [Product](classeigen_1_1product)<SparseDerived, [Inverse](classeigen_1_1inverse)<PermutationType>, AliasFreeProduct> Eigen::operator\*  | ( | const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< SparseDerived > &  | *matrix*,  |
|  |  | const InverseImpl< PermutationType, [PermutationStorage](structeigen_1_1permutationstorage) > &  | *tperm* |
|  | ) |  |  |

 | inline |

 
 
Returns
the matrix with the inverse permutation applied to the columns. 
    operator\*() [8/9]
------------------

    template<typename SparseDerived , typename PermDerived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [Product](classeigen_1_1product)<SparseDerived, PermDerived, AliasFreeProduct> Eigen::operator\*  | ( | const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< SparseDerived > &  | *matrix*,  |
|  |  | const [PermutationBase](classeigen_1_1permutationbase)< PermDerived > &  | *perm* |
|  | ) |  |  |

 | inline |

 
 
Returns
the matrix with the permutation applied to the columns 
    operator\*() [9/9]
------------------

    template<typename TranspositionsDerived , typename MatrixDerived >  

|  |  |  |  |
| --- | --- | --- | --- |
| const [Product](classeigen_1_1product)<TranspositionsDerived, MatrixDerived, AliasFreeProduct> Eigen::operator\*  | ( | const TranspositionsBase< TranspositionsDerived > &  | *transpositions*,  |
|  |  | const [MatrixBase](classeigen_1_1matrixbase)< MatrixDerived > &  | *matrix* |
|  | ) |  |  |

 
 
Returns
the *matrix* with the *transpositions* applied to the rows. 
    real()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_real\_op <typename Derived::Scalar>, const Derived> Eigen::real  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise real part of *x* 
 
See also
ArrayBase::real   [Math functions](group__coeffwisemathfunctions#cwisetable_real), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    rint()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_rint\_op <typename Derived::Scalar>, const Derived> Eigen::rint  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise nearest integer of *x* 
 
See also

[Eigen::floor](namespaceeigen#abf03d773a87830bc7fde51bcd94c89a0) , [Eigen::ceil](namespaceeigen#aa73e38be0689a463ae14141b9cf89c35) , ArrayBase::round   [Math functions](group__coeffwisemathfunctions#cwisetable_rint), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    round()
-------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_round\_op <typename Derived::Scalar>, const Derived> Eigen::round  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise nearest integer of *x* 
 
See also

[Eigen::floor](namespaceeigen#abf03d773a87830bc7fde51bcd94c89a0) , [Eigen::ceil](namespaceeigen#aa73e38be0689a463ae14141b9cf89c35) , ArrayBase::round   [Math functions](group__coeffwisemathfunctions#cwisetable_round), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    rsqrt()
-------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_rsqrt\_op <typename Derived::Scalar>, const Derived> Eigen::rsqrt  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise reciprocal square root of *x* 
 
See also
ArrayBase::rsqrt   [Math functions](group__coeffwisemathfunctions#cwisetable_rsqrt), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    Scaling() [1/6]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [DiagonalWrapper](classeigen_1_1diagonalwrapper)<const Derived> Eigen::Scaling  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *coeffs* | ) |  |

 | inline |

 
 Constructs an axis aligned scaling expression from vector expression *coeffs* This is an alias for coeffs.asDiagonal() 

    Scaling() [2/6]
---------------

    template<typename Scalar >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [DiagonalMatrix](classeigen_1_1diagonalmatrix)<Scalar,2> Eigen::Scaling  | ( | const Scalar &  | *sx*,  |
|  |  | const Scalar &  | *sy* |
|  | ) |  |  |

 | inline |

 
 Constructs a 2D axis aligned scaling 

    Scaling() [3/6]
---------------

    template<typename Scalar >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [DiagonalMatrix](classeigen_1_1diagonalmatrix)<Scalar,3> Eigen::Scaling  | ( | const Scalar &  | *sx*,  |
|  |  | const Scalar &  | *sy*,  |
|  |  | const Scalar &  | *sz* |
|  | ) |  |  |

 | inline |

 
 Constructs a 3D axis aligned scaling 

    Scaling() [4/6]
---------------

    template<typename RealScalar >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [UniformScaling](classeigen_1_1uniformscaling)<std::complex<RealScalar> > Eigen::Scaling  | ( | const std::complex< RealScalar > &  | *s* | ) |  |

 | inline |

 
 Constructs a uniform scaling from scale factor *s* 

    Scaling() [5/6]
---------------

   

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [UniformScaling](classeigen_1_1uniformscaling)<double> Eigen::Scaling  | ( | double  | *s* | ) |  |

 | inline |

 
 Constructs a uniform scaling from scale factor *s* 

    Scaling() [6/6]
---------------

   

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [UniformScaling](classeigen_1_1uniformscaling)<float> Eigen::Scaling  | ( | float  | *s* | ) |  |

 | inline |

 
 Constructs a uniform scaling from scale factor *s* 

    seq() [1/2]
-----------

    template<typename FirstType , typename LastType >  

|  |  |  |  |
| --- | --- | --- | --- |
| auto Eigen::seq  | ( | FirstType  | *f*,  |
|  |  | LastType  | *l* |
|  | ) |  |  |

 
 
Returns
an [ArithmeticSequence](classeigen_1_1arithmeticsequence) starting at *f*, up (or down) to *l*, and unit increment
 It is essentially an alias to: 



```
[seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)(f,l-f+1);

```


See also

[seqN(FirstType,SizeType)](namespaceeigen#ade9f918902511b83512a8e6dde5cad7a), [seq(FirstType,LastType,IncrType)](namespaceeigen#a0c04400203ca9b414e13c9c721399969) 
    seq() [2/2]
-----------

    template<typename FirstType , typename LastType , typename IncrType >  

|  |  |  |  |
| --- | --- | --- | --- |
| auto Eigen::seq  | ( | FirstType  | *f*,  |
|  |  | LastType  | *l*,  |
|  |  | IncrType  | *incr* |
|  | ) |  |  |

 
 
Returns
an [ArithmeticSequence](classeigen_1_1arithmeticsequence) starting at *f*, up (or down) to *l*, and with positive (or negative) increment *incr* 
 It is essentially an alias to: 



```
[seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)(f, (l-f+incr)/incr, incr);

```


See also

[seqN(FirstType,SizeType,IncrType)](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda), [seq(FirstType,LastType)](namespaceeigen#ad87fbafd4a91f5c1ed6a768987a1b74d) 
    seqN() [1/2]
------------

    template<typename FirstType , typename SizeType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [ArithmeticSequence](classeigen_1_1arithmeticsequence)<typename internal::cleanup\_index\_type<FirstType>::type,typename internal::cleanup\_index\_type<SizeType>::type > Eigen::seqN  | ( | FirstType  | *first*,  |
|  |  | SizeType  | *size* |
|  | ) |  |  |

 
 
Returns
an [ArithmeticSequence](classeigen_1_1arithmeticsequence) starting at *first*, of length *size*, and unit increment
 
See also

[seqN(FirstType,SizeType,IncrType)](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda), [seq(FirstType,LastType)](namespaceeigen#ad87fbafd4a91f5c1ed6a768987a1b74d) 
    seqN() [2/2]
------------

    template<typename FirstType , typename SizeType , typename IncrType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [ArithmeticSequence](classeigen_1_1arithmeticsequence)< typename internal::cleanup\_index\_type< FirstType >::type, typename internal::cleanup\_index\_type< SizeType >::type, typename internal::cleanup\_seq\_incr< IncrType >::type > Eigen::seqN  | ( | FirstType  | *first*,  |
|  |  | SizeType  | *size*,  |
|  |  | IncrType  | *incr* |
|  | ) |  |  |

 
 
Returns
an [ArithmeticSequence](classeigen_1_1arithmeticsequence) starting at *first*, of length *size*, and increment *incr* 
 
See also

[seqN(FirstType,SizeType)](namespaceeigen#ade9f918902511b83512a8e6dde5cad7a), [seq(FirstType,LastType,IncrType)](namespaceeigen#a0c04400203ca9b414e13c9c721399969) 
    sign()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_sign\_op <typename Derived::Scalar>, const Derived> Eigen::sign  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise sign (or 0) of *x* 
 
See also
ArrayBase::sign   [Math functions](group__coeffwisemathfunctions#cwisetable_sign), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    sin()
-----

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_sin\_op <typename Derived::Scalar>, const Derived> Eigen::sin  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise sine of *x* 
 
See also
ArrayBase::sin   [Math functions](group__coeffwisemathfunctions#cwisetable_sin), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    sinh()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_sinh\_op <typename Derived::Scalar>, const Derived> Eigen::sinh  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise hyperbolic sine of *x* 
 
See also
ArrayBase::sinh   [Math functions](group__coeffwisemathfunctions#cwisetable_sinh), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    sqrt()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_sqrt\_op <typename Derived::Scalar>, const Derived> Eigen::sqrt  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise square root of *x* 
 
See also
ArrayBase::sqrt , MatrixBase::cwiseSqrt   [Math functions](group__coeffwisemathfunctions#cwisetable_sqrt), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    square()
--------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_square\_op <typename Derived::Scalar>, const Derived> Eigen::square  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise square (power 2) of *x* 
 
See also

[Eigen::abs2](namespaceeigen#a54cc34b64b4935307efc06d56cd531df) , Eigen::pow , ArrayBase::square   [Math functions](group__coeffwisemathfunctions#cwisetable_square), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    tan()
-----

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_tan\_op <typename Derived::Scalar>, const Derived> Eigen::tan  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise tangent of *x* 
 
See also
ArrayBase::tan   [Math functions](group__coeffwisemathfunctions#cwisetable_tan), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    tanh()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)<Eigen::internal:: scalar\_tanh\_op <typename Derived::Scalar>, const Derived> Eigen::tanh  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise hyperbolic tangent of *x* 
 
See also
ArrayBase::tanh   [Math functions](group__coeffwisemathfunctions#cwisetable_tanh), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.")   
 
    viewAsCholmod() [1/3]
---------------------

    template<typename \_Scalar , int \_Options, typename \_Index , unsigned int UpLo>  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| cholmod\_sparse Eigen::viewAsCholmod  | ( | const [SparseSelfAdjointView](classeigen_1_1sparseselfadjointview)< const [SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_Index >, UpLo > &  | *mat* | ) |  |

 
 Returns a view of the [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") sparse matrix *mat* as Cholmod sparse matrix. The data are not copied but shared. 

    viewAsCholmod() [2/3]
---------------------

    template<typename Derived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| cholmod\_dense Eigen::viewAsCholmod  | ( | [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *mat* | ) |  |

 
 Returns a view of the [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") **dense** matrix *mat* as Cholmod dense matrix. The data are not copied but shared. 

    viewAsCholmod() [3/3]
---------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| cholmod\_sparse Eigen::viewAsCholmod  | ( | [Ref](classeigen_1_1ref)< [SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex > >  | *mat* | ) |  |

 
 Wraps the [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") sparse matrix *mat* into a Cholmod sparse matrix object. Note that the data are shared. 

    viewAsEigen()
-------------

    template<typename Scalar , int Flags, typename StorageIndex >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [MappedSparseMatrix](classeigen_1_1mappedsparsematrix)<Scalar,Flags,StorageIndex> Eigen::viewAsEigen  | ( | cholmod\_sparse &  | *cm* | ) |  |

 
 Returns a view of the Cholmod sparse matrix *cm* as an [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") sparse matrix. The data are not copied but shared. 

    Dynamic
-------

   

|  |
| --- |
| const int Eigen::Dynamic |

 
 This value means that a positive quantity (e.g., a size) is not known at compile-time, and that instead the value is stored in some runtime variable.

 Changing the value of Dynamic breaks the ABI, as Dynamic is often used as a template parameter for [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."). 

    DynamicIndex
------------

   

|  |
| --- |
| const int Eigen::DynamicIndex |

 
 This value means that a signed quantity (e.g., a signed index) is not known at compile-time, and that instead its value has to be specified at runtime. 

    HugeCost
--------

   

|  |
| --- |
| const int Eigen::HugeCost |

 
 This value means that the cost to evaluate an expression coefficient is either very expensive or cannot be known at compile time.

 This value has to be positive to (1) simplify cost computation, and (2) allow to distinguish between a very expensive and very very expensive expressions. It thus must also be large enough to make sure unrolling won't happen and that sub expressions will be evaluated, but not too large to avoid overflow. 

    Infinity
--------

   

|  |
| --- |
| const int Eigen::Infinity |

 
 This value means +Infinity; it is currently used only as the p parameter to [MatrixBase::lpNorm<int>()](classeigen_1_1matrixbase#a72586ab059e889e7d2894ff227747e35). The value Infinity there means the L-infinity norm. 

    UndefinedIncr
-------------

   

|  |
| --- |
| const int Eigen::UndefinedIncr |

 
 This value means that the increment to go from one value to another in a sequence is not constant for each step. 

    

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/namespaceEigen.html>

Extending MatrixBase
====================

   
In this section we will see how to add custom methods to [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions."). Since all expressions and matrix types inherit [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions."), adding a method to [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") make it immediately available to all expressions ! A typical use case is, for instance, to make [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") compatible with another API.

 You certainly know that in C++ it is not possible to add methods to an existing class. So how that's possible ? Here the trick is to include in the declaration of [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") a file defined by the preprocessor token `EIGEN_MATRIXBASE_PLUGIN:` 



```
class MatrixBase {
  // ...
 #ifdef EIGEN\_MATRIXBASE\_PLUGIN
 #include EIGEN\_MATRIXBASE\_PLUGIN
 #endif
};

```

 Therefore to extend [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") with your own methods you just have to create a file with your method declaration and define EIGEN\_MATRIXBASE\_PLUGIN before you include any [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s header file.

 You can extend many of the other classes used in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") by defining similarly named preprocessor symbols. For instance, define `EIGEN_ARRAYBASE_PLUGIN` if you want to extend the [ArrayBase](classeigen_1_1arraybase "Base class for all 1D and 2D array, and related expressions.") class. A full list of classes that can be extended in this way and the corresponding preprocessor symbols can be found on our page [Preprocessor directives](topicpreprocessordirectives).

 Here is an example of an extension file for adding methods to [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions."):   
 **MatrixBaseAddons.h** 



```
inline Scalar at(uint i, uint j) const { return this->operator()(i,j); }
inline Scalar& at(uint i, uint j) { return this->operator()(i,j); }
inline Scalar at(uint i) const { return this->operator[](i); }
inline Scalar& at(uint i) { return this->operator[](i); }
 
inline RealScalar squaredLength() const { return squaredNorm(); }
inline RealScalar length() const { return norm(); }
inline RealScalar invLength(void) const { return fast_inv_sqrt(squaredNorm()); }
 
template<typename OtherDerived>
inline Scalar squaredDistanceTo(const MatrixBase<OtherDerived>& other) const
{ return (derived() - other.derived()).squaredNorm(); }
 
template<typename OtherDerived>
inline RealScalar distanceTo(const MatrixBase<OtherDerived>& other) const
{ return internal::sqrt(derived().squaredDistanceTo(other)); }
 
inline void scaleTo(RealScalar l) { RealScalar vl = norm(); if (vl>1e-9) derived() *= (l/vl); }
 
inline Transpose<Derived> transposed() {return this->transpose();}
inline const Transpose<Derived> transposed() const {return this->transpose();}
 
inline uint minComponentId(void) const { int i; this->minCoeff(&i); return i; }
inline uint maxComponentId(void) const { int i; this->maxCoeff(&i); return i; }
 
template<typename OtherDerived>
void makeFloor(const MatrixBase<OtherDerived>& other) { derived() = derived().cwiseMin(other.derived()); }
template<typename OtherDerived>
void makeCeil(const MatrixBase<OtherDerived>& other) { derived() = derived().cwiseMax(other.derived()); }
 
const CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const Derived, const ConstantReturnType>
operator+(const Scalar& scalar) const
{ return CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const Derived, const ConstantReturnType>(derived(), Constant(rows(),cols(),scalar)); }
 
friend const CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const ConstantReturnType, Derived>
operator+(const Scalar& scalar, const MatrixBase<Derived>& mat)
{ return CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const ConstantReturnType, Derived>(Constant(rows(),cols(),scalar), mat.derived()); }

```

Then one can the following declaration in the config.h or whatever prerequisites header file of his project: 



```
#define EIGEN\_MATRIXBASE\_PLUGIN "MatrixBaseAddons.h"

```
 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicCustomizing_Plugins.html>

Inheriting from Matrix
======================

   
Before inheriting from [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."), be really, I mean REALLY, sure that using EIGEN\_MATRIX\_PLUGIN is not what you really want (see previous section). If you just need to add few members to [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."), this is the way to go.

 An example of when you actually need to inherit [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."), is when you have several layers of heritage such as MyVerySpecificVector1, MyVerySpecificVector2 -> MyVector1 -> [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") and MyVerySpecificVector3, MyVerySpecificVector4 -> MyVector2 -> [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.").

 In order for your object to work within the Eigen framework, you need to define a few members in your inherited class.

 Here is a minimalistic example:

 
```
#include <Eigen/Core>
#include <iostream>
 
class MyVectorType : public [Eigen::VectorXd](classeigen_1_1matrix)
{
public:
    MyVectorType(void):[Eigen](namespaceeigen)::VectorXd() {}
 
    // This constructor allows you to construct MyVectorType from Eigen expressions
    template<typename OtherDerived>
    MyVectorType(const [Eigen::MatrixBase<OtherDerived>](classeigen_1_1matrixbase)& other)
        : [Eigen](namespaceeigen)::VectorXd(other)
    { }
 
    // This method allows you to assign Eigen expressions to MyVectorType
    template<typename OtherDerived>
    MyVectorType& operator=(const [Eigen::MatrixBase <OtherDerived>](classeigen_1_1matrixbase)& other)
    {
        this->[Eigen::VectorXd::operator=](classeigen_1_1matrix#a0b287f226563b8410312bd474b2a1ccc)(other);
        return *this;
    }
};
 
int main()
{
  MyVectorType v = MyVectorType::Ones(4);
  v(2) += 10;
  v = 2 * v;
  std::cout << v.transpose() << std::endl;
}
```

Output: 



```
 2  2 22  2

```

This is the kind of error you can get if you don't provide those methods 



```
error: no match for ‘operator=’ in ‘v = Eigen::operator*(
const Eigen::MatrixBase<Eigen::Matrix<double, -0x000000001, 1, 0, -0x000000001, 1> >::Scalar&, 
const Eigen::MatrixBase<Eigen::Matrix<double, -0x000000001, 1> >::StorageBaseType&)
(((const Eigen::MatrixBase<Eigen::Matrix<double, -0x000000001, 1> >::StorageBaseType&)
((const Eigen::MatrixBase<Eigen::Matrix<double, -0x000000001, 1> >::StorageBaseType*)(& v))))’

```
 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicCustomizing_InheritingMatrix.html>

Assertions
==========

   

 Assertions
============

 The macro eigen\_assert is defined to be `eigen_plain_assert` by default. We use eigen\_plain\_assert instead of `assert` to work around a known bug for GCC <= 4.3. Basically, eigen\_plain\_assert *is* `assert`.

 
 Redefining assertions
-----------------------

 Both eigen\_assert and eigen\_plain\_assert are defined in [Macros.h](https://eigen.tuxfamily.org/dox/Macros_8h_source.html). Defining eigen\_assert indirectly gives you a chance to change its behavior. You can redefine this macro if you want to do something else such as throwing an exception, and fall back to its default behavior with eigen\_plain\_assert. The code below tells [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") to throw an std::runtime\_error:

 
```
#include <stdexcept>
#undef eigen\_assert
#define eigen\_assert(x) \
 if (!(x)) { throw (std::runtime\_error("Put your message here")); }

```


 Disabling assertions
----------------------

 Assertions cost run time and can be turned off. You can suppress eigen\_assert by defining `EIGEN_NO_DEBUG` **before** including [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") headers. `EIGEN_NO_DEBUG` is undefined by default unless `NDEBUG` is defined.

 
 Static assertions
===================

 Static assertions are not standardized until C++11. However, in the [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") library, there are many conditions can and should be detectedat compile time. For instance, we use static assertions to prevent the code below from compiling.

 
```
Matrix3d()  + Matrix4d();   // adding matrices of different sizes
Matrix4cd() * Vector3cd();  // invalid product known at compile time

```

Static assertions are defined in [StaticAssert.h](https://eigen.tuxfamily.org/dox/StaticAssert_8h_source.html). If there is native static\_assert, we use it. Otherwise, we have implemented an assertion macro that can show a limited range of messages.

 One can easily come up with static assertions without messages, such as:

 
```
#define STATIC\_ASSERT(x) \
 switch(0) { case 0: case x:; }

```

However, the example above obviously cannot tell why the assertion failed. Therefore, we define a `struct` in namespace Eigen::internal to handle available messages.

 
```
template<bool condition>
struct static_assertion {};
 
template<>
struct static_assertion<true>
{
  enum {
    YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX,
    YOU_MIXED_VECTORS_OF_DIFFERENT_SIZES,
    // see StaticAssert.h for all enums.
  };
};

```

And then, we define EIGEN\_STATIC\_ASSERT(CONDITION,MSG) to access Eigen::internal::static\_assertion<bool(CONDITION)>::MSG. If the condition evaluates into `false`, your compiler displays a lot of messages explaining there is no MSG in static\_assert<false>. Nevertheless, this is *not* in what we are interested. As you can see, all members of static\_assert<true> are ALL\_CAPS\_AND\_THEY\_ARE\_SHOUTING.

 
Warning
When using this macro, MSG should be a member of static\_assertion<true>, or the static assertion **always** fails. Currently, it can only be used in function scope.
 
 Derived static assertions
---------------------------

 There are other macros derived from EIGEN\_STATIC\_ASSERT to enhance readability. Their names are self-explanatory.

 * **EIGEN\_STATIC\_ASSERT\_FIXED\_SIZE(TYPE)** - passes if *TYPE* is fixed size.
* **EIGEN\_STATIC\_ASSERT\_DYNAMIC\_SIZE(TYPE)** - passes if *TYPE* is dynamic size.
* **EIGEN\_STATIC\_ASSERT\_LVALUE(Derived)** - failes if *Derived* is read-only.
* **EIGEN\_STATIC\_ASSERT\_ARRAYXPR(Derived)** - passes if *Derived* is an array expression.
* **EIGEN\_STATIC\_ASSERT\_SAME\_XPR\_KIND(Derived1, Derived2)** - failes if the two expressions are an array one and a matrix one.

 Because [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") handles both fixed-size and dynamic-size expressions, some conditions cannot be clearly determined at compile time. We classify them into strict assertions and permissive assertions.

 ### 
 Strict assertions

 These assertions fail if the condition **may not** be met. For example, MatrixXd may not be a vector, so it fails EIGEN\_STATIC\_ASSERT\_VECTOR\_ONLY.

 * **EIGEN\_STATIC\_ASSERT\_VECTOR\_ONLY(TYPE)** - passes if *TYPE* must be a vector type.
* **EIGEN\_STATIC\_ASSERT\_VECTOR\_SPECIFIC\_SIZE(TYPE, SIZE)** - passes if *TYPE* must be a vector of the given size.
* **EIGEN\_STATIC\_ASSERT\_MATRIX\_SPECIFIC\_SIZE(TYPE, ROWS, COLS)** - passes if *TYPE* must be a matrix with given rows and columns.

 ### 
 Permissive assertions

 These assertions fail if the condition **cannot** be met. For example, MatrixXd and Matrix4d may have the same size, so they pass EIGEN\_STATIC\_ASSERT\_SAME\_MATRIX\_SIZE.

 * **EIGEN\_STATIC\_ASSERT\_SAME\_VECTOR\_SIZE(TYPE0,TYPE1)** - fails if the two vector expression types must have different sizes.
* **EIGEN\_STATIC\_ASSERT\_SAME\_MATRIX\_SIZE(TYPE0,TYPE1)** - fails if the two matrix expression types must have different sizes.
* **EIGEN\_STATIC\_ASSERT\_SIZE\_1x1(TYPE)** - fails if *TYPE* cannot be an 1x1 expression.

 See [StaticAssert.h](https://eigen.tuxfamily.org/dox/StaticAssert_8h_source.html) for details such as what messages they throw.

 
 Disabling static assertions
-----------------------------

 If `EIGEN_NO_STATIC_ASSERT` is defined, static assertions turn into `eigen_assert`'s, working like:

 
```
#define EIGEN\_STATIC\_ASSERT(CONDITION,MSG) eigen\_assert((CONDITION) && #MSG);

```

This saves compile time but consumes more run time. `EIGEN_NO_STATIC_ASSERT` is undefined by default. 

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicAssertions.html>

Eigen and multi-threading
=========================

   

 Make Eigen run in parallel
============================

 Some Eigen's algorithms can exploit the multiple cores present in your hardware. To this end, it is enough to enable OpenMP on your compiler, for instance:


* GCC: `-fopenmp`
* ICC: `-openmp`
* MSVC: check the respective option in the build properties.

 You can control the number of threads that will be used using either the OpenMP API or Eigen's API using the following priority: 



```
OMP_NUM_THREADS=n ./my_program
omp_set_num_threads(n);
Eigen::setNbThreads(n);

```

 Unless `setNbThreads` has been called, Eigen uses the number of threads specified by OpenMP. You can restore this behavior by calling `setNbThreads(0);`. You can query the number of threads that will be used with: 



```
n = Eigen::nbThreads( );

```

 You can disable Eigen's multi threading at compile time by defining the [EIGEN\_DONT\_PARALLELIZE](topicpreprocessordirectives#TopicPreprocessorDirectivesPerformance)  preprocessor token.

 Currently, the following algorithms can make use of multi-threading:


* general dense matrix - matrix products
* [PartialPivLU](classeigen_1_1partialpivlu "LU decomposition of a matrix with partial pivoting, and related features.")
* row-major-sparse \* dense vector/matrix products
* [ConjugateGradient](classeigen_1_1conjugategradient "A conjugate gradient solver for sparse (or dense) self-adjoint problems.") with `Lower|Upper` as the `UpLo` template parameter.
* [BiCGSTAB](classeigen_1_1bicgstab "A bi conjugate gradient stabilized solver for sparse square problems.") with a row-major sparse matrix format.
* [LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient "A conjugate gradient solver for sparse (or dense) least-square problems.")

 
Warning
On most OS it is **very important** to limit the number of threads to the number of physical cores, otherwise significant slowdowns are expected, especially for operations involving dense matrices.
 Indeed, the principle of hyper-threading is to run multiple threads (in most cases 2) on a single core in an interleaved manner. However, Eigen's matrix-matrix product kernel is fully optimized and already exploits nearly 100% of the CPU capacity. Consequently, there is no room for running multiple such threads on a single core, and the performance would drops significantly because of cache pollution and other sources of overheads. At this stage of reading you're probably wondering why Eigen does not limit itself to the number of physical cores? This is simply because OpenMP does not allow to know the number of physical cores, and thus Eigen will launch as many threads as *cores* reported by OpenMP.

 
 Using Eigen in a multi-threaded application
=============================================

 In the case your own application is multithreaded, and multiple threads make calls to Eigen, then you have to initialize Eigen by calling the following routine **before** creating the threads: 



```
#include <Eigen/Core>
 
int main(int argc, char** argv)
{
  Eigen::initParallel();
  
  ...
}

```


Note
With Eigen 3.3, and a fully C++11 compliant compiler (i.e., [thread-safe static local variable initialization](http://en.cppreference.com/w/cpp/language/storage_duration#Static_local_variables)), then calling `initParallel()` is optional.
 
Warning
Note that all functions generating random matrices are **not** re-entrant nor thread-safe. Those include [DenseBase::Random()](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19), and [DenseBase::setRandom()](classeigen_1_1densebase#ac476e5852129ba32beaa1a8a3d7ee0db) despite a call to `Eigen::initParallel()`. This is because these functions are based on `std::rand` which is not re-entrant. For thread-safe random generator, we recommend the use of c++11 random generators ([example](classeigen_1_1densebase#a9752ee59976a4b4aad860ad1a9093e7f) ) or `boost::random`.
 In the case your application is parallelized with OpenMP, you might want to disable Eigen's own parallelization as detailed in the previous section.

 
Warning
Using OpenMP with custom scalar types that might throw exceptions can lead to unexpected behaviour in the event of throwing. 
 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicMultiThreading.html>

Using BLAS/LAPACK from Eigen
============================

   
Since Eigen version 3.3 and later, any F77 compatible BLAS or LAPACK libraries can be used as backends for dense matrix products and dense matrix decompositions. For instance, one can use [Intel® MKL](http://eigen.tuxfamily.org/Counter/redirect_to_mkl.php), Apple's Accelerate framework on OSX, [OpenBLAS](http://www.openblas.net/), [Netlib LAPACK](http://www.netlib.org/lapack), etc.

 Do not miss this [page](topicusingintelmkl)  for further discussions on the specific use of Intel® MKL (also includes VML, PARDISO, etc.)

 In order to use an external BLAS and/or LAPACK library, you must link you own application to the respective libraries and their dependencies. For LAPACK, you must also link to the standard [Lapacke](http://www.netlib.org/lapack/lapacke.html) library, which is used as a convenient think layer between Eigen's C++ code and LAPACK F77 interface. Then you must activate their usage by defining one or multiple of the following macros (**before** including any Eigen's header):

 
Note
For Mac users, in order to use the lapack version shipped with the Accelerate framework, you also need the lapacke library. Using [MacPorts](https://www.macports.org/), this is as easy as: 
```
sudo port install lapack

```
 and then use the following link flags: `-framework` `Accelerate` `/opt/local/lib/lapack/liblapacke`.dylib
 

|  |  |
| --- | --- |
| `EIGEN_USE_BLAS` | Enables the use of external BLAS level 2 and 3 routines (compatible with any F77 BLAS interface)  |
| `EIGEN_USE_LAPACKE` | Enables the use of external Lapack routines via the [Lapacke](http://www.netlib.org/lapack/lapacke.html) C interface to Lapack (compatible with any F77 LAPACK interface)  |
| `EIGEN_USE_LAPACKE_STRICT` | Same as `EIGEN_USE_LAPACKE` but algorithms of lower numerical robustness are disabled.  This currently concerns only [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") which otherwise would be replaced by `gesvd` that is less robust than Jacobi rotations.  |

 When doing so, a number of Eigen's algorithms are silently substituted with calls to BLAS or LAPACK routines. These substitutions apply only for **Dynamic** **or** **large** enough objects with one of the following four standard scalar types: `float`, `double`, `complex<float>`, and `complex<double>`. Operations on other scalar types or mixing reals and complexes will continue to use the built-in algorithms.

 The breadth of Eigen functionality that can be substituted is listed in the table below. 




| Functional domain | Code example | BLAS/LAPACK routines  |
| --- | --- | --- |
| Matrix-matrix operations  `EIGEN_USE_BLAS` | 
```
m1*m2.transpose();
m1.selfadjointView<[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>()*m2;
m1*m2.triangularView<[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>();
m1.selfadjointView<[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>().rankUpdate(m2,1.0);
```
 | 
```
?gemm
?symm/?hemm
?trmm
dsyrk/ssyrk

```
 |
| Matrix-vector operations  `EIGEN_USE_BLAS` | 
```
m1.adjoint()*b;
m1.selfadjointView<[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>()*b;
m1.triangularView<[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>()*b;

```
 | 
```
?gemv
?symv/?hemv
?trmv

```
 |
| LU decomposition  `EIGEN_USE_LAPACKE`  `EIGEN_USE_LAPACKE_STRICT` | 
```
v1 = m1.lu().solve(v2);

```
 | 
```
?getrf

```
 |
| Cholesky decomposition  `EIGEN_USE_LAPACKE`  `EIGEN_USE_LAPACKE_STRICT` | 
```
v1 = m2.selfadjointView<[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>().llt().solve(v2);

```
 | 
```
?potrf

```
 |
| QR decomposition  `EIGEN_USE_LAPACKE`  `EIGEN_USE_LAPACKE_STRICT` | 
```
m1.householderQr();
m1.colPivHouseholderQr();

```
 | 
```
?geqrf
?geqp3

```
 |
| Singular value decomposition  `EIGEN_USE_LAPACKE` | 
```
JacobiSVD<MatrixXd> svd;
svd.compute(m1, [ComputeThinV](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a540036417bfecf2e791a70948c227f47));
```
 | 
```
?gesvd

```
 |
| Eigen-value decompositions  `EIGEN_USE_LAPACKE`  `EIGEN_USE_LAPACKE_STRICT` | 
```
EigenSolver<MatrixXd> es(m1);
ComplexEigenSolver<MatrixXcd> ces(m1);
SelfAdjointEigenSolver<MatrixXd> saes(m1+m1.transpose());
GeneralizedSelfAdjointEigenSolver<MatrixXd>
    gsaes(m1+m1.transpose(),m2+m2.transpose());

```
 | 
```
?gees
?gees
?syev/?heev
?syev/?heev,
?potrf

```
 |
| Schur decomposition  `EIGEN_USE_LAPACKE`  `EIGEN_USE_LAPACKE_STRICT` | 
```
RealSchur<MatrixXd> schurR(m1);
ComplexSchur<MatrixXcd> schurC(m1);

```
 | 
```
?gees

```
 |

 In the examples, m1 and m2 are dense matrices and v1 and v2 are dense vectors. 

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicUsingBlasLapack.html>

Using Intel® MKL from Eigen
===========================

   
Since Eigen version 3.1 and later, users can benefit from built-in Intel® Math Kernel Library (MKL) optimizations with an installed copy of Intel MKL 10.3 (or later).

 [Intel MKL](http://eigen.tuxfamily.org/Counter/redirect_to_mkl.php)  provides highly optimized multi-threaded mathematical routines for x86-compatible architectures. Intel MKL is available on Linux, Mac and Windows for both Intel64 and IA32 architectures.

 
Note
Intel® MKL is a proprietary software and it is the responsibility of users to buy or register for community (free) Intel MKL licenses for their products. Moreover, the license of the user product has to allow linking to proprietary software that excludes any unmodified versions of the GPL.
 Using Intel MKL through Eigen is easy:


1. define the `EIGEN_USE_MKL_ALL` macro before including any Eigen's header
2. link your program to MKL libraries (see the [MKL linking advisor](http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/))
3. on a 64bits system, you must use the LP64 interface (not the ILP64 one)

 When doing so, a number of Eigen's algorithms are silently substituted with calls to Intel MKL routines. These substitutions apply only for **Dynamic** **or** **large** enough objects with one of the following four standard scalar types: `float`, `double`, `complex<float>`, and `complex<double>`. Operations on other scalar types or mixing reals and complexes will continue to use the built-in algorithms.

 In addition you can choose which parts will be substituted by defining one or multiple of the following macros:

 

|  |  |
| --- | --- |
| `EIGEN_USE_BLAS` | Enables the use of external BLAS level 2 and 3 routines  |
| `EIGEN_USE_LAPACKE` | Enables the use of external Lapack routines via the [Lapacke](http://www.netlib.org/lapack/lapacke.html) C interface to Lapack  |
| `EIGEN_USE_LAPACKE_STRICT` | Same as `EIGEN_USE_LAPACKE` but algorithm of lower robustness are disabled.  This currently concerns only [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") which otherwise would be replaced by `gesvd` that is less robust than Jacobi rotations.  |
| `EIGEN_USE_MKL_VML` | Enables the use of Intel VML (vector operations)  |
| `EIGEN_USE_MKL_ALL` | Defines `EIGEN_USE_BLAS`, `EIGEN_USE_LAPACKE`, and `EIGEN_USE_MKL_VML` |

 The `EIGEN_USE_BLAS` and `EIGEN_USE_LAPACKE*` macros can be combined with `EIGEN_USE_MKL` to explicitly tell [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") that the underlying BLAS/Lapack implementation is Intel MKL. The main effect is to enable MKL direct call feature (`MKL_DIRECT_CALL`). This may help to increase performance of some MKL BLAS (?GEMM, ?GEMV, ?TRSM, ?AXPY and ?DOT) and LAPACK (LU, Cholesky and QR) routines for very small matrices. MKL direct call can be disabled by defining `EIGEN_MKL_NO_DIRECT_CALL`.

 Note that the BLAS and LAPACKE backends can be enabled for any F77 compatible BLAS and LAPACK libraries. See this [page](topicusingblaslapack)  for the details.

 Finally, the PARDISO sparse solver shipped with Intel MKL can be used through the [PardisoLU](classeigen_1_1pardisolu), [PardisoLLT](classeigen_1_1pardisollt) and [PardisoLDLT](classeigen_1_1pardisoldlt) classes of the [PardisoSupport module](group__pardisosupport__module).

 The following table summarizes the list of functions covered by `EIGEN_USE_MKL_VML:` 




| Code example | MKL routines  |
| --- | --- |
| 
```
v2=v1.array().sin();
v2=v1.array().asin();
v2=v1.array().cos();
v2=v1.array().acos();
v2=v1.array().tan();
v2=v1.array().exp();
v2=v1.array().log();
v2=v1.array().sqrt();
v2=v1.array().square();
v2=v1.array().pow(1.5);

```
 | 
```
v?Sin
v?Asin
v?Cos
v?Acos
v?Tan
v?Exp
v?Ln
v?Sqrt
v?Sqr
v?Powx

```
 |

 In the examples, v1 and v2 are dense vectors.

 
 Links
=======

 * Intel MKL can be purchased and downloaded [here](http://eigen.tuxfamily.org/Counter/redirect_to_mkl.php).
* Intel MKL is also bundled with [Intel Composer XE](http://software.intel.com/en-us/articles/intel-composer-xe/).

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicUsingIntelMKL.html>

Using Eigen in CUDA kernels
===========================

   
Staring from CUDA 5.5 and [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3, it is possible to use [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s matrices, vectors, and arrays for fixed size within CUDA kernels. This is especially useful when working on numerous but small problems. By default, when [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s headers are included within a .cu file compiled by nvcc most [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s functions and methods are prefixed by the `**device**` `**host**` keywords making them callable from both host and device code. This support can be disabled by defining `EIGEN_NO_CUDA` before including any [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s header. This might be useful to disable some warnings when a .cu file makes use of [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") on the host side only. However, in both cases, host's SIMD vectorization has to be disabled in .cu files. It is thus **strongly** **recommended** to properly move all costly host computation from your .cu files to regular .cpp files.

 Known issues:

 * `nvcc` with MS Visual Studio does not work (patch welcome)
* `nvcc` 5.5 with gcc-4.7 (or greater) has issues with the standard `<limits>` header file. To workaround this, you can add the following before including any other files: 
```
// workaround issue between gcc >= 4.7 and cuda 5.5
#if (defined \_\_GNUC\_\_) && (\_\_GNUC\_\_>4 || \_\_GNUC\_MINOR\_\_>=7)
 #undef \_GLIBCXX\_ATOMIC\_BUILTINS
 #undef \_GLIBCXX\_USE\_INT128
#endif

```
* On 64bits system [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") uses `long` `int` as the default type for indexes and sizes. On CUDA device, it would make sense to default to 32 bits `int`. However, to keep host and CUDA code compatible, this cannot be done automatically by Eigen, and the user is thus required to define `EIGEN_DEFAULT_DENSE_INDEX_TYPE` to `int` throughout his code (or only for CUDA code if there is no interaction between host and CUDA code through Eigen's object).

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicCUDA.html>

Using Eigen in CMake Projects
=============================

   
Eigen provides native CMake support which allows the library to be easily used in CMake projects.

 
Note
CMake 3.0 (or later) is required to enable this functionality.
 Eigen exports a CMake target called `Eigen3::Eigen` which can be imported using the `find_package` CMake command and used by calling `target_link_libraries` as in the following example: 



```
cmake_minimum_required (VERSION 3.0)
project (myproject)
 
find_package (Eigen3 3.3 REQUIRED NO_MODULE)
 
add_executable (example example.cpp)
target_link_libraries (example Eigen3::Eigen)

```

The above code snippet must be placed in a file called `CMakeLists.txt` alongside `example.cpp`. After running 



```
$ cmake path-to-example-directory

```

 CMake will produce project files that generate an executable called `example` which requires at least version 3.3 of Eigen. Here, `path-to-example-directory` is the path to the directory that contains both `CMakeLists.txt` and `example.cpp`.

 Do not forget to set the [`CMAKE_PREFIX_PATH`](https://cmake.org/cmake/help/v3.7/variable/CMAKE_PREFIX_PATH.html)  variable if [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") is not installed in a default location or if you want to pick a specific version. For instance: 



```
$ cmake path-to-example-directory -DCMAKE_PREFIX_PATH=$HOME/mypackages

```

 An alternative is to set the `Eigen3_DIR` cmake's variable to the respective path containing the `Eigen3*`.cmake files. For instance: 



```
$ cmake path-to-example-directory -DEigen3_DIR=$HOME/mypackages/share/eigen3/cmake/

```

If the `REQUIRED` option is omitted when locating Eigen using `find_package`, one can check whether the package was found as follows: 



```
find_package (Eigen3 3.3 NO_MODULE)
 
if (TARGET Eigen3::Eigen)
  # Use the imported target
endif (TARGET Eigen3::Eigen)

```
 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicCMakeGuide.html>

Eigen SYCL Backend
==================

   
Useful information for [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") SYCL Backend:

 * [Getting Started with Eigen](https://developer.codeplay.com/computecppce/latest/getting-started-with-eigen)
* [Options for Building Eigen SYCL](https://developer.codeplay.com/computecppce/latest/options-for-building-eigen-sycl)

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/SYCL_EIGEN.html>

Using custom scalar types
=========================

   
 By default, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") currently supports standard floating-point types (`float`, `double`, `std::complex<float>`, `std::complex<double>`, `long` `double`), as well as all native integer types (e.g., `int`, `unsigned` `int`, `short`, etc.), and `bool`. On x86-64 systems, `long` `double` permits to locally enforces the use of x87 registers with extended accuracy (in comparison to SSE).

 In order to add support for a custom type `T` you need:


1. make sure the common operator (+,-,\*,/,etc.) are supported by the type `T`
2. add a specialization of struct Eigen::NumTraits<T> (see [NumTraits](structeigen_1_1numtraits))
3. define the math functions that makes sense for your type. This includes standard ones like sqrt, pow, sin, tan, conj, real, imag, etc, as well as abs2 which is [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") specific. (see the file [Eigen/src/Core/MathFunctions.h](https://eigen.tuxfamily.org/dox/MathFunctions_8h_source.html))

 The math function should be defined in the same namespace than `T`, or in the `std` namespace though that second approach is not recommended.

 Here is a concrete example adding support for the Adolc's `adouble` type. [Adolc](https://projects.coin-or.org/ADOL-C) is an automatic differentiation library. The type `adouble` is basically a real value tracking the values of any number of partial derivatives.

 
```
#ifndef ADOLCSUPPORT\_H
#define ADOLCSUPPORT\_H
 
#define ADOLC\_TAPELESS
#include <adolc/adouble.h>
#include <Eigen/Core>
 
namespace [Eigen](namespaceeigen) {
 
template<> struct NumTraits<adtl::adouble>
 : NumTraits<double> // permits to get the epsilon, dummy\_precision, lowest, highest functions
{
  typedef adtl::adouble Real;
  typedef adtl::adouble NonInteger;
  typedef adtl::adouble Nested;
 
  enum {
    IsComplex = 0,
    IsInteger = 0,
    IsSigned = 1,
    RequireInitialization = 1,
    ReadCost = 1,
    AddCost = 3,
    MulCost = 3
  };
};
 
}
 
namespace adtl {
 
inline const adouble& [conj](namespaceeigen#ab84f39a06a18e1ebb23f8be80345b79d)(const adouble& x)  { return x; }
inline const adouble& [real](namespaceeigen#ac74dc920119b1eba45e9218d9f402afc)(const adouble& x)  { return x; }
inline adouble [imag](namespaceeigen#a04d60a3c8a266f63c08e03615c1985c9)(const adouble&)    { return 0.; }
inline adouble [abs](namespaceeigen#ae27242789e7e62a8c42579b79be59b1a)(const adouble&  x)  { return fabs(x); }
inline adouble [abs2](namespaceeigen#a54cc34b64b4935307efc06d56cd531df)(const adouble& x)  { return x*x; }
 
}
 
#endif // ADOLCSUPPORT\_H
```

This other example adds support for the `mpq_class` type from [GMP](https://gmplib.org/). It shows in particular how to change the way [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") picks the best pivot during LU factorization. It selects the coefficient with the highest score, where the score is by default the absolute value of a number, but we can define a different score, for instance to prefer pivots with a more compact representation (this is an example, not a recommendation). Note that the scores should always be non-negative and only zero is allowed to have a score of zero. Also, this can interact badly with thresholds for inexact scalar types.

 
```
#include <gmpxx.h>
#include <Eigen/Core>
#include <boost/operators.hpp>
 
namespace [Eigen](namespaceeigen) {
  template<> struct NumTraits<mpq_class> : GenericNumTraits<mpq_class>
  {
    typedef mpq_class Real;
    typedef mpq_class NonInteger;
    typedef mpq_class Nested;
 
    static inline Real epsilon() { return 0; }
    static inline Real dummy_precision() { return 0; }
    static inline int digits10() { return 0; }
 
    enum {
      IsInteger = 0,
      IsSigned = 1,
      IsComplex = 0,
      RequireInitialization = 1,
      ReadCost = 6,
      AddCost = 150,
      MulCost = 100
    };
  };
 
  namespace internal {
 
    template<> struct scalar_score_coeff_op<mpq_class> {
      struct result_type : boost::totally_ordered1<result_type> {
        std::size_t len;
        result_type(int i = 0) : len(i) {} // Eigen uses Score(0) and Score()
        result_type(mpq_class const& q) :
          len(mpz_size(q.get_num_mpz_t())+
              mpz_size(q.get_den_mpz_t())-1) {}
        friend bool operator<(result_type x, result_type y) {
          // 0 is the worst possible pivot
          if (x.len == 0) return y.len > 0;
          if (y.len == 0) return false;
          // Prefer a pivot with a small representation
          return x.len > y.len;
        }
        friend bool operator==(result_type x, result_type y) {
          // Only used to test if the score is 0
          return x.len == y.len;
        }
      };
      result_type operator()(mpq_class const& x) const { return x; }
    };
  }
}

```
 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicCustomizing_CustomScalar.html>

Matrix manipulation via nullary-expressions
===========================================

   
The main purpose of the class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.") is to define *procedural* matrices such as constant or random matrices as returned by the Ones(), Zero(), Constant(), Identity() and Random() methods. Nevertheless, with some imagination it is possible to accomplish very sophisticated matrix manipulation with minimal efforts such that [implementing new expression](topicnewexpressiontype) is rarely needed.

 
 Example 1: circulant matrix
=============================

 To explore these possibilities let us start with the *circulant* example of the [implementing new expression](topicnewexpressiontype) topic. Let us recall that a circulant matrix is a matrix where each column is the same as the column to the left, except that it is cyclically shifted downwards. For example, here is a 4-by-4 circulant matrix: 


 \[ \begin{bmatrix} 1 & 8 & 4 & 2 \\ 2 & 1 & 8 & 4 \\ 4 & 2 & 1 & 8 \\ 8 & 4 & 2 & 1 \end{bmatrix} \] 

  A circulant matrix is uniquely determined by its first column. We wish to write a function `makeCirculant` which, given the first column, returns an expression representing the circulant matrix.

 For this exercise, the return type of `makeCirculant` will be a [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.") that we need to instantiate with: 1 - a proper `circulant_functor` storing the input vector and implementing the adequate coefficient accessor `operator(i,j)` 2 - a template instantiation of class [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") conveying compile-time information such as the scalar type, sizes, and preferred storage layout.

 Calling `ArgType` the type of the input vector, we can construct the equivalent squared [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") type as follows:

 
```
template<class ArgType>
struct circulant_helper {
  typedef Matrix<typename ArgType::Scalar,
                 ArgType::SizeAtCompileTime,
                 ArgType::SizeAtCompileTime,
                 [ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62),
                 ArgType::MaxSizeAtCompileTime,
                 ArgType::MaxSizeAtCompileTime> MatrixType;
};
```

 This little helper structure will help us to implement our `makeCirculant` function as follows:

 
```
template <class ArgType>
CwiseNullaryOp<circulant_functor<ArgType>, typename circulant_helper<ArgType>::MatrixType>
makeCirculant(const [Eigen::MatrixBase<ArgType>](classeigen_1_1matrixbase)& [arg](namespaceeigen#aa539408a09481d35961e11ee78793db1))
{
  typedef typename circulant_helper<ArgType>::MatrixType MatrixType;
  return MatrixType::NullaryExpr([arg](namespaceeigen#aa539408a09481d35961e11ee78793db1).size(), [arg](namespaceeigen#aa539408a09481d35961e11ee78793db1).size(), circulant_functor<ArgType>([arg](namespaceeigen#aa539408a09481d35961e11ee78793db1).derived()));
}
```

 As usual, our function takes as argument a `[MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.")` (see this [page](topicfunctiontakingeigentypes) for more details). Then, the [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.") object is constructed through the [DenseBase::NullaryExpr](classeigen_1_1densebase#a3340c9b997f5b53a0131cf927f93b54c) static method with the adequate runtime sizes.

 Then, we need to implement our `circulant_functor`, which is a straightforward exercise:

 
```
template<class ArgType>
class circulant_functor {
  const ArgType &m_vec;
public:
  circulant_functor(const ArgType& [arg](namespaceeigen#aa539408a09481d35961e11ee78793db1)) : m_vec([arg](namespaceeigen#aa539408a09481d35961e11ee78793db1)) {}
 
  const typename ArgType::Scalar& operator() ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) row, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) col) const {
    [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) index = row - col;
    if (index < 0) index += m_vec.size();
    return m_vec(index);
  }
};
```

 We are now all set to try our new feature:

 
```
int main()
{
  [Eigen::VectorXd](classeigen_1_1matrix) vec(4);
  vec << 1, 2, 4, 8;
  [Eigen::MatrixXd](classeigen_1_1matrix) mat;
  mat = makeCirculant(vec);
  std::cout << mat << std::endl;
}
```

If all the fragments are combined, the following output is produced, showing that the program works as expected:

 
```
1 8 4 2
2 1 8 4
4 2 1 8
8 4 2 1

```

This implementation of `makeCirculant` is much simpler than [defining a new expression](topicnewexpressiontype) from scratch.

 
 Example 2: indexing rows and columns
======================================

 The goal here is to mimic MatLab's ability to index a matrix through two vectors of indices referencing the rows and columns to be picked respectively, like this:

 
```
A =
 7  9 -5 -3
-2 -6  1  0
 6 -3  0  9
 6  6  3  9
 
A([1 2 1], [3 2 1 0 0 2]) =
 0  1 -6 -2 -2  1
 9  0 -3  6  6  0
 0  1 -6 -2 -2  1

```

 To this end, let us first write a nullary-functor storing references to the input matrix and to the two arrays of indices, and implementing the required `operator()(i,j)`:

 
```
template<class ArgType, class RowIndexType, class ColIndexType>
class indexing_functor {
  const ArgType &m_arg;
  const RowIndexType &m_rowIndices;
  const ColIndexType &m_colIndices;
public:
  typedef Matrix<typename ArgType::Scalar,
                 RowIndexType::SizeAtCompileTime,
                 ColIndexType::SizeAtCompileTime,
                 ArgType::Flags&[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762)?[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f):[ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62),
                 RowIndexType::MaxSizeAtCompileTime,
                 ColIndexType::MaxSizeAtCompileTime> MatrixType;
 
  indexing_functor(const ArgType& [arg](namespaceeigen#aa539408a09481d35961e11ee78793db1), const RowIndexType& row_indices, const ColIndexType& col_indices)
    : m_arg([arg](namespaceeigen#aa539408a09481d35961e11ee78793db1)), m_rowIndices(row_indices), m_colIndices(col_indices)
  {}
 
  const typename ArgType::Scalar& operator() ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) row, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) col) const {
    return m_arg(m_rowIndices[row], m_colIndices[col]);
  }
};
```

 Then, let's create an `indexing(A,rows,cols)` function creating the nullary expression:

 
```
template <class ArgType, class RowIndexType, class ColIndexType>
CwiseNullaryOp<indexing_functor<ArgType,RowIndexType,ColIndexType>, typename indexing_functor<ArgType,RowIndexType,ColIndexType>::MatrixType>
mat_indexing(const [Eigen::MatrixBase<ArgType>](classeigen_1_1matrixbase)& [arg](namespaceeigen#aa539408a09481d35961e11ee78793db1), const RowIndexType& row_indices, const ColIndexType& col_indices)
{
  typedef indexing_functor<ArgType,RowIndexType,ColIndexType> Func;
  typedef typename Func::MatrixType MatrixType;
  return MatrixType::NullaryExpr(row_indices.size(), col_indices.size(), Func([arg](namespaceeigen#aa539408a09481d35961e11ee78793db1).derived(), row_indices, col_indices));
}

```

 Finally, here is an example of how this function can be used:

 
```
  [Eigen::MatrixXi](classeigen_1_1matrix) A = [Eigen::MatrixXi::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
  Array3i ri(1,2,1);
  ArrayXi ci(6); ci << 3,2,1,0,0,2;
  [Eigen::MatrixXi](classeigen_1_1matrix) B = mat_indexing(A, ri, ci);
  std::cout << "A =" << std::endl;
  std::cout << A << std::endl << std::endl;
  std::cout << "A([" << ri.[transpose](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c)() << "], [" << ci.transpose() << "]) =" << std::endl;
  std::cout << B << std::endl;
```

 This straightforward implementation is already quite powerful as the row or column index arrays can also be expressions to perform offsetting, modulo, striding, reverse, etc.

 
```
  B =  mat_indexing(A, ri+1, ci);
  std::cout << "A(ri+1,ci) =" << std::endl;
  std::cout << B << std::endl << std::endl;
#if EIGEN\_COMP\_CXXVER >= 11
  B =  mat_indexing(A, [ArrayXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(13,0,12).unaryExpr([](int x){return x%4;}), [ArrayXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(4,0,3));
  std::cout << "A(ArrayXi::LinSpaced(13,0,12).unaryExpr([](int x){return x%4;}), ArrayXi::LinSpaced(4,0,3)) =" << std::endl;
  std::cout << B << std::endl << std::endl;
#endif
```

 and the output is:

 
```
A(ri+1,ci) =
 9  0 -3  6  6  0
 9  3  6  6  6  3
 9  0 -3  6  6  0
 
A(ArrayXi::LinSpaced(13,0,12).unaryExpr([](int x){return x%4;}), ArrayXi::LinSpaced(4,0,3)) =
 7  9 -5 -3
-2 -6  1  0
 6 -3  0  9
 6  6  3  9
 7  9 -5 -3
-2 -6  1  0
 6 -3  0  9
 6  6  3  9
 7  9 -5 -3
-2 -6  1  0
 6 -3  0  9
 6  6  3  9
 7  9 -5 -3
 

```


  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicCustomizing_NullaryExpr.html>

Adding a new expression type
============================

   

Warning
Disclaimer: this page is tailored to very advanced users who are not afraid of dealing with some Eigen's internal aspects. In most cases, a custom expression can be avoided by either using custom unary or binary functors, while extremely complex matrix manipulations can be achieved by a nullary functors as described in the [previous page](topiccustomizing_nullaryexpr).
 This page describes with the help of an example how to implement a new light-weight expression type in Eigen. This consists of three parts: the expression type itself, a traits class containing compile-time information about the expression, and the evaluator class which is used to evaluate the expression to a matrix.

 **TO** **DO:** Write a page explaining the design, with details on vectorization etc., and refer to that page here.

 
 The setting
=============

 A circulant matrix is a matrix where each column is the same as the column to the left, except that it is cyclically shifted downwards. For example, here is a 4-by-4 circulant matrix: 


 \[ \begin{bmatrix} 1 & 8 & 4 & 2 \\ 2 & 1 & 8 & 4 \\ 4 & 2 & 1 & 8 \\ 8 & 4 & 2 & 1 \end{bmatrix} \] 

  A circulant matrix is uniquely determined by its first column. We wish to write a function `makeCirculant` which, given the first column, returns an expression representing the circulant matrix.

 For simplicity, we restrict the `makeCirculant` function to dense matrices. It may make sense to also allow arrays, or sparse matrices, but we will not do so here. We also do not want to support vectorization.

 
 Getting started
=================

 We will present the file implementing the `makeCirculant` function part by part. We start by including the appropriate header files and forward declaring the expression class, which we will call `Circulant`. The `makeCirculant` function will return an object of this type. The class `Circulant` is in fact a class template; the template argument `ArgType` refers to the type of the vector passed to the `makeCirculant` function.

 
```
#include <Eigen/Core>
#include <iostream>
 
template <class ArgType> class Circulant;

```


 The traits class
==================

 For every expression class `X`, there should be a traits class `Traits<X>` in the `Eigen::internal` namespace containing information about `X` known as compile time.

 As explained in [The setting](topicnewexpressiontype#TopicSetting), we designed the `Circulant` expression class to refer to dense matrices. The entries of the circulant matrix have the same type as the entries of the vector passed to the `makeCirculant` function. The type used to index the entries is also the same. Again for simplicity, we will only return column-major matrices. Finally, the circulant matrix is a square matrix (number of rows equals number of columns), and the number of rows equals the number of rows of the column vector passed to the `makeCirculant` function. If this is a dynamic-size vector, then the size of the circulant matrix is not known at compile-time.

 This leads to the following code:

 
```
namespace Eigen {
  namespace internal {
    template <class ArgType>
    struct traits<Circulant<ArgType> >
    {
      typedef Eigen::Dense StorageKind;
      typedef Eigen::MatrixXpr XprKind;
      typedef typename ArgType::StorageIndex StorageIndex;
      typedef typename ArgType::Scalar Scalar;
      enum { 
        Flags = Eigen::ColMajor,
        RowsAtCompileTime = ArgType::RowsAtCompileTime,
        ColsAtCompileTime = ArgType::RowsAtCompileTime,
        MaxRowsAtCompileTime = ArgType::MaxRowsAtCompileTime,
        MaxColsAtCompileTime = ArgType::MaxRowsAtCompileTime
      };
    };
  }
}

```


 The expression class
======================

 The next step is to define the expression class itself. In our case, we want to inherit from `[MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.")` in order to expose the interface for dense matrices. In the constructor, we check that we are passed a column vector (see [Assertions](topicassertions)) and we store the vector from which we are going to build the circulant matrix in the member variable `m_arg`. Finally, the expression class should compute the size of the corresponding circulant matrix. As explained above, this is a square matrix with as many columns as the vector used to construct the matrix.

 **TO** **DO:** What about the `Nested` typedef? It seems to be necessary; is this only temporary?

 
```
template <class ArgType>
class Circulant : public Eigen::MatrixBase<Circulant<ArgType> >
{
public:
  Circulant(const ArgType& arg)
    : m_arg(arg)
  { 
    EIGEN_STATIC_ASSERT(ArgType::ColsAtCompileTime == 1,
                        YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX);
  }
 
  typedef typename Eigen::internal::ref_selector<Circulant>::type Nested; 
 
  typedef Eigen::Index Index;
  Index rows() const { return m_arg.rows(); }
  Index cols() const { return m_arg.rows(); }
 
  typedef typename Eigen::internal::ref_selector<ArgType>::type ArgTypeNested;
  ArgTypeNested m_arg;
};

```


 The evaluator
===============

 The last big fragment implements the evaluator for the `Circulant` expression. The evaluator computes the entries of the circulant matrix; this is done in the .coeff() member function. The entries are computed by finding the corresponding entry of the vector from which the circulant matrix is constructed. Getting this entry may actually be non-trivial when the circulant matrix is constructed from a vector which is given by a complicated expression, so we use the evaluator which corresponds to the vector.

 The `CoeffReadCost` constant records the cost of computing an entry of the circulant matrix; we ignore the index computation and say that this is the same as the cost of computing an entry of the vector from which the circulant matrix is constructed.

 In the constructor, we save the evaluator for the column vector which defined the circulant matrix. We also save the size of that vector; remember that we can query an expression object to find the size but not the evaluator.

 
```
namespace Eigen {
  namespace internal {
    template<typename ArgType>
    struct evaluator<Circulant<ArgType> >
      : evaluator_base<Circulant<ArgType> >
    {
      typedef Circulant<ArgType> XprType;
      typedef typename nested_eval<ArgType, XprType::ColsAtCompileTime>::type ArgTypeNested;
      typedef typename remove_all<ArgTypeNested>::type ArgTypeNestedCleaned;
      typedef typename XprType::CoeffReturnType CoeffReturnType;
 
      enum { 
        CoeffReadCost = evaluator<ArgTypeNestedCleaned>::CoeffReadCost,
        Flags = Eigen::ColMajor 
      };
      
      evaluator(const XprType& xpr)
        : m_argImpl(xpr.m_arg), m_rows(xpr.rows())
      { }
 
      CoeffReturnType coeff(Index row, Index col) const
      {
        Index index = row - col;
        if (index < 0) index += m_rows;
        return m_argImpl.coeff(index);
      }
 
      evaluator<ArgTypeNestedCleaned> m_argImpl;
      const Index m_rows;
    };
  }
}

```


 The entry point
=================

 After all this, the `makeCirculant` function is very simple. It simply creates an expression object and returns it.

 
```
template <class ArgType>
Circulant<ArgType> makeCirculant(const Eigen::MatrixBase<ArgType>& arg)
{
  return Circulant<ArgType>(arg.derived());
}

```


 A simple main function for testing
====================================

 Finally, a short `main` function that shows how the `makeCirculant` function can be called.

 
```
int main()
{
  Eigen::VectorXd vec(4);
  vec << 1, 2, 4, 8;
  Eigen::MatrixXd mat;
  mat = makeCirculant(vec);
  std::cout << mat << std::endl;
}

```

If all the fragments are combined, the following output is produced, showing that the program works as expected:

 
```
1 8 4 2
2 1 8 4
4 2 1 8
8 4 2 1

```
 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicNewExpressionType.html>

Preprocessor directives
=======================

   
You can control some aspects of Eigen by defining the preprocessor tokens using `#define`. These macros should be defined before any Eigen headers are included. Often they are best set in the project options.

 This page lists the preprocessor tokens recognized by Eigen.

 
 Macros with major effects
===========================

 These macros have a major effect and typically break the API (Application Programming Interface) and/or the ABI (Application Binary Interface). This can be rather dangerous: if parts of your program are compiled with one option, and other parts (or libraries that you use) are compiled with another option, your program may fail to link or exhibit subtle bugs. Nevertheless, these options can be useful for people who know what they are doing.

 * **EIGEN2\_SUPPORT** and **EIGEN2\_SUPPORT\_STAGEnn\_xxx** are disabled starting from the 3.3 release. Defining one of these will raise a compile-error. If you need to compile Eigen2 code, [check this site](http://eigen.tuxfamily.org/index.php?title=Eigen2).
* **EIGEN\_DEFAULT\_DENSE\_INDEX\_TYPE** - the type for column and row indices in matrices, vectors and array ([DenseBase::Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02 "The interface type of indices.")). Set to `std::ptrdiff_t` by default.
* **EIGEN\_DEFAULT\_IO\_FORMAT** - the [IOFormat](structeigen_1_1ioformat "Stores a set of parameters controlling the way matrices are printed.") to use when printing a matrix if no IOFormat is specified. Defaults to the IOFormat constructed by the default constructor [IOFormat::IOFormat()](structeigen_1_1ioformat#acdcc91702d45c714b11ba42db5beddb5).
* **EIGEN\_INITIALIZE\_MATRICES\_BY\_ZERO** - if defined, all entries of newly constructed matrices and arrays are initialized to zero, as are new entries in matrices and arrays after resizing. Not defined by default. 
Warning
The unary (resp. binary) constructor of `1x1` (resp. `2x1` or `1x2`) fixed size matrices is always interpreted as an initialization constructor where the argument(s) are the coefficient values and not the sizes. For instance,
```
Vector2d v(2,1); 

```
 will create a vector with coeficients [2,1], and **not** a `2x1` vector initialized with zeros (i.e., [0,0]). If such cases might occur, then it is recommended to use the default constructor with a explicit call to resize: 
```
Matrix<?,SizeAtCompileTime,1> v;
v.resize(size);
Matrix<?,RowsAtCompileTime,ColsAtCompileTime> m;
m.resize(rows,cols);

```
* **EIGEN\_INITIALIZE\_MATRICES\_BY\_NAN** - if defined, all entries of newly constructed matrices and arrays are initialized to NaN, as are new entries in matrices and arrays after resizing. This option is especially useful for debugging purpose, though a memory tool like [valgrind](http://valgrind.org/) is preferable. Not defined by default. 
Warning
See the documentation of `EIGEN_INITIALIZE_MATRICES_BY_ZERO` for a discussion on a limitations of these macros when applied to `1x1`, `1x2`, and `2x1` fixed-size matrices.
* **EIGEN\_NO\_AUTOMATIC\_RESIZING** - if defined, the matrices (or arrays) on both sides of an assignment `a = b` have to be of the same size; otherwise, Eigen automatically resizes `a` so that it is of the correct size. Not defined by default.

 
 C++ standard features
=======================

 By default, Eigen strive to automatically detect and enable language features at compile-time based on the information provided by the compiler.

 * **EIGEN\_MAX\_CPP\_VER** - disables usage of C++ features requiring a version greater than EIGEN\_MAX\_CPP\_VER. Possible values are: 03, 11, 14, 17, etc. If not defined (the default), Eigen enables all features supported by the compiler.

 Individual features can be explicitly enabled or disabled by defining the following token to 0 or 1 respectively. For instance, one might limit the C++ version to C++03 by defining EIGEN\_MAX\_CPP\_VER=03, but still enable C99 math functions by defining EIGEN\_HAS\_C99\_MATH=1.

 * **EIGEN\_HAS\_C99\_MATH** - controls the usage of C99 math functions such as erf, erfc, lgamma, etc. Automatic detection disabled if EIGEN\_MAX\_CPP\_VER<11.
* **EIGEN\_HAS\_CXX11\_MATH** - controls the implementation of some functions such as round, logp1, isinf, isnan, etc. Automatic detection disabled if EIGEN\_MAX\_CPP\_VER<11.
* **EIGEN\_HAS\_RVALUE\_REFERENCES** - defines whether rvalue references are supported Automatic detection disabled if EIGEN\_MAX\_CPP\_VER<11.
* **EIGEN\_HAS\_STD\_RESULT\_OF** - defines whether std::result\_of is supported Automatic detection disabled if EIGEN\_MAX\_CPP\_VER<11.
* **EIGEN\_HAS\_VARIADIC\_TEMPLATES** - defines whether variadic templates are supported Automatic detection disabled if EIGEN\_MAX\_CPP\_VER<11.
* **EIGEN\_HAS\_CONSTEXPR** - defines whether relaxed const expression are supported Automatic detection disabled if EIGEN\_MAX\_CPP\_VER<14.
* **EIGEN\_HAS\_CXX11\_CONTAINERS** - defines whether STL's containers follows C++11 specifications Automatic detection disabled if EIGEN\_MAX\_CPP\_VER<11.
* **EIGEN\_HAS\_CXX11\_NOEXCEPT** - defines whether noexcept is supported Automatic detection disabled if EIGEN\_MAX\_CPP\_VER<11.
* **EIGEN\_NO\_IO** - Disables any usage and support for `<iostreams>`.

 
 Assertions
============

 The Eigen library contains many assertions to guard against programming errors, both at compile time and at run time. However, these assertions do cost time and can thus be turned off.

 * **EIGEN\_NO\_DEBUG** - disables Eigen's assertions if defined. Not defined by default, unless the `NDEBUG` macro is defined (this is a standard C++ macro which disables all asserts).
* **EIGEN\_NO\_STATIC\_ASSERT** - if defined, compile-time static assertions are replaced by runtime assertions; this saves compilation time. Not defined by default.
* **eigen\_assert** - macro with one argument that is used inside Eigen for assertions. By default, it is basically defined to be `assert`, which aborts the program if the assertion is violated. Redefine this macro if you want to do something else, like throwing an exception.
* **EIGEN\_MPL2\_ONLY** - disable non MPL2 compatible features, or in other words disable the features which are still under the LGPL.

 
 Alignment, vectorization and performance tweaking
===================================================

 * **`EIGEN_MALLOC_ALREADY_ALIGNED` -** Can be set to 0 or 1 to tell whether default system `malloc` already returns aligned buffers. In not defined, then this information is automatically deduced from the compiler and system preprocessor tokens.
* **`EIGEN_MAX_ALIGN_BYTES` -** Must be a power of two, or 0. Defines an upper bound on the memory boundary in bytes on which dynamically and statically allocated data may be aligned by Eigen. If not defined, a default value is automatically computed based on architecture, compiler, and OS. This option is typically used to enforce binary compatibility between code/libraries compiled with different SIMD options. For instance, one may compile AVX code and enforce ABI compatibility with existing SSE code by defining `EIGEN_MAX_ALIGN_BYTES=16`. In the other way round, since by default AVX implies 32 bytes alignment for best performance, one can compile SSE code to be ABI compatible with AVX code by defining `EIGEN_MAX_ALIGN_BYTES=32`.
* **`EIGEN_MAX_STATIC_ALIGN_BYTES` -** Same as `EIGEN_MAX_ALIGN_BYTES` but for statically allocated data only. By default, if only `EIGEN_MAX_ALIGN_BYTES` is defined, then `EIGEN_MAX_STATIC_ALIGN_BYTES` == `EIGEN_MAX_ALIGN_BYTES`, otherwise a default value is automatically computed based on architecture, compiler, and OS (can be smaller than the default value of EIGEN\_MAX\_ALIGN\_BYTES on architectures that do not support stack alignment). Let us emphasize that `EIGEN_MAX_*_ALIGN_BYTES` define only a diserable upper bound. In practice data is aligned to largest power-of-two common divisor of `EIGEN_MAX_STATIC_ALIGN_BYTES` and the size of the data, such that memory is not wasted.
* **`EIGEN_DONT_PARALLELIZE` -** if defined, this disables multi-threading. This is only relevant if you enabled OpenMP. See [Eigen and multi-threading](topicmultithreading) for details.
* **`EIGEN_DONT_VECTORIZE` -** disables explicit vectorization when defined. Not defined by default, unless alignment is disabled by Eigen's platform test or the user defining `EIGEN_DONT_ALIGN`.
* **`EIGEN_UNALIGNED_VECTORIZE` -** disables/enables vectorization with unaligned stores. Default is 1 (enabled). If set to 0 (disabled), then expression for which the destination cannot be aligned are not vectorized (e.g., unaligned small fixed size vectors or matrices)
* **`EIGEN_FAST_MATH` -** enables some optimizations which might affect the accuracy of the result. This currently enables the SSE vectorization of [sin()](namespaceeigen#ae6e8ad270ff41c088d7651567594f796) and [cos()](namespaceeigen#ad01d50a42869218f1d54af13f71517a6), and speedups [sqrt()](namespaceeigen#af4f536e8ea56702e63088efb3706d1f0) for single precision. Defined to 1 by default. Define it to 0 to disable.
* **`EIGEN_UNROLLING_LIMIT` -** defines the size of a loop to enable meta unrolling. Set it to zero to disable unrolling. The size of a loop here is expressed in Eigen's own notion of "number of FLOPS", it does not correspond to the number of iterations or the number of instructions. The default is value 110.
* **`EIGEN_STACK_ALLOCATION_LIMIT` -** defines the maximum bytes for a buffer to be allocated on the stack. For internal temporary buffers, dynamic memory allocation is employed as a fall back. For fixed-size matrices or arrays, exceeding this threshold raises a compile time assertion. Use 0 to set no limit. Default is 128 KB.
* **`EIGEN_NO_CUDA` -** disables CUDA support when defined. Might be useful in .cu files for which [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") is used on the host only, and never called from device code.
* **`EIGEN_STRONG_INLINE` -** This macro is used to qualify critical functions and methods that we expect the compiler to inline. By default it is defined to `__forceinline` for MSVC and ICC, and to `inline` for other compilers. A tipical usage is to define it to `inline` for MSVC users wanting faster compilation times, at the risk of performance degradations in some rare cases for which MSVC inliner fails to do a good job.
* **`EIGEN_DEFAULT_L1_CACHE_SIZE` -** Sets the default L1 cache size that is used in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s GEBP kernel when the correct cache size cannot be determined at runtime.
* **`EIGEN_DEFAULT_L2_CACHE_SIZE` -** Sets the default L2 cache size that is used in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s GEBP kernel when the correct cache size cannot be determined at runtime.
* **`EIGEN_DEFAULT_L3_CACHE_SIZE` -** Sets the default L3 cache size that is used in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s GEBP kernel when the correct cache size cannot be determined at runtime.
* `EIGEN_DONT_ALIGN` - Deprecated, it is a synonym for `EIGEN_MAX_ALIGN_BYTES=0`. It disables alignment completely. Eigen will not try to align its objects and does not expect that any objects passed to it are aligned. This will turn off vectorization if **`EIGEN_UNALIGNED_VECTORIZE=1`.** Not defined by default.
* `EIGEN_DONT_ALIGN_STATICALLY` - Deprecated, it is a synonym for `EIGEN_MAX_STATIC_ALIGN_BYTES=0`. It disables alignment of arrays on the stack. Not defined by default, unless `EIGEN_DONT_ALIGN` is defined.

 
 Plugins
=========

 It is possible to add new methods to many fundamental classes in Eigen by writing a plugin. As explained in the section [Extending MatrixBase (and other classes)](topiccustomizing_plugins), the plugin is specified by defining a `EIGEN_xxx_PLUGIN` macro. The following macros are supported; none of them are defined by default.

 * **EIGEN\_ARRAY\_PLUGIN** - filename of plugin for extending the [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") class.
* **EIGEN\_ARRAYBASE\_PLUGIN** - filename of plugin for extending the [ArrayBase](classeigen_1_1arraybase "Base class for all 1D and 2D array, and related expressions.") class.
* **EIGEN\_CWISE\_PLUGIN** - filename of plugin for extending the Cwise class.
* **EIGEN\_DENSEBASE\_PLUGIN** - filename of plugin for extending the [DenseBase](classeigen_1_1densebase "Base class for all dense matrices, vectors, and arrays.") class.
* **EIGEN\_DYNAMICSPARSEMATRIX\_PLUGIN** - filename of plugin for extending the DynamicSparseMatrix class.
* **EIGEN\_FUNCTORS\_PLUGIN** - filename of plugin for adding new functors and specializations of functor\_traits.
* **EIGEN\_MAPBASE\_PLUGIN** - filename of plugin for extending the MapBase class.
* **EIGEN\_MATRIX\_PLUGIN** - filename of plugin for extending the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class.
* **EIGEN\_MATRIXBASE\_PLUGIN** - filename of plugin for extending the [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") class.
* **EIGEN\_PLAINOBJECTBASE\_PLUGIN** - filename of plugin for extending the [PlainObjectBase](classeigen_1_1plainobjectbase "Dense storage base class for matrices and arrays.") class.
* **EIGEN\_QUATERNION\_PLUGIN** - filename of plugin for extending the [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") class.
* **EIGEN\_QUATERNIONBASE\_PLUGIN** - filename of plugin for extending the [QuaternionBase](classeigen_1_1quaternionbase "Base class for quaternion expressions.") class.
* **EIGEN\_SPARSEMATRIX\_PLUGIN** - filename of plugin for extending the [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.") class.
* **EIGEN\_SPARSEMATRIXBASE\_PLUGIN** - filename of plugin for extending the [SparseMatrixBase](classeigen_1_1sparsematrixbase "Base class of any sparse matrices or sparse expressions.") class.
* **EIGEN\_SPARSEVECTOR\_PLUGIN** - filename of plugin for extending the [SparseVector](classeigen_1_1sparsevector "a sparse vector class") class.
* **EIGEN\_TRANSFORM\_PLUGIN** - filename of plugin for extending the [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") class.
* **EIGEN\_VECTORWISEOP\_PLUGIN** - filename of plugin for extending the [VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations.") class.

 
 Macros for Eigen developers
=============================

 These macros are mainly meant for people developing Eigen and for testing purposes. Even though, they might be useful for power users and the curious for debugging and testing purpose, they **should** **not** **be** **used** by real-word code.

 * **EIGEN\_DEFAULT\_TO\_ROW\_MAJOR** - when defined, the default storage order for matrices becomes row-major instead of column-major. Not defined by default.
* **EIGEN\_INTERNAL\_DEBUGGING** - if defined, enables assertions in Eigen's internal routines. This is useful for debugging Eigen itself. Not defined by default.
* **EIGEN\_NO\_MALLOC** - if defined, any request from inside the Eigen to allocate memory from the heap results in an assertion failure. This is useful to check that some routine does not allocate memory dynamically. Not defined by default.
* **EIGEN\_RUNTIME\_NO\_MALLOC** - if defined, a new switch is introduced which can be turned on and off by calling `set_is_malloc_allowed(bool)`. If malloc is not allowed and Eigen tries to allocate memory dynamically anyway, an assertion failure results. Not defined by default.

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicPreprocessorDirectives.html>

Writing Functions Taking Eigen Types as Parameters
==================================================

   
Eigen's use of expression templates results in potentially every expression being of a different type. If you pass such an expression to a function taking a parameter of type [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."), your expression will implicitly be evaluated into a temporary [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."), which will then be passed to the function. This means that you lose the benefit of expression templates. Concretely, this has two drawbacks: 


* The evaluation into a temporary may be useless and inefficient;
* This only allows the function to read from the expression, not to write to it.

 Fortunately, all this myriad of expression types have in common that they all inherit a few common, templated base classes. By letting your function take templated parameters of these base types, you can let them play nicely with Eigen's expression templates.

 
 Some First Examples
=====================

 This section will provide simple examples for different types of objects Eigen is offering. Before starting with the actual examples, we need to recapitulate which base objects we can work with (see also [The class hierarchy](topicclasshierarchy)).

 * [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions."): The common base class for all dense matrix expressions (as opposed to array expressions, as opposed to sparse and special matrix classes). Use it in functions that are meant to work only on dense matrices.
* [ArrayBase](classeigen_1_1arraybase "Base class for all 1D and 2D array, and related expressions."): The common base class for all dense array expressions (as opposed to matrix expressions, etc). Use it in functions that are meant to work only on arrays.
* [DenseBase](classeigen_1_1densebase "Base class for all dense matrices, vectors, and arrays."): The common base class for all dense matrix expression, that is, the base class for both `[MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.")` and `[ArrayBase](classeigen_1_1arraybase "Base class for all 1D and 2D array, and related expressions.")`. It can be used in functions that are meant to work on both matrices and arrays.
* [EigenBase](structeigen_1_1eigenbase): The base class unifying all types of objects that can be evaluated into dense matrices or arrays, for example special matrix classes such as diagonal matrices, permutation matrices, etc. It can be used in functions that are meant to work on any such general type.

  **EigenBase Example**   
   
 Prints the dimensions of the most generic object present in Eigen. It could be any matrix expressions, any dense or sparse matrix and any array. 




| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Core>
using namespace [Eigen](namespaceeigen);
 
template <typename Derived>
void print_size(const EigenBase<Derived>& b)
{
  std::cout << "size (rows, cols): " << b.size() << " (" << b.rows()
            << ", " << b.cols() << ")" << std::endl;
}
 
int main()
{
    Vector3f v;
    print_size(v);
    // v.asDiagonal() returns a 3x3 diagonal matrix pseudo-expression
    print_size(v.asDiagonal());
}
```
 | 
```
size (rows, cols): 3 (3, 1)
size (rows, cols): 9 (3, 3)

```
 |

  **DenseBase Example**   
   
 Prints a sub-block of the dense expression. Accepts any dense matrix or array expression, but no sparse objects and no special matrix classes such as [DiagonalMatrix](classeigen_1_1diagonalmatrix "Represents a diagonal matrix with its storage."). 



```
template <typename Derived>
void print_block(const DenseBase<Derived>& b, int x, int y, int r, int c)
{
  std::cout << "block: " << b.block(x,y,r,c) << std::endl;
}

```

  **ArrayBase Example**   
   
 Prints the maximum coefficient of the array or array-expression. 



```
template <typename Derived>
void print_max_coeff(const ArrayBase<Derived> &a)
{
  std::cout << "max: " << a.maxCoeff() << std::endl;
}

```

  **MatrixBase Example**   
   
 Prints the inverse condition number of the given matrix or matrix-expression. 



```
template <typename Derived>
void print_inv_cond(const MatrixBase<Derived>& a)
{
  const typename JacobiSVD<typename Derived::PlainObject>::SingularValuesType&
    sing_vals = a.jacobiSvd().singularValues();
  std::cout << "inv cond: " << sing_vals(sing_vals.size()-1) / sing_vals(0) << std::endl;
}

```

  **Multiple templated arguments example**   
   
 Calculate the Euclidean distance between two points. 



```
template <typename DerivedA,typename DerivedB>
typename DerivedA::Scalar squaredist(const MatrixBase<DerivedA>& p1,const MatrixBase<DerivedB>& p2)
{
  return (p1-p2).squaredNorm();
}

```

 Notice that we used two template parameters, one per argument. This permits the function to handle inputs of different types, e.g., 



```
squaredist(v1,2*v2)

```

 where the first argument `v1` is a vector and the second argument `2*v2` is an expression.   
   
 

 These examples are just intended to give the reader a first impression of how functions can be written which take a plain and constant [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") or [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") argument. They are also intended to give the reader an idea about the most common base classes being the optimal candidates for functions. In the next section we will look in more detail at an example and the different ways it can be implemented, while discussing each implementation's problems and advantages. For the discussion below, [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") and [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") as well as [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") and [ArrayBase](classeigen_1_1arraybase "Base class for all 1D and 2D array, and related expressions.") can be exchanged and all arguments still hold.

 
 How to write generic, but non-templated function?
===================================================

 In all the previous examples, the functions had to be template functions. This approach allows to write very generic code, but it is often desirable to write non templated functions and still keep some level of genericity to avoid stupid copies of the arguments. The typical example is to write functions accepting both a MatrixXf or a block of a MatrixXf. This is exactly the purpose of the [Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.") class. Here is a simple example:

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/SVD>
using namespace [Eigen](namespaceeigen);
using namespace std;
 
float inv_cond(const Ref<const MatrixXf>& a)
{
  const VectorXf sing_vals = a.jacobiSvd().singularValues();
  return sing_vals(sing_vals.size()-1) / sing_vals(0);
}
 
int main()
{
  Matrix4f m = [Matrix4f::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
  cout << "matrix m:" << endl << m << endl << endl;
  cout << "inv\_cond(m): " << inv_cond(m)                      << endl;
  cout << "inv\_cond(m(1:3,1:3)): " << inv_cond(m.topLeftCorner(3,3))   << endl;
  cout << "inv\_cond(m+I): " << inv_cond(m+[Matrix4f::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)()) << endl;
}
```
 | 
```
matrix m:
   0.68   0.823  -0.444   -0.27
 -0.211  -0.605   0.108  0.0268
  0.566   -0.33 -0.0452   0.904
  0.597   0.536   0.258   0.832

inv_cond(m):          0.0562343
inv_cond(m(1:3,1:3)): 0.0836819
inv_cond(m+I):        0.160204

```
 |

 In the first two calls to inv\_cond, no copy occur because the memory layout of the arguments matches the memory layout accepted by Ref<MatrixXf>. However, in the last call, we have a generic expression that will be automatically evaluated into a temporary MatrixXf by the Ref<> object.

 A [Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.") object can also be writable. Here is an example of a function computing the covariance matrix of two input matrices where each row is an observation: 



```
void cov(const Ref<const MatrixXf> x, const Ref<const MatrixXf> y, Ref<MatrixXf> C)
{
  const float num_observations = static\_cast<float>(x.rows());
  const RowVectorXf x_mean = x.colwise().sum() / num_observations;
  const RowVectorXf y_mean = y.colwise().sum() / num_observations;
  C = (x.rowwise() - x_mean).transpose() * (y.rowwise() - y_mean) / num_observations;
}

```

 and here are two examples calling cov without any copy: 



```
MatrixXf m1, m2, m3
cov(m1, m2, m3);
cov(m1.leftCols<3>(), m2.leftCols<3>(), m3.topLeftCorner<3,3>());

```

 The Ref<> class has two other optional template arguments allowing to control the kind of memory layout that can be accepted without any copy. See the class [Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.") documentation for the details.

 
 In which cases do functions taking plain Matrix or Array arguments work?
==========================================================================

 Without using template functions, and without the [Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.") class, a naive implementation of the previous cov function might look like this 



```
MatrixXf cov(const MatrixXf& x, const MatrixXf& y)
{
  const float num_observations = static\_cast<float>(x.rows());
  const RowVectorXf x_mean = x.colwise().sum() / num_observations;
  const RowVectorXf y_mean = y.colwise().sum() / num_observations;
  return (x.rowwise() - x_mean).transpose() * (y.rowwise() - y_mean) / num_observations;
}

```

 and contrary to what one might think at first, this implementation is fine unless you require a generic implementation that works with double matrices too and unless you do not care about temporary objects. Why is that the case? Where are temporaries involved? How can code as given below compile? 



```
MatrixXf x,y,z;
MatrixXf C = cov(x,y+z);

```

 In this special case, the example is fine and will be working because both parameters are declared as *const* references. The compiler creates a temporary and evaluates the expression x+z into this temporary. Once the function is processed, the temporary is released and the result is assigned to C.

 **Note:** Functions taking *const* references to [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") (or [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.")) can process expressions at the cost of temporaries.

 
 In which cases do functions taking a plain Matrix or Array argument fail?
===========================================================================

 Here, we consider a slightly modified version of the function given above. This time, we do not want to return the result but pass an additional non-const parameter which allows us to store the result. A first naive implementation might look as follows. 



```
// Note: This code is flawed!
void cov(const MatrixXf& x, const MatrixXf& y, MatrixXf& C)
{
  const float num_observations = static\_cast<float>(x.rows());
  const RowVectorXf x_mean = x.colwise().sum() / num_observations;
  const RowVectorXf y_mean = y.colwise().sum() / num_observations;
  C = (x.rowwise() - x_mean).transpose() * (y.rowwise() - y_mean) / num_observations;
}

```

 When trying to execute the following code 



```
MatrixXf C = [MatrixXf::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)(3,6);
cov(x,y, C.block(0,0,3,3));
```

 the compiler will fail, because it is not possible to convert the expression returned by `MatrixXf::block()` into a non-const `MatrixXf&`. This is the case because the compiler wants to protect you from writing your result to a temporary object. In this special case this protection is not intended – we want to write to a temporary object. So how can we overcome this problem?

 The solution which is preferred at the moment is based on a little *hack*. One needs to pass a const reference to the matrix and internally the constness needs to be cast away. The correct implementation for C98 compliant compilers would be 



```
template <typename Derived, typename OtherDerived>
void cov(const MatrixBase<Derived>& x, const MatrixBase<Derived>& y, MatrixBase<OtherDerived> const & C)
{
  typedef typename Derived::Scalar Scalar;
  typedef typename internal::plain_row_type<Derived>::type RowVectorType;
 
  const Scalar num_observations = static\_cast<Scalar>(x.rows());
 
  const RowVectorType x_mean = x.colwise().sum() / num_observations;
  const RowVectorType y_mean = y.colwise().sum() / num_observations;
 
  const\_cast< MatrixBase<OtherDerived>& >(C) =
    (x.rowwise() - x_mean).transpose() * (y.rowwise() - y_mean) / num_observations;
}

```

 The implementation above does now not only work with temporary expressions but it also allows to use the function with matrices of arbitrary floating point scalar types.

 **Note:** The const cast hack will only work with templated functions. It will not work with the MatrixXf implementation because it is not possible to cast a [Block](classeigen_1_1block "Expression of a fixed-size or dynamic-size block.") expression to a [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") reference!

 
 How to resize matrices in generic implementations?
====================================================

 One might think we are done now, right? This is not completely true because in order for our covariance function to be generically applicable, we want the following code to work 



```
MatrixXf x = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(100,3);
MatrixXf y = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(100,3);
MatrixXf C;
cov(x, y, C);

```

 This is not the case anymore, when we are using an implementation taking [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") as a parameter. In general, Eigen supports automatic resizing but it is not possible to do so on expressions. Why should resizing of a matrix [Block](classeigen_1_1block "Expression of a fixed-size or dynamic-size block.") be allowed? It is a reference to a sub-matrix and we definitely don't want to resize that. So how can we incorporate resizing if we cannot resize on [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.")? The solution is to resize the derived object as in this implementation. 



```
template <typename Derived, typename OtherDerived>
void cov(const MatrixBase<Derived>& x, const MatrixBase<Derived>& y, MatrixBase<OtherDerived> const & C_)
{
  typedef typename Derived::Scalar Scalar;
  typedef typename internal::plain_row_type<Derived>::type RowVectorType;
 
  const Scalar num_observations = static\_cast<Scalar>(x.rows());
 
  const RowVectorType x_mean = x.colwise().sum() / num_observations;
  const RowVectorType y_mean = y.colwise().sum() / num_observations;
 
  MatrixBase<OtherDerived>& C = const\_cast< MatrixBase<OtherDerived>& >(C_);
  
  C.derived().resize(x.cols(),x.cols()); // resize the derived object
  C = (x.rowwise() - x_mean).transpose() * (y.rowwise() - y_mean) / num_observations;
}

```

 This implementation is now working for parameters being expressions and for parameters being matrices and having the wrong size. Resizing the expressions does not do any harm in this case unless they actually require resizing. That means, passing an expression with the wrong dimensions will result in a run-time error (in debug mode only) while passing expressions of the correct size will just work fine.

 **Note:** In the above discussion the terms [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") and [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") and [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") and [ArrayBase](classeigen_1_1arraybase "Base class for all 1D and 2D array, and related expressions.") can be exchanged and all arguments still hold.

 
 Summary
=========

 * To summarize, the implementation of functions taking non-writable (const referenced) objects is not a big issue and does not lead to problematic situations in terms of compiling and running your program. However, a naive implementation is likely to introduce unnecessary temporary objects in your code. In order to avoid evaluating parameters into temporaries, pass them as (const) references to [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") or [ArrayBase](classeigen_1_1arraybase "Base class for all 1D and 2D array, and related expressions.") (so templatize your function).
* Functions taking writable (non-const) parameters must take const references and cast away constness within the function body.
* Functions that take as parameters [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") (or [ArrayBase](classeigen_1_1arraybase "Base class for all 1D and 2D array, and related expressions.")) objects, and potentially need to resize them (in the case where they are resizable), must call resize() on the derived class, as returned by derived().

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicFunctionTakingEigenTypes.html>

Sparse matrix manipulations
===========================

  Manipulating and solving sparse problems involves various modules which are summarized below:

 

| Module | Header file | Contents  |
| --- | --- | --- |
| [SparseCore](group__sparsecore__module)  | 
```
#include <Eigen/SparseCore>

```
 | [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.") and [SparseVector](classeigen_1_1sparsevector "a sparse vector class") classes, matrix assembly, basic sparse linear algebra (including sparse triangular solvers)  |
| [SparseCholesky](group__sparsecholesky__module)  | 
```
#include <Eigen/SparseCholesky>

```
 | Direct sparse [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") and [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") Cholesky factorization to solve sparse self-adjoint positive definite problems  |
| [SparseLU](group__sparselu__module)  | 
```
#include<Eigen/SparseLU> 

```
 | Sparse LU factorization to solve general square sparse systems  |
| [SparseQR](group__sparseqr__module)  | 
```
#include<Eigen/SparseQR>

```
 | Sparse QR factorization for solving sparse linear least-squares problems  |
| [IterativeLinearSolvers](group__iterativelinearsolvers__module)  | 
```
#include <Eigen/IterativeLinearSolvers>

```
 | Iterative solvers to solve large general linear square problems (including self-adjoint positive definite problems)  |
| [Sparse](group__sparse__module)  | 
```
#include <Eigen/Sparse>

```
 | Includes all the above modules  |

 
 Sparse matrix format
======================

 In many applications (e.g., finite element methods) it is common to deal with very large matrices where only a few coefficients are different from zero. In such cases, memory consumption can be reduced and performance increased by using a specialized representation storing only the nonzero coefficients. Such a matrix is called a sparse matrix.

 **The** **SparseMatrix** **class** 

 The class [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.") is the main sparse matrix representation of [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s sparse module; it offers high performance and low memory usage. It implements a more versatile variant of the widely-used Compressed Column (or Row) Storage scheme. It consists of four compact arrays:


* `Values:` stores the coefficient values of the non-zeros.
* `InnerIndices:` stores the row (resp. column) indices of the non-zeros.
* `OuterStarts:` stores for each column (resp. row) the index of the first non-zero in the previous two arrays.
* `InnerNNZs:` stores the number of non-zeros of each column (resp. row). The word `inner` refers to an *inner* *vector* that is a column for a column-major matrix, or a row for a row-major matrix. The word `outer` refers to the other direction.

 This storage scheme is better explained on an example. The following matrix 




|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| 0 | 3 | 0 | 0 | 0  |
| 22 | 0 | 0 | 0 | 17  |
| 7 | 5 | 0 | 1 | 0  |
| 0 | 0 | 0 | 0 | 0  |
| 0 | 0 | 14 | 0 | 8  |

 and one of its possible sparse, **column** **major** representation: 




|  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Values:  | 22 | 7 | \_ | 3 | 5 | 14 | \_ | \_ | 1 | \_ | 17 | 8  |
| InnerIndices:  | 1 | 2 | \_ | 0 | 2 | 4 | \_ | \_ | 2 | \_ | 1 | 4  |

 

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| OuterStarts: | 0 | 3 | 5 | 8 | 10 | *12* |
| InnerNNZs:  | 2 | 2 | 1 | 1 | 2 |  |

 Currently the elements of a given inner vector are guaranteed to be always sorted by increasing inner indices. The `"_"` indicates available free space to quickly insert new elements. Assuming no reallocation is needed, the insertion of a random element is therefore in O(nnz\_j) where nnz\_j is the number of nonzeros of the respective inner vector. On the other hand, inserting elements with increasing inner indices in a given inner vector is much more efficient since this only requires to increase the respective `InnerNNZs` entry that is a O(1) operation.

 The case where no empty space is available is a special case, and is referred as the *compressed* mode. It corresponds to the widely used Compressed Column (or Row) Storage schemes (CCS or CRS). Any [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.") can be turned to this form by calling the [SparseMatrix::makeCompressed()](classeigen_1_1sparsematrix#a5ff54ffc10296f9466dc81fa888733fd) function. In this case, one can remark that the `InnerNNZs` array is redundant with `OuterStarts` because we have the equality: `InnerNNZs`[j] = `OuterStarts`[j+1]-`OuterStarts`[j]. Therefore, in practice a call to [SparseMatrix::makeCompressed()](classeigen_1_1sparsematrix#a5ff54ffc10296f9466dc81fa888733fd) frees this buffer.

 It is worth noting that most of our wrappers to external libraries requires compressed matrices as inputs.

 The results of Eigen's operations always produces **compressed** sparse matrices. On the other hand, the insertion of a new element into a [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.") converts this later to the **uncompressed** mode.

 Here is the previous matrix represented in compressed mode: 




|  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Values:  | 22 | 7 | 3 | 5 | 14 | 1 | 17 | 8  |
| InnerIndices:  | 1 | 2 | 0 | 2 | 4 | 2 | 1 | 4  |

 

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| OuterStarts: | 0 | 2 | 4 | 5 | 6 | *8* |

 A [SparseVector](classeigen_1_1sparsevector "a sparse vector class") is a special case of a [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.") where only the `Values` and `InnerIndices` arrays are stored. There is no notion of compressed/uncompressed mode for a [SparseVector](classeigen_1_1sparsevector "a sparse vector class").

 
 First example
===============

 Before describing each individual class, let's start with the following typical example: solving the Laplace equation \( \Delta u = 0 \) on a regular 2D grid using a finite difference scheme and Dirichlet boundary conditions. Such problem can be mathematically expressed as a linear problem of the form \( Ax=b \) where \( x \) is the vector of `m` unknowns (in our case, the values of the pixels), \( b \) is the right hand side vector resulting from the boundary conditions, and \( A \) is an \( m \times m \) matrix containing only a few non-zero elements resulting from the discretization of the Laplacian operator.

 

|  |  |
| --- | --- |
| 
```
#include <Eigen/Sparse>
#include <vector>
#include <iostream>
 
typedef [Eigen::SparseMatrix<double>](classeigen_1_1sparsematrix) SpMat; // declares a column-major sparse matrix type of double
typedef [Eigen::Triplet<double>](classeigen_1_1triplet) T;
 
void buildProblem(std::vector<T>& coefficients, [Eigen::VectorXd](classeigen_1_1matrix)& b, int n);
void saveAsBitmap(const [Eigen::VectorXd](classeigen_1_1matrix)& x, int n, const char* filename);
 
int main(int argc, char** argv)
{
  if(argc!=2) {
    std::cerr << "Error: expected one and only one argument.\n";
    return -1;
  }
  
  int n = 300;  // size of the image
  int m = n*n;  // number of unknowns (=number of pixels)
 
  // Assembly:
  std::vector<T> coefficients;            // list of non-zeros coefficients
  [Eigen::VectorXd](classeigen_1_1matrix) b(m);                   // the right hand side-vector resulting from the constraints
  buildProblem(coefficients, b, n);
 
  SpMat A(m,m);
  A.setFromTriplets(coefficients.begin(), coefficients.end());
 
  // Solving:
  [Eigen::SimplicialCholesky<SpMat>](classeigen_1_1simplicialcholesky) chol(A);  // performs a Cholesky factorization of A
  [Eigen::VectorXd](classeigen_1_1matrix) x = chol.solve(b);         // use the factorization to solve for the given right hand side
 
  // Export the result to a file:
  saveAsBitmap(x, n, argv[1]);
 
  return 0;
}
 
```
 |    |

 In this example, we start by defining a column-major sparse matrix type of double `SparseMatrix<double>`, and a triplet list of the same scalar type `Triplet<double>`. A triplet is a simple object representing a non-zero entry as the triplet: `row` index, `column` index, `value`.

 In the main function, we declare a list `coefficients` of triplets (as a std vector) and the right hand side vector \( b \) which are filled by the *buildProblem* function. The raw and flat list of non-zero entries is then converted to a true [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.") object `A`. Note that the elements of the list do not have to be sorted, and possible duplicate entries will be summed up.

 The last step consists of effectively solving the assembled problem. Since the resulting matrix `A` is symmetric by construction, we can perform a direct Cholesky factorization via the [SimplicialLDLT](classeigen_1_1simplicialldlt "A direct sparse LDLT Cholesky factorizations without square root.") class which behaves like its [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") counterpart for dense objects.

 The resulting vector `x` contains the pixel values as a 1D array which is saved to a jpeg file shown on the right of the code above.

 Describing the *buildProblem* and *save* functions is out of the scope of this tutorial. They are given [here](tutorialsparse_example_details) for the curious and reproducibility purpose.

 
 The SparseMatrix class
========================

 **Matrix** **and** **vector** **properties**   
 The [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.") and [SparseVector](classeigen_1_1sparsevector "a sparse vector class") classes take three template arguments: the scalar type (e.g., double) the storage order (ColMajor or RowMajor, the default is ColMajor) the inner index type (default is `int`).

 As for dense [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") objects, constructors takes the size of the object. Here are some examples:

 
```
SparseMatrix<std::complex<float> > mat(1000,2000);         // declares a 1000x2000 column-major compressed sparse matrix of complex<float>
SparseMatrix<double,RowMajor> mat(1000,2000);              // declares a 1000x2000 row-major compressed sparse matrix of double
SparseVector<std::complex<float> > vec(1000);              // declares a column sparse vector of complex<float> of size 1000
SparseVector<double,RowMajor> vec(1000);                   // declares a row sparse vector of double of size 1000

```

In the rest of the tutorial, `mat` and `vec` represent any sparse-matrix and sparse-vector objects, respectively.

 The dimensions of a matrix can be queried using the following functions: 




|  |  |  |
| --- | --- | --- |
| Standard  dimensions | 
```
mat.rows()
mat.cols()

```
 | 
```
vec.size() 

```
 |
| Sizes along the  inner/outer dimensions | 
```
mat.innerSize()
mat.outerSize()

```
 |  |
| Number of non  zero coefficients | 
```
mat.nonZeros() 

```
 | 
```
vec.nonZeros() 

```
 |

 **Iterating** **over** **the** **nonzero** **coefficients**   
 Random access to the elements of a sparse object can be done through the `coeffRef(i,j)` function. However, this function involves a quite expensive binary search. In most cases, one only wants to iterate over the non-zeros elements. This is achieved by a standard loop over the outer dimension, and then by iterating over the non-zeros of the current inner vector via an InnerIterator. Thus, the non-zero entries have to be visited in the same order than the storage order. Here is an example: 




|  |  |
| --- | --- |
| 
```
SparseMatrix<double> mat(rows,cols);
for (int k=0; k<mat.outerSize(); ++k)
  for (SparseMatrix<double>::InnerIterator it(mat,k); it; ++it)
  {
    it.value();
    it.row();   // row index
    it.col();   // col index (here it is equal to k)
    it.index(); // inner index, here it is equal to it.row()
  }

```
 | 
```
SparseVector<double> vec(size);
for (SparseVector<double>::InnerIterator it(vec); it; ++it)
{
  it.value(); // == vec[ it.index() ]
  it.index();
}

```
 |

 For a writable expression, the referenced value can be modified using the valueRef() function. If the type of the sparse matrix or vector depends on a template parameter, then the `typename` keyword is required to indicate that `InnerIterator` denotes a type; see [The template and typename keywords in C++](topictemplatekeyword) for details.

 
 Filling a sparse matrix
=========================

 Because of the special storage scheme of a [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation."), special care has to be taken when adding new nonzero entries. For instance, the cost of a single purely random insertion into a [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.") is `O(nnz)`, where `nnz` is the current number of non-zero coefficients.

 The simplest way to create a sparse matrix while guaranteeing good performance is thus to first build a list of so-called *triplets*, and then convert it to a [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.").

 Here is a typical usage example: 



```
typedef [Eigen::Triplet<double>](classeigen_1_1triplet) T;
std::vector<T> tripletList;
tripletList.reserve(estimation_of_entries);
for(...)
{
  // ...
  tripletList.push_back(T(i,j,v_ij));
}
SparseMatrixType mat(rows,cols);
mat.setFromTriplets(tripletList.begin(), tripletList.end());
// mat is ready to go!

```

 The `std::vector` of triplets might contain the elements in arbitrary order, and might even contain duplicated elements that will be summed up by setFromTriplets(). See the [SparseMatrix::setFromTriplets()](classeigen_1_1sparsematrix#acc35051d698e3973f1de5b9b78dbe345) function and class [Triplet](classeigen_1_1triplet "A small structure to hold a non zero as a triplet (i,j,value).") for more details.

 In some cases, however, slightly higher performance, and lower memory consumption can be reached by directly inserting the non-zeros into the destination matrix. A typical scenario of this approach is illustrated below: 



```
1: SparseMatrix<double> mat(rows,cols);         // default is column major
2: mat.reserve([VectorXi::Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd)(cols,6));
3: for each i,j such that v_ij != 0
4:   mat.insert(i,j) = v_ij;                    // alternative: mat.coeffRef(i,j) += v\_ij;
5: mat.makeCompressed();                        // optional
```

* The key ingredient here is the line 2 where we reserve room for 6 non-zeros per column. In many cases, the number of non-zeros per column or row can easily be known in advance. If it varies significantly for each inner vector, then it is possible to specify a reserve size for each inner vector by providing a vector object with an operator[](int j) returning the reserve size of the `j-th` inner vector (e.g., via a VectorXi or std::vector<int>). If only a rought estimate of the number of nonzeros per inner-vector can be obtained, it is highly recommended to overestimate it rather than the opposite. If this line is omitted, then the first insertion of a new element will reserve room for 2 elements per inner vector.
* The line 4 performs a sorted insertion. In this example, the ideal case is when the `j-th` column is not full and contains non-zeros whose inner-indices are smaller than `i`. In this case, this operation boils down to trivial O(1) operation.
* When calling insert(i,j) the element `i` ,j must not already exists, otherwise use the coeffRef(i,j) method that will allow to, e.g., accumulate values. This method first performs a binary search and finally calls insert(i,j) if the element does not already exist. It is more flexible than insert() but also more costly.
* The line 5 suppresses the remaining empty space and transforms the matrix into a compressed column storage.

 
 Supported operators and functions
===================================

 Because of their special storage format, sparse matrices cannot offer the same level of flexibility than dense matrices. In [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s sparse module we chose to expose only the subset of the dense matrix API which can be efficiently implemented. In the following *sm* denotes a sparse matrix, *sv* a sparse vector, *dm* a dense matrix, and *dv* a dense vector.

 
 Basic operations
------------------

 Sparse expressions support most of the unary and binary coefficient wise operations: 



```
sm1.real()   sm1.imag()   -sm1                    0.5*sm1
sm1+sm2      sm1-sm2      sm1.cwiseProduct(sm2)

```

 However, **a strong restriction is that the storage orders must match**. For instance, in the following example: 



```
sm4 = sm1 + sm2 + sm3;

```

 sm1, sm2, and sm3 must all be row-major or all column-major. On the other hand, there is no restriction on the target matrix sm4. For instance, this means that for computing \( A^T + A \), the matrix \( A^T \) must be evaluated into a temporary matrix of compatible storage order: 



```
SparseMatrix<double> A, B;
B = SparseMatrix<double>(A.transpose()) + A;

```

Binary coefficient wise operators can also mix sparse and dense expressions: 



```
sm2 = sm1.cwiseProduct(dm1);
dm2 = sm1 + dm1;
dm2 = dm1 - sm1;

```

 Performance-wise, the adding/subtracting sparse and dense matrices is better performed in two steps. For instance, instead of doing `dm2 = sm1 + dm1`, better write: 



```
dm2 = dm1;
dm2 += sm1;

```

 This version has the advantage to fully exploit the higher performance of dense storage (no indirection, SIMD, etc.), and to pay the cost of slow sparse evaluation on the few non-zeros of the sparse matrix only.

 Sparse expressions also support transposition: 



```
sm1 = sm2.transpose();
sm1 = sm2.adjoint();

```

 However, there is no transposeInPlace() method.

 
 Matrix products
-----------------

 Eigen supports various kind of sparse matrix products which are summarize below:


* **sparse-dense**: 
```
dv2 = sm1 * dv1;
dm2 = dm1 * sm1.adjoint();
dm2 = 2. * sm1 * dm1;

```
* **symmetric** **sparse-dense**. The product of a sparse symmetric matrix with a dense matrix (or vector) can also be optimized by specifying the symmetry with selfadjointView(): 
```
dm2 = sm1.selfadjointView<>() * dm1;        // if all coefficients of A are stored
dm2 = A.selfadjointView<[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>() * dm1;     // if only the upper part of A is stored
dm2 = A.selfadjointView<[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>() * dm1;     // if only the lower part of A is stored
```
* **sparse-sparse**. For sparse-sparse products, two different algorithms are available. The default one is conservative and preserve the explicit zeros that might appear: 
```
sm3 = sm1 * sm2;
sm3 = 4 * sm1.adjoint() * sm2;

```
 The second algorithm prunes on the fly the explicit zeros, or the values smaller than a given threshold. It is enabled and controlled through the prune() functions: 
```
sm3 = (sm1 * sm2).pruned();                  // removes numerical zeros
sm3 = (sm1 * sm2).pruned(ref);               // removes elements much smaller than ref
sm3 = (sm1 * sm2).pruned(ref,epsilon);       // removes elements smaller than ref\*epsilon

```
* **permutations**. Finally, permutations can be applied to sparse matrices too: 
```
PermutationMatrix<Dynamic,Dynamic> P = ...;
sm2 = P * sm1;
sm2 = sm1 * P.inverse();
sm2 = sm1.transpose() * P;

```

 
 Block operations
------------------

 Regarding read-access, sparse matrices expose the same API than for dense matrices to access to sub-matrices such as blocks, columns, and rows. See [Block operations](group__tutorialblockoperations) for a detailed introduction. However, for performance reasons, writing to a sub-sparse-matrix is much more limited, and currently only contiguous sets of columns (resp. rows) of a column-major (resp. row-major) [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.") are writable. Moreover, this information has to be known at compile-time, leaving out methods such as `block(...)` and `corner*(...)`. The available API for write-access to a [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.") are summarized below: 



```
SparseMatrix<double,ColMajor> sm1;
sm1.col(j) = ...;
sm1.leftCols(ncols) = ...;
sm1.middleCols(j,ncols) = ...;
sm1.rightCols(ncols) = ...;
 
SparseMatrix<double,RowMajor> sm2;
sm2.row(i) = ...;
sm2.topRows(nrows) = ...;
sm2.middleRows(i,nrows) = ...;
sm2.bottomRows(nrows) = ...;

```

In addition, sparse matrices expose the SparseMatrixBase::innerVector() and SparseMatrixBase::innerVectors() methods, which are aliases to the col/middleCols methods for a column-major storage, and to the row/middleRows methods for a row-major storage.

 
 Triangular and selfadjoint views
----------------------------------

 Just as with dense matrices, the triangularView() function can be used to address a triangular part of the matrix, and perform triangular solves with a dense right hand side: 



```
dm2 = sm1.triangularView<[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>(dm1);
dv2 = sm1.transpose().triangularView<[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>(dv1);

```

The selfadjointView() function permits various operations:


* optimized sparse-dense matrix products: 
```
dm2 = sm1.selfadjointView<>() * dm1;        // if all coefficients of A are stored
dm2 = A.selfadjointView<[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>() * dm1;     // if only the upper part of A is stored
dm2 = A.selfadjointView<[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>() * dm1;     // if only the lower part of A is stored

```
* copy of triangular parts: 
```
sm2 = sm1.selfadjointView<[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>();                               // makes a full selfadjoint matrix from the upper triangular part
sm2.selfadjointView<[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>() = sm1.selfadjointView<[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>();      // copies the upper triangular part to the lower triangular part

```
* application of symmetric permutations: 
```
PermutationMatrix<Dynamic,Dynamic> P = ...;
sm2 = A.selfadjointView<[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>().twistedBy(P);                                // compute P S P' from the upper triangular part of A, and make it a full matrix
sm2.selfadjointView<[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>() = A.selfadjointView<[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>().twistedBy(P);       // compute P S P' from the lower triangular part of A, and then only compute the lower part

```

 Please, refer to the [Quick Reference](group__sparsequickrefpage)  guide for the list of supported operations. The list of linear solvers available is [here.](group__topicsparsesystems)  

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TutorialSparse.html>

Enumerations
============

  Various enumerations used in Eigen. Many of these are used as template parameters. 

 

|  |
| --- |
|  |
| enum  | [Eigen::AccessorLevels](group__enums#ga9f93eac38eb83deb0e8dbd42ddf11d5d) {  [Eigen::ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) ,  [Eigen::WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) ,  [Eigen::DirectAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5da50108ad00095928de06228470ceab09e) ,  [Eigen::DirectWriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dacbe59d09ba2fdf8eac127bff1a1f0234)  } |
|  |
| enum  | [Eigen::AlignmentType](group__enums#ga45fe06e29902b7a2773de05ba27b47a1) {  [Eigen::Unaligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a4e19dd09d5ff42295ba1d72d12a46686) ,  [Eigen::Aligned8](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a9d99d7a9ff1da5c949bec22733bfba14) ,  [Eigen::Aligned16](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ad0b140cd97bc74365b51843d28379655) ,  [Eigen::Aligned32](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a8a380b1cd0c3e5a6cceac06f8235157a) ,  [Eigen::Aligned64](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a2639cfa1e8faac751556bc0009fe95a4) ,  [Eigen::Aligned128](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a60057da2408e499b5656244d0b26cc20) ,  **AlignedMask** ,  [Eigen::Aligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ae12d0f8f869c40c76128260af2242bc8) ,  **AlignedMax**  } |
|  |
| enum  | [Eigen::ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) {  [Eigen::Success](group__enums#gga85fad7b87587764e5cf6b513a9e0ee5ea671a2aeb0f527802806a441d58a80fcf) ,  [Eigen::NumericalIssue](group__enums#gga85fad7b87587764e5cf6b513a9e0ee5ea1c6e20706575a629b27a105f07f1883b) ,  [Eigen::NoConvergence](group__enums#gga85fad7b87587764e5cf6b513a9e0ee5ea6a68dfb88a8336108a30588bdf356c57) ,  [Eigen::InvalidInput](group__enums#gga85fad7b87587764e5cf6b513a9e0ee5ea580b2a3cafe585691e789f768fb729bf)  } |
|  |
| enum  | [Eigen::DecompositionOptions](group__enums#gae3e239fb70022eb8747994cf5d68b4a9) {  } |
|  |
| enum  | [Eigen::DirectionType](group__enums#gad49a7b3738e273eb00932271b36127f7) {  [Eigen::Vertical](group__enums#ggad49a7b3738e273eb00932271b36127f7ae2efac6e74ecab5e3b0b1561c5ddf83e) ,  [Eigen::Horizontal](group__enums#ggad49a7b3738e273eb00932271b36127f7a961c62410157b64033839488f4d7f7e4) ,  [Eigen::BothDirections](group__enums#ggad49a7b3738e273eb00932271b36127f7a04fefd61992e941d509a57bc44c59794)  } |
|  |
| enum  | [Eigen::NaNPropagationOptions](group__enums#ga7f4e3f96895bdb325eab1a0b651e211f) {  [Eigen::PropagateFast](group__enums#gga7f4e3f96895bdb325eab1a0b651e211fa917fa8982b7eb0cbb440d38ee50e0b9c) ,  [Eigen::PropagateNaN](group__enums#gga7f4e3f96895bdb325eab1a0b651e211fa1d414f9966ecba69cd840b8def472c4a) ,  [Eigen::PropagateNumbers](group__enums#gga7f4e3f96895bdb325eab1a0b651e211fa5bfaff916ad4913fd04fe2e92c5c32ae)  } |
|  |
| enum  | [Eigen::QRPreconditioners](group__enums#ga46eba0d5c621f590b8cf1b53af31d56e) {  [Eigen::NoQRPreconditioner](group__enums#gga46eba0d5c621f590b8cf1b53af31d56ea2e95bc818f975b19def01e93d240dece) ,  [Eigen::HouseholderQRPreconditioner](group__enums#gga46eba0d5c621f590b8cf1b53af31d56ea9c660eb3336bf8c77ce9d081ca07cbdd) ,  [Eigen::ColPivHouseholderQRPreconditioner](group__enums#gga46eba0d5c621f590b8cf1b53af31d56eabd2e2f4875c5b4b6e602a433d90c4e5e) ,  [Eigen::FullPivHouseholderQRPreconditioner](group__enums#gga46eba0d5c621f590b8cf1b53af31d56eabd745dcaff7019c5f918c68809e5ea50)  } |
|  |
| enum  | [Eigen::SideType](group__enums#gac22de43beeac7a78b384f99bed5cee0b) {  [Eigen::OnTheLeft](group__enums#ggac22de43beeac7a78b384f99bed5cee0ba21b30a61e9cb10c967aec17567804007) ,  [Eigen::OnTheRight](group__enums#ggac22de43beeac7a78b384f99bed5cee0ba329fc3a54ceb2b6e0e73b400998b8a82)  } |
|  |
| enum  | [Eigen::StorageOptions](group__enums#gaacded1a18ae58b0f554751f6cdf9eb13) {  [Eigen::ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62) ,  [Eigen::RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f) ,  [Eigen::AutoAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea) ,  [Eigen::DontAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a56908522e51443a0aa0567f879c2e78a)  } |
|  |
| enum  | [Eigen::TransformTraits](group__enums#gaee59a86102f150923b0cac6d4ff05107) {  [Eigen::Isometry](group__enums#ggaee59a86102f150923b0cac6d4ff05107a84413028615d2d718bafd2dfb93dafef) ,  [Eigen::Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb) ,  [Eigen::AffineCompact](group__enums#ggaee59a86102f150923b0cac6d4ff05107a8192e8fdb2ec3ec46d92956cc83ef490) ,  [Eigen::Projective](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0f7338b8672884554e8642bce9e44183)  } |
|  |
| enum  | [Eigen::UpLoType](group__enums#ga39e3366ff5554d731e7dc8bb642f83cd) {  [Eigen::Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749) ,  [Eigen::Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1) ,  [Eigen::UnitDiag](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda2ef430bff6cc12c2d1e0ef01b95f7ff3) ,  [Eigen::ZeroDiag](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdac4dc554a61510151ddd5bafaf6040223) ,  [Eigen::UnitLower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda8f40b928c10a71ba03e5f75ad2a72fda) ,  [Eigen::UnitUpper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdadd28224d7ea92689930be73c1b50b0ad) ,  [Eigen::StrictlyLower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda2424988b6fca98be70b595632753ba81) ,  [Eigen::StrictlyUpper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda7b37877e0b9b0df28c9c2b669a633265) ,  [Eigen::SelfAdjoint](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdacf9ccb2016f8b9c0f3268f05a1e75821) ,  [Eigen::Symmetric](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdad5381b2d1c8973a08303c94e7da02333)  } |
|  |

  AccessorLevels
--------------

   

|  |
| --- |
| enum [Eigen::AccessorLevels](group__enums#ga9f93eac38eb83deb0e8dbd42ddf11d5d) |

 
 Used as template parameter in DenseCoeffBase and MapBase to indicate which accessors should be provided. 

 

| Enumerator |
| --- |
| ReadOnlyAccessors  | Read-only access via a member function.  |
| WriteAccessors  | Read/write access via member functions.  |
| DirectAccessors  | Direct read-only access to the coefficients.  |
| DirectWriteAccessors  | Direct read/write access to the coefficients.  |

    AlignmentType
-------------

   

|  |
| --- |
| enum [Eigen::AlignmentType](group__enums#ga45fe06e29902b7a2773de05ba27b47a1) |

 
 Enum for indicating whether a buffer is aligned or not. 

 

| Enumerator |
| --- |
| Unaligned  | Data pointer has no specific alignment.  |
| Aligned8  | Data pointer is aligned on a 8 bytes boundary.  |
| Aligned16  | Data pointer is aligned on a 16 bytes boundary.  |
| Aligned32  | Data pointer is aligned on a 32 bytes boundary.  |
| Aligned64  | Data pointer is aligned on a 64 bytes boundary.  |
| Aligned128  | Data pointer is aligned on a 128 bytes boundary.  |
| Aligned  | 
**[Deprecated:](deprecated#_deprecated000010)**
Synonym for Aligned16. 
 |

    ComputationInfo
---------------

   

|  |
| --- |
| enum [Eigen::ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) |

 
 Enum for reporting the status of a computation. 

 

| Enumerator |
| --- |
| Success  | Computation was successful.  |
| NumericalIssue  | The provided data did not satisfy the prerequisites.  |
| NoConvergence  | Iterative procedure did not converge.  |
| InvalidInput  | The inputs are invalid, or the algorithm has been improperly called. When assertions are enabled, such errors trigger an assert.  |

    DecompositionOptions
--------------------

   

|  |
| --- |
| enum [Eigen::DecompositionOptions](group__enums#gae3e239fb70022eb8747994cf5d68b4a9) |

 
 Enum with options to give to various decompositions. 

 

| Enumerator |
| --- |
| ComputeFullU  | Used in [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") to indicate that the square matrix U is to be computed.  |
| ComputeThinU  | Used in [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") to indicate that the thin matrix U is to be computed.  |
| ComputeFullV  | Used in [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") to indicate that the square matrix V is to be computed.  |
| ComputeThinV  | Used in [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") to indicate that the thin matrix V is to be computed.  |
| EigenvaluesOnly  | Used in [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver "Computes eigenvalues and eigenvectors of selfadjoint matrices.") and [GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver "Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem.") to specify that only the eigenvalues are to be computed and not the eigenvectors.  |
| ComputeEigenvectors  | Used in [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver "Computes eigenvalues and eigenvectors of selfadjoint matrices.") and [GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver "Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem.") to specify that both the eigenvalues and the eigenvectors are to be computed.  |
| Ax\_lBx  | Used in [GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver "Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem.") to indicate that it should solve the generalized eigenproblem \( Ax = \lambda B x \).  |
| ABx\_lx  | Used in [GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver "Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem.") to indicate that it should solve the generalized eigenproblem \( ABx = \lambda x \).  |
| BAx\_lx  | Used in [GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver "Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem.") to indicate that it should solve the generalized eigenproblem \( BAx = \lambda x \).  |

    DirectionType
-------------

   

|  |
| --- |
| enum [Eigen::DirectionType](group__enums#gad49a7b3738e273eb00932271b36127f7) |

 
 Enum containing possible values for the `Direction` parameter of [Reverse](classeigen_1_1reverse "Expression of the reverse of a vector or matrix."), [PartialReduxExpr](classeigen_1_1partialreduxexpr "Generic expression of a partially reduxed matrix.") and [VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations."). 

 

| Enumerator |
| --- |
| Vertical  | For [Reverse](classeigen_1_1reverse "Expression of the reverse of a vector or matrix."), all columns are reversed; for [PartialReduxExpr](classeigen_1_1partialreduxexpr "Generic expression of a partially reduxed matrix.") and [VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations."), act on columns.  |
| Horizontal  | For [Reverse](classeigen_1_1reverse "Expression of the reverse of a vector or matrix."), all rows are reversed; for [PartialReduxExpr](classeigen_1_1partialreduxexpr "Generic expression of a partially reduxed matrix.") and [VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations."), act on rows.  |
| BothDirections  | For [Reverse](classeigen_1_1reverse "Expression of the reverse of a vector or matrix."), both rows and columns are reversed; not used for [PartialReduxExpr](classeigen_1_1partialreduxexpr "Generic expression of a partially reduxed matrix.") and [VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations.").  |

    NaNPropagationOptions
---------------------

   

|  |
| --- |
| enum [Eigen::NaNPropagationOptions](group__enums#ga7f4e3f96895bdb325eab1a0b651e211f) |

 
 Enum for specifying NaN-propagation behavior, e.g. for coeff-wise min/max. 

 

| Enumerator |
| --- |
| PropagateFast  | Implementation defined behavior if NaNs are present.  |
| PropagateNaN  | Always propagate NaNs.  |
| PropagateNumbers  | Always propagate not-NaNs.  |

    QRPreconditioners
-----------------

   

|  |
| --- |
| enum [Eigen::QRPreconditioners](group__enums#ga46eba0d5c621f590b8cf1b53af31d56e) |

 
 Possible values for the `QRPreconditioner` template parameter of [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix."). 

 

| Enumerator |
| --- |
| NoQRPreconditioner  | Do not specify what is to be done if the SVD of a non-square matrix is asked for.  |
| HouseholderQRPreconditioner  | Use a QR decomposition without pivoting as the first step.  |
| ColPivHouseholderQRPreconditioner  | Use a QR decomposition with column pivoting as the first step.  |
| FullPivHouseholderQRPreconditioner  | Use a QR decomposition with full pivoting as the first step.  |

    SideType
--------

   

|  |
| --- |
| enum [Eigen::SideType](group__enums#gac22de43beeac7a78b384f99bed5cee0b) |

 
 Enum for specifying whether to apply or solve on the left or right. 

 

| Enumerator |
| --- |
| OnTheLeft  | Apply transformation on the left.  |
| OnTheRight  | Apply transformation on the right.  |

    StorageOptions
--------------

   

|  |
| --- |
| enum [Eigen::StorageOptions](group__enums#gaacded1a18ae58b0f554751f6cdf9eb13) |

 
 Enum containing possible values for the `_Options` template parameter of [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."), [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") and BandMatrix. 

 

| Enumerator |
| --- |
| ColMajor  | Storage order is column major (see [Storage orders](group__topicstorageorders)).  |
| RowMajor  | Storage order is row major (see [Storage orders](group__topicstorageorders)).  |
| AutoAlign  | Align the matrix itself if it is vectorizable fixed-size  |
| DontAlign  | Don't require alignment for the matrix itself (the array of coefficients, if dynamically allocated, may still be requested to be aligned)  |

    TransformTraits
---------------

   

|  |
| --- |
| enum [Eigen::TransformTraits](group__enums#gaee59a86102f150923b0cac6d4ff05107) |

 
 Enum used to specify how a particular transformation is stored in a matrix. 



See also

[Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space."), [Hyperplane::transform()](classeigen_1_1hyperplane#ae89b4a512bfb4acbf6192b37c89d1552). 
 

| Enumerator |
| --- |
| Isometry  | Transformation is an isometry.  |
| Affine  | Transformation is an affine transformation stored as a (Dim+1)^2 matrix whose last row is assumed to be [0 ... 0 1].  |
| AffineCompact  | Transformation is an affine transformation stored as a (Dim) x (Dim+1) matrix.  |
| Projective  | Transformation is a general projective transformation stored as a (Dim+1)^2 matrix.  |

    UpLoType
--------

   

|  |
| --- |
| enum [Eigen::UpLoType](group__enums#ga39e3366ff5554d731e7dc8bb642f83cd) |

 
 Enum containing possible values for the `Mode` or `UpLo` parameter of MatrixBase::selfadjointView() and MatrixBase::triangularView(), and selfadjoint solvers. 

 

| Enumerator |
| --- |
| Lower  | View matrix as a lower triangular matrix.  |
| Upper  | View matrix as an upper triangular matrix.  |
| UnitDiag  | Matrix has ones on the diagonal; to be used in combination with [Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749) or [Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1).  |
| ZeroDiag  | Matrix has zeros on the diagonal; to be used in combination with [Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749) or [Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1).  |
| UnitLower  | View matrix as a lower triangular matrix with ones on the diagonal.  |
| UnitUpper  | View matrix as an upper triangular matrix with ones on the diagonal.  |
| StrictlyLower  | View matrix as a lower triangular matrix with zeros on the diagonal.  |
| StrictlyUpper  | View matrix as an upper triangular matrix with zeros on the diagonal.  |
| SelfAdjoint  | Used in BandMatrix and [SelfAdjointView](classeigen_1_1selfadjointview "Expression of a selfadjoint matrix from a triangular part of a dense matrix.") to indicate that the matrix is self-adjoint.  |
| Symmetric  | Used to support symmetric, non-selfadjoint, complex matrices.  |

    

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__enums.html>

Reshape
=======

  Since the version 3.4, Eigen exposes convenient methods to reshape a matrix to another matrix of different sizes or vector. All cases are handled via the DenseBase::reshaped(NRowsType,NColsType) and DenseBase::reshaped() functions. Those functions do not perform in-place reshaping, but instead return a  *view*  on the input expression.

 
 Reshaped 2D views
===================

 The more general reshaping transformation is handled via: `reshaped(nrows,ncols)`. Here is an example reshaping a 4x4 matrix to a 2x8 one:

 

| Example: | Output:  |
| --- | --- |
| 
```
Matrix4i m = [Matrix4i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is m.reshaped(2, 8):" << endl << m.reshaped(2, 8) << endl;
```
 | 
```
Here is the matrix m:
 7  9 -5 -3
-2 -6  1  0
 6 -3  0  9
 6  6  3  9
Here is m.reshaped(2, 8):
 7  6  9 -3 -5  0 -3  9
-2  6 -6  6  1  3  0  9

```
 |

 By default, the input coefficients are always interpreted in column-major order regardless of the storage order of the input expression. For more control on ordering, compile-time sizes, and automatic size deduction, please see de documentation of DenseBase::reshaped(NRowsType,NColsType) that contains all the details with many examples.

 
 1D linear views
=================

 A very common usage of reshaping is to create a 1D linear view over a given 2D matrix or expression. In this case, sizes can be deduced and thus omitted as in the following example:

 

| Example:  |
| --- |
| 
```
Matrix4i m = [Matrix4i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is m.reshaped().transpose():" << endl << m.reshaped().transpose() << endl;
cout << "Here is m.reshaped<RowMajor>().transpose(): " << endl << m.reshaped<[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f)>().transpose() << endl;
```
 |
| Output:  |
| 
```
Here is the matrix m:
 7  9 -5 -3
-2 -6  1  0
 6 -3  0  9
 6  6  3  9
Here is m.reshaped().transpose():
 7 -2  6  6  9 -6 -3  6 -5  1  0  3 -3  0  9  9
Here is m.reshaped<RowMajor>().transpose():  
 7  9 -5 -3 -2 -6  1  0  6 -3  0  9  6  6  3  9

```
 |

 This shortcut always returns a column vector and by default input coefficients are always interpreted in column-major order. Again, see the documentation of DenseBase::reshaped() for more control on the ordering.

 
 TutorialReshapeInPlace
========================

 The above examples create reshaped views, but what about reshaping inplace a given matrix? Of course this task in only conceivable for matrix and arrays having runtime dimensions. In many cases, this can be accomplished via [PlainObjectBase::resize(Index,Index)](classeigen_1_1plainobjectbase#a9fd0703bd7bfe89d6dc80e2ce87c312a):

 

| Example:  |
| --- |
| 
```
MatrixXi m = [Matrix4i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is m.reshaped(2, 8):" << endl << m.reshaped(2, 8) << endl;
m.resize(2,8);
cout << "Here is the matrix m after m.resize(2,8):" << endl << m << endl;

```
 |
| Output:  |
| 
```
Here is the matrix m:
 7  9 -5 -3
-2 -6  1  0
 6 -3  0  9
 6  6  3  9
Here is m.reshaped(2, 8):
 7  6  9 -3 -5  0 -3  9
-2  6 -6  6  1  3  0  9
Here is the matrix m after m.resize(2,8):
 7  6  9 -3 -5  0 -3  9
-2  6 -6  6  1  3  0  9

```
 |

 However beware that unlike `reshaped`, the result of `resize` depends on the input storage order. It thus behaves similarly to `reshaped<AutoOrder>`:

 

| Example:  |
| --- |
| 
```
Matrix<int,Dynamic,Dynamic,RowMajor> m = [Matrix4i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is m.reshaped(2, 8):" << endl << m.reshaped(2, 8) << endl;
cout << "Here is m.reshaped<AutoOrder>(2, 8):" << endl << m.reshaped<AutoOrder>(2, 8) << endl;
m.resize(2,8);
cout << "Here is the matrix m after m.resize(2,8):" << endl << m << endl;

```
 |
| Output:  |
| 
```
Here is the matrix m:
 7 -2  6  6
 9 -6 -3  6
-5  1  0  3
-3  0  9  9
Here is m.reshaped(2, 8):
 7 -5 -2  1  6  0  6  3
 9 -3 -6  0 -3  9  6  9
Here is m.reshaped<AutoOrder>(2, 8):
 7 -2  6  6  9 -6 -3  6
-5  1  0  3 -3  0  9  9
Here is the matrix m after m.resize(2,8):
 7 -2  6  6  9 -6 -3  6
-5  1  0  3 -3  0  9  9

```
 |

 Finally, assigning a reshaped matrix to itself is currently not supported and will result to undefined-behavior because of [aliasing](group__topicaliasing) . The following is forbidden:



```
A = A.reshaped(2,8); 

```

 This is OK:



```
A = A.reshaped(2,8).eval(); 

```
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TutorialReshape.html>

STL iterators and algorithms
============================

  Since the version 3.4, Eigen's dense matrices and arrays provide STL compatible iterators. As demonstrated below, this makes them naturally compatible with range-for-loops and STL's algorithms.

 
 Iterating over 1D arrays and vectors
======================================

 Any dense 1D expressions exposes the pair of `begin()/end()` methods to iterate over them.

 This directly enables c++11 range for loops: 




| Example: | Output:  |
| --- | --- |
| 
```
VectorXi v = [VectorXi::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4);
cout << "Here is the vector v:\n";
for(auto x : v) cout << x << " ";
cout << "\n";
```
 | 
```
Here is the vector v:
7 -2 6 6 

```
 |

 One dimensional expressions can also easily be passed to STL algorithms: 




| Example: | Output:  |
| --- | --- |
| 
```
Array4i v = [Array4i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)().abs();
cout << "Here is the initial vector v:\n" << v.transpose() << "\n";
std::sort(v.begin(), v.end());
cout << "Here is the sorted vector v:\n" << v.transpose() << "\n";

```
 | 
```
Here is the initial vector v:
7 2 6 6
Here is the sorted vector v:
2 6 6 7

```
 |

 Similar to `std::vector`, 1D expressions also exposes the pair of `cbegin()/cend()` methods to conveniently get const iterators on non-const object.

 
 Iterating over coefficients of 2D arrays and matrices
=======================================================

 STL iterators are intrinsically designed to iterate over 1D structures. This is why `begin()/end()` methods are disabled for 2D expressions. Iterating over all coefficients of a 2D expressions is still easily accomplished by creating a 1D linear view through `reshaped()`: 




| Example: | Output:  |
| --- | --- |
| 
```
Matrix2i A = [Matrix2i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here are the coeffs of the 2x2 matrix A:\n";
for(auto x : A.reshaped())
  cout << x << " ";
cout << "\n";

```
 | 
```
Here are the coeffs of the 2x2 matrix A:
7 -2 6 6 

```
 |

 
 Iterating over rows or columns of 2D arrays and matrices
==========================================================

 It is also possible to get iterators over rows or columns of 2D expressions. Those are available through the `rowwise()` and `colwise()` proxies. Here is an example sorting each row of a matrix: 




| Example: | Output:  |
| --- | --- |
| 
```
ArrayXXi A = [ArrayXXi::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4).abs();
cout << "Here is the initial matrix A:\n" << A << "\n";
for(auto row : A.rowwise())
  std::sort(row.begin(), row.end());
cout << "Here is the sorted matrix A:\n" << A << "\n";

```
 | 
```
Here is the initial matrix A:
7 9 5 3
2 6 1 0
6 3 0 9
6 6 3 9
Here is the sorted matrix A:
3 5 7 9
0 1 2 6
0 3 6 9
3 6 6 9

```
 |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TutorialSTL.html>

Storage orders
==============

  There are two different storage orders for matrices and two-dimensional arrays: column-major and row-major. This page explains these storage orders and how to specify which one should be used.

 
 Column-major and row-major storage
====================================

 The entries of a matrix form a two-dimensional grid. However, when the matrix is stored in memory, the entries have to somehow be laid out linearly. There are two main ways to do this, by row and by column.

 We say that a matrix is stored in **row-major** order if it is stored row by row. The entire first row is stored first, followed by the entire second row, and so on. Consider for example the matrix

  \[ A = \begin{bmatrix} 8 & 2 & 2 & 9 \\ 9 & 1 & 4 & 4 \\ 3 & 5 & 4 & 5 \end{bmatrix}. \] 

 If this matrix is stored in row-major order, then the entries are laid out in memory as follows:

 
```
8 2 2 9 9 1 4 4 3 5 4 5 

```

On the other hand, a matrix is stored in **column-major** order if it is stored column by column, starting with the entire first column, followed by the entire second column, and so on. If the above matrix is stored in column-major order, it is laid out as follows:

 
```
8 9 3 2 1 5 2 4 4 9 4 5 

```

This example is illustrated by the following [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") code. It uses the [PlainObjectBase::data()](classeigen_1_1plainobjectbase#ad12a492bcadea9b65ccd9bc8404c01f1) function, which returns a pointer to the memory location of the first entry of the matrix.

 

| Example | Output  |
| --- | --- |
| 
```
Matrix<int, 3, 4, ColMajor> Acolmajor;
Acolmajor << 8, 2, 2, 9,
             9, 1, 4, 4,
             3, 5, 4, 5;
cout << "The matrix A:" << endl;
cout << Acolmajor << endl << endl; 
 
cout << "In memory (column-major):" << endl;
for (int i = 0; i < Acolmajor.size(); i++)
  cout << *(Acolmajor.data() + i) << " ";
cout << endl << endl;
 
Matrix<int, 3, 4, RowMajor> Arowmajor = Acolmajor;
cout << "In memory (row-major):" << endl;
for (int i = 0; i < Arowmajor.size(); i++)
  cout << *(Arowmajor.data() + i) << " ";
cout << endl;
 

```
 | 
```
The matrix A:
8 2 2 9
9 1 4 4
3 5 4 5

In memory (column-major):
8  9  3  2  1  5  2  4  4  9  4  5  

In memory (row-major):
8  2  2  9  9  1  4  4  3  5  4  5  

```
 |

 
 Storage orders in Eigen
=========================

 The storage order of a matrix or a two-dimensional array can be set by specifying the `Options` template parameter for [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") or [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations."). As [The Matrix class](group__tutorialmatrixclass) explains, the Matrix class template has six template parameters, of which three are compulsory (`Scalar`, `RowsAtCompileTime` and `ColsAtCompileTime`) and three are optional (`Options`, `MaxRowsAtCompileTime` and `MaxColsAtCompileTime`). If the `Options` parameter is set to `RowMajor`, then the matrix or array is stored in row-major order; if it is set to `ColMajor`, then it is stored in column-major order. This mechanism is used in the above [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") program to specify the storage order.

 If the storage order is not specified, then [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") defaults to storing the entry in column-major. This is also the case if one of the convenience typedefs (`Matrix3f`, `ArrayXXd`, etc.) is used.

 Matrices and arrays using one storage order can be assigned to matrices and arrays using the other storage order, as happens in the above program when `Arowmajor` is initialized using `Acolmajor`. [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") will reorder the entries automatically. More generally, row-major and column-major matrices can be mixed in an expression as we want.

 
 Which storage order to choose?
================================

 So, which storage order should you use in your program? There is no simple answer to this question; it depends on your application. Here are some points to keep in mind:

 * Your users may expect you to use a specific storage order. Alternatively, you may use other libraries than [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."), and these other libraries may expect a certain storage order. In these cases it may be easiest and fastest to use this storage order in your whole program.
* Algorithms that traverse a matrix row by row will go faster when the matrix is stored in row-major order because of better data locality. Similarly, column-by-column traversal is faster for column-major matrices. It may be worthwhile to experiment a bit to find out what is faster for your particular application.
* The default in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") is column-major. Naturally, most of the development and testing of the [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") library is thus done with column-major matrices. This means that, even though we aim to support column-major and row-major storage orders transparently, the [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") library may well work best with column-major matrices.

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TopicStorageOrders.html>

Alignment issues
================

  <> 

 

|  |
| --- |
|  |
|  | [Explanation of the assertion on unaligned arrays](group__topicunalignedarrayassert) |
|  |
|  | [Fixed-size vectorizable %Eigen objects](group__topicfixedsizevectorizable) |
|  |
|  | [Structures Having Eigen Members](group__topicstructhavingeigenmembers) |
|  |
|  | [Using STL Containers with Eigen](group__topicstlcontainers) |
|  |
|  | [Passing Eigen objects by value to functions](group__topicpassingbyvalue) |
|  |
|  | [Compiler making a wrong assumption on stack alignment](group__topicwrongstackalignment) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__DenseMatrixManipulation__Alignement.html>

The Array class and coefficient-wise operations
===============================================

  This page aims to provide an overview and explanations on how to use [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") class.

 
 What is the Array class?
==========================

 The [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") class provides general-purpose arrays, as opposed to the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class which is intended for linear algebra. Furthermore, the [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") class provides an easy way to perform coefficient-wise operations, which might not have a linear algebraic meaning, such as adding a constant to every coefficient in the array or multiplying two arrays coefficient-wise.

 
 Array types
=============

 [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") is a class template taking the same template parameters as [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."). As with [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."), the first three template parameters are mandatory: 



```
Array<typename Scalar, int RowsAtCompileTime, int ColsAtCompileTime>

```

 The last three template parameters are optional. Since this is exactly the same as for [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."), we won't explain it again here and just refer to [The Matrix class](group__tutorialmatrixclass).

 [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") also provides typedefs for some common cases, in a way that is similar to the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") typedefs but with some slight differences, as the word "array" is used for both 1-dimensional and 2-dimensional arrays. We adopt the convention that typedefs of the form ArrayNt stand for 1-dimensional arrays, where N and t are the size and the scalar type, as in the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") typedefs explained on [this page](group__tutorialmatrixclass). For 2-dimensional arrays, we use typedefs of the form ArrayNNt. Some examples are shown in the following table:

 

| Type  | Typedef  |
| --- | --- |
| 
```
Array<float,Dynamic,1> 

```
 | 
```
ArrayXf 

```
 |
| 
```
Array<float,3,1> 

```
 | 
```
Array3f 

```
 |
| 
```
Array<double,Dynamic,Dynamic> 

```
 | 
```
ArrayXXd 

```
 |
| 
```
Array<double,3,3> 

```
 | 
```
Array33d 

```
 |

 
 Accessing values inside an Array
==================================

 The parenthesis operator is overloaded to provide write and read access to the coefficients of an array, just as with matrices. Furthermore, the `<<` operator can be used to initialize arrays (via the comma initializer) or to print them.

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <Eigen/Dense>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
using namespace std;
 
int main()
{
  ArrayXXf  m(2,2);
  
  // assign some values coefficient by coefficient
  m(0,0) = 1.0; m(0,1) = 2.0;
  m(1,0) = 3.0; m(1,1) = m(0,1) + m(1,0);
  
  // print values to standard output
  cout << m << endl << endl;
 
  // using the comma-initializer is also allowed
  m << 1.0,2.0,
       3.0,4.0;
     
  // print values to standard output
  cout << m << endl;
}
```
 | 
```
1 2
3 5

1 2
3 4

```
 |

 For more information about the comma initializer, see [Advanced initialization](group__tutorialadvancedinitialization).

 
 Addition and subtraction
==========================

 Adding and subtracting two arrays is the same as for matrices. The operation is valid if both arrays have the same size, and the addition or subtraction is done coefficient-wise.

 Arrays also support expressions of the form `array + scalar` which add a scalar to each coefficient in the array. This provides a functionality that is not directly available for [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") objects.

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <Eigen/Dense>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
using namespace std;
 
int main()
{
  ArrayXXf a(3,3);
  ArrayXXf b(3,3);
  a << 1,2,3,
       4,5,6,
       7,8,9;
  b << 1,2,3,
       1,2,3,
       1,2,3;
       
  // Adding two arrays
  cout << "a + b = " << endl << a + b << endl << endl;
 
  // Subtracting a scalar from an array
  cout << "a - 2 = " << endl << a - 2 << endl;
}

```
 | 
```
a + b = 
 2  4  6
 5  7  9
 8 10 12

a - 2 = 
-1  0  1
 2  3  4
 5  6  7

```
 |

 
 Array multiplication
======================

 First of all, of course you can multiply an array by a scalar, this works in the same way as matrices. Where arrays are fundamentally different from matrices, is when you multiply two together. Matrices interpret multiplication as matrix product and arrays interpret multiplication as coefficient-wise product. Thus, two arrays can be multiplied if and only if they have the same dimensions.

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <Eigen/Dense>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
using namespace std;
 
int main()
{
  ArrayXXf a(2,2);
  ArrayXXf b(2,2);
  a << 1,2,
       3,4;
  b << 5,6,
       7,8;
  cout << "a \* b = " << endl << a * b << endl;
}

```
 | 
```
a * b = 
 5 12
21 32

```
 |

 
 Other coefficient-wise operations
===================================

 The [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") class defines other coefficient-wise operations besides the addition, subtraction and multiplication operators described above. For example, the [.abs()](group__tutorialarrayclass)  method takes the absolute value of each coefficient, while [.sqrt()](group__tutorialarrayclass)  computes the square root of the coefficients. If you have two arrays of the same size, you can call [.min(.)](group__tutorialarrayclass)  to construct the array whose coefficients are the minimum of the corresponding coefficients of the two given arrays. These operations are illustrated in the following example.

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <Eigen/Dense>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
using namespace std;
 
int main()
{
  ArrayXf a = [ArrayXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(5);
  a *= 2;
  cout << "a =" << endl 
       << a << endl;
  cout << "a.abs() =" << endl 
       << a.abs() << endl;
  cout << "a.abs().sqrt() =" << endl 
       << a.abs().sqrt() << endl;
  cout << "a.min(a.abs().sqrt()) =" << endl 
       << a.min(a.abs().sqrt()) << endl;
}
```
 | 
```
a =
  1.36
-0.422
  1.13
  1.19
  1.65
a.abs() =
 1.36
0.422
 1.13
 1.19
 1.65
a.abs().sqrt() =
1.17
0.65
1.06
1.09
1.28
a.min(a.abs().sqrt()) =
  1.17
-0.422
  1.06
  1.09
  1.28

```
 |

 More coefficient-wise operations can be found in the [Quick reference guide](group__quickrefpage).

 
 Converting between array and matrix expressions
=================================================

 When should you use objects of the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class and when should you use objects of the [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") class? You cannot apply [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") operations on arrays, or [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") operations on matrices. Thus, if you need to do linear algebraic operations such as matrix multiplication, then you should use matrices; if you need to do coefficient-wise operations, then you should use arrays. However, sometimes it is not that simple, but you need to use both [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") and [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") operations. In that case, you need to convert a matrix to an array or reversely. This gives access to all operations regardless of the choice of declaring objects as arrays or as matrices.

 [Matrix expressions](classeigen_1_1matrixbase)  have an [.array()](classeigen_1_1matrixbase#a354c33eec32ceb4193d002f4d41c0497)  method that 'converts' them into [array expressions](classeigen_1_1arraybase), so that coefficient-wise operations can be applied easily. Conversely, [array expressions](classeigen_1_1arraybase)  have a [.matrix()](classeigen_1_1arraybase#af01e9ea8087e390af8af453bbe4c276c)  method. As with all [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") expression abstractions, this doesn't have any runtime cost (provided that you let your compiler optimize). Both [.array()](classeigen_1_1matrixbase#a354c33eec32ceb4193d002f4d41c0497)  and [.matrix()](classeigen_1_1arraybase#af01e9ea8087e390af8af453bbe4c276c)  can be used as rvalues and as lvalues.

 Mixing matrices and arrays in an expression is forbidden with [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."). For instance, you cannot add a matrix and array directly; the operands of a `+` operator should either both be matrices or both be arrays. However, it is easy to convert from one to the other with [.array()](classeigen_1_1matrixbase#a354c33eec32ceb4193d002f4d41c0497)  and [.matrix()](classeigen_1_1arraybase#af01e9ea8087e390af8af453bbe4c276c). The exception to this rule is the assignment operator: it is allowed to assign a matrix expression to an array variable, or to assign an array expression to a matrix variable.

 The following example shows how to use array operations on a [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") object by employing the [.array()](classeigen_1_1matrixbase#a354c33eec32ceb4193d002f4d41c0497)  method. For example, the statement `result = m.array() * n.array()` takes two matrices `m` and `n`, converts them both to an array, uses to multiply them coefficient-wise and assigns the result to the matrix variable `result` (this is legal because [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") allows assigning array expressions to matrix variables).

 As a matter of fact, this usage case is so common that [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") provides a [const .cwiseProduct(.)](group__tutorialarrayclass)  method for matrices to compute the coefficient-wise product. This is also shown in the example program.

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <Eigen/Dense>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
using namespace std;
 
int main()
{
  MatrixXf m(2,2);
  MatrixXf n(2,2);
  MatrixXf result(2,2);
 
  m << 1,2,
       3,4;
  n << 5,6,
       7,8;
 
  result = m * n;
  cout << "-- Matrix m\*n: --" << endl << result << endl << endl;
  result = m.array() * n.array();
  cout << "-- Array m\*n: --" << endl << result << endl << endl;
  result = m.cwiseProduct(n);
  cout << "-- With cwiseProduct: --" << endl << result << endl << endl;
  result = m.array() + 4;
  cout << "-- Array m + 4: --" << endl << result << endl << endl;
}

```
 | 
```
-- Matrix m*n: --
19 22
43 50

-- Array m*n: --
 5 12
21 32

-- With cwiseProduct: --
 5 12
21 32

-- Array m + 4: --
5 6
7 8


```
 |

 Similarly, if `array1` and `array2` are arrays, then the expression `array1.matrix() * array2.matrix()` computes their matrix product.

 Here is a more advanced example. The expression `(m.array() + 4).matrix() * m` adds 4 to every coefficient in the matrix `m` and then computes the matrix product of the result with `m`. Similarly, the expression `(m.array() * n.array()).matrix() * m` computes the coefficient-wise product of the matrices `m` and `n` and then the matrix product of the result with `m`.

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <Eigen/Dense>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
using namespace std;
 
int main()
{
  MatrixXf m(2,2);
  MatrixXf n(2,2);
  MatrixXf result(2,2);
 
  m << 1,2,
       3,4;
  n << 5,6,
       7,8;
  
  result = (m.array() + 4).matrix() * m;
  cout << "-- Combination 1: --" << endl << result << endl << endl;
  result = (m.array() * n.array()).matrix() * m;
  cout << "-- Combination 2: --" << endl << result << endl << endl;
}

```
 | 
```
-- Combination 1: --
23 34
31 46

-- Combination 2: --
 41  58
117 170


```
 |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TutorialArrayClass.html>

Block operations
================

  This page explains the essentials of block operations. A block is a rectangular part of a matrix or array. Blocks expressions can be used both as rvalues and as lvalues. As usual with [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") expressions, this abstraction has zero runtime cost provided that you let your compiler optimize.

 
 Using block operations
========================

 The most general block operation in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") is called [.block()](group__tutorialblockoperations) . There are two versions, whose syntax is as follows:

 

| **Block** **operation** | Version constructing a  dynamic-size block expression  | Version constructing a  fixed-size block expression  |
| --- | --- | --- |
| Block of size `(p,q)`, starting at `(i,j)` | 
```
matrix.block(i,j,p,q);

```
 | 
```
matrix.block<p,q>(i,j);

```
 |

 As always in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."), indices start at 0.

 Both versions can be used on fixed-size and dynamic-size matrices and arrays. These two expressions are semantically equivalent. The only difference is that the fixed-size version will typically give you faster code if the block size is small, but requires this size to be known at compile time.

 The following program uses the dynamic-size and fixed-size versions to print the values of several blocks inside a matrix.

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <Eigen/Dense>
#include <iostream>
 
using namespace std;
 
int main()
{
  [Eigen::MatrixXf](classeigen_1_1matrix) m(4,4);
  m <<  1, 2, 3, 4,
        5, 6, 7, 8,
        9,10,11,12,
       13,14,15,16;
  cout << "Block in the middle" << endl;
  cout << m.block<2,2>(1,1) << endl << endl;
  for (int i = 1; i <= 3; ++i)
  {
    cout << "Block of size " << i << "x" << i << endl;
    cout << m.block(0,0,i,i) << endl << endl;
  }
}
```
 | 
```
Block in the middle
 6  7
10 11

Block of size 1x1
1

Block of size 2x2
1 2
5 6

Block of size 3x3
 1  2  3
 5  6  7
 9 10 11


```
 |

 In the above example the [.block()](group__tutorialblockoperations)  function was employed as a *rvalue*, i.e. it was only read from. However, blocks can also be used as *lvalues*, meaning that you can assign to a block.

 This is illustrated in the following example. This example also demonstrates blocks in arrays, which works exactly like the above-demonstrated blocks in matrices.

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <Eigen/Dense>
#include <iostream>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
 
int main()
{
  Array22f m;
  m << 1,2,
       3,4;
  Array44f a = [Array44f::Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd)(0.6);
  cout << "Here is the array a:" << endl << a << endl << endl;
  a.block<2,2>(1,1) = m;
  cout << "Here is now a with m copied into its central 2x2 block:" << endl << a << endl << endl;
  a.block(0,0,2,3) = a.block(2,1,2,3);
  cout << "Here is now a with bottom-right 2x3 block copied into top-left 2x3 block:" << endl << a << endl << endl;
}
```
 | 
```
Here is the array a:
0.6 0.6 0.6 0.6
0.6 0.6 0.6 0.6
0.6 0.6 0.6 0.6
0.6 0.6 0.6 0.6

Here is now a with m copied into its central 2x2 block:
0.6 0.6 0.6 0.6
0.6   1   2 0.6
0.6   3   4 0.6
0.6 0.6 0.6 0.6

Here is now a with bottom-right 2x3 block copied into top-left 2x3 block:
  3   4 0.6 0.6
0.6 0.6 0.6 0.6
0.6   3   4 0.6
0.6 0.6 0.6 0.6


```
 |

 While the [.block()](group__tutorialblockoperations)  method can be used for any block operation, there are other methods for special cases, providing more specialized API and/or better performance. On the topic of performance, all what matters is that you give [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") as much information as possible at compile time. For example, if your block is a single whole column in a matrix, using the specialized [.col()](group__tutorialblockoperations)  function described below lets [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") know that, which can give it optimization opportunities.

 The rest of this page describes these specialized methods.

 
 Columns and rows
==================

 Individual columns and rows are special cases of blocks. [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") provides methods to easily address them: [.col()](group__tutorialblockoperations)  and [.row()](group__tutorialblockoperations).

 

| Block operation  | Method  |
| --- | --- |
| ith row [\*](group__tutorialblockoperations)  | 
```
matrix.row(i);

```
 |
| jth column [\*](group__tutorialblockoperations)  | 
```
matrix.col(j);

```
 |

 The argument for `col()` and `row()` is the index of the column or row to be accessed. As always in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."), indices start at 0.

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <Eigen/Dense>
#include <iostream>
 
using namespace std;
 
int main()
{
  [Eigen::MatrixXf](classeigen_1_1matrix) m(3,3);
  m << 1,2,3,
       4,5,6,
       7,8,9;
  cout << "Here is the matrix m:" << endl << m << endl;
  cout << "2nd Row: " << m.row(1) << endl;
  m.col(2) += 3 * m.col(0);
  cout << "After adding 3 times the first column into the third column, the matrix m is:\n";
  cout << m << endl;
}

```
 | 
```
Here is the matrix m:
1 2 3
4 5 6
7 8 9
2nd Row: 4 5 6
After adding 3 times the first column into the third column, the matrix m is:
 1  2  6
 4  5 18
 7  8 30

```
 |

 That example also demonstrates that block expressions (here columns) can be used in arithmetic like any other expression.

 
 Corner-related operations
===========================

 [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") also provides special methods for blocks that are flushed against one of the corners or sides of a matrix or array. For instance, [.topLeftCorner()](group__tutorialblockoperations)  can be used to refer to a block in the top-left corner of a matrix.

 The different possibilities are summarized in the following table:

 

| Block **operation** | Version constructing a  dynamic-size block expression  | Version constructing a  fixed-size block expression  |
| --- | --- | --- |
| Top-left p by q block [\*](group__tutorialblockoperations)  | 
```
matrix.topLeftCorner(p,q);

```
 | 
```
matrix.topLeftCorner<p,q>();

```
 |
| Bottom-left p by q block [\*](group__tutorialblockoperations)  | 
```
matrix.bottomLeftCorner(p,q);

```
 | 
```
matrix.bottomLeftCorner<p,q>();

```
 |
| Top-right p by q block [\*](group__tutorialblockoperations)  | 
```
matrix.topRightCorner(p,q);

```
 | 
```
matrix.topRightCorner<p,q>();

```
 |
| Bottom-right p by q block [\*](group__tutorialblockoperations)  | 
```
matrix.bottomRightCorner(p,q);

```
 | 
```
matrix.bottomRightCorner<p,q>();

```
 |
| Block containing the first q rows [\*](group__tutorialblockoperations)  | 
```
matrix.topRows(q);

```
 | 
```
matrix.topRows<q>();

```
 |
| Block containing the last q rows [\*](group__tutorialblockoperations)  | 
```
matrix.bottomRows(q);

```
 | 
```
matrix.bottomRows<q>();

```
 |
| Block containing the first p columns [\*](group__tutorialblockoperations)  | 
```
matrix.leftCols(p);

```
 | 
```
matrix.leftCols<p>();

```
 |
| Block containing the last q columns [\*](group__tutorialblockoperations)  | 
```
matrix.rightCols(q);

```
 | 
```
matrix.rightCols<q>();

```
 |
| Block containing the q columns starting from i [\*](group__tutorialblockoperations)  | 
```
matrix.middleCols(i,q);

```
 | 
```
matrix.middleCols<q>(i);

```
 |
| Block containing the q rows starting from i [\*](group__tutorialblockoperations)  | 
```
matrix.middleRows(i,q);

```
 | 
```
matrix.middleRows<q>(i);

```
 |

 Here is a simple example illustrating the use of the operations presented above:

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <Eigen/Dense>
#include <iostream>
 
using namespace std;
 
int main()
{
  [Eigen::Matrix4f](classeigen_1_1matrix) m;
  m << 1, 2, 3, 4,
       5, 6, 7, 8,
       9, 10,11,12,
       13,14,15,16;
  cout << "m.leftCols(2) =" << endl << m.leftCols(2) << endl << endl;
  cout << "m.bottomRows<2>() =" << endl << m.bottomRows<2>() << endl << endl;
  m.topLeftCorner(1,3) = m.bottomRightCorner(3,1).[transpose](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c)();
  cout << "After assignment, m = " << endl << m << endl;
}
```
 | 
```
m.leftCols(2) =
 1  2
 5  6
 9 10
13 14

m.bottomRows<2>() =
 9 10 11 12
13 14 15 16

After assignment, m = 
 8 12 16  4
 5  6  7  8
 9 10 11 12
13 14 15 16

```
 |

 
 Block operations for vectors
==============================

 [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") also provides a set of block operations designed specifically for the special case of vectors and one-dimensional arrays:

 

| Block operation  | Version constructing a  dynamic-size block expression  | Version constructing a  fixed-size block expression  |
| --- | --- | --- |
| Block containing the first `n` elements [\*](group__tutorialblockoperations)  | 
```
vector.head(n);

```
 | 
```
vector.head<n>();

```
 |
| Block containing the last `n` elements [\*](group__tutorialblockoperations)  | 
```
vector.tail(n);

```
 | 
```
vector.tail<n>();

```
 |
| Block containing `n` elements, starting at position `i` [\*](group__tutorialblockoperations)  | 
```
vector.segment(i,n);

```
 | 
```
vector.segment<n>(i);

```
 |

 An example is presented below: 




| Example: | Output:  |
| --- | --- |
| 
```
#include <Eigen/Dense>
#include <iostream>
 
using namespace std;
 
int main()
{
  [Eigen::ArrayXf](classeigen_1_1array) v(6);
  v << 1, 2, 3, 4, 5, 6;
  cout << "v.head(3) =" << endl << v.head(3) << endl << endl;
  cout << "v.tail<3>() = " << endl << v.tail<3>() << endl << endl;
  v.segment(1,4) *= 2;
  cout << "after 'v.segment(1,4) \*= 2', v =" << endl << v << endl;
}
```
 | 
```
v.head(3) =
1
2
3

v.tail<3>() = 
4
5
6

after 'v.segment(1,4) *= 2', v =
 1
 4
 6
 8
10
 6

```
 |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TutorialBlockOperations.html>

Slicing and Indexing
====================

  This page presents the numerous possibilities offered by `operator()` to index sub-set of rows and columns. This API has been introduced in Eigen 3.4. It supports all the feature proposed by the [block API](group__tutorialblockoperations) , and much more. In particular, it supports **slicing** that consists in taking a set of rows, columns, or elements, uniformly spaced within a matrix or indexed from an array of indices.

 
 Overview
==========

 All the aforementioned operations are handled through the generic DenseBase::operator()(const RowIndices&, const ColIndices&) method. Each argument can be:


* An integer indexing a single row or column, including symbolic indices.
* The symbol [Eigen::all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14) representing the whole set of respective rows or columns in increasing order.
* An [ArithmeticSequence](classeigen_1_1arithmeticsequence) as constructed by the [Eigen::seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969), [Eigen::seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda), or [Eigen::lastN](namespaceeigen#acc01e5c7293dd3af76e79ae68cc87f77) functions.
* Any 1D vector/array of integers including Eigen's vector/array, expressions, std::vector, std::array, as well as plain C arrays: `int[N]`.

 More generally, it can accepts any object exposing the following two member functions: 



```
<integral type> operator[](<integral type>) const;
<integral type> size() const;

```

 where `<integral type>` stands for any integer type compatible with [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde "The Index type as used for the API.") (i.e. `std::ptrdiff_t`).

 
 Basic slicing
===============

 Taking a set of rows, columns, or elements, uniformly spaced within a matrix or vector is achieved through the [Eigen::seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969) or [Eigen::seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda) functions where "seq" stands for arithmetic sequence. Their signatures are summarized below:

 

| function  | description  | example  |
| --- | --- | --- |
| 
```
[seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969)(firstIdx,lastIdx) 
```
 | represents the sequence of integers ranging from `firstIdx` to `lastIdx` | 
```
[seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969)(2,5) <=> {2,3,4,5} 

```
 |
| 
```
[seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969)(firstIdx,lastIdx,incr) 

```
 | same but using the increment `incr` to advance from one index to the next  | 
```
[seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969)(2,8,2) <=> {2,4,6,8} 

```
 |
| 
```
[seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)(firstIdx,size) 
```
 | represents the sequence of `size` integers starting from `firstIdx` | 
```
[seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)(2,5) <=> {2,3,4,5,6} 

```
 |
| 
```
[seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)(firstIdx,size,incr) 

```
 | same but using the increment `incr` to advance from one index to the next  | 
```
[seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)(2,3,3) <=> {2,5,8} 

```
 |

 The `firstIdx` and `lastIdx` parameters can also be defined with the help of the [Eigen::last](group__core__module#ga2dd8b20d08336af23947e054a17415ee) symbol representing the index of the last row, column or element of the underlying matrix/vector once the arithmetic sequence is passed to it through operator(). Here are some examples for a 2D array/matrix `A` and a 1D array/vector `v`. 




| Intent  | Code  | Block-API equivalence  |
| --- | --- | --- |
| Bottom-left corner starting at row `i` with `n` columns  | 
```
A([seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969)(i,[last](group__core__module#ga2dd8b20d08336af23947e054a17415ee)), [seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)(0,n)) 
```
 | 
```
A.bottomLeftCorner(A.rows()-i,n) 

```
 |
| Block starting at `i`,j having `m` rows, and `n` columns  | 
```
A([seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)(i,m), [seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)(i,n) 

```
 | 
```
A.block(i,j,m,n) 

```
 |
| Block starting at `i0`,j0 and ending at `i1`,j1  | 
```
A([seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969)(i0,i1), [seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969)(j0,j1) 

```
 | 
```
A.block(i0,j0,i1-i0+1,j1-j0+1) 

```
 |
| Even columns of A  | 
```
A([all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14), [seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969)(0,[last](group__core__module#ga2dd8b20d08336af23947e054a17415ee),2)) 
```
 |  |
| First `n` odd rows A  | 
```
A([seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)(1,n,2), [all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14)) 

```
 |  |
| The last past one column  | 
```
A([all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14), [last](group__core__module#ga2dd8b20d08336af23947e054a17415ee)-1) 

```
 | 
```
A.col(A.cols()-2) 

```
 |
| The middle row  | 
```
A([last](group__core__module#ga2dd8b20d08336af23947e054a17415ee)/2,[all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14)) 

```
 | 
```
A.row((A.rows()-1)/2) 

```
 |
| Last elements of v starting at i  | 
```
v([seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969)(i,[last](group__core__module#ga2dd8b20d08336af23947e054a17415ee))) 

```
 | 
```
v.tail(v.size()-i) 

```
 |
| Last `n` elements of v  | 
```
v([seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969)([last](group__core__module#ga2dd8b20d08336af23947e054a17415ee)+1-n,[last](group__core__module#ga2dd8b20d08336af23947e054a17415ee))) 

```
 | 
```
v.tail(n) 

```
 |

 As seen in the last exemple, referencing the  *last n*  elements (or rows/columns) is a bit cumbersome to write. This becomes even more tricky and error prone with a non-default increment. Here comes [Eigen::lastN(size)](namespaceeigen#a5564b99b116c725ef571f1a2f859acb1) , and [Eigen::lastN(size,incr)](namespaceeigen#acc01e5c7293dd3af76e79ae68cc87f77) :

 

| Intent  | Code  | Block-API equivalence  |
| --- | --- | --- |
| Last `n` elements of v  | 
```
v([lastN](namespaceeigen#acc01e5c7293dd3af76e79ae68cc87f77)(n)) 
```
 | 
```
v.tail(n) 

```
 |
| Bottom-right corner of A of size `m` times `n` | 
```
v([lastN](namespaceeigen#acc01e5c7293dd3af76e79ae68cc87f77)(m), [lastN](namespaceeigen#acc01e5c7293dd3af76e79ae68cc87f77)(n)) 

```
 | 
```
A.bottomRightCorner(m,n) 

```
 |
| Bottom-right corner of A of size `m` times `n` | 
```
v([lastN](namespaceeigen#acc01e5c7293dd3af76e79ae68cc87f77)(m), [lastN](namespaceeigen#acc01e5c7293dd3af76e79ae68cc87f77)(n)) 

```
 | 
```
A.bottomRightCorner(m,n) 

```
 |
| Last `n` columns taking 1 column over 3  | 
```
A([all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14), [lastN](namespaceeigen#acc01e5c7293dd3af76e79ae68cc87f77)(n,3)) 

```
 |  |

 
 Compile time size and increment
=================================

 In terms of performance, Eigen and the compiler can take advantage of compile-time size and increment. To this end, you can enforce compile-time parameters using [Eigen::fix<val>](group__core__module#gac01f234bce100e39e6928fdc470e5194). Such compile-time value can be combined with the [Eigen::last](group__core__module#ga2dd8b20d08336af23947e054a17415ee) symbol: 



```
v([seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969)([last](group__core__module#ga2dd8b20d08336af23947e054a17415ee)-fix<7>, [last](group__core__module#ga2dd8b20d08336af23947e054a17415ee)-fix<2>))

```

 In this example Eigen knowns at compile-time that the returned expression has 6 elements. It is equivalent to: 



```
v([seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)([last](group__core__module#ga2dd8b20d08336af23947e054a17415ee)-7, fix<6>))

```

We can revisit the *even columns of A* example as follows: 



```
A([all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14), [seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969)(0,[last](group__core__module#ga2dd8b20d08336af23947e054a17415ee),fix<2>))

```


 Reverse order
===============

 Row/column indices can also be enumerated in decreasing order using a negative increment. For instance, one over two columns of A from the column 20 to 10: 



```
A([all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14), [seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969)(20, 10, fix<-2>))

```

 The last `n` rows starting from the last one: 



```
A([seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)([last](group__core__module#ga2dd8b20d08336af23947e054a17415ee), n, fix<-1>), [all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14))

```

 You can also use the ArithmeticSequence::reverse() method to reverse its order. The previous example can thus also be written as: 



```
A([lastN](namespaceeigen#acc01e5c7293dd3af76e79ae68cc87f77)(n).reverse(), [all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14))

```


 Array of indices
==================

 The generic `operator()` can also takes as input an arbitrary list of row or column indices stored as either an `ArrayXi`, a `std::vector<int>`, `std::array<int,N>`, etc.

 

| Example: | Output:  |
| --- | --- |
| 
```
std::vector<int> ind{4,2,5,5,3};
MatrixXi A = [MatrixXi::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,6);
cout << "Initial matrix A:\n" << A << "\n\n";
cout << "A(all,ind):\n" << A([all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14),ind) << "\n\n";
```
 | 
```
Initial matrix A:
  7   9  -5  -3   3 -10
 -2  -6   1   0   5  -5
  6  -3   0   9  -8  -8
  6   6   3   9   2   6

A(all,ind):
  3  -5 -10 -10  -3
  5   1  -5  -5   0
 -8   0  -8  -8   9
  2   3   6   6   9


```
 |

 You can also directly pass a static array: 




| Example: | Output:  |
| --- | --- |
| 
```
#if EIGEN\_HAS\_STATIC\_ARRAY\_TEMPLATE
MatrixXi A = [MatrixXi::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,6);
cout << "Initial matrix A:\n" << A << "\n\n";
cout << "A(all,{4,2,5,5,3}):\n" << A([all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14),{4,2,5,5,3}) << "\n\n";
#endif

```
 | 
```
Initial matrix A:
  7   9  -5  -3   3 -10
 -2  -6   1   0   5  -5
  6  -3   0   9  -8  -8
  6   6   3   9   2   6

A(all,{4,2,5,5,3}):
  3  -5 -10 -10  -3
  5   1  -5  -5   0
 -8   0  -8  -8   9
  2   3   6   6   9


```
 |

 or expressions: 




| Example: | Output:  |
| --- | --- |
| 
```
ArrayXi ind(5); ind<<4,2,5,5,3;
MatrixXi A = [MatrixXi::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,6);
cout << "Initial matrix A:\n" << A << "\n\n";
cout << "A(all,ind-1):\n" << A([all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14),ind-1) << "\n\n";

```
 | 
```
Initial matrix A:
  7   9  -5  -3   3 -10
 -2  -6   1   0   5  -5
  6  -3   0   9  -8  -8
  6   6   3   9   2   6

A(all,ind-1):
-3  9  3  3 -5
 0 -6  5  5  1
 9 -3 -8 -8  0
 9  6  2  2  3


```
 |

 When passing an object with a compile-time size such as `Array4i`, `std::array<int,N>`, or a static array, then the returned expression also exhibit compile-time dimensions.

 
 Custom index list
===================

 More generally, `operator()` can accept as inputs any object `ind` of type `T` compatible with: 



```
[Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) s = ind.size(); or [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) s = size(ind);
[Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) i;
i = ind[i];
```

This means you can easily build your own fancy sequence generator and pass it to `operator()`. Here is an exemple enlarging a given matrix while padding the additional first rows and columns through repetition:

 

| Example: | Output:  |
| --- | --- |
| 
```
struct pad {
  [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size() const { return out_size; }
  [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) operator[] ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) i) const { return std::max<Index>(0,i-(out_size-in_size)); }
  [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) in_size, out_size;
};
 
Matrix3i A;
A.reshaped() = [VectorXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(9,1,9);
cout << "Initial matrix A:\n" << A << "\n\n";
MatrixXi B(5,5);
B = A(pad{3,5}, pad{3,5});
cout << "A(pad{3,N}, pad{3,N}):\n" << B << "\n\n";
```
 | 
```
Initial matrix A:
1 4 7
2 5 8
3 6 9

A(pad{3,N}, pad{3,N}):
1 1 1 4 7
1 1 1 4 7
1 1 1 4 7
2 2 2 5 8
3 3 3 6 9


```
 |

   
 

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TutorialSlicingIndexing.html>

Interfacing with raw buffers: the Map class
===========================================

  This page explains how to work with "raw" C/C++ arrays. This can be useful in a variety of contexts, particularly when "importing" vectors and matrices from other libraries into Eigen.

 
 Introduction
==============

 Occasionally you may have a pre-defined array of numbers that you want to use within Eigen as a vector or matrix. While one option is to make a copy of the data, most commonly you probably want to re-use this memory as an Eigen type. Fortunately, this is very easy with the [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") class.

 
 Map types and declaring Map variables
=======================================

 A [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") object has a type defined by its Eigen equivalent: 



```
Map<Matrix<typename Scalar, int RowsAtCompileTime, int ColsAtCompileTime> >

```

 Note that, in this default case, a [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") requires just a single template parameter.   
 

 To construct a [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") variable, you need two other pieces of information: a pointer to the region of memory defining the array of coefficients, and the desired shape of the matrix or vector. For example, to define a matrix of `float` with sizes determined at compile time, you might do the following: 



```
Map<MatrixXf> mf(pf,rows,columns);

```

 where `pf` is a `float` `*` pointing to the array of memory. A fixed-size read-only vector of integers might be declared as 



```
Map<const Vector4i> mi(pi);

```

 where `pi` is an `int` `*`. In this case the size does not have to be passed to the constructor, because it is already specified by the Matrix/Array type.

 Note that [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") does not have a default constructor; you *must* pass a pointer to initialize the object. However, you can work around this requirement (see [Changing the mapped array](group__tutorialmapclass#TutorialMapPlacementNew)).

 [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") is flexible enough to accommodate a variety of different data representations. There are two other (optional) template parameters: 



```
Map<typename MatrixType,
    int MapOptions,
    typename StrideType>

```
 * `MapOptions` specifies whether the pointer is `[Aligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ae12d0f8f869c40c76128260af2242bc8)`, or `[Unaligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a4e19dd09d5ff42295ba1d72d12a46686)`. The default is `[Unaligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a4e19dd09d5ff42295ba1d72d12a46686)`.
* `StrideType` allows you to specify a custom layout for the memory array, using the [Stride](classeigen_1_1stride "Holds strides information for Map.") class. One example would be to specify that the data array is organized in row-major format: 

| Example: | Output:  |
| --- | --- |
| 
```
int array[8];
for(int i = 0; i < 8; ++i) array[i] = i;
cout << "Column-major:\n" << Map<Matrix<int,2,4> >(array) << endl;
cout << "Row-major:\n" << Map<Matrix<int,2,4,RowMajor> >(array) << endl;
cout << "Row-major using stride:\n" <<
  Map<Matrix<int,2,4>, [Unaligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a4e19dd09d5ff42295ba1d72d12a46686), Stride<1,4> >(array) << endl;
 
```
 | 
```
Column-major:
0 2 4 6
1 3 5 7
Row-major:
0 1 2 3
4 5 6 7
Row-major using stride:
0 1 2 3
4 5 6 7

```
 |

 However, [Stride](classeigen_1_1stride "Holds strides information for Map.") is even more flexible than this; for details, see the documentation for the [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") and [Stride](classeigen_1_1stride "Holds strides information for Map.") classes.

 
 Using Map variables
=====================

 You can use a [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") object just like any other Eigen type: 




| Example: | Output:  |
| --- | --- |
| 
```
typedef Matrix<float,1,Dynamic> MatrixType;
typedef Map<MatrixType> MapType;
typedef Map<const MatrixType> MapTypeConst;   // a read-only map
const int n_dims = 5;
  
MatrixType m1(n_dims), m2(n_dims);
m1.setRandom();
m2.setRandom();
float *p = &m2(0);  // get the address storing the data for m2
MapType m2map(p,m2.size());   // m2map shares data with m2
MapTypeConst m2mapconst(p,m2.size());  // a read-only accessor for m2
 
cout << "m1: " << m1 << endl;
cout << "m2: " << m2 << endl;
cout << "Squared euclidean distance: " << (m1-m2).squaredNorm() << endl;
cout << "Squared euclidean distance, using map: " <<
  (m1-m2map).squaredNorm() << endl;
m2map(3) = 7;   // this will change m2, since they share the same array
cout << "Updated m2: " << m2 << endl;
cout << "m2 coefficient 2, constant accessor: " << m2mapconst(2) << endl;
/\* m2mapconst(2) = 5; \*/   // this yields a compile-time error

```
 | 
```
m1:   0.68 -0.211  0.566  0.597  0.823
m2: -0.605  -0.33  0.536 -0.444  0.108
Squared euclidean distance: 3.26
Squared euclidean distance, using map: 3.26
Updated m2: -0.605  -0.33  0.536      7  0.108
m2 coefficient 2, constant accessor: 0.536

```
 |

 All Eigen functions are written to accept [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") objects just like other Eigen types. However, when writing your own functions taking Eigen types, this does *not* happen automatically: a [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") type is not identical to its [Dense](structeigen_1_1dense) equivalent. See [Writing Functions Taking Eigen Types as Parameters](topicfunctiontakingeigentypes) for details.

 
 Changing the mapped array
===========================

 It is possible to change the array of a [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") object after declaration, using the C++ "placement new" syntax: 




| Example: | Output:  |
| --- | --- |
| 
```
int data[] = {1,2,3,4,5,6,7,8,9};
Map<RowVectorXi> v(data,4);
cout << "The mapped vector v is: " << v << "\n";
new (&v) Map<RowVectorXi>(data+4,5);
cout << "Now v is: " << v << "\n";

```
 | 
```
The mapped vector v is: 1 2 3 4
Now v is: 5 6 7 8 9

```
 |

 Despite appearances, this does not invoke the memory allocator, because the syntax specifies the location for storing the result.

 This syntax makes it possible to declare a [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") object without first knowing the mapped array's location in memory: 



```
Map<Matrix3f> A(NULL);  // don't try to use this matrix yet!
VectorXf b(n_matrices);
for (int i = 0; i < n_matrices; i++)
{
  new (&A) Map<Matrix3f>(get_matrix_pointer(i));
  b(i) = A.trace();
}

```
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TutorialMapClass.html>

Aliasing
========

  In Eigen, aliasing refers to assignment statement in which the same matrix (or array or vector) appears on the left and on the right of the assignment operators. Statements like `mat = 2 * mat;` or `mat = mat.transpose();` exhibit aliasing. The aliasing in the first example is harmless, but the aliasing in the second example leads to unexpected results. This page explains what aliasing is, when it is harmful, and what to do about it.

 
 Examples
==========

 Here is a simple example exhibiting aliasing:

 

| Example | Output  |
| --- | --- |
| 
```
MatrixXi mat(3,3); 
mat << 1, 2, 3,   4, 5, 6,   7, 8, 9;
cout << "Here is the matrix mat:\n" << mat << endl;
 
// This assignment shows the aliasing problem
mat.bottomRightCorner(2,2) = mat.topLeftCorner(2,2);
cout << "After the assignment, mat = \n" << mat << endl;

```
 | 
```
Here is the matrix mat:
1 2 3
4 5 6
7 8 9
After the assignment, mat = 
1 2 3
4 1 2
7 4 1

```
 |

 The output is not what one would expect. The problem is the assignment 



```
mat.bottomRightCorner(2,2) = mat.topLeftCorner(2,2);

```

 This assignment exhibits aliasing: the coefficient `mat(1,1)` appears both in the block `mat.bottomRightCorner(2,2)` on the left-hand side of the assignment and the block `mat.topLeftCorner(2,2)` on the right-hand side. After the assignment, the (2,2) entry in the bottom right corner should have the value of `mat(1,1)` before the assignment, which is 5. However, the output shows that `mat(2,2)` is actually 1. The problem is that Eigen uses lazy evaluation (see [Expression templates in Eigen](topiceigenexpressiontemplates)) for `mat.topLeftCorner(2,2)`. The result is similar to 



```
mat(1,1) = mat(0,0);
mat(1,2) = mat(0,1);
mat(2,1) = mat(1,0);
mat(2,2) = mat(1,1);

```

 Thus, `mat(2,2)` is assigned the *new* value of `mat(1,1)` instead of the old value. The next section explains how to solve this problem by calling [eval()](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b).

 Aliasing occurs more naturally when trying to shrink a matrix. For example, the expressions `vec = vec.head(n)` and `mat = mat.block(i,j,r,c)` exhibit aliasing.

 In general, aliasing cannot be detected at compile time: if `mat` in the first example were a bit bigger, then the blocks would not overlap, and there would be no aliasing problem. However, Eigen does detect some instances of aliasing, albeit at run time. The following example exhibiting aliasing was mentioned in [Matrix and vector arithmetic](group__tutorialmatrixarithmetic) :

 

| Example | Output  |
| --- | --- |
| 
```
Matrix2i a; a << 1, 2, 3, 4;
cout << "Here is the matrix a:\n" << a << endl;
 
a = a.transpose(); // !!! do NOT do this !!!
cout << "and the result of the aliasing effect:\n" << a << endl;

```
 | 
```
Here is the matrix a:
1 2
3 4
and the result of the aliasing effect:
1 2
2 4

```
 |

 Again, the output shows the aliasing issue. However, by default Eigen uses a run-time assertion to detect this and exits with a message like

 
```
void Eigen::DenseBase<Derived>::checkTransposeAliasing(const OtherDerived&) const 
[with OtherDerived = Eigen::Transpose<Eigen::Matrix<int, 2, 2, 0, 2, 2> >, Derived = Eigen::Matrix<int, 2, 2, 0, 2, 2>]: 
Assertion `(!internal::check_transpose_aliasing_selector<Scalar,internal::blas_traits<Derived>::IsTransposed,OtherDerived>::run(internal::extract_data(derived()), other)) 
&& "aliasing detected during transposition, use transposeInPlace() or evaluate the rhs into a temporary using .eval()"' failed.

```

The user can turn Eigen's run-time assertions like the one to detect this aliasing problem off by defining the EIGEN\_NO\_DEBUG macro, and the above program was compiled with this macro turned off in order to illustrate the aliasing problem. See [Assertions](topicassertions) for more information about Eigen's run-time assertions.

 
 Resolving aliasing issues
===========================

 If you understand the cause of the aliasing issue, then it is obvious what must happen to solve it: Eigen has to evaluate the right-hand side fully into a temporary matrix/array and then assign it to the left-hand side. The function [eval()](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b)  does precisely that.

 For example, here is the corrected version of the first example above:

 

| Example | Output  |
| --- | --- |
| 
```
MatrixXi mat(3,3); 
mat << 1, 2, 3,   4, 5, 6,   7, 8, 9;
cout << "Here is the matrix mat:\n" << mat << endl;
 
// The eval() solves the aliasing problem
mat.bottomRightCorner(2,2) = mat.topLeftCorner(2,2).eval();
cout << "After the assignment, mat = \n" << mat << endl;

```
 | 
```
Here is the matrix mat:
1 2 3
4 5 6
7 8 9
After the assignment, mat = 
1 2 3
4 1 2
7 4 5

```
 |

 Now, `mat(2,2)` equals 5 after the assignment, as it should be.

 The same solution also works for the second example, with the transpose: simply replace the line `a = a.transpose();` with `a = a.transpose().eval();`. However, in this common case there is a better solution. Eigen provides the special-purpose function [transposeInPlace()](classeigen_1_1densebase#ac501bd942994af7a95d95bee7a16ad2a)  which replaces a matrix by its transpose. This is shown below:

 

| Example | Output  |
| --- | --- |
| 
```
MatrixXf a(2,3); a << 1, 2, 3, 4, 5, 6;
cout << "Here is the initial matrix a:\n" << a << endl;
 
 
a.transposeInPlace();
cout << "and after being transposed:\n" << a << endl;

```
 | 
```
Here is the initial matrix a:
1 2 3
4 5 6
and after being transposed:
1 4
2 5
3 6

```
 |

 If an xxxInPlace() function is available, then it is best to use it, because it indicates more clearly what you are doing. This may also allow Eigen to optimize more aggressively. These are some of the xxxInPlace() functions provided:

 

| Original function | In-place function  |
| --- | --- |
| [MatrixBase::adjoint()](classeigen_1_1matrixbase#afacca1f88da57e5cd87dd07c8ff926bb) | [MatrixBase::adjointInPlace()](classeigen_1_1matrixbase#a51c5982c1f64e45a939515b701fa6f4a) |
| [DenseBase::reverse()](classeigen_1_1densebase#a38ea394036d8b096abf322469c80198f) | [DenseBase::reverseInPlace()](classeigen_1_1densebase#adb8045155ea45f7961fc2a5170e1d921) |
| [LDLT::solve()](classeigen_1_1ldlt#aa257dd7a8acf8b347d5a22a13d6ca3e1) | LDLT::solveInPlace()  |
| [LLT::solve()](classeigen_1_1llt#a3738bb3ce6f9b837a2beb432b937499f) | LLT::solveInPlace()  |
| TriangularView::solve()  | TriangularView::solveInPlace()  |
| [DenseBase::transpose()](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c) | [DenseBase::transposeInPlace()](classeigen_1_1densebase#ac501bd942994af7a95d95bee7a16ad2a) |

 In the special case where a matrix or vector is shrunk using an expression like `vec = vec.head(n)`, you can use [conservativeResize()](classeigen_1_1plainobjectbase#a712c25be1652e5a64a00f28c8ed11462) .

 
 Aliasing and component-wise operations
========================================

 As explained above, it may be dangerous if the same matrix or array occurs on both the left-hand side and the right-hand side of an assignment operator, and it is then often necessary to evaluate the right-hand side explicitly. However, applying component-wise operations (such as matrix addition, scalar multiplication and array multiplication) is safe.

 The following example has only component-wise operations. Thus, there is no need for [eval()](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b)  even though the same matrix appears on both sides of the assignments.

 

| Example | Output  |
| --- | --- |
| 
```
MatrixXf mat(2,2); 
mat << 1, 2,  4, 7;
cout << "Here is the matrix mat:\n" << mat << endl << endl;
 
mat = 2 * mat;
cout << "After 'mat = 2 \* mat', mat = \n" << mat << endl << endl;
 
 
mat = mat - [MatrixXf::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)(2,2);
cout << "After the subtraction, it becomes\n" << mat << endl << endl;
 
 
ArrayXXf arr = mat;
arr = arr.square();
cout << "After squaring, it becomes\n" << arr << endl << endl;
 
// Combining all operations in one statement:
mat << 1, 2,  4, 7;
mat = (2 * mat - [MatrixXf::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)(2,2)).array().square();
cout << "Doing everything at once yields\n" << mat << endl << endl;
```
 | 
```
Here is the matrix mat:
1 2
4 7

After 'mat = 2 * mat', mat = 
 2  4
 8 14

After the subtraction, it becomes
 1  4
 8 13

After squaring, it becomes
  1  16
 64 169

Doing everything at once yields
  1  16
 64 169


```
 |

 In general, an assignment is safe if the (i,j) entry of the expression on the right-hand side depends only on the (i,j) entry of the matrix or array on the left-hand side and not on any other entries. In that case it is not necessary to evaluate the right-hand side explicitly.

 
 Aliasing and matrix multiplication
====================================

 [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") multiplication is the only operation in Eigen that assumes aliasing by default, **under the condition that the destination matrix is not resized**. Thus, if `matA` is a **squared** matrix, then the statement `matA = matA * matA;` is safe. All other operations in Eigen assume that there are no aliasing problems, either because the result is assigned to a different matrix or because it is a component-wise operation.

 

| Example | Output  |
| --- | --- |
| 
```
MatrixXf matA(2,2); 
matA << 2, 0,  0, 2;
matA = matA * matA;
cout << matA;

```
 | 
```
4 0
0 4
```
 |

 However, this comes at a price. When executing the expression `matA = matA * matA`, Eigen evaluates the product in a temporary matrix which is assigned to `matA` after the computation. This is fine. But Eigen does the same when the product is assigned to a different matrix (e.g., `matB = matA * matA`). In that case, it is more efficient to evaluate the product directly into `matB` instead of evaluating it first into a temporary matrix and copying that matrix to `matB`.

 The user can indicate with the [noalias()](classeigen_1_1matrixbase#a2c1085de7645f23f240876388457da0b) function that there is no aliasing, as follows: `matB.noalias() = matA * matA`. This allows Eigen to evaluate the matrix product `matA * matA` directly into `matB`.

 

| Example | Output  |
| --- | --- |
| 
```
MatrixXf matA(2,2), matB(2,2); 
matA << 2, 0,  0, 2;
 
// Simple but not quite as efficient
matB = matA * matA;
cout << matB << endl << endl;
 
// More complicated but also more efficient
matB.noalias() = matA * matA;
cout << matB;

```
 | 
```
4 0
0 4

4 0
0 4
```
 |

 Of course, you should not use `noalias()` when there is in fact aliasing taking place. If you do, then you may get wrong results:

 

| Example | Output  |
| --- | --- |
| 
```
MatrixXf matA(2,2); 
matA << 2, 0,  0, 2;
matA.noalias() = matA * matA;
cout << matA;

```
 | 
```
4 0
0 4
```
 |

 Moreover, starting in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3, aliasing is **not** assumed if the destination matrix is resized and the product is not directly assigned to the destination. Therefore, the following example is also wrong:

 

| Example | Output  |
| --- | --- |
| 
```
MatrixXf A(2,2), B(3,2);
B << 2, 0,  0, 3, 1, 1;
A << 2, 0, 0, -2;
A = (B * A).cwiseAbs();
cout << A;

```
 | 
```
4 0
0 6
2 2
```
 |

 As for any aliasing issue, you can resolve it by explicitly evaluating the expression prior to assignment: 




| Example | Output  |
| --- | --- |
| 
```
MatrixXf A(2,2), B(3,2);
B << 2, 0,  0, 3, 1, 1;
A << 2, 0, 0, -2;
A = (B * A).eval().cwiseAbs();
cout << A;

```
 | 
```
4 0
0 6
2 2
```
 |

 
 Summary
=========

 Aliasing occurs when the same matrix or array coefficients appear both on the left- and the right-hand side of an assignment operator.


* Aliasing is harmless with coefficient-wise computations; this includes scalar multiplication and matrix or array addition.
* When you multiply two matrices, Eigen assumes that aliasing occurs. If you know that there is no aliasing, then you can use [noalias()](classeigen_1_1matrixbase#a2c1085de7645f23f240876388457da0b).
* In all other situations, Eigen assumes that there is no aliasing issue and thus gives the wrong result if aliasing does in fact occur. To prevent this, you have to use [eval()](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b)  or one of the xxxInPlace() functions.

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TopicAliasing.html>

Explanation of the assertion on unaligned arrays
================================================

  Hello! You are seeing this webpage because your program terminated on an assertion failure like this one: 



```

my_program: path/to/eigen/Eigen/src/Core/DenseStorage.h:44:
Eigen::internal::matrix_array<T, Size, MatrixOptions, Align>::internal::matrix_array()
[with T = double, int Size = 2, int MatrixOptions = 2, bool Align = true]:
Assertion `(reinterpret_cast<size_t>(array) & (sizemask)) == 0 && "this assertion
is explained here: <http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html>
     READ THIS WEB PAGE !!! ****"' failed.

```

There are 4 known causes for this issue. If you can target [c++17] only with a recent compiler (e.g., GCC>=7, clang>=5, MSVC>=19.12), then you're lucky: enabling c++17 should be enough (if not, please [report](http://eigen.tuxfamily.org/bz/) to us). Otherwise, please read on to understand those issues and learn how to fix them.

 
 Where in my own code is the cause of the problem?
===================================================

 First of all, you need to find out where in your own code this assertion was triggered from. At first glance, the error message doesn't look helpful, as it refers to a file inside Eigen! However, since your program crashed, if you can reproduce the crash, you can get a backtrace using any debugger. For example, if you're using GCC, you can use the GDB debugger as follows: 



```
$ gdb ./my_program          # Start GDB on your program
> run                       # Start running your program
...                         # Now reproduce the crash!
> bt                        # Obtain the backtrace

```

 Now that you know precisely where in your own code the problem is happening, read on to understand what you need to change.

 
 Cause 1: Structures having Eigen objects as members
=====================================================

 If you have code like this,

 
```
class Foo
{
  //...
  [Eigen::Vector4d](classeigen_1_1matrix) v;
  //...
};
//...
Foo *foo = new Foo;
```

then you need to read this separate page: [Structures Having Eigen Members](group__topicstructhavingeigenmembers).

 Note that here, Eigen::Vector4d is only used as an example, more generally the issue arises for all [fixed-size vectorizable Eigen types](group__topicfixedsizevectorizable).

 
 Cause 2: STL Containers or manual memory allocation
=====================================================

 If you use STL Containers such as std::vector, std::map, ..., with Eigen objects, or with classes containing Eigen objects, like this,

 
```
std::vector<Eigen::Matrix2d> my_vector;
struct my_class { ... [Eigen::Matrix2d](classeigen_1_1matrix) m; ... };
std::map<int, my_class> my_map;

```

then you need to read this separate page: [Using STL Containers with Eigen](group__topicstlcontainers).

 Note that here, Eigen::Matrix2d is only used as an example, more generally the issue arises for all [fixed-size vectorizable Eigen types](group__topicfixedsizevectorizable) and [structures having such Eigen objects as member](group__topicstructhavingeigenmembers).

 The same issue will be exhibited by any classes/functions by-passing operator new to allocate memory, that is, by performing custom memory allocation followed by calls to the placement new operator. This is for instance typically the case of ``std::make_shared`` or `std::allocate_shared` for which is the solution is to use an [aligned allocator](classeigen_1_1aligned__allocator) as detailed in the [solution for STL containers](group__topicstlcontainers).

 
 Cause 3: Passing Eigen objects by value
=========================================

 If some function in your code is getting an Eigen object passed by value, like this,

 
```
void func([Eigen::Vector4d](classeigen_1_1matrix) v);

```

then you need to read this separate page: [Passing Eigen objects by value to functions](group__topicpassingbyvalue).

 Note that here, Eigen::Vector4d is only used as an example, more generally the issue arises for all [fixed-size vectorizable Eigen types](group__topicfixedsizevectorizable).

 
 Cause 4: Compiler making a wrong assumption on stack alignment (for instance GCC on Windows)
==============================================================================================

 This is a must-read for people using GCC on Windows (like MinGW or TDM-GCC). If you have this assertion failure in an innocent function declaring a local variable like this:

 
```
void foo()
{
  [Eigen::Quaternionf](classeigen_1_1quaternion) q;
  //...
}
```

then you need to read this separate page: [Compiler making a wrong assumption on stack alignment](group__topicwrongstackalignment).

 Note that here, [Eigen::Quaternionf](group__geometry__module#ga66aa915a26d698c60ed206818c3e4c9b) is only used as an example, more generally the issue arises for all [fixed-size vectorizable Eigen types](group__topicfixedsizevectorizable).

 
 General explanation of this assertion
=======================================

 [Fixed-size vectorizable Eigen objects](group__topicfixedsizevectorizable) must absolutely be created at properly aligned locations, otherwise SIMD instructions addressing them will crash. For instance, SSE/NEON/MSA/Altivec/VSX targets will require 16-byte-alignment, whereas AVX and AVX512 targets may require up to 32 and 64 byte alignment respectively.

 Eigen normally takes care of these alignment issues for you, by setting an alignment attribute on them and by overloading their `operator new`.

 However there are a few corner cases where these alignment settings get overridden: they are the possible causes for this assertion.

 
 I don't care about optimal vectorization, how do I get rid of that stuff?
===========================================================================

 Three possibilities: 


* Use the `DontAlign` option to [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."), [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations."), [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations."), etc. objects that gives you trouble. This way Eigen won't try to over-align them, and thus won"t assume any special alignment. On the down side, you will pay the cost of unaligned loads/stores for them, but on modern CPUs, the overhead is either null or marginal. See [here](group__topicstructhavingeigenmembers#StructHavingEigenMembers_othersolutions)  for an example.
* Define [EIGEN\_MAX\_STATIC\_ALIGN\_BYTES](topicpreprocessordirectives#TopicPreprocessorDirectivesPerformance)  to 0. That disables all 16-byte (and above) static alignment code, while keeping 16-byte (or above) heap alignment. This has the effect of vectorizing fixed-size objects (like Matrix4d) through unaligned stores (as controlled by [EIGEN\_UNALIGNED\_VECTORIZE](topicpreprocessordirectives#TopicPreprocessorDirectivesPerformance) ), while keeping unchanged the vectorization of dynamic-size objects (like MatrixXd). On 64 bytes systems, you might also define it 16 to disable only 32 and 64 bytes of over-alignment. But do note that this breaks ABI compatibility with the default behavior of static alignment.
* Or define both [EIGEN\_DONT\_VECTORIZE](topicpreprocessordirectives#TopicPreprocessorDirectivesPerformance)  and `EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT`. This keeps the 16-byte (or above) alignment code and thus preserves ABI compatibility, but completely disables vectorization.

 If you want to know why defining `EIGEN_DONT_VECTORIZE` does not by itself disable 16-byte (or above) alignment and the assertion, here's the explanation:

 It doesn't disable the assertion, because otherwise code that runs fine without vectorization would suddenly crash when enabling vectorization. It doesn't disable 16-byte (or above) alignment, because that would mean that vectorized and non-vectorized code are not mutually ABI-compatible. This ABI compatibility is very important, even for people who develop only an in-house application, as for instance one may want to have in the same application a vectorized path and a non-vectorized path.

 
 How can I check my code is safe regarding alignment issues?
=============================================================

 Unfortunately, there is no possibility in c++ to detect any of the aforementioned shortcoming at compile time (though static analyzers are becoming more and more powerful and could detect some of them). Even at runtime, all we can do is to catch invalid unaligned allocation and trigger the explicit assertion mentioned at the beginning of this page. Therefore, if your program runs fine on a given system with some given compilation flags, then this does not guarantee that your code is safe. For instance, on most 64 bits systems buffer are aligned on 16 bytes boundary and so, if you do not enable AVX instruction set, then your code will run fine. On the other hand, the same code may assert if moving to a more exotic platform, or enabling AVX instructions that required 32 bytes alignment by default.

 The situation is not hopeless though. Assuming your code is well covered by unit test, then you can check its alignment safety by linking it to a custom malloc library returning 8 bytes aligned buffers only. This way all alignment shortcomings should pop-up. To this end, you must also compile your program with [EIGEN\_MALLOC\_ALREADY\_ALIGNED=0](topicpreprocessordirectives#TopicPreprocessorDirectivesPerformance) . 

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TopicUnalignedArrayAssert.html>

Solving Sparse Linear Systems
=============================

  In [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."), there are several methods available to solve linear systems when the coefficient matrix is sparse. Because of the special representation of this class of matrices, special care should be taken in order to get a good performance. See [Sparse matrix manipulations](group__tutorialsparse) for a detailed introduction about sparse matrices in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."). This page lists the sparse solvers available in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."). The main steps that are common to all these linear solvers are introduced as well. Depending on the properties of the matrix, the desired accuracy, the end-user is able to tune those steps in order to improve the performance of its code. Note that it is not required to know deeply what's hiding behind these steps: the last section presents a benchmark routine that can be easily used to get an insight on the performance of all the available solvers.

 
 List of sparse solvers
========================

 Eigen currently provides a wide set of built-in solvers, as well as wrappers to external solver libraries. They are summarized in the following tables:

 
 Built-in direct solvers
-------------------------

 

| Class | Solver kind | [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") kind | Features related to performance  | License |  Notes   |
| --- | --- | --- | --- | --- | --- |
| [SimplicialLLT](classeigen_1_1simplicialllt "A direct sparse LLT Cholesky factorizations.")  `#include<Eigen/[SparseCholesky](group__sparsecholesky__module)>` | Direct LLt factorization | SPD | Fill-in reducing  | LGPL  | [SimplicialLDLT](classeigen_1_1simplicialldlt "A direct sparse LDLT Cholesky factorizations without square root.") is often preferable  |
| [SimplicialLDLT](classeigen_1_1simplicialldlt "A direct sparse LDLT Cholesky factorizations without square root.")  `#include<Eigen/[SparseCholesky](group__sparsecholesky__module)>` | Direct LDLt factorization | SPD | Fill-in reducing  | LGPL  | Recommended for very sparse and not too large problems (e.g., 2D Poisson eq.)  |
| [SparseLU](classeigen_1_1sparselu "Sparse supernodal LU factorization for general matrices.")  `#include<Eigen/[SparseLU](group__sparselu__module)>` | LU factorization  | Square  | Fill-in reducing, Leverage fast dense algebra  | MPL2  | optimized for small and large problems with irregular patterns   |
| [SparseQR](classeigen_1_1sparseqr "Sparse left-looking QR factorization with numerical column pivoting.")  `#include<Eigen/[SparseQR](group__sparseqr__module)>` | QR factorization  | Any, rectangular | Fill-in reducing  | MPL2  | recommended for least-square problems, has a basic rank-revealing feature  |

 
 Built-in iterative solvers
----------------------------

 

| Class | Solver kind | [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") kind | Supported preconditioners, [default]  | License |  Notes   |
| --- | --- | --- | --- | --- | --- |
| [ConjugateGradient](classeigen_1_1conjugategradient "A conjugate gradient solver for sparse (or dense) self-adjoint problems.")  `#include<Eigen/[IterativeLinearSolvers](group__iterativelinearsolvers__module)>` | Classic iterative CG | SPD  | [IdentityPreconditioner](classeigen_1_1identitypreconditioner "A naive preconditioner which approximates any matrix as the identity matrix."), [[DiagonalPreconditioner](classeigen_1_1diagonalpreconditioner "A preconditioner based on the digonal entries.")], [IncompleteCholesky](classeigen_1_1incompletecholesky "Modified Incomplete Cholesky with dual threshold.") | MPL2  | Recommended for large symmetric problems (e.g., 3D Poisson eq.)  |
| [LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient "A conjugate gradient solver for sparse (or dense) least-square problems.")  `#include<Eigen/[IterativeLinearSolvers](group__iterativelinearsolvers__module)>` | CG for rectangular least-square problem | Rectangular  | [IdentityPreconditioner](classeigen_1_1identitypreconditioner "A naive preconditioner which approximates any matrix as the identity matrix."), [[LeastSquareDiagonalPreconditioner](classeigen_1_1leastsquarediagonalpreconditioner "Jacobi preconditioner for LeastSquaresConjugateGradient.")]  | MPL2  | [Solve](classeigen_1_1solve "Pseudo expression representing a solving operation.") for min |A'Ax-b|^2 without forming A'A  |
| [BiCGSTAB](classeigen_1_1bicgstab "A bi conjugate gradient stabilized solver for sparse square problems.")  `#include<Eigen/[IterativeLinearSolvers](group__iterativelinearsolvers__module)>` | Iterative stabilized bi-conjugate gradient | Square  | [IdentityPreconditioner](classeigen_1_1identitypreconditioner "A naive preconditioner which approximates any matrix as the identity matrix."), [[DiagonalPreconditioner](classeigen_1_1diagonalpreconditioner "A preconditioner based on the digonal entries.")], [IncompleteLUT](classeigen_1_1incompletelut "Incomplete LU factorization with dual-threshold strategy.") | MPL2  | To speedup the convergence, try it with the [IncompleteLUT](classeigen_1_1incompletelut) preconditioner.  |

 
 Wrappers to external solvers
------------------------------

 

| Class | Module | Solver kind | [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") kind | Features related to performance  | Dependencies,License |  Notes  |
| --- | --- | --- | --- | --- | --- | --- |
| [PastixLLT](classeigen_1_1pastixllt "A sparse direct supernodal Cholesky (LLT) factorization and solver based on the PaStiX library.")  [PastixLDLT](classeigen_1_1pastixldlt "A sparse direct supernodal Cholesky (LLT) factorization and solver based on the PaStiX library.")  [PastixLU](classeigen_1_1pastixlu "Interface to the PaStix solver.") | [PaStiXSupport](group__pastixsupport__module)  | Direct LLt, LDLt, LU factorizations | SPD  SPD  Square | Fill-in reducing, Leverage fast dense algebra, Multithreading  | Requires the [PaStiX](http://pastix.gforge.inria.fr) package, **CeCILL-C** | optimized for tough problems and symmetric patterns  |
| [CholmodSupernodalLLT](classeigen_1_1cholmodsupernodalllt "A supernodal Cholesky (LLT) factorization and solver based on Cholmod.") | [CholmodSupport](group__cholmodsupport__module)  | Direct LLt factorization | SPD | Fill-in reducing, Leverage fast dense algebra  | Requires the [SuiteSparse](http://www.suitesparse.com) package, **GPL** |  |
| [UmfPackLU](classeigen_1_1umfpacklu "A sparse LU factorization and solver based on UmfPack.") | [UmfPackSupport](group__umfpacksupport__module)  | Direct LU factorization | Square | Fill-in reducing, Leverage fast dense algebra  | Requires the [SuiteSparse](http://www.suitesparse.com) package, **GPL** |  |
| KLU | [KLUSupport](group__klusupport__module)  | Direct LU factorization | Square | Fill-in reducing, suitted for circuit simulation  | Requires the [SuiteSparse](http://www.suitesparse.com) package, **GPL** |  |
| [SuperLU](classeigen_1_1superlu "A sparse direct LU factorization and solver based on the SuperLU library.") | [SuperLUSupport](group__superlusupport__module)  | Direct LU factorization | Square | Fill-in reducing, Leverage fast dense algebra  | Requires the [SuperLU](http://crd-legacy.lbl.gov/~xiaoye/SuperLU/) library, (BSD-like)  |  |
| [SPQR](classeigen_1_1spqr "Sparse QR factorization based on SuiteSparseQR library.") | [SPQRSupport](group__spqrsupport__module)  | QR factorization  | Any, rectangular | fill-in reducing, multithreaded, fast dense algebra  | requires the [SuiteSparse](http://www.suitesparse.com) package, **GPL** | recommended for linear least-squares problems, has a rank-revealing feature  |
| [PardisoLLT](classeigen_1_1pardisollt "A sparse direct Cholesky (LLT) factorization and solver based on the PARDISO library.")  [PardisoLDLT](classeigen_1_1pardisoldlt "A sparse direct Cholesky (LDLT) factorization and solver based on the PARDISO library.")  [PardisoLU](classeigen_1_1pardisolu "A sparse direct LU factorization and solver based on the PARDISO library.") | [PardisoSupport](group__pardisosupport__module)  | Direct LLt, LDLt, LU factorizations | SPD  SPD  Square | Fill-in reducing, Leverage fast dense algebra, Multithreading  | Requires the [Intel MKL](http://eigen.tuxfamily.org/Counter/redirect_to_mkl.php) package, **Proprietary** | optimized for tough problems patterns, see also [using MKL with Eigen](topicusingintelmkl)  |

 Here `SPD` means symmetric positive definite.

 
 Sparse solver concept
=======================

 All these solvers follow the same general concept. Here is a typical and general example: 



```
#include <Eigen/RequiredModuleName>
// ...
SparseMatrix<double> A;
// fill A
VectorXd b, x;
// fill b
// solve Ax = b
SolverClassName<SparseMatrix<double> > solver;
solver.compute(A);
if(solver.info()!=[Success](group__enums#gga85fad7b87587764e5cf6b513a9e0ee5ea671a2aeb0f527802806a441d58a80fcf)) {
  // decomposition failed
  return;
}
x = solver.solve(b);
if(solver.info()!=[Success](group__enums#gga85fad7b87587764e5cf6b513a9e0ee5ea671a2aeb0f527802806a441d58a80fcf)) {
  // solving failed
  return;
}
// solve for another right hand side:
x1 = solver.solve(b1);
```

For `SPD` solvers, a second optional template argument allows to specify which triangular part have to be used, e.g.:

 
```
#include <Eigen/IterativeLinearSolvers>
 
ConjugateGradient<SparseMatrix<double>, [Eigen::Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)> solver;
x = solver.compute(A).solve(b);
```

 In the above example, only the upper triangular part of the input matrix A is considered for solving. The opposite triangle might either be empty or contain arbitrary values.

 In the case where multiple problems with the same sparsity pattern have to be solved, then the "compute" step can be decomposed as follow: 



```
SolverClassName<SparseMatrix<double> > solver;
solver.analyzePattern(A);   // for this step the numerical values of A are not used
solver.factorize(A);
x1 = solver.solve(b1);
x2 = solver.solve(b2);
...
A = ...;                    // modify the values of the nonzeros of A, the nonzeros pattern must stay unchanged
solver.factorize(A);
x1 = solver.solve(b1);
x2 = solver.solve(b2);
...

```

 The compute() method is equivalent to calling both analyzePattern() and factorize().

 Each solver provides some specific features, such as determinant, access to the factors, controls of the iterations, and so on. More details are available in the documentations of the respective classes.

 Finally, most of the iterative solvers, can also be used in a **matrix-free** context, see the following [example](group__matrixfreesolverexample) .

 
 The Compute Step
==================

 In the compute() function, the matrix is generally factorized: [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") for self-adjoint matrices, [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") for general hermitian matrices, LU for non hermitian matrices and QR for rectangular matrices. These are the results of using direct solvers. For this class of solvers precisely, the compute step is further subdivided into analyzePattern() and factorize().

 The goal of analyzePattern() is to reorder the nonzero elements of the matrix, such that the factorization step creates less fill-in. This step exploits only the structure of the matrix. Hence, the results of this step can be used for other linear systems where the matrix has the same structure. Note however that sometimes, some external solvers (like [SuperLU](classeigen_1_1superlu "A sparse direct LU factorization and solver based on the SuperLU library.")) require that the values of the matrix are set in this step, for instance to equilibrate the rows and columns of the matrix. In this situation, the results of this step should not be used with other matrices.

 [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") provides a limited set of methods to reorder the matrix in this step, either built-in (COLAMD, AMD) or external (METIS). These methods are set in template parameter list of the solver : 



```
DirectSolverClassName<SparseMatrix<double>, OrderingMethod<IndexType> > solver;

```

See the [OrderingMethods module](group__orderingmethods__module)  for the list of available methods and the associated options.

 In factorize(), the factors of the coefficient matrix are computed. This step should be called each time the values of the matrix change. However, the structural pattern of the matrix should not change between multiple calls.

 For iterative solvers, the compute step is used to eventually setup a preconditioner. For instance, with the ILUT preconditioner, the incomplete factors L and U are computed in this step. Remember that, basically, the goal of the preconditioner is to speedup the convergence of an iterative method by solving a modified linear system where the coefficient matrix has more clustered eigenvalues. For real problems, an iterative solver should always be used with a preconditioner. In [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."), a preconditioner is selected by simply adding it as a template parameter to the iterative solver object. 



```
IterativeSolverClassName<SparseMatrix<double>, PreconditionerName<SparseMatrix<double> > solver; 

```

 The member function preconditioner() returns a read-write reference to the preconditioner to directly interact with it. See the [Iterative solvers module](group__iterativelinearsolvers__module)  and the documentation of each class for the list of available methods.

 
 The Solve step
================

 The solve() function computes the solution of the linear systems with one or many right hand sides. 



```
X = solver.solve(B);

```

 Here, B can be a vector or a matrix where the columns form the different right hand sides. The solve() function can be called several times as well, for instance when all the right hand sides are not available at once. 



```
x1 = solver.solve(b1);
// Get the second right hand side b2
x2 = solver.solve(b2); 
// ...

```

 For direct methods, the solution are computed at the machine precision. Sometimes, the solution need not be too accurate. In this case, the iterative methods are more suitable and the desired accuracy can be set before the solve step using **setTolerance()**. For all the available functions, please, refer to the documentation of the [Iterative solvers module](group__iterativelinearsolvers__module) .

 
 BenchmarkRoutine
==================

 Most of the time, all you need is to know how much time it will take to solve your system, and hopefully, what is the most suitable solver. In [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."), we provide a benchmark routine that can be used for this purpose. It is very easy to use. In the build directory, navigate to bench/spbench and compile the routine by typing **make** *spbenchsolver*. Run it with –help option to get the list of all available options. Basically, the matrices to test should be in [MatrixMarket Coordinate format](http://math.nist.gov/MatrixMarket/formats.html), and the routine returns the statistics from all available solvers in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.").

 To export your matrices and right-hand-side vectors in the matrix-market format, you can the the unsupported SparseExtra module: 



```
#include <unsupported/Eigen/SparseExtra>
...
Eigen::saveMarket(A, "filename.mtx");
Eigen::saveMarket(A, "filename\_SPD.mtx", [Eigen::Symmetric](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdad5381b2d1c8973a08303c94e7da02333)); // if A is symmetric-positive-definite
Eigen::saveMarketVector(B, "filename\_b.mtx");
```

The following table gives an example of XML statistics from several [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") built-in and external solvers. 




| [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") | N  | NNZ  |  | UMFPACK  | SUPERLU  | PASTIX LU  | [BiCGSTAB](classeigen_1_1bicgstab "A bi conjugate gradient stabilized solver for sparse square problems.") | BiCGSTAB+ILUT  | GMRES+ILUT | [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") | CHOLMOD [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") | PASTIX [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") | [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") | CHOLMOD SP [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") | CHOLMOD [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") | PASTIX [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") | CG  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| vector\_graphics  | 12855  | 72069  | Compute Time  | 0.0254549 | 0.0215677 | 0.0701827 | 0.000153388 | 0.0140107 | 0.0153709 | 0.0101601 | 0.00930502 | 0.0649689  |
| [Solve](classeigen_1_1solve "Pseudo expression representing a solving operation.") Time  | 0.00337835 | 0.000951826 | 0.00484373 | 0.0374886 | 0.0046445 | 0.00847754 | 0.000541813 | 0.000293696 | 0.00485376  |
| Total Time  | 0.0288333 | 0.0225195 | 0.0750265 | 0.037642 | 0.0186552 | 0.0238484 | 0.0107019 | 0.00959871 | 0.0698227  |
| Error(Iter)  | 1.299e-16  | 2.04207e-16  | 4.83393e-15  | 3.94856e-11 (80)  | 1.03861e-12 (3)  | 5.81088e-14 (6)  | 1.97578e-16  | 1.83927e-16  | 4.24115e-15  |
| poisson\_SPD  | 19788  | 308232  | Compute Time  | 0.425026 | 1.82378 | 0.617367 | 0.000478921 | 1.34001 | 1.33471 | 0.796419 | 0.857573 | 0.473007 | 0.814826 | 0.184719 | 0.861555 | 0.470559 | 0.000458188  |
| [Solve](classeigen_1_1solve "Pseudo expression representing a solving operation.") Time  | 0.0280053 | 0.0194402 | 0.0268747 | 0.249437 | 0.0548444 | 0.0926991 | 0.00850204 | 0.0053171 | 0.0258932 | 0.00874603 | 0.00578155 | 0.00530361 | 0.0248942 | 0.239093  |
| Total Time  | 0.453031 | 1.84322 | 0.644241 | 0.249916 | 1.39486 | 1.42741 | 0.804921 | 0.862891 | 0.4989 | 0.823572 | 0.190501 | 0.866859 | 0.495453 | 0.239551  |
| Error(Iter)  | 4.67146e-16  | 1.068e-15  | 1.3397e-15  | 6.29233e-11 (201)  | 3.68527e-11 (6)  | 3.3168e-15 (16)  | 1.86376e-15  | 1.31518e-16  | 1.42593e-15  | 3.45361e-15  | 3.14575e-16  | 2.21723e-15  | 7.21058e-16  | 9.06435e-12 (261)  |
| sherman2  | 1080  | 23094  | Compute Time  | 0.00631754 | 0.015052 | 0.0247514  | - | 0.0214425 | 0.0217988  |
| [Solve](classeigen_1_1solve "Pseudo expression representing a solving operation.") Time  | 0.000478424 | 0.000337998 | 0.0010291  | - | 0.00243152 | 0.00246152  |
| Total Time  | 0.00679597 | 0.01539 | 0.0257805  | - | 0.023874 | 0.0242603  |
| Error(Iter)  | 1.83099e-15  | 8.19351e-15  | 2.625e-14  | 1.3678e+69 (1080)  | 4.1911e-12 (7)  | 5.0299e-13 (12)  |
| bcsstk01\_SPD  | 48  | 400  | Compute Time  | 0.000169079 | 0.00010789 | 0.000572538 | 1.425e-06 | 9.1612e-05 | 8.3985e-05 | 5.6489e-05 | 7.0913e-05 | 0.000468251 | 5.7389e-05 | 8.0212e-05 | 5.8394e-05 | 0.000463017 | 1.333e-06  |
| [Solve](classeigen_1_1solve "Pseudo expression representing a solving operation.") Time  | 1.2288e-05 | 1.1124e-05 | 0.000286387 | 8.5896e-05 | 1.6381e-05 | 1.6984e-05 | 3.095e-06 | 4.115e-06 | 0.000325438 | 3.504e-06 | 7.369e-06 | 3.454e-06 | 0.000294095 | 6.0516e-05  |
| Total Time  | 0.000181367 | 0.000119014 | 0.000858925 | 8.7321e-05 | 0.000107993 | 0.000100969 | 5.9584e-05 | 7.5028e-05 | 0.000793689 | 6.0893e-05 | 8.7581e-05 | 6.1848e-05 | 0.000757112 | 6.1849e-05  |
| Error(Iter)  | 1.03474e-16  | 2.23046e-16  | 2.01273e-16  | 4.87455e-07 (48)  | 1.03553e-16 (2)  | 3.55965e-16 (2)  | 2.48189e-16  | 1.88808e-16  | 1.97976e-16  | 2.37248e-16  | 1.82701e-16  | 2.71474e-16  | 2.11322e-16  | 3.547e-09 (48)  |
| sherman1  | 1000  | 3750  | Compute Time  | 0.00228805 | 0.00209231 | 0.00528268 | 9.846e-06 | 0.00163522 | 0.00162155 | 0.000789259 | 0.000804495 | 0.00438269  |
| [Solve](classeigen_1_1solve "Pseudo expression representing a solving operation.") Time  | 0.000213788 | 9.7983e-05 | 0.000938831 | 0.00629835 | 0.000361764 | 0.00078794 | 4.3989e-05 | 2.5331e-05 | 0.000917166  |
| Total Time  | 0.00250184 | 0.00219029 | 0.00622151 | 0.0063082 | 0.00199698 | 0.00240949 | 0.000833248 | 0.000829826 | 0.00529986  |
| Error(Iter)  | 1.16839e-16  | 2.25968e-16  | 2.59116e-16  | 3.76779e-11 (248)  | 4.13343e-11 (4)  | 2.22347e-14 (10)  | 2.05861e-16  | 1.83555e-16  | 1.02917e-15  |
| young1c  | 841  | 4089  | Compute Time  | 0.00235843 | 0.00217228 | 0.00568075 | 1.2735e-05 | 0.00264866 | 0.00258236  |
| [Solve](classeigen_1_1solve "Pseudo expression representing a solving operation.") Time  | 0.000329599 | 0.000168634 | 0.00080118 | 0.0534738 | 0.00187193 | 0.00450211  |
| Total Time  | 0.00268803 | 0.00234091 | 0.00648193 | 0.0534865 | 0.00452059 | 0.00708447  |
| Error(Iter)  | 1.27029e-16  | 2.81321e-16  | 5.0492e-15  | 8.0507e-11 (706)  | 3.00447e-12 (8)  | 1.46532e-12 (16)  |
| mhd1280b  | 1280  | 22778  | Compute Time  | 0.00234898 | 0.00207079 | 0.00570918 | 2.5976e-05 | 0.00302563 | 0.00298036 | 0.00144525 | 0.000919922 | 0.00426444  |
| [Solve](classeigen_1_1solve "Pseudo expression representing a solving operation.") Time  | 0.00103392 | 0.000211911 | 0.00105 | 0.0110432 | 0.000628287 | 0.00392089 | 0.000138303 | 6.2446e-05 | 0.00097564  |
| Total Time  | 0.0033829 | 0.0022827 | 0.00675918 | 0.0110692 | 0.00365392 | 0.00690124 | 0.00158355 | 0.000982368 | 0.00524008  |
| Error(Iter)  | 1.32953e-16  | 3.08646e-16  | 6.734e-16  | 8.83132e-11 (40)  | 1.51153e-16 (1)  | 6.08556e-16 (8)  | 1.89264e-16  | 1.97477e-16  | 6.68126e-09  |
| crashbasis  | 160000  | 1750416  | Compute Time  | 3.2019 | 5.7892 | 15.7573 | 0.00383515 | 3.1006 | 3.09921  |
| [Solve](classeigen_1_1solve "Pseudo expression representing a solving operation.") Time  | 0.261915 | 0.106225 | 0.402141 | 1.49089 | 0.24888 | 0.443673  |
| Total Time  | 3.46381 | 5.89542 | 16.1594 | 1.49473 | 3.34948 | 3.54288  |
| Error(Iter)  | 1.76348e-16  | 4.58395e-16  | 1.67982e-14  | 8.64144e-11 (61)  | 8.5996e-12 (2)  | 6.04042e-14 (5)  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TopicSparseSystems.html>

Matrix and vector arithmetic
============================

  This page aims to provide an overview and some details on how to perform arithmetic between matrices, vectors and scalars with [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.").

 
 Introduction
==============

 [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") offers matrix/vector arithmetic operations either through overloads of common C++ arithmetic operators such as +, -, \*, or through special methods such as dot(), cross(), etc. For the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class (matrices and vectors), operators are only overloaded to support linear-algebraic operations. For example, `matrix1` `*` `matrix2` means matrix-matrix product, and `vector` `+` `scalar` is just not allowed. If you want to perform all kinds of array operations, not linear algebra, see the [next page](group__tutorialarrayclass).

 
 Addition and subtraction
==========================

 The left hand side and right hand side must, of course, have the same numbers of rows and of columns. They must also have the same `Scalar` type, as [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") doesn't do automatic type promotion. The operators at hand here are: 


* binary operator + as in `a+b`
* binary operator - as in `a-b`
* unary operator - as in `-a`
* compound operator += as in `a+=b`
* compound operator -= as in `a-=b`

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace [Eigen](namespaceeigen);
 
int main()
{
  Matrix2d a;
  a << 1, 2,
       3, 4;
  MatrixXd b(2,2);
  b << 2, 3,
       1, 4;
  std::cout << "a + b =\n" << a + b << std::endl;
  std::cout << "a - b =\n" << a - b << std::endl;
  std::cout << "Doing a += b;" << std::endl;
  a += b;
  std::cout << "Now a =\n" << a << std::endl;
  Vector3d v(1,2,3);
  Vector3d w(1,0,0);
  std::cout << "-v + w - v =\n" << -v + w - v << std::endl;
}
```
 | 
```
a + b =
3 5
4 8
a - b =
-1 -1
 2  0
Doing a += b;
Now a =
3 5
4 8
-v + w - v =
-1
-4
-6

```
 |

 
 Scalar multiplication and division
====================================

 Multiplication and division by a scalar is very simple too. The operators at hand here are: 


* binary operator \* as in `matrix*scalar`
* binary operator \* as in `scalar*matrix`
* binary operator / as in `matrix/scalar`
* compound operator \*= as in `matrix*=scalar`
* compound operator /= as in `matrix/=scalar`

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace [Eigen](namespaceeigen);
 
int main()
{
  Matrix2d a;
  a << 1, 2,
       3, 4;
  Vector3d v(1,2,3);
  std::cout << "a \* 2.5 =\n" << a * 2.5 << std::endl;
  std::cout << "0.1 \* v =\n" << 0.1 * v << std::endl;
  std::cout << "Doing v \*= 2;" << std::endl;
  v *= 2;
  std::cout << "Now v =\n" << v << std::endl;
}

```
 | 
```
a * 2.5 =
2.5   5
7.5  10
0.1 * v =
0.1
0.2
0.3
Doing v *= 2;
Now v =
2
4
6

```
 |

 
 A note about expression templates
===================================

 This is an advanced topic that we explain on [this page](topiceigenexpressiontemplates), but it is useful to just mention it now. In [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."), arithmetic operators such as `operator+` don't perform any computation by themselves, they just return an "expression object" describing the computation to be performed. The actual computation happens later, when the whole expression is evaluated, typically in `operator=`. While this might sound heavy, any modern optimizing compiler is able to optimize away that abstraction and the result is perfectly optimized code. For example, when you do: 



```
VectorXf a(50), b(50), c(50), d(50);
...
a = 3*b + 4*c + 5*d;

```

 [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") compiles it to just one for loop, so that the arrays are traversed only once. Simplifying (e.g. ignoring SIMD optimizations), this loop looks like this: 



```
for(int i = 0; i < 50; ++i)
  a[i] = 3*b[i] + 4*c[i] + 5*d[i];

```

 Thus, you should not be afraid of using relatively large arithmetic expressions with [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."): it only gives [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") more opportunities for optimization.

 
 Transposition and conjugation
===============================

 The transpose \( a^T \), conjugate \( \bar{a} \), and adjoint (i.e., conjugate transpose) \( a^\* \) of a matrix or vector \( a \) are obtained by the member functions [transpose()](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c), [conjugate()](group__tutorialmatrixarithmetic), and [adjoint()](classeigen_1_1matrixbase#afacca1f88da57e5cd87dd07c8ff926bb), respectively.

 

| Example: | Output:  |
| --- | --- |
| 
```
MatrixXcf a = [MatrixXcf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(2,2);
cout << "Here is the matrix a\n" << a << endl;
 
cout << "Here is the matrix a^T\n" << a.transpose() << endl;
 
 
cout << "Here is the conjugate of a\n" << a.conjugate() << endl;
 
 
cout << "Here is the matrix a^\*\n" << a.adjoint() << endl;
 
 
```
 | 
```
Here is the matrix a
 (-0.211,0.68) (-0.605,0.823)
 (0.597,0.566)  (0.536,-0.33)
Here is the matrix a^T
 (-0.211,0.68)  (0.597,0.566)
(-0.605,0.823)  (0.536,-0.33)
Here is the conjugate of a
 (-0.211,-0.68) (-0.605,-0.823)
 (0.597,-0.566)    (0.536,0.33)
Here is the matrix a^*
 (-0.211,-0.68)  (0.597,-0.566)
(-0.605,-0.823)    (0.536,0.33)

```
 |

 For real matrices, `conjugate()` is a no-operation, and so `adjoint()` is equivalent to `transpose()`.

 As for basic arithmetic operators, `transpose()` and `adjoint()` simply return a proxy object without doing the actual transposition. If you do `b = a.transpose()`, then the transpose is evaluated at the same time as the result is written into `b`. However, there is a complication here. If you do `a = a.transpose()`, then [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") starts writing the result into `a` before the evaluation of the transpose is finished. Therefore, the instruction `a = a.transpose()` does not replace `a` with its transpose, as one would expect: 




| Example: | Output:  |
| --- | --- |
| 
```
Matrix2i a; a << 1, 2, 3, 4;
cout << "Here is the matrix a:\n" << a << endl;
 
a = a.transpose(); // !!! do NOT do this !!!
cout << "and the result of the aliasing effect:\n" << a << endl;

```
 | 
```
Here is the matrix a:
1 2
3 4
and the result of the aliasing effect:
1 2
2 4

```
 |

 This is the so-called [aliasing issue](group__topicaliasing). In "debug mode", i.e., when [assertions](topicassertions) have not been disabled, such common pitfalls are automatically detected.

 For *in-place* transposition, as for instance in `a = a.transpose()`, simply use the [transposeInPlace()](classeigen_1_1densebase#ac501bd942994af7a95d95bee7a16ad2a) function: 




| Example: | Output:  |
| --- | --- |
| 
```
MatrixXf a(2,3); a << 1, 2, 3, 4, 5, 6;
cout << "Here is the initial matrix a:\n" << a << endl;
 
 
a.transposeInPlace();
cout << "and after being transposed:\n" << a << endl;

```
 | 
```
Here is the initial matrix a:
1 2 3
4 5 6
and after being transposed:
1 4
2 5
3 6

```
 |

 There is also the [adjointInPlace()](classeigen_1_1matrixbase#a51c5982c1f64e45a939515b701fa6f4a) function for complex matrices.

 
 Matrix-matrix and matrix-vector multiplication
================================================

 Matrix-matrix multiplication is again done with `operator*`. Since vectors are a special case of matrices, they are implicitly handled there too, so matrix-vector product is really just a special case of matrix-matrix product, and so is vector-vector outer product. Thus, all these cases are handled by just two operators: 


* binary operator \* as in `a*b`
* compound operator \*= as in `a*=b` (this multiplies on the right: `a*=b` is equivalent to `a = a*b`)

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace [Eigen](namespaceeigen);
int main()
{
  Matrix2d mat;
  mat << 1, 2,
         3, 4;
  Vector2d u(-1,1), v(2,0);
  std::cout << "Here is mat\*mat:\n" << mat*mat << std::endl;
  std::cout << "Here is mat\*u:\n" << mat*u << std::endl;
  std::cout << "Here is u^T\*mat:\n" << u.transpose()*mat << std::endl;
  std::cout << "Here is u^T\*v:\n" << u.transpose()*v << std::endl;
  std::cout << "Here is u\*v^T:\n" << u*v.transpose() << std::endl;
  std::cout << "Let's multiply mat by itself" << std::endl;
  mat = mat*mat;
  std::cout << "Now mat is mat:\n" << mat << std::endl;
}

```
 | 
```
Here is mat*mat:
 7 10
15 22
Here is mat*u:
1
1
Here is u^T*mat:
2 2
Here is u^T*v:
-2
Here is u*v^T:
-2 -0
 2  0
Let's multiply mat by itself
Now mat is mat:
 7 10
15 22

```
 |

 Note: if you read the above paragraph on expression templates and are worried that doing `m=m*m` might cause aliasing issues, be reassured for now: [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") treats matrix multiplication as a special case and takes care of introducing a temporary here, so it will compile `m=m*m` as: 



```
tmp = m*m;
m = tmp;

```

 If you know your matrix product can be safely evaluated into the destination matrix without aliasing issue, then you can use the [noalias()](classeigen_1_1matrixbase#a2c1085de7645f23f240876388457da0b) function to avoid the temporary, e.g.: 



```
c.noalias() += a * b;

```

 For more details on this topic, see the page on [aliasing](group__topicaliasing).

 **Note:** for BLAS users worried about performance, expressions such as `c.noalias() -= 2 * a.adjoint() * b;` are fully optimized and trigger a single gemm-like function call.

 
 Dot product and cross product
===============================

 For dot product and cross product, you need the [dot()](classeigen_1_1matrixbase#adfd32bf5fcf6ee603c924dde9bf7bc39) and [cross()](group__geometry__module#ga0024b44eca99cb7135887c2aaf319d28) methods. Of course, the dot product can also be obtained as a 1x1 matrix as u.adjoint()\*v. 




| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace [Eigen](namespaceeigen);
using namespace std;
int main()
{
  Vector3d v(1,2,3);
  Vector3d w(0,1,2);
 
  cout << "Dot product: " << v.dot(w) << endl;
  double dp = v.adjoint()*w; // automatic conversion of the inner product to a scalar
  cout << "Dot product via a matrix product: " << dp << endl;
  cout << "Cross product:\n" << v.cross(w) << endl;
}

```
 | 
```
Dot product: 8
Dot product via a matrix product: 8
Cross product:
 1
-2
 1

```
 |

 Remember that cross product is only for vectors of size 3. Dot product is for vectors of any sizes. When using complex numbers, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s dot product is conjugate-linear in the first variable and linear in the second variable.

 
 Basic arithmetic reduction operations
=======================================

 [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") also provides some reduction operations to reduce a given matrix or vector to a single value such as the sum (computed by [sum()](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c)), product ([prod()](classeigen_1_1densebase#af119d9a4efe5a15cd83c1ccdf01b3a4f)), or the maximum ([maxCoeff()](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1)) and minimum ([minCoeff()](classeigen_1_1densebase#a0739f9c868c331031c7810e21838dcb2)) of all its coefficients.

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
int main()
{
  [Eigen::Matrix2d](classeigen_1_1matrix) mat;
  mat << 1, 2,
         3, 4;
  cout << "Here is mat.sum(): " << mat.[sum](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c)()       << endl;
  cout << "Here is mat.prod(): " << mat.[prod](classeigen_1_1densebase#af119d9a4efe5a15cd83c1ccdf01b3a4f)()      << endl;
  cout << "Here is mat.mean(): " << mat.[mean](classeigen_1_1densebase#a21ac6c0419a72ad7a88ea0bc189017d7)()      << endl;
  cout << "Here is mat.minCoeff(): " << mat.[minCoeff](classeigen_1_1densebase#a0739f9c868c331031c7810e21838dcb2)()  << endl;
  cout << "Here is mat.maxCoeff(): " << mat.[maxCoeff](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1)()  << endl;
  cout << "Here is mat.trace(): " << mat.[trace](classeigen_1_1matrixbase#a544b609f65eb2bd3e368b3fc2d79479e)()     << endl;
}
```
 | 
```
Here is mat.sum():       10
Here is mat.prod():      24
Here is mat.mean():      2.5
Here is mat.minCoeff():  1
Here is mat.maxCoeff():  4
Here is mat.trace():     5

```
 |

 The *trace* of a matrix, as returned by the function [trace()](classeigen_1_1matrixbase#a544b609f65eb2bd3e368b3fc2d79479e), is the sum of the diagonal coefficients and can also be computed as efficiently using `a.diagonal().sum()`, as we will see later on.

 There also exist variants of the `minCoeff` and `maxCoeff` functions returning the coordinates of the respective coefficient via the arguments:

 

| Example: | Output:  |
| --- | --- |
| 
```
  Matrix3f m = [Matrix3f::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
  std::ptrdiff_t i, j;
  float minOfM = m.minCoeff(&i,&j);
  cout << "Here is the matrix m:\n" << m << endl;
  cout << "Its minimum coefficient (" << minOfM 
       << ") is at position (" << i << "," << j << ")\n\n";
 
  RowVector4i v = [RowVector4i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
  int maxOfV = v.maxCoeff(&i);
  cout << "Here is the vector v: " << v << endl;
  cout << "Its maximum coefficient (" << maxOfV 
       << ") is at position " << i << endl;

```
 | 
```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Its minimum coefficient (-0.605) is at position (2,1)

Here is the vector v:  1  0  3 -3
Its maximum coefficient (3) is at position 2

```
 |

 
 Validity of operations
========================

 [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") checks the validity of the operations that you perform. When possible, it checks them at compile time, producing compilation errors. These error messages can be long and ugly, but [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") writes the important message in UPPERCASE\_LETTERS\_SO\_IT\_STANDS\_OUT. For example: 



```
Matrix3f m;
Vector4f v;
v = m*v;      // Compile-time error: YOU\_MIXED\_MATRICES\_OF\_DIFFERENT\_SIZES

```

Of course, in many cases, for example when checking dynamic sizes, the check cannot be performed at compile time. [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") then uses runtime assertions. This means that the program will abort with an error message when executing an illegal operation if it is run in "debug mode", and it will probably crash if assertions are turned off.

 
```
MatrixXf m(3,3);
VectorXf v(4);
v = m * v; // Run-time assertion failure here: "invalid matrix product"

```

For more details on this topic, see [this page](topicassertions). 

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TutorialMatrixArithmetic.html>

Reductions, visitors and broadcasting
=====================================

  This page explains [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s reductions, visitors and broadcasting and how they are used with [matrices](classeigen_1_1matrixbase)  and [arrays](classeigen_1_1arraybase) .

 
 Reductions
============

 In [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."), a reduction is a function taking a matrix or array, and returning a single scalar value. One of the most used reductions is [.sum()](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c) , returning the sum of all the coefficients inside a given matrix or array.

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
int main()
{
  [Eigen::Matrix2d](classeigen_1_1matrix) mat;
  mat << 1, 2,
         3, 4;
  cout << "Here is mat.sum(): " << mat.[sum](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c)()       << endl;
  cout << "Here is mat.prod(): " << mat.[prod](classeigen_1_1densebase#af119d9a4efe5a15cd83c1ccdf01b3a4f)()      << endl;
  cout << "Here is mat.mean(): " << mat.[mean](classeigen_1_1densebase#a21ac6c0419a72ad7a88ea0bc189017d7)()      << endl;
  cout << "Here is mat.minCoeff(): " << mat.[minCoeff](classeigen_1_1densebase#a0739f9c868c331031c7810e21838dcb2)()  << endl;
  cout << "Here is mat.maxCoeff(): " << mat.[maxCoeff](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1)()  << endl;
  cout << "Here is mat.trace(): " << mat.[trace](classeigen_1_1matrixbase#a544b609f65eb2bd3e368b3fc2d79479e)()     << endl;
}
```
 | 
```
Here is mat.sum():       10
Here is mat.prod():      24
Here is mat.mean():      2.5
Here is mat.minCoeff():  1
Here is mat.maxCoeff():  4
Here is mat.trace():     5

```
 |

 The *trace* of a matrix, as returned by the function `trace()`, is the sum of the diagonal coefficients and can equivalently be computed `a.diagonal().sum()`.

 
 Norm computations
-------------------

 The (Euclidean a.k.a. \(\ell^2\)) squared norm of a vector can be obtained [squaredNorm()](classeigen_1_1matrixbase#ac8da566526419f9742a6c471bbd87e0a) . It is equal to the dot product of the vector by itself, and equivalently to the sum of squared absolute values of its coefficients.

 [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") also provides the [norm()](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975)  method, which returns the square root of [squaredNorm()](classeigen_1_1matrixbase#ac8da566526419f9742a6c471bbd87e0a) .

 These operations can also operate on matrices; in that case, a n-by-p matrix is seen as a vector of size (n\*p), so for example the [norm()](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975)  method returns the "Frobenius" or "Hilbert-Schmidt" norm. We refrain from speaking of the \(\ell^2\) norm of a matrix because that can mean different things.

 If you want other coefficient-wise \(\ell^p\) norms, use the [lpNorm<p>()](classeigen_1_1matrixbase#a72586ab059e889e7d2894ff227747e35)  method. The template parameter *p* can take the special value *Infinity* if you want the \(\ell^\infty\) norm, which is the maximum of the absolute values of the coefficients.

 The following example demonstrates these methods.

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <Eigen/Dense>
#include <iostream>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
 
int main()
{
  VectorXf v(2);
  MatrixXf m(2,2), n(2,2);
  
  v << -1,
       2;
  
  m << 1,-2,
       -3,4;
 
  cout << "v.squaredNorm() = " << v.squaredNorm() << endl;
  cout << "v.norm() = " << v.norm() << endl;
  cout << "v.lpNorm<1>() = " << v.lpNorm<1>() << endl;
  cout << "v.lpNorm<Infinity>() = " << v.lpNorm<[Infinity](namespaceeigen#a7951593b031e13d90223c83d022ce99e)>() << endl;
 
  cout << endl;
  cout << "m.squaredNorm() = " << m.squaredNorm() << endl;
  cout << "m.norm() = " << m.norm() << endl;
  cout << "m.lpNorm<1>() = " << m.lpNorm<1>() << endl;
  cout << "m.lpNorm<Infinity>() = " << m.lpNorm<[Infinity](namespaceeigen#a7951593b031e13d90223c83d022ce99e)>() << endl;
}
```
 | 
```
v.squaredNorm() = 5
v.norm() = 2.23607
v.lpNorm<1>() = 3
v.lpNorm<Infinity>() = 2

m.squaredNorm() = 30
m.norm() = 5.47723
m.lpNorm<1>() = 10
m.lpNorm<Infinity>() = 4

```
 |

 **Operator** **norm:** The 1-norm and \(\infty\)-norm [matrix operator norms](https://en.wikipedia.org/wiki/Operator_norm) can easily be computed as follows: 




| Example: | Output:  |
| --- | --- |
| 
```
#include <Eigen/Dense>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
using namespace std;
 
int main()
{
  MatrixXf m(2,2);
  m << 1,-2,
       -3,4;
 
  cout << "1-norm(m) = " << m.cwiseAbs().colwise().sum().maxCoeff()
       << " == "             << m.colwise().lpNorm<1>().maxCoeff() << endl;
 
  cout << "infty-norm(m) = " << m.cwiseAbs().rowwise().sum().maxCoeff()
       << " == "             << m.rowwise().lpNorm<1>().maxCoeff() << endl;
}

```
 | 
```
1-norm(m)     = 6 == 6
infty-norm(m) = 7 == 7

```
 |

 See below for more explanations on the syntax of these expressions.

 
 Boolean reductions
--------------------

 The following reductions operate on boolean values:


* [all()](classeigen_1_1densebase#ae42ab60296c120e9f45ce3b44e1761a4)  returns **true** if all of the coefficients in a given [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") or [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") evaluate to **true** .
* [any()](classeigen_1_1densebase#abfbf4cb72dd577e62fbe035b1c53e695)  returns **true** if at least one of the coefficients in a given [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") or [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") evaluates to **true** .
* [count()](classeigen_1_1densebase#a229be090c665b9bf7d1fcdfd1ab6e0c1)  returns the number of coefficients in a given [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") or [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") that evaluate to **true**.

 These are typically used in conjunction with the coefficient-wise comparison and equality operators provided by [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations."). For instance, `array > 0` is an Array of the same size as `array` , with **true** at those positions where the corresponding coefficient of `array` is positive. Thus, `(array > 0).[all()](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14)` tests whether all coefficients of `array` are positive. This can be seen in the following example:

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <Eigen/Dense>
#include <iostream>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
 
int main()
{
  ArrayXXf a(2,2);
  
  a << 1,2,
       3,4;
 
  cout << "(a > 0).all() = " << (a > 0).[all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14)() << endl;
  cout << "(a > 0).any() = " << (a > 0).any() << endl;
  cout << "(a > 0).count() = " << (a > 0).count() << endl;
  cout << endl;
  cout << "(a > 2).all() = " << (a > 2).[all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14)() << endl;
  cout << "(a > 2).any() = " << (a > 2).any() << endl;
  cout << "(a > 2).count() = " << (a > 2).count() << endl;
}
```
 | 
```
(a > 0).all()   = 1
(a > 0).any()   = 1
(a > 0).count() = 4

(a > 2).all()   = 0
(a > 2).any()   = 1
(a > 2).count() = 2

```
 |

 
 User defined reductions
-------------------------

 TODO

 In the meantime you can have a look at the DenseBase::redux() function.

 
 Visitors
==========

 Visitors are useful when one wants to obtain the location of a coefficient inside a [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") or [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations."). The simplest examples are [maxCoeff(&x,&y)](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1)  and [minCoeff(&x,&y)](classeigen_1_1densebase#a0739f9c868c331031c7810e21838dcb2), which can be used to find the location of the greatest or smallest coefficient in a [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") or [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.").

 The arguments passed to a visitor are pointers to the variables where the row and column position are to be stored. These variables should be of type [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) , as shown below:

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
 
int main()
{
  [Eigen::MatrixXf](classeigen_1_1matrix) m(2,2);
  
  m << 1, 2,
       3, 4;
 
  //get location of maximum
  [MatrixXf::Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) maxRow, maxCol;
  float max = m.maxCoeff(&maxRow, &maxCol);
 
  //get location of minimum
  [MatrixXf::Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) minRow, minCol;
  float min = m.minCoeff(&minRow, &minCol);
 
  cout << "Max: " << max <<  ", at: " <<
     maxRow << "," << maxCol << endl;
  cout << "Min: " << min << ", at: " <<
     minRow << "," << minCol << endl;
}
```
 | 
```
Max: 4, at: 1,1
Min: 1, at: 0,0

```
 |

 Both functions also return the value of the minimum or maximum coefficient.

 
 Partial reductions
====================

 Partial reductions are reductions that can operate column- or row-wise on a [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") or [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations."), applying the reduction operation on each column or row and returning a column or row vector with the corresponding values. Partial reductions are applied with [colwise()](classeigen_1_1densebase#a1c0e1b6067ec1de6cb8799da55aa7d30)  or [rowwise()](classeigen_1_1densebase#a6daa3a3156ca0e0722bf78638e1c7f28) .

 A simple example is obtaining the maximum of the elements in each column in a given matrix, storing the result in a row vector:

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
int main()
{
  [Eigen::MatrixXf](classeigen_1_1matrix) mat(2,4);
  mat << 1, 2, 6, 9,
         3, 1, 7, 2;
  
  std::cout << "Column's maximum: " << std::endl
   << mat.[colwise](classeigen_1_1densebase#a58837c81de446efbdb58da07b73a63c1)().[maxCoeff](classeigen_1_1vectorwiseop#a6646b584db116c1661b5bb56750bd6f6)() << std::endl;
}
```
 | 
```
Column's maximum: 
3 2 7 9

```
 |

 The same operation can be performed row-wise:

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
int main()
{
  [Eigen::MatrixXf](classeigen_1_1matrix) mat(2,4);
  mat << 1, 2, 6, 9,
         3, 1, 7, 2;
  
  std::cout << "Row's maximum: " << std::endl
   << mat.[rowwise](classeigen_1_1densebase#aa1cabd3404528fe8cec4bab43d74bffc)().[maxCoeff](classeigen_1_1vectorwiseop#a6646b584db116c1661b5bb56750bd6f6)() << std::endl;
}
```
 | 
```
Row's maximum: 
9
7

```
 |

 **Note that column-wise operations return a row vector, while row-wise operations return a column vector.**

 
 Combining partial reductions with other operations
----------------------------------------------------

 It is also possible to use the result of a partial reduction to do further processing. Here is another example that finds the column whose sum of elements is the maximum within a matrix. With column-wise partial reductions this can be coded as:

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
int main()
{
  MatrixXf mat(2,4);
  mat << 1, 2, 6, 9,
         3, 1, 7, 2;
  
  [MatrixXf::Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02)   maxIndex;
  float maxNorm = mat.[colwise](classeigen_1_1densebase#a58837c81de446efbdb58da07b73a63c1)().[sum](classeigen_1_1vectorwiseop#a7030fc687c24d687ed7cd70733ba611c)().maxCoeff(&maxIndex);
  
  std::cout << "Maximum sum at position " << maxIndex << std::endl;
 
  std::cout << "The corresponding vector is: " << std::endl;
  std::cout << mat.col( maxIndex ) << std::endl;
  std::cout << "And its sum is is: " << maxNorm << std::endl;
}
```
 | 
```
Maximum sum at position 2
The corresponding vector is: 
6
7
And its sum is is: 13

```
 |

 The previous example applies the [sum()](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c)  reduction on each column though the [colwise()](classeigen_1_1densebase#a1c0e1b6067ec1de6cb8799da55aa7d30)  visitor, obtaining a new matrix whose size is 1x4.

 Therefore, if 


 \[ \mbox{m} = \begin{bmatrix} 1 & 2 & 6 & 9 \\ 3 & 1 & 7 & 2 \end{bmatrix} \] 

 then

  \[ \mbox{m.colwise().sum()} = \begin{bmatrix} 4 & 3 & 13 & 11 \end{bmatrix} \] 

 The [maxCoeff()](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1)  reduction is finally applied to obtain the column index where the maximum sum is found, which is the column index 2 (third column) in this case.

 
 Broadcasting
==============

 The concept behind broadcasting is similar to partial reductions, with the difference that broadcasting constructs an expression where a vector (column or row) is interpreted as a matrix by replicating it in one direction.

 A simple example is to add a certain column vector to each column in a matrix. This can be accomplished with:

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
int main()
{
  [Eigen::MatrixXf](classeigen_1_1matrix) mat(2,4);
  [Eigen::VectorXf](classeigen_1_1matrix) v(2);
  
  mat << 1, 2, 6, 9,
         3, 1, 7, 2;
         
  v << 0,
       1;
       
  //add v to each column of m
  mat.[colwise](classeigen_1_1densebase#a58837c81de446efbdb58da07b73a63c1)() += v;
  
  std::cout << "Broadcasting result: " << std::endl;
  std::cout << mat << std::endl;
}

```
 | 
```
Broadcasting result: 
1 2 6 9
4 2 8 3

```
 |

 We can interpret the instruction `mat.colwise() += v` in two equivalent ways. It adds the vector `v` to every column of the matrix. Alternatively, it can be interpreted as repeating the vector `v` four times to form a four-by-two matrix which is then added to `mat:` 


 \[ \begin{bmatrix} 1 & 2 & 6 & 9 \\ 3 & 1 & 7 & 2 \end{bmatrix} + \begin{bmatrix} 0 & 0 & 0 & 0 \\ 1 & 1 & 1 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 2 & 6 & 9 \\ 4 & 2 & 8 & 3 \end{bmatrix}. \] 

  The operators `-=`, `+` and `-` can also be used column-wise and row-wise. On arrays, we can also use the operators `*=`, `/=`, `*` and `/` to perform coefficient-wise multiplication and division column-wise or row-wise. These operators are not available on matrices because it is not clear what they would do. If you want multiply column 0 of a matrix `mat` with `v(0)`, column 1 with `v(1)`, and so on, then use `mat = mat * v.asDiagonal()`.

 It is important to point out that the vector to be added column-wise or row-wise must be of type Vector, and cannot be a [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."). If this is not met then you will get compile-time error. This also means that broadcasting operations can only be applied with an object of type Vector, when operating with [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."). The same applies for the [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") class, where the equivalent for VectorXf is ArrayXf. As always, you should not mix arrays and matrices in the same expression.

 To perform the same operation row-wise we can do:

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
int main()
{
  [Eigen::MatrixXf](classeigen_1_1matrix) mat(2,4);
  [Eigen::VectorXf](classeigen_1_1matrix) v(4);
  
  mat << 1, 2, 6, 9,
         3, 1, 7, 2;
         
  v << 0,1,2,3;
       
  //add v to each row of m
  mat.[rowwise](classeigen_1_1densebase#aa1cabd3404528fe8cec4bab43d74bffc)() += v.transpose();
  
  std::cout << "Broadcasting result: " << std::endl;
  std::cout << mat << std::endl;
}

```
 | 
```
Broadcasting result: 
 1  3  8 12
 3  2  9  5

```
 |

 
 Combining broadcasting with other operations
----------------------------------------------

 Broadcasting can also be combined with other operations, such as [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") or [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") operations, reductions and partial reductions.

 Now that broadcasting, reductions and partial reductions have been introduced, we can dive into a more advanced example that finds the nearest neighbour of a vector `v` within the columns of matrix `m`. The Euclidean distance will be used in this example, computing the squared Euclidean distance with the partial reduction named [squaredNorm()](classeigen_1_1matrixbase#ac8da566526419f9742a6c471bbd87e0a) :

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
 
int main()
{
  [Eigen::MatrixXf](classeigen_1_1matrix) m(2,4);
  [Eigen::VectorXf](classeigen_1_1matrix) v(2);
  
  m << 1, 23, 6, 9,
       3, 11, 7, 2;
       
  v << 2,
       3;
 
  [MatrixXf::Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index;
  // find nearest neighbour
  (m.colwise() - v).colwise().squaredNorm().minCoeff(&index);
 
  cout << "Nearest neighbour is column " << index << ":" << endl;
  cout << m.col(index) << endl;
}

```
 | 
```
Nearest neighbour is column 0:
1
3

```
 |

 The line that does the job is 



```
(m.colwise() - v).colwise().squaredNorm().minCoeff(&index);

```

We will go step by step to understand what is happening:

 * `m.colwise() - v` is a broadcasting operation, subtracting `v` from each column in `m`. The result of this operation is a new matrix whose size is the same as matrix `m`:  \[ \mbox{m.colwise() - v} = \begin{bmatrix} -1 & 21 & 4 & 7 \\ 0 & 8 & 4 & -1 \end{bmatrix} \]
* `(m.colwise() - v).colwise().squaredNorm()` is a partial reduction, computing the squared norm column-wise. The result of this operation is a row vector where each coefficient is the squared Euclidean distance between each column in `m` and `v`:  \[ \mbox{(m.colwise() - v).colwise().squaredNorm()} = \begin{bmatrix} 1 & 505 & 32 & 50 \end{bmatrix} \]
* Finally, `minCoeff(&index)` is used to obtain the index of the column in `m` that is closest to `v` in terms of Euclidean distance.

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TutorialReductionsVisitorsBroadcasting.html>

Eigen::SparseMatrix
===================

  
### template<typename \_Scalar, int \_Options, typename \_StorageIndex> class Eigen::SparseMatrix< \_Scalar, \_Options, \_StorageIndex >

 A versatible sparse matrix representation. 

 This class implements a more versatile variants of the common *compressed* row/column storage format. Each colmun's (resp. row) non zeros are stored as a pair of value with associated row (resp. colmiun) index. All the non zeros are stored in a single large buffer. Unlike the *compressed* format, there might be extra space in between the nonzeros of two successive colmuns (resp. rows) such that insertion of new non-zero can be done with limited memory reallocation and copies.

 A call to the function [makeCompressed()](classeigen_1_1sparsematrix#a5ff54ffc10296f9466dc81fa888733fd) turns the matrix into the standard *compressed* format compatible with many library.

 More details on this storage sceheme are given in the [manual pages](group__tutorialsparse).

 
Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the scalar type, i.e. the type of the coefficients  |
| \_Options | Union of bit flags controlling the storage scheme. Currently the only possibility is ColMajor or RowMajor. The default is 0 which means column-major.  |
| \_StorageIndex | the type of the indices. It has to be a **signed** type (e.g., short, int, std::ptrdiff\_t). Default is `int`. |

   
Warning
In Eigen 3.2, the undocumented type `[SparseMatrix::Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02 "The interface type of indices.")` was improperly defined as the storage index type (e.g., int), whereas it is now (starting from Eigen 3.3) deprecated and always defined as [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde "The Index type as used for the API."). Codes making use of `[SparseMatrix::Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02 "The interface type of indices.")`, might thus likely have to be changed to use `[SparseMatrix::StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed)` instead.
 This class can be extended with the help of the plugin mechanism described on the page [Extending MatrixBase (and other classes)](topiccustomizing_plugins) by defining the preprocessor symbol `EIGEN_SPARSEMATRIX_PLUGIN`. 

     ![Inheritance graph]        

|  |
| --- |
|  |
| Scalar  | [coeff](classeigen_1_1sparsematrix#a54adf6aa526045f37e67e352da8fd105) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) row, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) col) const |
|  |
| Scalar &  | [coeffRef](classeigen_1_1sparsematrix#a013197b3f598968ff37ed8c97087f1ef) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) row, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) col) |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [cols](classeigen_1_1sparsematrix#aa391750e3c530227e4a5c3c52e959975) () const |
|  |
| void  | [conservativeResize](classeigen_1_1sparsematrix#a9dc538b2c1fe9027ba58f31ee83b2ff1) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [rows](classeigen_1_1sparsematrix#a62e61bb861eee306d5b069ce652b5aa5), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [cols](classeigen_1_1sparsematrix#aa391750e3c530227e4a5c3c52e959975)) |
|  |
| [DiagonalReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1sparsematrix#af83005640c2771ebd69f98848720ee52) () |
|  |
| const [ConstDiagonalReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1sparsematrix#a4423486f9fd64cbac7be06c748b37e0a) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsematrix#a8e9ef5d399d36fdd860ad05cb7a31455) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsematrix#ae7b804bd39745156d20ca1611a296b67) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsematrix#a00efb5c30c29bbc826d156d97e60d870) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsematrix#a218204b051a24f579c394454786eeda0) () const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [innerSize](classeigen_1_1sparsematrix#a0f42824d4a06ee1d1f6afbc4551c5896) () const |
|  |
| Scalar &  | [insert](classeigen_1_1sparsematrix#aae45e3b5fec7f6a0cdd10eec7c6d3666) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) row, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) col) |
|  |
| bool  | [isCompressed](classeigen_1_1sparsematrix#a837934b33a80fe996ff20500373d3a61) () const |
|  |
| void  | [makeCompressed](classeigen_1_1sparsematrix#a5ff54ffc10296f9466dc81fa888733fd) () |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [nonZeros](classeigen_1_1sparsematrix#a03de8b3da2c142ce8698a76123b3e7d3) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsematrix#a9451af2795c1a5b97678272475e41422) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsematrix#a75506964d86d6badb32d0b4917acf2e2) () const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [outerSize](classeigen_1_1sparsematrix#a4e5f706cfae14d2eaec1ea1e234905f1) () const |
|  |
| template<typename KeepFunc >  |
| void  | [prune](classeigen_1_1sparsematrix#a0e5f8cc59ee57207f0cff6b142bcdd0d) (const KeepFunc &keep=KeepFunc()) |
|  |
| void  | [prune](classeigen_1_1sparsematrix#a08af03b2fc6c371c8be4fcd62509288c) (const Scalar &reference, const RealScalar &epsilon=[NumTraits](structeigen_1_1numtraits)< RealScalar >::dummy\_precision()) |
|  |
| template<class SizesType >  |
| void  | [reserve](classeigen_1_1sparsematrix#ac2b219eb36fbab0bfae535cfbfc74a76) (const SizesType &reserveSizes) |
|  |
| void  | [reserve](classeigen_1_1sparsematrix#a1518e58ac49bed0e2385b722a034f7d3) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) reserveSize) |
|  |
| void  | [resize](classeigen_1_1sparsematrix#af88551f30202341b7cc24cfadabdec5c) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [rows](classeigen_1_1sparsematrix#a62e61bb861eee306d5b069ce652b5aa5), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [cols](classeigen_1_1sparsematrix#aa391750e3c530227e4a5c3c52e959975)) |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [rows](classeigen_1_1sparsematrix#a62e61bb861eee306d5b069ce652b5aa5) () const |
|  |
| template<typename InputIterators >  |
| void  | [setFromTriplets](classeigen_1_1sparsematrix#acc35051d698e3973f1de5b9b78dbe345) (const InputIterators &begin, const InputIterators &end) |
|  |
| template<typename InputIterators , typename DupFunctor >  |
| void  | [setFromTriplets](classeigen_1_1sparsematrix#ad3eee2d3d2a9843cd095c0207f781e7e) (const InputIterators &begin, const InputIterators &end, DupFunctor dup\_func) |
|  |
| void  | [setIdentity](classeigen_1_1sparsematrix#a89013d2aa58413672c90932607a0d6f0) () |
|  |
| void  | [setZero](classeigen_1_1sparsematrix#ad3c7416090f913e8685523cb3ab7c2f7) () |
|  |
|  | [SparseMatrix](classeigen_1_1sparsematrix#a68087ee333c9614ea28850ec52069079) () |
|  |
|  template<typename OtherDerived >  |
|  | [SparseMatrix](classeigen_1_1sparsematrix#a1c6fde42fd40e6f753b60f71e8fd88aa) (const DiagonalBase< OtherDerived > &other) |
|  | Copy constructor with in-place evaluation.  |
|  |
|  template<typename OtherDerived >  |
|  | [SparseMatrix](classeigen_1_1sparsematrix#a4e328e4686980219c2b4d2a932670ab0) (const ReturnByValue< OtherDerived > &other) |
|  | Copy constructor with in-place evaluation.  |
|  |
|  | [SparseMatrix](classeigen_1_1sparsematrix#af0fa64cdba1f30353aac937a31db33f3) (const [SparseMatrix](classeigen_1_1sparsematrix) &other) |
|  |
| template<typename OtherDerived >  |
|  | [SparseMatrix](classeigen_1_1sparsematrix#a501a50f0d7d58dc4c1d990cd912f581f) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived , unsigned int UpLo>  |
|  | [SparseMatrix](classeigen_1_1sparsematrix#aa755e8ba4ec4a2e39ebdb658228364e5) (const [SparseSelfAdjointView](classeigen_1_1sparseselfadjointview)< OtherDerived, UpLo > &other) |
|  |
|  | [SparseMatrix](classeigen_1_1sparsematrix#a6abf1015a0243be97648e106a17b01ea) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [rows](classeigen_1_1sparsematrix#a62e61bb861eee306d5b069ce652b5aa5), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [cols](classeigen_1_1sparsematrix#aa391750e3c530227e4a5c3c52e959975)) |
|  |
| Scalar  | [sum](classeigen_1_1sparsematrix#a0700cd0b8658962d742fa51a5e594a2f) () const |
|  |
| void  | [swap](classeigen_1_1sparsematrix#ae9b9ad3524f87276511397d988b7a607) ([SparseMatrix](classeigen_1_1sparsematrix) &other) |
|  |
| void  | [uncompress](classeigen_1_1sparsematrix#a7e560ebda035e992d2c99875cc7c3af3) () |
|  |
| Scalar \*  | [valuePtr](classeigen_1_1sparsematrix#ac2684952b14b5c9b0f68ae3bb8c517a6) () |
|  |
| const Scalar \*  | [valuePtr](classeigen_1_1sparsematrix#a9d4354d3f4d121d764bbed33cac05329) () const |
|  |
|  | [~SparseMatrix](classeigen_1_1sparsematrix#a36835ee4f8e5f273087910ec8063a4f6) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseCompressedBase< SparseMatrix< \_Scalar, \_Options, \_StorageIndex > >](classeigen_1_1sparsecompressedbase) |
| [Map](classeigen_1_1map)< [Array](classeigen_1_1array)< Scalar, Dynamic, 1 > >  | [coeffs](classeigen_1_1sparsecompressedbase#a7cf299e08d2a4f6d6869e631e51b12fe) () |
|  |
| const [Map](classeigen_1_1map)< const [Array](classeigen_1_1array)< Scalar, Dynamic, 1 > >  | [coeffs](classeigen_1_1sparsecompressedbase#a101b155485ae59ea1261c4f6040f3dc4) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsecompressedbase#a197111c1289644f1ea38fe683ccdd82a) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsecompressedbase#aa64818e1aa43015dad01b114b2ab4687) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsecompressedbase#a411e972b097e6aef225415a4c2d0a0b5) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsecompressedbase#afc056a3895eae1a4c4767252ff04966a) () const |
|  |
| bool  | [isCompressed](classeigen_1_1sparsecompressedbase#a837934b33a80fe996ff20500373d3a61) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1sparsecompressedbase#a03de8b3da2c142ce8698a76123b3e7d3) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsecompressedbase#a53a82f962686e18c8dc07a4b9a85ed7b) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsecompressedbase#a2624d4c2661c582de168246c56e8d71e) () const |
|  |
| Scalar \*  | [valuePtr](classeigen_1_1sparsecompressedbase#a0f12f72d14b6c277d09be9f5ce2eab95) () |
|  |
| const Scalar \*  | [valuePtr](classeigen_1_1sparsecompressedbase#a0f44c739398794ea77f310b745cc5627) () const |
|  |
| - Public Member Functions inherited from [Eigen::SparseMatrixBase< SparseMatrix< \_Scalar, \_Options, \_StorageIndex > >](classeigen_1_1sparsematrixbase) |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1sparsematrixbase#aca7ce296424ef6e478ab0fb19547a7ee) () const |
|  |
| const internal::eval< [SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex > >::type  | [eval](classeigen_1_1sparsematrixbase#a761bd872a06b59632fcff7b7807a77ce) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1sparsematrixbase#a180fcba1ccf3cdf3252a263bc1de7a1d) () const |
|  |
| bool  | [isVector](classeigen_1_1sparsematrixbase#a7eedffa867031f649fd0fb9cc23ce4be) () const |
|  |
| const [Product](classeigen_1_1product)< [SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >, OtherDerived, AliasFreeProduct >  | [operator\*](classeigen_1_1sparsematrixbase#a9d4d71b3f34389e6fc01f2b86e43f7a4) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &other) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1sparsematrixbase#ac86cc88a4cfef21db6b64ec0ab4c8f0a) () const |
|  |
| const [SparseView](classeigen_1_1sparseview)< [SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex > >  | [pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d) (const Scalar &reference=Scalar(0), const RealScalar &epsilon=[NumTraits](structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1sparsematrixbase#a1944e9fa9ce7937bfc3a87b2cb94371f) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1sparsematrixbase#a124bc57921775eb9aa2dfd9727e23472) () const |
|  |
| SparseSymmetricPermutationProduct< [SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >, Upper|Lower >  | [twistedBy](classeigen_1_1sparsematrixbase#a51d4898bd6a57cc3ba543a39b102423e) (const [PermutationMatrix](classeigen_1_1permutationmatrix)< Dynamic, Dynamic, [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) > &perm) const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< SparseMatrix< \_Scalar, \_Options, \_StorageIndex > >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| [SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex > &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const [SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex > &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::SparseMatrixBase< SparseMatrix< \_Scalar, \_Options, \_StorageIndex > >](classeigen_1_1sparsematrixbase) |
| typedef internal::traits< [SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex > >::[StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) | [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) |
|  |
| typedef Scalar  | [value\_type](classeigen_1_1sparsematrixbase#ac254d3b61718ebc2136d27bac043dcb7) |
|  |
| - Public Types inherited from [Eigen::EigenBase< SparseMatrix< \_Scalar, \_Options, \_StorageIndex > >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |
| - Protected Member Functions inherited from [Eigen::SparseCompressedBase< SparseMatrix< \_Scalar, \_Options, \_StorageIndex > >](classeigen_1_1sparsecompressedbase) |
|  | [SparseCompressedBase](classeigen_1_1sparsecompressedbase#af79f020db965367d97eb954fc68d8f99) () |
|  |

  SparseMatrix() [1/5]
--------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::[SparseMatrix](classeigen_1_1sparsematrix) | ( |  | ) |  |

 | inline |

 
 Default constructor yielding an empty `0` `x` `0` matrix 

    SparseMatrix() [2/5]
--------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::[SparseMatrix](classeigen_1_1sparsematrix) | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inline |

 
 Constructs a *rows* `x` *cols* empty matrix 

    SparseMatrix() [3/5]
--------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::[SparseMatrix](classeigen_1_1sparsematrix) | ( | const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Constructs a sparse matrix from the sparse expression *other* 

    SparseMatrix() [4/5]
--------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >   template<typename OtherDerived , unsigned int UpLo>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::[SparseMatrix](classeigen_1_1sparsematrix) | ( | const [SparseSelfAdjointView](classeigen_1_1sparseselfadjointview)< OtherDerived, UpLo > &  | *other* | ) |  |

 | inline |

 
 Constructs a sparse matrix from the sparse selfadjoint view *other* 

    SparseMatrix() [5/5]
--------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::[SparseMatrix](classeigen_1_1sparsematrix) | ( | const [SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex > &  | *other* | ) |  |

 | inline |

 
 Copy constructor (it performs a deep copy) 

    ~SparseMatrix()
---------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::~[SparseMatrix](classeigen_1_1sparsematrix) | ( |  | ) |  |

 | inline |

 
 Destructor 

    coeff()
-------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Scalar [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::coeff  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *row*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *col* |
|  | ) |  |  const |

 | inline |

 
 
Returns
the value of the matrix at position *i*, *j* This function returns Scalar(0) if the element is an explicit *zero* 
    coeffRef()
----------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Scalar& [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::coeffRef  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *row*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *col* |
|  | ) |  |  |

 | inline |

 
 
Returns
a non-const reference to the value of the matrix at position *i*, *j* 
 If the element does not exist then it is inserted via the [insert(Index,Index)](classeigen_1_1sparsematrix#aae45e3b5fec7f6a0cdd10eec7c6d3666) function which itself turns the matrix into a non compressed form if that was not the case.

 This is a O(log(nnz\_j)) operation (binary search) plus the cost of [insert(Index,Index)](classeigen_1_1sparsematrix#aae45e3b5fec7f6a0cdd10eec7c6d3666) function if the element does not already exist. 

    cols()
------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::cols  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
the number of columns of the matrix 
    conservativeResize()
--------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::conservativeResize  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inline |

 
 Resizes the matrix to a *rows* x *cols* matrix leaving old values untouched.

 If the sizes of the matrix are decreased, then the matrix is turned to **uncompressed-mode** and the storage of the out of bounds coefficients is kept and reserved. Call [makeCompressed()](classeigen_1_1sparsematrix#a5ff54ffc10296f9466dc81fa888733fd) to pack the entries and squeeze extra memory.

 
See also

[reserve()](classeigen_1_1sparsematrix#a1518e58ac49bed0e2385b722a034f7d3), [setZero()](classeigen_1_1sparsematrix#ad3c7416090f913e8685523cb3ab7c2f7), [makeCompressed()](classeigen_1_1sparsematrix#a5ff54ffc10296f9466dc81fa888733fd) 
    diagonal() [1/2]
----------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [DiagonalReturnType](classeigen_1_1diagonal) [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::diagonal  | ( |  | ) |  |

 | inline |

 
 
Returns
a read-write expression of the diagonal coefficients. 
 
Warning
If the diagonal entries are written, then all diagonal entries **must** already exist, otherwise an assertion will be raised. 
    diagonal() [2/2]
----------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [ConstDiagonalReturnType](classeigen_1_1diagonal) [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::diagonal  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const expression of the diagonal coefficients. 
    innerIndexPtr() [1/2]
---------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed)\* [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::innerIndexPtr  | ( |  | ) |  |

 | inline |

 
 
Returns
a non-const pointer to the array of inner indices. This function is aimed at interoperability with other libraries. 
 
See also

[valuePtr()](classeigen_1_1sparsematrix#ac2684952b14b5c9b0f68ae3bb8c517a6), [outerIndexPtr()](classeigen_1_1sparsematrix#a9451af2795c1a5b97678272475e41422) 
    innerIndexPtr() [2/2]
---------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed)\* [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::innerIndexPtr  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const pointer to the array of inner indices. This function is aimed at interoperability with other libraries. 
 
See also

[valuePtr()](classeigen_1_1sparsematrix#ac2684952b14b5c9b0f68ae3bb8c517a6), [outerIndexPtr()](classeigen_1_1sparsematrix#a9451af2795c1a5b97678272475e41422) 
    innerNonZeroPtr() [1/2]
-----------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed)\* [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::innerNonZeroPtr  | ( |  | ) |  |

 | inline |

 
 
Returns
a non-const pointer to the array of the number of non zeros of the inner vectors. This function is aimed at interoperability with other libraries. 
 
Warning
it returns the null pointer 0 in compressed mode 
    innerNonZeroPtr() [2/2]
-----------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed)\* [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::innerNonZeroPtr  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const pointer to the array of the number of non zeros of the inner vectors. This function is aimed at interoperability with other libraries. 
 
Warning
it returns the null pointer 0 in compressed mode 
    innerSize()
-----------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::innerSize  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of rows (resp. columns) of the matrix if the storage order column major (resp. row major) 
    insert()
--------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |
| --- | --- | --- | --- |
| [SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::Scalar & [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::insert  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *row*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *col* |
|  | ) |  |  |

 
 
Returns
a reference to a novel non zero coefficient with coordinates *row* x *col*. The non zero coefficient must **not** already exist.
 If the matrix `*this` is in compressed mode, then `*this` is turned into uncompressed mode while reserving room for 2 x this->[innerSize()](classeigen_1_1sparsematrix#a0f42824d4a06ee1d1f6afbc4551c5896) non zeros if [reserve(Index)](classeigen_1_1sparsematrix#a1518e58ac49bed0e2385b722a034f7d3) has not been called earlier. In this case, the insertion procedure is optimized for a *sequential* insertion mode where elements are assumed to be inserted by increasing outer-indices.

 If that's not the case, then it is strongly recommended to either use a triplet-list to assemble the matrix, or to first call [reserve(const SizesType &)](classeigen_1_1sparsematrix#ac2b219eb36fbab0bfae535cfbfc74a76) to reserve the appropriate number of non-zero elements per inner vector.

 Assuming memory has been appropriately reserved, this function performs a sorted insertion in O(1) if the elements of each inner vector are inserted in increasing inner index order, and in O(nnz\_j) for a random insertion. 

    isCompressed()
--------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| bool [Eigen::SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived >::isCompressed |

 | inline |

 
 
Returns
whether `*this` is in compressed form. 
    makeCompressed()
----------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::makeCompressed  | ( |  | ) |  |

 | inline |

 
 Turns the matrix into the *compressed* format. 

    nonZeros()
----------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived >::nonZeros |

 | inline |

 
 
Returns
the number of non zero coefficients 
    outerIndexPtr() [1/2]
---------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed)\* [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::outerIndexPtr  | ( |  | ) |  |

 | inline |

 
 
Returns
a non-const pointer to the array of the starting positions of the inner vectors. This function is aimed at interoperability with other libraries. 
 
See also

[valuePtr()](classeigen_1_1sparsematrix#ac2684952b14b5c9b0f68ae3bb8c517a6), [innerIndexPtr()](classeigen_1_1sparsematrix#a8e9ef5d399d36fdd860ad05cb7a31455) 
    outerIndexPtr() [2/2]
---------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed)\* [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::outerIndexPtr  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const pointer to the array of the starting positions of the inner vectors. This function is aimed at interoperability with other libraries. 
 
See also

[valuePtr()](classeigen_1_1sparsematrix#ac2684952b14b5c9b0f68ae3bb8c517a6), [innerIndexPtr()](classeigen_1_1sparsematrix#a8e9ef5d399d36fdd860ad05cb7a31455) 
    outerSize()
-----------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::outerSize  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of columns (resp. rows) of the matrix if the storage order column major (resp. row major) 
    prune() [1/2]
-------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >   template<typename KeepFunc >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::prune  | ( | const KeepFunc &  | *keep* = `KeepFunc()` | ) |  |

 | inline |

 
 Turns the matrix into compressed format, and suppresses all nonzeros which do not satisfy the predicate *keep*. The functor type *KeepFunc* must implement the following function: 



```
bool operator() (const [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02)& row, const [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02)& col, const Scalar& value) const;
```
 
See also
prune(Scalar,RealScalar) 
    prune() [2/2]
-------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::prune  | ( | const Scalar &  | *reference*,  |
|  |  | const RealScalar &  | *epsilon* = `[NumTraits](structeigen_1_1numtraits)<RealScalar>::dummy_precision()` |
|  | ) |  |  |

 | inline |

 
 Suppresses all nonzeros which are **much** **smaller** **than** *reference* under the tolerance *epsilon* 

    reserve() [1/2]
---------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >   template<class SizesType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::reserve  | ( | const SizesType &  | *reserveSizes* | ) |  |

 | inline |

 
 Preallocates *reserveSize*[`j`] non zeros for each column (resp. row) `j`.

 This function turns the matrix in non-compressed mode.

 The type `SizesType` must expose the following interface: 



```
typedef [value\_type](classeigen_1_1sparsematrixbase#ac254d3b61718ebc2136d27bac043dcb7);
const [value\_type](classeigen_1_1sparsematrixbase#ac254d3b61718ebc2136d27bac043dcb7)& operator[](i) const;
```

 for `i` in the [0,this->[outerSize()](classeigen_1_1sparsematrix#a4e5f706cfae14d2eaec1ea1e234905f1)[ range. Typical choices include std::vector<int>, Eigen::VectorXi, [Eigen::VectorXi::Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd), etc. 

    reserve() [2/2]
---------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::reserve  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *reserveSize* | ) |  |

 | inline |

 
 Preallocates *reserveSize* non zeros.

 Precondition: the matrix must be in compressed mode. 

    resize()
--------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::resize  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inline |

 
 Resizes the matrix to a *rows* x *cols* matrix and initializes it to zero.

 This function does not free the currently allocated memory. To release as much as memory as possible, call



```
mat.data().squeeze(); 

```

 after resizing it.

 
See also

[reserve()](classeigen_1_1sparsematrix#a1518e58ac49bed0e2385b722a034f7d3), [setZero()](classeigen_1_1sparsematrix#ad3c7416090f913e8685523cb3ab7c2f7) 
    rows()
------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::rows  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
the number of rows of the matrix 
    setFromTriplets() [1/2]
-----------------------

    template<typename Scalar , int \_Options, typename \_StorageIndex >   template<typename InputIterators >  

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< Scalar, \_Options, \_StorageIndex >::setFromTriplets  | ( | const InputIterators &  | *begin*,  |
|  |  | const InputIterators &  | *end* |
|  | ) |  |  |

 
 Fill the matrix `*this` with the list of *triplets* defined by the iterator range *begin* - *end*.

 A *triplet* is a tuple (i,j,value) defining a non-zero element. The input list of triplets does not have to be sorted, and can contains duplicated elements. In any case, the result is a **sorted** and **compressed** sparse matrix where the duplicates have been summed up. This is a *O(n)* operation, with *n* the number of triplet elements. The initial contents of `*this` is destroyed. The matrix `*this` must be properly resized beforehand using the [SparseMatrix(Index,Index)](classeigen_1_1sparsematrix#a6abf1015a0243be97648e106a17b01ea) constructor, or the [resize(Index,Index)](classeigen_1_1sparsematrix#af88551f30202341b7cc24cfadabdec5c) method. The sizes are not extracted from the triplet list.

 The *InputIterators* value\_type must provide the following interface: 



```
Scalar value() const; // the value
Scalar row() const;   // the row index i
Scalar col() const;   // the column index j

```

 See for instance the [Eigen::Triplet](classeigen_1_1triplet "A small structure to hold a non zero as a triplet (i,j,value).") template class.

 Here is a typical usage example: 



```
typedef Triplet<double> T;
std::vector<T> tripletList;
tripletList.reserve(estimation_of_entries);
for(...)
{
  // ...
  tripletList.push_back(T(i,j,v_ij));
}
SparseMatrixType m([rows](classeigen_1_1sparsematrix#a62e61bb861eee306d5b069ce652b5aa5),[cols](classeigen_1_1sparsematrix#aa391750e3c530227e4a5c3c52e959975));
m.setFromTriplets(tripletList.begin(), tripletList.end());
// m is ready to go!
```


Warning
The list of triplets is read multiple times (at least twice). Therefore, it is not recommended to define an abstract iterator over a complex data-structure that would be expensive to evaluate. The triplets should rather be explicitly stored into a std::vector for instance. 
    setFromTriplets() [2/2]
-----------------------

    template<typename Scalar , int \_Options, typename \_StorageIndex >   template<typename InputIterators , typename DupFunctor >  

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< Scalar, \_Options, \_StorageIndex >::setFromTriplets  | ( | const InputIterators &  | *begin*,  |
|  |  | const InputIterators &  | *end*,  |
|  |  | DupFunctor  | *dup\_func* |
|  | ) |  |  |

 
 The same as setFromTriplets but when duplicates are met the functor *dup\_func* is applied: 



```
value = dup_func(OldValue, NewValue)

```

 Here is a C++11 example keeping the latest entry only: 



```
mat.setFromTriplets(triplets.begin(), triplets.end(), [] (const Scalar&,const Scalar &b) { return b; });

```
    setIdentity()
-------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::setIdentity  | ( |  | ) |  |

 | inline |

 
 Sets \*this to the identity matrix. This function also turns the matrix into compressed mode, and drop any reserved memory. 

    setZero()
---------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::setZero  | ( |  | ) |  |

 | inline |

 
 Removes all non zeros but keep allocated memory

 This function does not free the currently allocated memory. To release as much as memory as possible, call



```
mat.data().squeeze(); 

```

 after resizing it.

 
See also

[resize(Index,Index)](classeigen_1_1sparsematrix#af88551f30202341b7cc24cfadabdec5c), data() 
    sum()
-----

    template<typename \_Scalar , int \_Options, typename \_Index >  

|  |
| --- |
| internal::traits< [SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_Index > >::Scalar [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_Index >::sum |

 
 Overloaded for performance 

    swap()
------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::swap  | ( | [SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex > &  | *other* | ) |  |

 | inline |

 
 Swaps the content of two sparse matrices of the same type. This is a fast operation that simply swaps the underlying pointers and parameters. 

    uncompress()
------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::uncompress  | ( |  | ) |  |

 | inline |

 
 Turns the matrix into the uncompressed mode 

    valuePtr() [1/2]
----------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar\* [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::valuePtr  | ( |  | ) |  |

 | inline |

 
 
Returns
a non-const pointer to the array of values. This function is aimed at interoperability with other libraries. 
 
See also

[innerIndexPtr()](classeigen_1_1sparsematrix#a8e9ef5d399d36fdd860ad05cb7a31455), [outerIndexPtr()](classeigen_1_1sparsematrix#a9451af2795c1a5b97678272475e41422) 
    valuePtr() [2/2]
----------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const Scalar\* [Eigen::SparseMatrix](classeigen_1_1sparsematrix)< \_Scalar, \_Options, \_StorageIndex >::valuePtr  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const pointer to the array of values. This function is aimed at interoperability with other libraries. 
 
See also

[innerIndexPtr()](classeigen_1_1sparsematrix#a8e9ef5d399d36fdd860ad05cb7a31455), [outerIndexPtr()](classeigen_1_1sparsematrix#a9451af2795c1a5b97678272475e41422) 
   

---

The documentation for this class was generated from the following files:* [SparseMatrix.h](https://eigen.tuxfamily.org/dox/SparseMatrix_8h_source.html)
* [SparseRedux.h](https://eigen.tuxfamily.org/dox/SparseRedux_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SparseMatrix.html>

Eigen::Map
==========

  
### template<typename SparseMatrixType> class Eigen::Map< SparseMatrixType >

 Specialization of class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") for SparseMatrix-like storage. 

 
Template Parameters
 

|  |  |
| --- | --- |
| SparseMatrixType | the equivalent sparse matrix type of the referenced data, it must be a template instance of class [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation."). |

   
See also
class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data."), class [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation."), class [Ref<SparseMatrixType,Options>](classeigen_1_1ref_3_01sparsematrixtype_00_01options_01_4 "A sparse matrix expression referencing an existing sparse expression.") 
     ![Inheritance graph]          

|  |
| --- |
|  |
|  | [Map](classeigen_1_1map_3_01sparsematrixtype_01_4#a3afd7ca5fb61494e9195a1e318078028) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a3cdd6cab0abd7ac01925a695fc315d34), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a0fc44f3781a869a3a410edd6691fd899), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) nnz, const StorageIndex \*[outerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#a3b74af754254837fc591cd9936688b95), const StorageIndex \*[innerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af5cd1f13dde8578eb9891a4ac4a11977), const Scalar \*[valuePtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af91648a18729ae8ff29cb1d8751c5655), const StorageIndex \*innerNonZerosPtr=0) |
|  |
|  | [Map](classeigen_1_1map_3_01sparsematrixtype_01_4#aeecd1e0e97eeae254ad97cdf5bde9ec2) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a3cdd6cab0abd7ac01925a695fc315d34), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a0fc44f3781a869a3a410edd6691fd899), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) nnz, StorageIndex \*[outerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#a3b74af754254837fc591cd9936688b95), StorageIndex \*[innerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af5cd1f13dde8578eb9891a4ac4a11977), Scalar \*[valuePtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af91648a18729ae8ff29cb1d8751c5655), StorageIndex \*innerNonZerosPtr=0) |
|  |
|  | [~Map](classeigen_1_1map_3_01sparsematrixtype_01_4#aefb5ce85ff8508d6a035b1b72158ca83) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseMapBase< Derived, WriteAccessors >](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4) |
| Scalar &  | [coeffRef](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#aa9c42d48b9dd6f947ce3c257fe4bf2ca) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| StorageIndex \*  | [innerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af5cd1f13dde8578eb9891a4ac4a11977) () |
|  |
| StorageIndex \*  | [innerNonZeroPtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af877ea4e285a4497f80987fea66f7459) () |
|  |
| StorageIndex \*  | [outerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#a3b74af754254837fc591cd9936688b95) () |
|  |
| Scalar \*  | [valuePtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af91648a18729ae8ff29cb1d8751c5655) () |
|  |
|  | [~SparseMapBase](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#a4dfbcf3ac411885b1710ad04892c984d) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseMapBase< Derived, ReadOnlyAccessors >](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4) |
| Scalar  | [coeff](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a195e66f79171f78cc22d91fff37e36e3) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a0fc44f3781a869a3a410edd6691fd899) () const |
|  |
| const StorageIndex \*  | [innerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#ab044564756f472877b2c1a5706e540e2) () const |
|  |
| const StorageIndex \*  | [innerNonZeroPtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a2b35a1d701d6c6ea36b2d9f19660a68c) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a0df6dba8d71e0fb15b2995510853f83e) () const |
|  |
| bool  | [isCompressed](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#aafab4afa7ab2ff89eff049d4c71e2ce4) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a753e975b7b3643d821dc061141786870) () const |
|  |
| const StorageIndex \*  | [outerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a24c55dd8de4aca30e7c90b69aa5dca6b) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a3d6ede19db6d42074ae063bc876231b1) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a3cdd6cab0abd7ac01925a695fc315d34) () const |
|  |
| const Scalar \*  | [valuePtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a574ea9371c22eabebdda21c0787312dc) () const |
|  |
|  | [~SparseMapBase](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#ab375aedf824909a7f1a6af24ee60d70f) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseCompressedBase< Derived >](classeigen_1_1sparsecompressedbase) |
| [Map](classeigen_1_1map)< [Array](classeigen_1_1array)< Scalar, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 1 > >  | [coeffs](classeigen_1_1sparsecompressedbase#a7cf299e08d2a4f6d6869e631e51b12fe) () |
|  |
| const [Map](classeigen_1_1map)< const [Array](classeigen_1_1array)< Scalar, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 1 > >  | [coeffs](classeigen_1_1sparsecompressedbase#a101b155485ae59ea1261c4f6040f3dc4) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsecompressedbase#a197111c1289644f1ea38fe683ccdd82a) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsecompressedbase#aa64818e1aa43015dad01b114b2ab4687) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsecompressedbase#a411e972b097e6aef225415a4c2d0a0b5) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsecompressedbase#afc056a3895eae1a4c4767252ff04966a) () const |
|  |
| bool  | [isCompressed](classeigen_1_1sparsecompressedbase#a837934b33a80fe996ff20500373d3a61) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1sparsecompressedbase#a03de8b3da2c142ce8698a76123b3e7d3) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsecompressedbase#a53a82f962686e18c8dc07a4b9a85ed7b) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsecompressedbase#a2624d4c2661c582de168246c56e8d71e) () const |
|  |
| Scalar \*  | [valuePtr](classeigen_1_1sparsecompressedbase#a0f12f72d14b6c277d09be9f5ce2eab95) () |
|  |
| const Scalar \*  | [valuePtr](classeigen_1_1sparsecompressedbase#a0f44c739398794ea77f310b745cc5627) () const |
|  |
| - Public Member Functions inherited from [Eigen::SparseMatrixBase< Derived >](classeigen_1_1sparsematrixbase) |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1sparsematrixbase#aca7ce296424ef6e478ab0fb19547a7ee) () const |
|  |
| const internal::eval< Derived >::type  | [eval](classeigen_1_1sparsematrixbase#a761bd872a06b59632fcff7b7807a77ce) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1sparsematrixbase#a180fcba1ccf3cdf3252a263bc1de7a1d) () const |
|  |
| bool  | [isVector](classeigen_1_1sparsematrixbase#a7eedffa867031f649fd0fb9cc23ce4be) () const |
|  |
| template<typename OtherDerived >  |
| const [Product](classeigen_1_1product)< Derived, OtherDerived, AliasFreeProduct >  | [operator\*](classeigen_1_1sparsematrixbase#a9d4d71b3f34389e6fc01f2b86e43f7a4) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &other) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1sparsematrixbase#ac86cc88a4cfef21db6b64ec0ab4c8f0a) () const |
|  |
| const [SparseView](classeigen_1_1sparseview)< Derived >  | [pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d) (const Scalar &reference=Scalar(0), const RealScalar &epsilon=[NumTraits](structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1sparsematrixbase#a1944e9fa9ce7937bfc3a87b2cb94371f) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1sparsematrixbase#a124bc57921775eb9aa2dfd9727e23472) () const |
|  |
| SparseSymmetricPermutationProduct< Derived, [Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)|[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749) >  | [twistedBy](classeigen_1_1sparsematrixbase#a51d4898bd6a57cc3ba543a39b102423e) (const [PermutationMatrix](classeigen_1_1permutationmatrix)< [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) > &perm) const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::SparseMatrixBase< Derived >](classeigen_1_1sparsematrixbase) |
| enum  | {  [RowsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a456cda7b9d938e57194036a41d634604) ,  [ColsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a27ba349f075d026c1f51d1ec69aa5b14) ,  [SizeAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5aa5022cfa2bb53129883e9b7b8abd3d68) ,  **MaxRowsAtCompileTime** ,  **MaxColsAtCompileTime** ,  **MaxSizeAtCompileTime** ,  [IsVectorAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a14a3f566ed2a074beddb8aef0223bfdf) ,  [NumDimensions](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a2366131ffcc38bff48a1c7572eb86dd3) ,  [Flags](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a2af043b36fe9e08df0107cf6de496165) ,  **IsRowMajor** ,  **InnerSizeAtCompileTime**  } |
|  |
| typedef internal::traits< Derived >::[StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) | [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) |
|  |
| typedef Scalar  | [value\_type](classeigen_1_1sparsematrixbase#ac254d3b61718ebc2136d27bac043dcb7) |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |
| - Protected Member Functions inherited from [Eigen::SparseCompressedBase< Derived >](classeigen_1_1sparsecompressedbase) |
|  | [SparseCompressedBase](classeigen_1_1sparsecompressedbase#af79f020db965367d97eb954fc68d8f99) () |
|  |

  Map() [1/2]
-----------

    template<typename SparseMatrixType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Map](classeigen_1_1map)< SparseMatrixType >::[Map](classeigen_1_1map) | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *nnz*,  |
|  |  | StorageIndex \*  | *outerIndexPtr*,  |
|  |  | StorageIndex \*  | *innerIndexPtr*,  |
|  |  | Scalar \*  | *valuePtr*,  |
|  |  | StorageIndex \*  | *innerNonZerosPtr* = `0` |
|  | ) |  |  |

 | inline |

 
 Constructs a read-write [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") to a sparse matrix of size *rows* x *cols*, containing *nnz* non-zero coefficients, stored as a sparse format as defined by the pointers *outerIndexPtr*, *innerIndexPtr*, and *valuePtr*. If the optional parameter *innerNonZerosPtr* is the null pointer, then a standard compressed format is assumed.

 This constructor is available only if `SparseMatrixType` is non-const.

 More details on the expected storage schemes are given in the [manual pages](group__tutorialsparse). 

    Map() [2/2]
-----------

    template<typename SparseMatrixType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Map](classeigen_1_1map)< SparseMatrixType >::[Map](classeigen_1_1map) | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *nnz*,  |
|  |  | const StorageIndex \*  | *outerIndexPtr*,  |
|  |  | const StorageIndex \*  | *innerIndexPtr*,  |
|  |  | const Scalar \*  | *valuePtr*,  |
|  |  | const StorageIndex \*  | *innerNonZerosPtr* = `0` |
|  | ) |  |  |

 | inline |

 
 This is the const version of the above constructor.

 This constructor is available only if `SparseMatrixType` is const, e.g.: 



```
Map<const SparseMatrix<double> >  

```
    ~Map()
------

    template<typename SparseMatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::Map](classeigen_1_1map)< SparseMatrixType >::~[Map](classeigen_1_1map) | ( |  | ) |  |

 | inline |

 
 Empty destructor 

   

---

The documentation for this class was generated from the following file:* [SparseMap.h](https://eigen.tuxfamily.org/dox/SparseMap_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Map_3_01SparseMatrixType_01_4.html>

Fixed-size vectorizable Eigen objects
=====================================

  The goal of this page is to explain what we mean by "fixed-size vectorizable".

 
 Executive Summary
===================

 An [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") object is called "fixed-size vectorizable" if it has fixed size and that size is a multiple of 16 bytes.

 Examples include: 


* Eigen::Vector2d
* Eigen::Vector4d
* Eigen::Vector4f
* Eigen::Matrix2d
* Eigen::Matrix2f
* Eigen::Matrix4d
* Eigen::Matrix4f
* Eigen::Affine3d
* Eigen::Affine3f
* [Eigen::Quaterniond](group__geometry__module#ga5daab8e66aa480465000308455578830)
* [Eigen::Quaternionf](group__geometry__module#ga66aa915a26d698c60ed206818c3e4c9b)

 
 Explanation
=============

 First, "fixed-size" should be clear: an Eigen object has fixed size if its number of rows and its number of columns are fixed at compile-time. So for example Matrix3f has fixed size, but MatrixXf doesn't (the opposite of fixed-size is dynamic-size).

 The array of coefficients of a fixed-size Eigen object is a plain "static array", it is not dynamically allocated. For example, the data behind a Matrix4f is just a "float array[16]".

 Fixed-size objects are typically very small, which means that we want to handle them with zero runtime overhead – both in terms of memory usage and of speed.

 Now, vectorization works with 128-bit packets (e.g., SSE, AltiVec, NEON), 256-bit packets (e.g., AVX), or 512-bit packets (e.g., AVX512). Moreover, for performance reasons, these packets are most efficiently read and written if they have the same alignment as the packet size, that is 16 bytes, 32 bytes, and 64 bytes respectively.

 So it turns out that the best way that fixed-size Eigen objects can be vectorized, is if their size is a multiple of 16 bytes (or more). Eigen will then request 16-byte alignment (or more) for these objects, and henceforth rely on these objects being aligned to achieve maximal efficiency. 

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TopicFixedSizeVectorizable.html>

Using STL Containers with Eigen
===============================

  
 Executive summary
===================

 If you're compiling in [c++17] mode only with a sufficiently recent compiler (e.g., GCC>=7, clang>=5, MSVC>=19.12), then everything is taken care by the compiler and you can stop reading.

 Otherwise, using STL containers on [fixed-size vectorizable Eigen types](group__topicfixedsizevectorizable), or classes having members of such types, requires the use of an over-aligned allocator. That is, an allocator capable of allocating buffers with 16, 32, or even 64 bytes alignment. Eigen does provide one ready for use: [aligned\_allocator](classeigen_1_1aligned__allocator "STL compatible allocator to use with types requiring a non standrad alignment.").

 Prior to [c++11], if you want to use the `std::vector` container, then you also have to  `#include <Eigen/StdVector>` .

 These issues arise only with [fixed-size vectorizable Eigen types](group__topicfixedsizevectorizable) and [structures having such Eigen objects as member](group__topicstructhavingeigenmembers). For other Eigen types, such as Vector3f or MatrixXd, no special care is needed when using STL containers.

 
 Using an aligned allocator
============================

 STL containers take an optional template parameter, the allocator type. When using STL containers on [fixed-size vectorizable Eigen types](group__topicfixedsizevectorizable), you need tell the container to use an allocator that will always allocate memory at 16-byte-aligned (or more) locations. Fortunately, Eigen does provide such an allocator: [Eigen::aligned\_allocator](classeigen_1_1aligned__allocator "STL compatible allocator to use with types requiring a non standrad alignment.").

 For example, instead of 



```
std::map<int, Eigen::Vector4d>

```

 you need to use 



```
std::map<int, Eigen::Vector4d, std::less<int>, 
         [Eigen::aligned\_allocator<std::pair<const int, Eigen::Vector4d>](classeigen_1_1aligned__allocator) > >
```

 Note that the third parameter `std::less<int>` is just the default value, but we have to include it because we want to specify the fourth parameter, which is the allocator type.

 
 The case of std::vector
=========================

 This section is for c++98/03 users only. [c++11] (or above) users can stop reading here.

 So in c++98/03, the situation with `std::vector` is more complicated because of a bug in the standard (explanation below). To workaround the issue, we had to specialize it for the [Eigen::aligned\_allocator](classeigen_1_1aligned__allocator "STL compatible allocator to use with types requiring a non standrad alignment.") type. In practice you **must** use the [Eigen::aligned\_allocator](classeigen_1_1aligned__allocator "STL compatible allocator to use with types requiring a non standrad alignment.") (not another aligned allocator), **and** #include <Eigen/StdVector>.

 Here is an example: 



```
#include<Eigen/StdVector>
/\* ... \*/
std::vector<Eigen::Vector4f,Eigen::aligned_allocator<Eigen::Vector4f> >

```

**Explanation:** The `resize()` method of `std::vector` takes a `value_type` argument (defaulting to `value_type()`). So with `std::vector<Eigen::Vector4d>`, some Eigen::Vector4d objects will be passed by value, which discards any alignment modifiers, so a Eigen::Vector4d can be created at an unaligned location. In order to avoid that, the only solution we saw was to specialize `std::vector` to make it work on a slight modification of, here, Eigen::Vector4d, that is able to deal properly with this situation. 

 
 An alternative - specializing std::vector for Eigen types
-----------------------------------------------------------

 As an alternative to the recommended approach described above, you have the option to specialize std::vector for [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") types requiring alignment. The advantage is that you won't need to declare std::vector all over with [Eigen::aligned\_allocator](classeigen_1_1aligned__allocator "STL compatible allocator to use with types requiring a non standrad alignment."). One drawback on the other hand side is that the specialization needs to be defined before all code pieces in which e.g. `std::vector<Vector2d>` is used. Otherwise, without knowing the specialization the compiler will compile that particular instance with the default `std::allocator` and you program is most likely to crash.

 Here is an example: 



```
#include<Eigen/StdVector>
/\* ... \*/
EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Matrix2d)
std::vector<Eigen::Vector2d>

```
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TopicStlContainers.html>

Passing Eigen objects by value to functions
===========================================

  Passing objects by value is almost always a very bad idea in C++, as this means useless copies, and one should pass them by reference instead.

 With Eigen, this is even more important: passing [fixed-size vectorizable Eigen objects](group__topicfixedsizevectorizable) by value is not only inefficient, it can be illegal or make your program crash! And the reason is that these Eigen objects have alignment modifiers that aren't respected when they are passed by value.

 For example, a function like this, where `v` is passed by value:

 
```
void my_function([Eigen::Vector2d](classeigen_1_1matrix) v);
```

needs to be rewritten as follows, passing `v` by const reference:

 
```
void my_function(const [Eigen::Vector2d](classeigen_1_1matrix)& v);

```

Likewise if you have a class having an Eigen object as member:

 
```
struct Foo
{
  [Eigen::Vector2d](classeigen_1_1matrix) v;
};
void my_function(Foo v);

```

This function also needs to be rewritten like this: 



```
void my_function(const Foo& v);

```

Note that on the other hand, there is no problem with functions that return objects by value. 

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TopicPassingByValue.html>

Compiler making a wrong assumption on stack alignment
=====================================================

  #### It appears that this was a GCC bug that has been fixed in GCC 4.5. If you hit this issue, please upgrade to GCC 4.5 and report to us, so we can update this page.

 This is an issue that, so far, we met only with GCC on Windows: for instance, MinGW and TDM-GCC.

 By default, in a function like this,

 
```
void foo()
{
  [Eigen::Quaternionf](classeigen_1_1quaternion) q;
  //...
}
```

GCC assumes that the stack is already 16-byte-aligned so that the object *q* will be created at a 16-byte-aligned location. For this reason, it doesn't take any special care to explicitly align the object *q*, as [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") requires.

 The problem is that, in some particular cases, this assumption can be wrong on Windows, where the stack is only guaranteed to have 4-byte alignment. Indeed, even though GCC takes care of aligning the stack in the main function and does its best to keep it aligned, when a function is called from another thread or from a binary compiled with another compiler, the stack alignment can be corrupted. This results in the object 'q' being created at an unaligned location, making your program crash with the [assertion on unaligned arrays](group__topicunalignedarrayassert). So far we found the three following solutions.

 
 Local solution
================

 A local solution is to mark such a function with this attribute: 



```
__attribute__((force_align_arg_pointer)) void foo()
{
  [Eigen::Quaternionf](classeigen_1_1quaternion) q;
  //...
}

```

 Read [this GCC documentation](http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Function-Attributes.html#Function-Attributes) to understand what this does. Of course this should only be done on GCC on Windows, so for portability you'll have to encapsulate this in a macro which you leave empty on other platforms. The advantage of this solution is that you can finely select which function might have a corrupted stack alignment. Of course on the downside this has to be done for every such function, so you may prefer one of the following two global solutions.

 
 Global solutions
==================

 A global solution is to edit your project so that when compiling with GCC on Windows, you pass this option to GCC: 



```
-mincoming-stack-boundary=2

```

 Explanation: this tells GCC that the stack is only required to be aligned to 2^2=4 bytes, so that GCC now knows that it really must take extra care to honor the 16 byte alignment of [fixed-size vectorizable Eigen types](group__topicfixedsizevectorizable) when needed.

 Another global solution is to pass this option to gcc: 



```
-mstackrealign

```

 which has the same effect than adding the `force_align_arg_pointer` attribute to all functions.

 These global solutions are easy to use, but note that they may slowdown your program because they lead to extra prologue/epilogue instructions for every function. 

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TopicWrongStackAlignment.html>

Jacobi module
=============

  This module provides Jacobi and Givens rotations.

 
```
#include <Eigen/Jacobi>

```

In addition to listed classes, it defines the two following [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") methods to apply a Jacobi or Givens rotation:


* [MatrixBase::applyOnTheLeft()](classeigen_1_1matrixbase#a3a08ad41e81d8ad4a37b5d5c7490e765)
* [MatrixBase::applyOnTheRight()](classeigen_1_1matrixbase#a45d91752925d2757fc8058a293b15462).

 

|  |
| --- |
|  |
| class  | [Eigen::JacobiRotation< Scalar >](classeigen_1_1jacobirotation) |
|  | Rotation given by a cosine-sine pair. [More...](classeigen_1_1jacobirotation#details) |
|  |




|  |
| --- |
|  |
| template<typename OtherScalar >  |
| void  | [Eigen::MatrixBase< Derived >::applyOnTheRight](group__jacobi__module#gaa07f741c86219601664433777827bf1c) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) p, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) q, const [JacobiRotation](classeigen_1_1jacobirotation)< OtherScalar > &j) |
|  |

  applyOnTheRight()
-----------------

    template<typename Derived >   template<typename OtherScalar >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::applyOnTheRight  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *p*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *q*,  |
|  |  | const [JacobiRotation](classeigen_1_1jacobirotation)< OtherScalar > &  | *j* |
|  | ) |  |  |

 | inline |

 
 Applies the rotation in the plane *j* to the columns *p* and *q* of `*this`, i.e., it computes B = B \* J with \( B = \left ( \begin{array}{cc} \text{\*this.col}(p) & \text{\*this.col}(q) \end{array} \right ) \).

 
See also
class [JacobiRotation](classeigen_1_1jacobirotation "Rotation given by a cosine-sine pair."), [MatrixBase::applyOnTheLeft()](classeigen_1_1matrixbase#a3a08ad41e81d8ad4a37b5d5c7490e765), internal::apply\_rotation\_in\_the\_plane() 
    

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__Jacobi__Module.html>

Householder module
==================

  This module provides Householder transformations.

 
```
#include <Eigen/Householder>

```
 

|  |
| --- |
|  |
| class  | [Eigen::HouseholderSequence< VectorsType, CoeffsType, Side >](classeigen_1_1householdersequence) |
|  | Sequence of Householder reflections acting on subspaces with decreasing size. [More...](classeigen_1_1householdersequence#details) |
|  |




|  |
| --- |
|  |
| template<typename VectorsType , typename CoeffsType >  |
| [HouseholderSequence](classeigen_1_1householdersequence)< VectorsType, CoeffsType >  | [Eigen::householderSequence](group__householder__module#ga5f2b3f80cdf7ae96609e4a8d2e55e371) (const VectorsType &v, const CoeffsType &h) |
|  | Convenience function for constructing a Householder sequence. [More...](group__householder__module#ga5f2b3f80cdf7ae96609e4a8d2e55e371) |
|  |
| template<typename VectorsType , typename CoeffsType >  |
| [HouseholderSequence](classeigen_1_1householdersequence)< VectorsType, CoeffsType, [OnTheRight](group__enums#ggac22de43beeac7a78b384f99bed5cee0ba329fc3a54ceb2b6e0e73b400998b8a82) >  | [Eigen::rightHouseholderSequence](group__householder__module#ga897ebce658762148f706f73a05525e89) (const VectorsType &v, const CoeffsType &h) |
|  | Convenience function for constructing a Householder sequence. [More...](group__householder__module#ga897ebce658762148f706f73a05525e89) |
|  |

  householderSequence()
---------------------

    template<typename VectorsType , typename CoeffsType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [HouseholderSequence](classeigen_1_1householdersequence)<VectorsType,CoeffsType> Eigen::householderSequence  | ( | const VectorsType &  | *v*,  |
|  |  | const CoeffsType &  | *h* |
|  | ) |  |  |

 
 Convenience function for constructing a Householder sequence. 

 % . \ # </> \ 



Returns
A [HouseholderSequence](classeigen_1_1householdersequence "Sequence of Householder reflections acting on subspaces with decreasing size.") constructed from the specified arguments. 
    rightHouseholderSequence()
--------------------------

    template<typename VectorsType , typename CoeffsType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [HouseholderSequence](classeigen_1_1householdersequence)<VectorsType,CoeffsType,[OnTheRight](group__enums#ggac22de43beeac7a78b384f99bed5cee0ba329fc3a54ceb2b6e0e73b400998b8a82)> Eigen::rightHouseholderSequence  | ( | const VectorsType &  | *v*,  |
|  |  | const CoeffsType &  | *h* |
|  | ) |  |  |

 
 Convenience function for constructing a Householder sequence. 

 % . \ # </> \ 



Returns
A [HouseholderSequence](classeigen_1_1householdersequence "Sequence of Householder reflections acting on subspaces with decreasing size.") constructed from the specified arguments.
 This function differs from [householderSequence()](group__householder__module#ga5f2b3f80cdf7ae96609e4a8d2e55e371 "Convenience function for constructing a Householder sequence.") in that the template argument `OnTheSide` of the constructed [HouseholderSequence](classeigen_1_1householdersequence "Sequence of Householder reflections acting on subspaces with decreasing size.") is set to OnTheRight, instead of the default OnTheLeft. 

    

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__Householder__Module.html>

Solving linear least squares systems
====================================

  This page describes how to solve linear least squares systems using Eigen. An overdetermined system of equations, say *Ax* = *b*, has no solutions. In this case, it makes sense to search for the vector *x* which is closest to being a solution, in the sense that the difference *Ax* - *b* is as small as possible. This *x* is called the least square solution (if the Euclidean norm is used).

 The three methods discussed on this page are the SVD decomposition, the QR decomposition and normal equations. Of these, the SVD decomposition is generally the most accurate but the slowest, normal equations is the fastest but least accurate, and the QR decomposition is in between.

 
 Using the SVD decomposition
=============================

 The [solve()](classeigen_1_1svdbase#ab28499936c0764fe5b56b9f4de701e26)  method in the [BDCSVD](classeigen_1_1bdcsvd "class Bidiagonal Divide and Conquer SVD") class can be directly used to solve linear squares systems. It is not enough to compute only the singular values (the default for this class); you also need the singular vectors but the thin SVD decomposition suffices for computing least squares solutions:

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
 
int main()
{
   MatrixXf A = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3, 2);
   cout << "Here is the matrix A:\n" << A << endl;
   VectorXf b = [VectorXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3);
   cout << "Here is the right hand side b:\n" << b << endl;
   cout << "The least-squares solution is:\n"
        << A.bdcSvd([ComputeThinU](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9aa7fb4e98834788d0b1b0f2b8467d2527) | [ComputeThinV](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a540036417bfecf2e791a70948c227f47)).solve(b) << endl;
}
```
 | 
```
Here is the matrix A:
  0.68  0.597
-0.211  0.823
 0.566 -0.605
Here is the right hand side b:
 -0.33
 0.536
-0.444
The least-squares solution is:
-0.67
0.314

```
 |

 This is example from the page [Linear algebra and decompositions](group__tutoriallinearalgebra) . If you just need to solve the least squares problem, but are not interested in the SVD per se, a faster alternative method is [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition "Complete orthogonal decomposition (COD) of a matrix.").

 
 Using the QR decomposition
============================

 The solve() method in QR decomposition classes also computes the least squares solution. There are three QR decomposition classes: [HouseholderQR](classeigen_1_1householderqr "Householder QR decomposition of a matrix.") (no pivoting, fast but unstable if your matrix is not rull rank), [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting.") (column pivoting, thus a bit slower but more stable) and [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with full pivoting.") (full pivoting, so slowest and slightly more stable than [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting.")). Here is an example with column pivoting:

 

| Example: | Output:  |
| --- | --- |
| 
```
MatrixXf A = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3, 2);
VectorXf b = [VectorXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3);
cout << "The solution using the QR decomposition is:\n"
     << A.colPivHouseholderQr().solve(b) << endl;

```
 | 
```
The solution using the QR decomposition is:
-0.67
0.314

```
 |

 
 Using normal equations
========================

 Finding the least squares solution of *Ax* = *b* is equivalent to solving the normal equation *A*T*Ax* = *A*T*b*. This leads to the following code

 

| Example: | Output:  |
| --- | --- |
| 
```
MatrixXf A = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3, 2);
VectorXf b = [VectorXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3);
cout << "The solution using normal equations is:\n"
     << (A.transpose() * A).ldlt().solve(A.transpose() * b) << endl;

```
 | 
```
The solution using normal equations is:
-0.67
0.314

```
 |

 This method is usually the fastest, especially when *A* is "tall and skinny". However, if the matrix *A* is even mildly ill-conditioned, this is not a good method, because the condition number of *A*T*A* is the square of the condition number of *A*. This means that you lose roughly twice as many digits of accuracy using the normal equation, compared to the more stable methods mentioned above. 

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__LeastSquares.html>

Inplace matrix decompositions
=============================

  Starting from Eigen 3.3, the LU, Cholesky, and QR decompositions can operate *inplace*, that is, directly within the given input matrix. This feature is especially useful when dealing with huge matrices, and or when the available memory is very limited (embedded systems).

 To this end, the respective decomposition class must be instantiated with a Ref<> matrix type, and the decomposition object must be constructed with the input matrix as argument. As an example, let us consider an inplace LU decomposition with partial pivoting.

 Let's start with the basic inclusions, and declaration of a 2x2 matrix `A:` 

 

| code | output  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
 
int main()
{
  MatrixXd A(2,2);
  A << 2, -1, 1, 3;
  cout << "Here is the input matrix A before decomposition:\n" << A << endl;
```
 | 
```
Here is the input matrix A before decomposition:
 2 -1
 1  3

```
 |

 No surprise here! Then, let's declare our inplace LU object `lu`, and check the content of the matrix `A:` 

 

|  |  |
| --- | --- |
| 
```
  PartialPivLU<Ref<MatrixXd> > lu(A);
  cout << "Here is the input matrix A after decomposition:\n" << A << endl;

```
 | 
```
Here is the input matrix A after decomposition:
  2  -1
0.5 3.5

```
 |

 Here, the `lu` object computes and stores the `L` and `U` factors within the memory held by the matrix `A`. The coefficients of `A` have thus been destroyed during the factorization, and replaced by the L and U factors as one can verify:

 

|  |  |
| --- | --- |
| 
```
  cout << "Here is the matrix storing the L and U factors:\n" << lu.matrixLU() << endl;

```
 | 
```
Here is the matrix storing the L and U factors:
  2  -1
0.5 3.5

```
 |

 Then, one can use the `lu` object as usual, for instance to solve the Ax=b problem: 




|  |  |
| --- | --- |
| 
```
  MatrixXd A0(2,2); A0 << 2, -1, 1, 3;
  VectorXd b(2);    b << 1, 2;
  VectorXd x = lu.solve(b);
  cout << "Residual: " << (A0 * x - b).norm() << endl;

```
 | 
```
Residual: 0

```
 |

 Here, since the content of the original matrix `A` has been lost, we had to declared a new matrix `A0` to verify the result.

 Since the memory is shared between `A` and `lu`, modifying the matrix `A` will make `lu` invalid. This can easily be verified by modifying the content of `A` and trying to solve the initial problem again:

 

|  |  |
| --- | --- |
| 
```
  A << 3, 4, -2, 1;
  x = lu.solve(b);
  cout << "Residual: " << (A0 * x - b).norm() << endl;

```
 | 
```
Residual: 15.8114

```
 |

 Note that there is no shared pointer under the hood, it is the **responsibility** **of** **the** **user** to keep the input matrix `A` in life as long as `lu` is living.

 If one wants to update the factorization with the modified A, one has to call the compute method as usual: 




|  |  |
| --- | --- |
| 
```
  A0 = A; // save A
  lu.compute(A);
  x = lu.solve(b);
  cout << "Residual: " << (A0 * x - b).norm() << endl;

```
 | 
```
Residual: 0

```
 |

 Note that calling compute does not change the memory which is referenced by the `lu` object. Therefore, if the compute method is called with another matrix `A1` different than `A`, then the content of `A1` won't be modified. This is still the content of `A` that will be used to store the L and U factors of the matrix `A1`. This can easily be verified as follows: 




|  |  |
| --- | --- |
| 
```
  MatrixXd A1(2,2);
  A1 << 5,-2,3,4;
  lu.compute(A1);
  cout << "Here is the input matrix A1 after decomposition:\n" << A1 << endl;

```
 | 
```
Here is the input matrix A1 after decomposition:
 5 -2
 3  4

```
 |

 The matrix `A1` is unchanged, and one can thus solve A1\*x=b, and directly check the residual without any copy of `A1:` 




|  |  |
| --- | --- |
| 
```
  x = lu.solve(b);
  cout << "Residual: " << (A1 * x - b).norm() << endl;

```
 | 
```
Residual: 2.48253e-16

```
 |

 Here is the list of matrix decompositions supporting this inplace mechanism:

 * class [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.")
* class [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.")
* class [PartialPivLU](classeigen_1_1partialpivlu "LU decomposition of a matrix with partial pivoting, and related features.")
* class [FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features.")
* class [HouseholderQR](classeigen_1_1householderqr "Householder QR decomposition of a matrix.")
* class [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting.")
* class [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with full pivoting.")
* class [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition "Complete orthogonal decomposition (COD) of a matrix.")

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__InplaceDecomposition.html>

Structures Having Eigen Members
===============================

  
 Executive Summary
===================

 If you define a structure having members of [fixed-size vectorizable Eigen types](group__topicfixedsizevectorizable), you must ensure that calling operator new on it allocates properly aligned buffers. If you're compiling in [c++17] mode only with a sufficiently recent compiler (e.g., GCC>=7, clang>=5, MSVC>=19.12), then everything is taken care by the compiler and you can stop reading.

 Otherwise, you have to overload its `operator new` so that it generates properly aligned pointers (e.g., 32-bytes-aligned for Vector4d and AVX). Fortunately, Eigen provides you with a macro `EIGEN_MAKE_ALIGNED_OPERATOR_NEW` that does that for you.

 
 What kind of code needs to be changed?
========================================

 The kind of code that needs to be changed is this:

 
```
class Foo
{
  ...
  [Eigen::Vector2d](classeigen_1_1matrix) v;
  ...
};
 
...
 
Foo *foo = new Foo;
```

In other words: you have a class that has as a member a [fixed-size vectorizable Eigen object](group__topicfixedsizevectorizable), and then you dynamically create an object of that class.

 
 How should such code be modified?
===================================

 Very easy, you just need to put a `EIGEN_MAKE_ALIGNED_OPERATOR_NEW` macro in a public part of your class, like this:

 
```
class Foo
{
  ...
  [Eigen::Vector4d](classeigen_1_1matrix) v;
  ...
public:
  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
};
 
...
 
Foo *foo = new Foo;

```

This macro makes `new Foo` always return an aligned pointer.

 In [c++17], this macro is empty.

 If this approach is too intrusive, see also the [other solutions](group__topicstructhavingeigenmembers#StructHavingEigenMembers_othersolutions).

 
 Why is this needed?
=====================

 OK let's say that your code looks like this:

 
```
class Foo
{
  ...
  [Eigen::Vector4d](classeigen_1_1matrix) v;
  ...
};
 
...
 
Foo *foo = new Foo;

```

A Eigen::Vector4d consists of 4 doubles, which is 256 bits. This is exactly the size of an AVX register, which makes it possible to use AVX for all sorts of operations on this vector. But AVX instructions (at least the ones that Eigen uses, which are the fast ones) require 256-bit alignment. Otherwise you get a segmentation fault.

 For this reason, Eigen takes care by itself to require 256-bit alignment for Eigen::Vector4d, by doing two things: 


* Eigen requires 256-bit alignment for the Eigen::Vector4d's array (of 4 doubles). With [c++11] this is done with the [alignas](https://en.cppreference.com/w/cpp/keyword/alignas) keyword, or compiler's extensions for c++98/03.
* Eigen overloads the `operator new` of Eigen::Vector4d so it will always return 256-bit aligned pointers. (removed in [c++17])

 Thus, normally, you don't have to worry about anything, Eigen handles alignment of operator new for you...

 ... except in one case. When you have a `class Foo` like above, and you dynamically allocate a new `Foo` as above, then, since `Foo` doesn't have aligned `operator new`, the returned pointer foo is not necessarily 256-bit aligned.

 The alignment attribute of the member `v` is then relative to the start of the class `Foo`. If the `foo` pointer wasn't aligned, then `foo->v` won't be aligned either!

 The solution is to let `class Foo` have an aligned `operator new`, as we showed in the previous section.

 This explanation also holds for SSE/NEON/MSA/Altivec/VSX targets, which require 16-bytes alignment, and AVX512 which requires 64-bytes alignment for fixed-size objects multiple of 64 bytes (e.g., Eigen::Matrix4d).

 
 Should I then put all the members of Eigen types at the beginning of my class?
================================================================================

 That's not required. Since Eigen takes care of declaring adequate alignment, all members that need it are automatically aligned relatively to the class. So code like this works fine:

 
```
class Foo
{
  double x;
  [Eigen::Vector4d](classeigen_1_1matrix) v;
public:
  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
};

```

That said, as usual, it is recommended to sort the members so that alignment does not waste memory. In the above example, with AVX, the compiler will have to reserve 24 empty bytes between `x` and `v`.

 
 What about dynamic-size matrices and vectors?
===============================================

 Dynamic-size matrices and vectors, such as Eigen::VectorXd, allocate dynamically their own array of coefficients, so they take care of requiring absolute alignment automatically. So they don't cause this issue. The issue discussed here is only with [fixed-size vectorizable matrices and vectors](group__topicfixedsizevectorizable).

 
 So is this a bug in Eigen?
============================

 No, it's not our bug. It's more like an inherent problem of the c++ language specification that has been solved in c++17 through the feature known as [dynamic memory allocation for over-aligned data](http://wg21.link/p0035r4).

 
 What if I want to do this conditionally (depending on template parameters) ?
==============================================================================

 For this situation, we offer the macro `EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)`. It will generate aligned operators like `EIGEN_MAKE_ALIGNED_OPERATOR_NEW` if `NeedsToAlign` is true. It will generate operators with the default alignment if `NeedsToAlign` is false. In [c++17], this macro is empty.

 Example:

 
```
template<int n> class Foo
{
  typedef [Eigen::Matrix<float,n,1>](classeigen_1_1matrix) [Vector](group__matrixtypedefs#ga2623c0d4641dda067fbdb9a009ef0c91);
  enum { NeedsToAlign = (sizeof([Vector](group__matrixtypedefs#ga2623c0d4641dda067fbdb9a009ef0c91))%16)==0 };
  ...
  [Vector](group__matrixtypedefs#ga2623c0d4641dda067fbdb9a009ef0c91) v;
  ...
public:
  EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
};
 
...
 
Foo<4> *foo4 = new Foo<4>; // foo4 is guaranteed to be 128bit-aligned
Foo<3> *foo3 = new Foo<3>; // foo3 has only the system default alignment guarantee
```


 Other solutions
=================

 In case putting the `EIGEN_MAKE_ALIGNED_OPERATOR_NEW` macro everywhere is too intrusive, there exists at least two other solutions.

 
 Disabling alignment
---------------------

 The first is to disable alignment requirement for the fixed size members: 



```
class Foo
{
  ...
  [Eigen::Matrix<double,4,1,Eigen::DontAlign>](classeigen_1_1matrix) v;
  ...
};

```

 This `v` is fully compatible with aligned Eigen::Vector4d. This has only for effect to make load/stores to `v` more expensive (usually slightly, but that's hardware dependent).

 
 Private structure
-------------------

 The second consist in storing the fixed-size objects into a private struct which will be dynamically allocated at the construction time of the main object:

 
```
struct Foo_d
{
  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
  Vector4d v;
  ...
};
 
 
struct Foo {
  Foo() { init_d(); }
  ~Foo() { delete d; }
  void bar()
  {
    // use d->v instead of v
    ...
  }
private:
  void init_d() { d = new Foo_d; }
  Foo_d* d;
};

```

The clear advantage here is that the class `Foo` remains unchanged regarding alignment issues. The drawback is that an additional heap allocation will be required whatsoever. 

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TopicStructHavingEigenMembers.html>

Global array typedefs
=====================

  Eigen defines several typedef shortcuts for most common 1D and 2D array types.

 The general patterns are the following:

 `ArrayRowsColsType` where `Rows` and `Cols` can be `2`,`3`,`4` for fixed size square matrices or `X` for dynamic size, and where `Type` can be `i` for integer, `f` for float, `d` for double, `cf` for complex float, `cd` for complex double.

 For example, `Array33d` is a fixed-size 3x3 array type of doubles, and `ArrayXXf` is a dynamic-size matrix of floats.

 There are also `ArraySizeType` which are self-explanatory. For example, `Array4cf` is a fixed-size 1D array of 4 complex floats.

 With [c++11], template alias are also defined for common sizes. They follow the same pattern as above except that the scalar type suffix is replaced by a template parameter, i.e.:


* `ArrayRowsCols<Type>` where `Rows` and `Cols` can be `2`,`3`,`4`, or `X` for fixed or dynamic size.
* `ArraySize<Type>` where `Size` can be `2`,`3`,`4` or `X` for fixed or dynamic size 1D arrays.

 
See also
class [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") 
 

|  |
| --- |
|  |
|  template<typename Type >  |
| using  | [Eigen::Array2](group__arraytypedefs#ga27e36e9e1da10f2c17d69bbfa7ead870) = [Array](classeigen_1_1array)< Type, 2, 1 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::Array22](group__arraytypedefs#gad5e10990863f064300d78e80b4537a0b) = [Array](classeigen_1_1array)< Type, 2, 2 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::Array2X](group__arraytypedefs#ga995df558b61646d505b9feabd30a28d0) = [Array](classeigen_1_1array)< Type, 2, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::Array3](group__arraytypedefs#ga7ca781ec91d7b715d226d5057d50b250) = [Array](classeigen_1_1array)< Type, 3, 1 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::Array33](group__arraytypedefs#gafb8560ef95ce6a7284131d91da82cf8a) = [Array](classeigen_1_1array)< Type, 3, 3 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::Array3X](group__arraytypedefs#gaf24f8bd443138027dd02599e7c58ef60) = [Array](classeigen_1_1array)< Type, 3, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::Array4](group__arraytypedefs#ga2b5e91e45a496f9893059ab4f298a9ee) = [Array](classeigen_1_1array)< Type, 4, 1 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::Array44](group__arraytypedefs#gabcb97c1d614be824fd355ca29632e30f) = [Array](classeigen_1_1array)< Type, 4, 4 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::Array4X](group__arraytypedefs#gaab59985198663295e89134835783bd0d) = [Array](classeigen_1_1array)< Type, 4, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::ArrayX](group__arraytypedefs#ga9f9db3ea1c9715a30ed77c6cd434bbd3) = [Array](classeigen_1_1array)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 1 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::ArrayX2](group__arraytypedefs#ga273e82d1306290af7e02aeb75a831fca) = [Array](classeigen_1_1array)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 2 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::ArrayX3](group__arraytypedefs#ga428c78ad433d2f285650ccee8fc0f29f) = [Array](classeigen_1_1array)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 3 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::ArrayX4](group__arraytypedefs#gaad02550dee7a18c7a74941be73de327d) = [Array](classeigen_1_1array)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 4 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::ArrayXX](group__arraytypedefs#ga6a3ca2b2a8694c17ed25ac03cafdaa04) = [Array](classeigen_1_1array)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__arraytypedefs.html>

Global matrix typedefs
======================

  Eigen defines several typedef shortcuts for most common matrix and vector types.

 The general patterns are the following:

 `MatrixSizeType` where `Size` can be `2`,`3`,`4` for fixed size square matrices or `X` for dynamic size, and where `Type` can be `i` for integer, `f` for float, `d` for double, `cf` for complex float, `cd` for complex double.

 For example, `Matrix3d` is a fixed-size 3x3 matrix type of doubles, and `MatrixXf` is a dynamic-size matrix of floats.

 There are also `VectorSizeType` and `RowVectorSizeType` which are self-explanatory. For example, `Vector4cf` is a fixed-size vector of 4 complex floats.

 With [c++11], template alias are also defined for common sizes. They follow the same pattern as above except that the scalar type suffix is replaced by a template parameter, i.e.:


* `MatrixSize<Type>` where `Size` can be `2`,`3`,`4` for fixed size square matrices or `X` for dynamic size.
* `MatrixXSize<Type>` and `MatrixSizeX<Type>` where `Size` can be `2`,`3`,`4` for hybrid dynamic/fixed matrices.
* `VectorSize<Type>` and `RowVectorSize<Type>` for column and row vectors.

 With [c++11], you can also use fully generic column and row vector types: `Vector<Type,Size>` and `RowVector<Type,Size>`.

 
See also
class [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") 
 

|  |
| --- |
|  |
|  template<typename Type >  |
| using  | [Eigen::Matrix2](group__matrixtypedefs#ga73a2c673745de956e66d30ad61fd4a7e) = [Matrix](classeigen_1_1matrix)< Type, 2, 2 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::Matrix2X](group__matrixtypedefs#ga9fc5afaeb88d6cd4f2503dd6127b1ba8) = [Matrix](classeigen_1_1matrix)< Type, 2, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::Matrix3](group__matrixtypedefs#ga6d61b8a0039eeb04e6faf382b8635a7a) = [Matrix](classeigen_1_1matrix)< Type, 3, 3 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::Matrix3X](group__matrixtypedefs#gab22d239b05eafe7ac235325d454e7530) = [Matrix](classeigen_1_1matrix)< Type, 3, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::Matrix4](group__matrixtypedefs#ga946841161df693bb792644ba410aa0f0) = [Matrix](classeigen_1_1matrix)< Type, 4, 4 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::Matrix4X](group__matrixtypedefs#ga93eea03ee4428402191f86ef2239975e) = [Matrix](classeigen_1_1matrix)< Type, 4, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::MatrixX](group__matrixtypedefs#ga8a779d79defc9f822fa6ff5869c2ba6b) = [Matrix](classeigen_1_1matrix)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::MatrixX2](group__matrixtypedefs#ga1d162ebb520e589b3a5a5f4024aa3ae4) = [Matrix](classeigen_1_1matrix)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 2 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::MatrixX3](group__matrixtypedefs#gacdb4b32de62bf47373eec29612b73657) = [Matrix](classeigen_1_1matrix)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 3 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::MatrixX4](group__matrixtypedefs#gabe35b438cb4f39d72092d1fbb16153b8) = [Matrix](classeigen_1_1matrix)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 4 > |
|  | [c++11]  |
|  |
|  template<typename Type , int Size>  |
| using  | [Eigen::RowVector](group__matrixtypedefs#ga181118570e7a0bb1cf3366180061f14f) = [Matrix](classeigen_1_1matrix)< Type, 1, Size > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::RowVector2](group__matrixtypedefs#gafbd00706e87859d2f0ad68b54e825809) = [Matrix](classeigen_1_1matrix)< Type, 1, 2 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::RowVector3](group__matrixtypedefs#gaaedec7d966e8dafd1611d106333bf461) = [Matrix](classeigen_1_1matrix)< Type, 1, 3 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::RowVector4](group__matrixtypedefs#gafb7f5975c1c3be1237e7f0bf589c6add) = [Matrix](classeigen_1_1matrix)< Type, 1, 4 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::RowVectorX](group__matrixtypedefs#gacbfe7eb9c070bcb75ef42aec7a6fbafe) = [Matrix](classeigen_1_1matrix)< Type, 1, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) > |
|  | [c++11]  |
|  |
|  template<typename Type , int Size>  |
| using  | [Eigen::Vector](group__matrixtypedefs#ga2623c0d4641dda067fbdb9a009ef0c91) = [Matrix](classeigen_1_1matrix)< Type, Size, 1 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::Vector2](group__matrixtypedefs#ga5c7551c08d7b0ca055e4abdc37b05a80) = [Matrix](classeigen_1_1matrix)< Type, 2, 1 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::Vector3](group__matrixtypedefs#ga0af1f95a68328299e1e9b273e4934c7a) = [Matrix](classeigen_1_1matrix)< Type, 3, 1 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::Vector4](group__matrixtypedefs#ga299db30993dd4e9ca74c7691ad32d50b) = [Matrix](classeigen_1_1matrix)< Type, 4, 1 > |
|  | [c++11]  |
|  |
|  template<typename Type >  |
| using  | [Eigen::VectorX](group__matrixtypedefs#ga7e589e92f0ae4929f5540a578cfd2bac) = [Matrix](classeigen_1_1matrix)< Type, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 1 > |
|  | [c++11]  |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__matrixtypedefs.html>

Flags
=====

  These are the possible bits which can be OR'ed to constitute the flags of a matrix or expression.

 It is important to note that these flags are a purely compile-time notion. They are a compile-time property of an expression type, implemented as enum's. They are not stored in memory at runtime, and they do not incur any runtime overhead.

 
See also

[MatrixBase::Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) 
 

|  |
| --- |
|  |
| const unsigned int  | [Eigen::ActualPacketAccessBit](group__flags#ga020f88dc24a123b9afbd756c4b220db2) |
|  |
| EIGEN\_DEPRECATED const unsigned int  | [Eigen::AlignedBit](group__flags#gac5795adacd266512a26890973503ed88) |
|  |
| const unsigned int  | [Eigen::CompressedAccessBit](group__flags#gaed0244284da47a2b8661261431173caf) |
|  |
| const unsigned int  | [Eigen::DirectAccessBit](group__flags#gabf1e9d0516a933445a4c307ad8f14915) |
|  |
| EIGEN\_DEPRECATED const unsigned int  | [Eigen::EvalBeforeAssigningBit](group__flags#ga0972b20dc004d13984e642b3bd12532e) |
|  |
| const unsigned int  | [Eigen::EvalBeforeNestingBit](group__flags#gaa34e83bae46a8eeae4e69ebe3aaecbed) |
|  |
| const unsigned int  | [Eigen::LinearAccessBit](group__flags#ga4b983a15d57cd55806df618ac544d09e) |
|  |
| const unsigned int  | [Eigen::LvalueBit](group__flags#gae2c323957f20dfdc6cb8f44428eaec1a) |
|  |
| const unsigned int  | [Eigen::NoPreferredStorageOrderBit](group__flags#ga3c186ad80ddcf5e2ed3d7ee31cca1860) |
|  |
| const unsigned int  | [Eigen::PacketAccessBit](group__flags#ga1a306a438e1ab074e8be59512e887b9f) |
|  |
| const unsigned int  | [Eigen::RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762) |
|  |

  ActualPacketAccessBit
---------------------

   

|  |
| --- |
| const unsigned int Eigen::ActualPacketAccessBit |

 
 If vectorization is enabled (EIGEN\_VECTORIZE is defined) this constant is set to the value *PacketAccessBit*.

 If vectorization is not enabled (EIGEN\_VECTORIZE is not defined) this constant is set to the value 0. 

    AlignedBit
----------

   

|  |
| --- |
| EIGEN\_DEPRECATED const unsigned int Eigen::AlignedBit |

 
 
**[Deprecated:](deprecated#_deprecated000009)**

 means the first coefficient packet is guaranteed to be aligned. An expression cannot have the AlignedBit without the PacketAccessBit flag. In other words, this means we are allow to perform an aligned packet access to the first element regardless of the expression kind: 



```
expression.packet<[Aligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ae12d0f8f869c40c76128260af2242bc8)>(0);
```
    CompressedAccessBit
-------------------

   

|  |
| --- |
| const unsigned int Eigen::CompressedAccessBit |

 
 Means that the underlying coefficients can be accessed through pointers to the sparse (un)compressed storage format, that is, the expression provides: 



```
inline const Scalar* valuePtr() const;
inline const [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde)* innerIndexPtr() const;
inline const [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde)* outerIndexPtr() const;
inline const [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde)* innerNonZeroPtr() const;
```
    DirectAccessBit
---------------

   

|  |
| --- |
| const unsigned int Eigen::DirectAccessBit |

 
 Means that the underlying array of coefficients can be directly accessed as a plain strided array. The memory layout of the array of coefficients must be exactly the natural one suggested by rows(), cols(), outerStride(), innerStride(), and the RowMajorBit. This rules out expressions such as [Diagonal](classeigen_1_1diagonal "Expression of a diagonal/subdiagonal/superdiagonal in a matrix."), whose coefficients, though referencable, do not have such a regular memory layout.

 See the comment on LvalueBit for an explanation of how LvalueBit and DirectAccessBit are mutually orthogonal. 

    EvalBeforeAssigningBit
----------------------

   

|  |
| --- |
| EIGEN\_DEPRECATED const unsigned int Eigen::EvalBeforeAssigningBit |

 
 
**[Deprecated:](deprecated#_deprecated000008)**
means the expression should be evaluated before any assignment 
    EvalBeforeNestingBit
--------------------

   

|  |
| --- |
| const unsigned int Eigen::EvalBeforeNestingBit |

 
 means the expression should be evaluated by the calling expression 

    LinearAccessBit
---------------

   

|  |
| --- |
| const unsigned int Eigen::LinearAccessBit |

 
 Short version: means the expression can be seen as 1D vector.

 Long version: means that one can access the coefficients of this expression by coeff(int), and coeffRef(int) in the case of a lvalue expression. These index-based access methods are guaranteed to not have to do any runtime computation of a (row, col)-pair from the index, so that it is guaranteed that whenever it is available, index-based access is at least as fast as (row,col)-based access. Expressions for which that isn't possible don't have the LinearAccessBit.

 If both PacketAccessBit and LinearAccessBit are set, then the packets of this expression can be accessed by packet(int), and writePacket(int) in the case of a lvalue expression.

 Typically, all vector expressions have the LinearAccessBit, but there is one exception: [Product](classeigen_1_1product "Expression of the product of two arbitrary matrices or vectors.") expressions don't have it, because it would be troublesome for vectorization, even when the [Product](classeigen_1_1product "Expression of the product of two arbitrary matrices or vectors.") is a vector expression. Thus, vector [Product](classeigen_1_1product "Expression of the product of two arbitrary matrices or vectors.") expressions allow index-based coefficient access but not index-based packet access, so they don't have the LinearAccessBit. 

    LvalueBit
---------

   

|  |
| --- |
| const unsigned int Eigen::LvalueBit |

 
 Means the expression has a coeffRef() method, i.e. is writable as its individual coefficients are directly addressable. This rules out read-only expressions.

 Note that DirectAccessBit and LvalueBit are mutually orthogonal, as there are examples of expression having one but note the other: 


* writable expressions that don't have a very simple memory layout as a strided array, have LvalueBit but not DirectAccessBit
* Map-to-const expressions, for example Map<const Matrix>, have DirectAccessBit but not LvalueBit

 Expressions having LvalueBit also have their coeff() method returning a const reference instead of returning a new value. 

    NoPreferredStorageOrderBit
--------------------------

   

|  |
| --- |
| const unsigned int Eigen::NoPreferredStorageOrderBit |

 
 for an expression, this means that the storage order can be either row-major or column-major. The precise choice will be decided at evaluation time or when combined with other expressions. 



See also

[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762), [Storage orders](group__topicstorageorders) 
    PacketAccessBit
---------------

   

|  |
| --- |
| const unsigned int Eigen::PacketAccessBit |

 
 Short version: means the expression might be vectorized

 Long version: means that the coefficients can be handled by packets and start at a memory location whose alignment meets the requirements of the present CPU architecture for optimized packet access. In the fixed-size case, there is the additional condition that it be possible to access all the coefficients by packets (this implies the requirement that the size be a multiple of 16 bytes, and that any nontrivial strides don't break the alignment). In the dynamic-size case, there is no such condition on the total size and strides, so it might not be possible to access all coeffs by packets.

 
Note
This bit can be set regardless of whether vectorization is actually enabled. To check for actual vectorizability, see *ActualPacketAccessBit*. 
    RowMajorBit
-----------

   

|  |
| --- |
| const unsigned int Eigen::RowMajorBit |

 
 for a matrix, this means that the storage order is row-major. If this bit is not set, the storage order is column-major. For an expression, this determines the storage order of the matrix created by evaluation of that expression. 



See also

[Storage orders](group__topicstorageorders) 
    

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__flags.html>

Catalog of coefficient-wise math functions
==========================================

  This table presents a catalog of the coefficient-wise math functions supported by Eigen. In this table, `a`, `b`, refer to [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") objects or expressions, and `m` refers to a linear algebra Matrix/Vector object. Standard scalar types are abbreviated as follows:


* `int:` `i32`
* `float:` `f`
* `double:` `d`
* `std::complex<float>`: `cf`
* `std::complex<double>`: `cd`

 For each row, the first column list the equivalent calls for arrays, and matrices when supported. Of course, all functions are available for matrices by first casting it as an array: `m.array()`.

 The third column gives some hints in the underlying scalar implementation. In most cases, Eigen does not implement itself the math function but relies on the STL for standard scalar types, or user-provided functions for custom scalar types. For instance, some simply calls the respective function of the STL while preserving [argument-dependent lookup](http://en.cppreference.com/w/cpp/language/adl) for custom types. The following: 



```
using std::foo;
foo(a[i]);

```

 means that the STL's function `std::foo` will be potentially called if it is compatible with the underlying scalar type. If not, then the user must ensure that an overload of the function foo is available for the given scalar type (usually defined in the same namespace as the given scalar type). This also means that, unless specified, if the function `std::foo` is available only in some recent c++ versions (e.g., c++11), then the respective Eigen's function/method will be usable on standard types only if the compiler support the required c++ version.

 

| API | Description | Default scalar implementation | SIMD  |
| --- | --- | --- | --- |
|  |
| Basic operations  |
|  a.[abs](group__coeffwisemathfunctions)();  [abs](namespaceeigen#ae27242789e7e62a8c42579b79be59b1a)(a);  m.[cwiseAbs](group__coeffwisemathfunctions)();  | absolute value ( \( |a\_i| \))  | using [std::abs](http://en.cppreference.com/w/cpp/numeric/math/fabs);  abs(a[i]);  | SSE2, AVX (i32,f,d)  |
|  a.[inverse](group__coeffwisemathfunctions)();  [inverse](namespaceeigen#ae9de9064c3b832ee804c0e0957e80334)(a);  m.[cwiseInverse](group__coeffwisemathfunctions)();  | inverse value ( \( 1/a\_i \))  | 1/a[i];  | All engines (f,d,fc,fd)  |
|  a.[conjugate](group__coeffwisemathfunctions)();  [conj](namespaceeigen#ab84f39a06a18e1ebb23f8be80345b79d)(a);  m.[conjugate](group__coeffwisemathfunctions)();  | [complex conjugate](https://en.wikipedia.org/wiki/Complex_conjugate) ( \( \bar{a\_i} \)), no-op for real  | using [std::conj](http://en.cppreference.com/w/cpp/numeric/complex/conj);  conj(a[i]);  | All engines (fc,fd)  |
|  a.[arg](group__coeffwisemathfunctions)();  [arg](namespaceeigen#aa539408a09481d35961e11ee78793db1)(a);  m.[cwiseArg](group__coeffwisemathfunctions)();  | phase angle of complex number  | using [std::arg](http://en.cppreference.com/w/cpp/numeric/complex/arg);  arg(a[i]);  | All engines (fc,fd)  |
| Exponential functions  |
|  a.[exp](group__coeffwisemathfunctions)();  [exp](namespaceeigen#ae491aecf7dab66ac7e11008c5766694d)(a);  | \( e \) raised to the given power ( \( e^{a\_i} \))  | using [std::exp](http://en.cppreference.com/w/cpp/numeric/math/exp);  exp(a[i]);  | SSE2, AVX (f,d)  |
|  a.[log](group__coeffwisemathfunctions)();  [log](namespaceeigen#ae8bb75ba4f5f30a7571146dbfa653c6d)(a);  | natural (base \( e \)) logarithm ( \( \ln({a\_i}) \))  | using [std::log](http://en.cppreference.com/w/cpp/numeric/math/log);  log(a[i]);  | SSE2, AVX (f)  |
|  a.[log1p](group__coeffwisemathfunctions)();  [log1p](namespaceeigen#ac5c8a2cded6b59628f2de04f24d2fff4)(a);  | natural (base \( e \)) logarithm of 1 plus  the given number ( \( \ln({1+a\_i}) \))  | built-in generic implementation based on `log`, plus `using` [`std::log1p`](http://en.cppreference.com/w/cpp/numeric/math/log1p) ; [c++11] |  |
|  a.[log10](group__coeffwisemathfunctions)();  [log10](namespaceeigen#a25256faeec3ffd0f3615a0e1e45dfb14)(a);  | base 10 logarithm ( \( \log\_{10}({a\_i}) \))  | using [std::log10](http://en.cppreference.com/w/cpp/numeric/math/log10);  log10(a[i]);  |  |
| Power functions  |
|  a.[pow](classeigen_1_1arraybase#a5df3d99d47747b72d61f235c9fb925e3)(b);  [pow](classeigen_1_1arraybase#acb769e1ab1d809abb77c7ab98021ad81)(a,b);   | raises a number to the given power ( \( a\_i ^ {b\_i} \))  `a` and `b` can be either an array or scalar.  | using [std::pow](http://en.cppreference.com/w/cpp/numeric/math/pow);  pow(a[i],b[i]); (plus builtin for integer types)  |  |
|  a.[sqrt](group__coeffwisemathfunctions)();  [sqrt](namespaceeigen#af4f536e8ea56702e63088efb3706d1f0)(a); m.[cwiseSqrt](group__coeffwisemathfunctions)();  | computes square root ( \( \sqrt a\_i \))  | using [std::sqrt](http://en.cppreference.com/w/cpp/numeric/math/sqrt);  sqrt(a[i]);  | SSE2, AVX (f,d)  |
|  a.[rsqrt](group__coeffwisemathfunctions)();  [rsqrt](namespaceeigen#a6374a6a9e972e9358d7ab3fced32d7d5)(a);  | [reciprocal square root](https://en.wikipedia.org/wiki/Fast_inverse_square_root) ( \( 1/{\sqrt a\_i} \))  | using [std::sqrt](http://en.cppreference.com/w/cpp/numeric/math/sqrt);  1/sqrt(a[i]);  | SSE2, AVX, AltiVec, ZVector (f,d) (approx + 1 Newton iteration)  |
|  a.[square](group__coeffwisemathfunctions)();  [square](namespaceeigen#af28ef8cae3b37bcf1b47910cd6f20d4c)(a);  | computes square power ( \( a\_i^2 \))  | a[i]\*a[i]  | All (i32,f,d,cf,cd)  |
|  a.[cube](group__coeffwisemathfunctions)();  [cube](namespaceeigen#ae04fac7e3068f05c3f01982554a21d80)(a);  | computes cubic power ( \( a\_i^3 \))  | a[i]\*a[i]\*a[i]  | All (i32,f,d,cf,cd)  |
|  a.[abs2](group__coeffwisemathfunctions)();  [abs2](namespaceeigen#a54cc34b64b4935307efc06d56cd531df)(a); m.[cwiseAbs2](group__coeffwisemathfunctions)();  | computes the squared absolute value ( \( |a\_i|^2 \))  | real: a[i]\*a[i]  complex: real(a[i])\*real(a[i])  + imag(a[i])\*imag(a[i])  | All (i32,f,d)  |
| Trigonometric functions  |
|  a.[sin](group__coeffwisemathfunctions)();  [sin](namespaceeigen#ae6e8ad270ff41c088d7651567594f796)(a);  | computes sine  | using [std::sin](http://en.cppreference.com/w/cpp/numeric/math/sin);  sin(a[i]);  | SSE2, AVX (f)  |
|  a.[cos](group__coeffwisemathfunctions)();  [cos](namespaceeigen#ad01d50a42869218f1d54af13f71517a6)(a);  | computes cosine  | using [std::cos](http://en.cppreference.com/w/cpp/numeric/math/cos);  cos(a[i]);  | SSE2, AVX (f)  |
|  a.[tan](group__coeffwisemathfunctions)();  [tan](namespaceeigen#a3bc116a6243f38c22f851581aa7b521a)(a);  | computes tangent  | using [std::tan](http://en.cppreference.com/w/cpp/numeric/math/tan);  tan(a[i]);  |  |
|  a.[asin](group__coeffwisemathfunctions)();  [asin](namespaceeigen#a6c5c246b877ac331495d21e7a5d51616)(a);  | computes arc sine ( \( \sin^{-1} a\_i \))  | using [std::asin](http://en.cppreference.com/w/cpp/numeric/math/asin);  asin(a[i]);  |  |
|  a.[acos](group__coeffwisemathfunctions)();  [acos](namespaceeigen#a3fe3a136370fefae062591304c6a7ebd)(a);  | computes arc cosine ( \( \cos^{-1} a\_i \))  | using [std::acos](http://en.cppreference.com/w/cpp/numeric/math/acos);  acos(a[i]);  |  |
|  a.[atan](group__coeffwisemathfunctions)();  [atan](namespaceeigen#a230744e17147d12e8ef3f2fc3796f64f)(a);  | computes arc tangent ( \( \tan^{-1} a\_i \))  | using [std::atan](http://en.cppreference.com/w/cpp/numeric/math/atan);  atan(a[i]);  |  |
| Hyperbolic functions  |
|  a.[sinh](group__coeffwisemathfunctions)();  [sinh](namespaceeigen#af284ce359b6efd4b594a9f8a1f5e5d96)(a);  | computes hyperbolic sine  | using [std::sinh](http://en.cppreference.com/w/cpp/numeric/math/sinh);  sinh(a[i]);  |  |
|  a.[cohs](group__coeffwisemathfunctions)();  [cosh](namespaceeigen#a34b99a26a2a1e7ff985a5ace16eedfcb)(a);  | computes hyperbolic cosine  | using [std::cosh](http://en.cppreference.com/w/cpp/numeric/math/cosh);  cosh(a[i]);  |  |
|  a.[tanh](group__coeffwisemathfunctions)();  [tanh](namespaceeigen#a0110c233d357169fd58fdf5656992a98)(a);  | computes hyperbolic tangent  | using [std::tanh](http://en.cppreference.com/w/cpp/numeric/math/tanh);  tanh(a[i]);  |  |
|  a.[asinh](group__coeffwisemathfunctions)();  [asinh](namespaceeigen#a727dd851cc82a62574145bc5abdc7aed)(a);  | computes inverse hyperbolic sine  | using [std::asinh](http://en.cppreference.com/w/cpp/numeric/math/asinh);  asinh(a[i]);  |  |
|  a.[cohs](group__coeffwisemathfunctions)();  [acosh](namespaceeigen#a97676fabe9a7466cc2ccb6a2d0f83471)(a);  | computes hyperbolic cosine  | using [std::acosh](http://en.cppreference.com/w/cpp/numeric/math/acosh);  acosh(a[i]);  |  |
|  a.[atanh](group__coeffwisemathfunctions)();  [atanh](namespaceeigen#a45d37a9f1c784eb8ab61ed24f07f436f)(a);  | computes hyperbolic tangent  | using [std::atanh](http://en.cppreference.com/w/cpp/numeric/math/atanh);  atanh(a[i]);  |  |
| Nearest integer floating point operations  |
|  a.[ceil](group__coeffwisemathfunctions)();  [ceil](namespaceeigen#aa73e38be0689a463ae14141b9cf89c35)(a);  | nearest integer not less than the given value  | using [std::ceil](http://en.cppreference.com/w/cpp/numeric/math/ceil);  ceil(a[i]);  | SSE4,AVX,ZVector (f,d)  |
|  a.[floor](group__coeffwisemathfunctions)();  [floor](namespaceeigen#abf03d773a87830bc7fde51bcd94c89a0)(a);  | nearest integer not greater than the given value  | using [std::floor](http://en.cppreference.com/w/cpp/numeric/math/floor);  floor(a[i]);  | SSE4,AVX,ZVector (f,d)  |
|  a.[round](group__coeffwisemathfunctions)();  [round](namespaceeigen#ad9eaa98e8016ef17024a18a2f3e5bef3)(a);  | nearest integer,  rounding away from zero in halfway cases  | built-in generic implementation  based on `floor` and `ceil`, plus `using` [`std::round`](http://en.cppreference.com/w/cpp/numeric/math/round) ; [c++11] | SSE4,AVX,ZVector (f,d)  |
|  a.[rint](group__coeffwisemathfunctions)();  [rint](namespaceeigen#a0211fe61b9e390dfd8ca213fe9c7fca3)(a);  | nearest integer,  rounding to nearest even in halfway cases  | built-in generic implementation using [`std::rint`](http://en.cppreference.com/w/cpp/numeric/math/rint) ; [c++11] or [`rintf`](http://en.cppreference.com/w/c/numeric/math/rint) ;  | SSE4,AVX (f,d)  |
| Floating point manipulation functions  |
| Classification and comparison  |
|  a.[isFinite](group__coeffwisemathfunctions)();  [isfinite](namespaceeigen#aba24ec81dec745a00b7f33adead89811)(a);  | checks if the given number has finite value  | built-in generic implementation, plus `using` [`std::isfinite`](http://en.cppreference.com/w/cpp/numeric/math/isfinite) ; [c++11] |  |
|  a.[isInf](group__coeffwisemathfunctions)();  [isinf](namespaceeigen#a1f1103712e337c4c96a05f949637a4c8)(a);  | checks if the given number is infinite  | built-in generic implementation, plus `using` [`std::isinf`](http://en.cppreference.com/w/cpp/numeric/math/isinf) ; [c++11] |  |
|  a.[isNaN](group__coeffwisemathfunctions)();  [isnan](namespaceeigen#a99adfc5178f3fd5488304284388b2a10)(a);  | checks if the given number is not a number  | built-in generic implementation, plus `using` [`std::isnan`](http://en.cppreference.com/w/cpp/numeric/math/isnan) ; [c++11] |  |
| Error and gamma functions  |
| Require `#include` `<unsupported/Eigen/SpecialFunctions>` |
|  a.[erf](group__coeffwisemathfunctions)();  [erf](namespaceeigen#ac336e0eba2b12dca8b01da1a006566c3)(a);  | error function  | using [std::erf](http://en.cppreference.com/w/cpp/numeric/math/erf); [c++11]  erf(a[i]);  |  |
|  a.[erfc](group__coeffwisemathfunctions)();  [erfc](namespaceeigen#a17bcfbd19ed883ecf581f06ac1eeeb8c)(a);  | complementary error function  | using [std::erfc](http://en.cppreference.com/w/cpp/numeric/math/erfc); [c++11]  erfc(a[i]);  |  |
|  a.[lgamma](group__coeffwisemathfunctions)();  [lgamma](namespaceeigen#ac2e6331628bb1989b7be6d7e42827649)(a);  | natural logarithm of the gamma function  | using [std::lgamma](http://en.cppreference.com/w/cpp/numeric/math/lgamma); [c++11]  lgamma(a[i]);  |  |
|  a.[digamma](group__coeffwisemathfunctions)();  [digamma](namespaceeigen#af40db84b3db19fe25fe2f77c429420e5)(a);  | [logarithmic derivative of the gamma function](https://en.wikipedia.org/wiki/Digamma_function) | built-in for float and double  |  |
|  [igamma](group__coeffwisemathfunctions)(a,x);  | [lower incomplete gamma integral](https://en.wikipedia.org/wiki/Incomplete_gamma_function)  \( \gamma(a\_i,x\_i)= \frac{1}{|a\_i|} \int\_{0}^{x\_i}e^{\text{-}t} t^{a\_i-1} \mathrm{d} t \)  | built-in for float and double, but requires [c++11] |  |
|  [igammac](group__coeffwisemathfunctions)(a,x);  | [upper incomplete gamma integral](https://en.wikipedia.org/wiki/Incomplete_gamma_function)  \( \Gamma(a\_i,x\_i) = \frac{1}{|a\_i|} \int\_{x\_i}^{\infty}e^{\text{-}t} t^{a\_i-1} \mathrm{d} t \)  | built-in for float and double, but requires [c++11] |  |
| Special functions  |
| Require `#include` `<unsupported/Eigen/SpecialFunctions>` |
|  [polygamma](group__coeffwisemathfunctions)(n,x);  | [n-th derivative of digamma at x](https://en.wikipedia.org/wiki/Polygamma_function) | built-in generic based on [`lgamma`](#cwisetable_lgamma) , [`digamma`](#cwisetable_digamma)  and [`zeta`](#cwisetable_zeta) .  |  |
|  [betainc](group__coeffwisemathfunctions)(a,b,x);  | [Incomplete beta function](https://en.wikipedia.org/wiki/Beta_function#Incomplete_beta_function) | built-in for float and double, but requires [c++11] |  |
|  [zeta](group__coeffwisemathfunctions)(a,b);  a.[zeta](group__coeffwisemathfunctions)(b);  | [Hurwitz zeta function](https://en.wikipedia.org/wiki/Hurwitz_zeta_function)  \( \zeta(a\_i,b\_i)=\sum\_{k=0}^{\infty}(b\_i+k)^{\text{-}a\_i} \)  | built-in for float and double  |  |
|  a.[ndtri](group__coeffwisemathfunctions)();  [ndtri](namespaceeigen#ab7ed113a2dd4a4342c72b550faea308d)(a);  | [Inverse](classeigen_1_1inverse "Expression of the inverse of another expression.") of the CDF of the Normal distribution function  | built-in for float and double  |  |
|  |

   
 

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__CoeffwiseMathFunctions.html>

Catalogue of dense decompositions
=================================

  This page presents a catalogue of the dense matrix decompositions offered by [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."). For an introduction on linear solvers and decompositions, check this [page](group__tutoriallinearalgebra) . To get an overview of the true relative speed of the different decompositions, check this [benchmark](group__densedecompositionbenchmark) .

 
 Catalogue of decompositions offered by Eigen
==============================================

 

|  | Generic information, not Eigen-specific  | Eigen-specific   |
| --- | --- | --- |
| Decomposition  | Requirements on the matrix  | Speed  | Algorithm reliability and accuracy  | Rank-revealing  | Allows to compute (besides linear solving)  | Linear solver provided by [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") | Maturity of [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s implementation  | Optimizations   |
| [PartialPivLU](classeigen_1_1partialpivlu "LU decomposition of a matrix with partial pivoting, and related features.") | Invertible  | Fast  | Depends on condition number  | -  | -  | Yes  | Excellent  | Blocking, Implicit MT   |
| [FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features.") | -  | Slow  | Proven  | Yes  | -  | Yes  | Excellent  | -   |
| [HouseholderQR](classeigen_1_1householderqr "Householder QR decomposition of a matrix.") | -  | Fast  | Depends on condition number  | -  | Orthogonalization  | Yes  | Excellent  | Blocking   |
| [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting.") | -  | Fast  | Good  | Yes  | Orthogonalization  | Yes  | Excellent  | *-*   |
| [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with full pivoting.") | -  | Slow  | Proven  | Yes  | Orthogonalization  | Yes  | Average  | -   |
| [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition "Complete orthogonal decomposition (COD) of a matrix.") | -  | Fast  | Good  | Yes  | Orthogonalization  | Yes  | Excellent  | *-*   |
| [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") | Positive definite  | Very fast  | Depends on condition number  | -  | -  | Yes  | Excellent  | Blocking   |
| [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") | Positive or negative semidefinite[1](#note1) | Very fast  | Good  | -  | -  | Yes  | Excellent  | *Soon: blocking*   |
|  Singular values and eigenvalues decompositions  |
| [BDCSVD](classeigen_1_1bdcsvd "class Bidiagonal Divide and Conquer SVD") (divide & conquer)  | -  | One of the fastest SVD algorithms  | Excellent  | Yes  | Singular values/vectors, least squares  | Yes (and does least squares)  | Excellent  | Blocked bidiagonalization   |
| [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") (two-sided)  | -  | Slow (but fast for small matrices)  | Proven[3](#note3) | Yes  | Singular values/vectors, least squares  | Yes (and does least squares)  | Excellent  | R-SVD   |
| [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver "Computes eigenvalues and eigenvectors of selfadjoint matrices.") | Self-adjoint  | Fast-average[2](#note2) | Good  | Yes  | Eigenvalues/vectors  | -  | Excellent  | *Closed forms for 2x2 and 3x3*   |
| [ComplexEigenSolver](classeigen_1_1complexeigensolver "Computes eigenvalues and eigenvectors of general complex matrices.") | Square  | Slow-very slow[2](#note2) | Depends on condition number  | Yes  | Eigenvalues/vectors  | -  | Average  | -   |
| [EigenSolver](classeigen_1_1eigensolver "Computes eigenvalues and eigenvectors of general matrices.") | Square and real  | Average-slow[2](#note2) | Depends on condition number  | Yes  | Eigenvalues/vectors  | -  | Average  | -   |
| [GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver "Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem.") | Square  | Fast-average[2](#note2) | Depends on condition number  | -  | Generalized eigenvalues/vectors  | -  | Good  | -   |
|  Helper decompositions  |
| [RealSchur](classeigen_1_1realschur "Performs a real Schur decomposition of a square matrix.") | Square and real  | Average-slow[2](#note2) | Depends on condition number  | Yes  | -  | -  | Average  | -   |
| [ComplexSchur](classeigen_1_1complexschur "Performs a complex Schur decomposition of a real or complex square matrix.") | Square  | Slow-very slow[2](#note2) | Depends on condition number  | Yes  | -  | -  | Average  | -   |
| [Tridiagonalization](classeigen_1_1tridiagonalization "Tridiagonal decomposition of a selfadjoint matrix.") | Self-adjoint  | Fast  | Good  | -  | -  | -  | Good  | *Soon: blocking*   |
| [HessenbergDecomposition](classeigen_1_1hessenbergdecomposition "Reduces a square matrix to Hessenberg form by an orthogonal similarity transformation.") | Square  | Average  | Good  | -  | -  | -  | Good  | *Soon: blocking*   |

 **Notes:** 


* **1**: There exist two variants of the [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") algorithm. [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s one produces a pure diagonal D matrix, and therefore it cannot handle indefinite matrices, unlike Lapack's one which produces a block diagonal D matrix.
* **2**: Eigenvalues, SVD and Schur decompositions rely on iterative algorithms. Their convergence speed depends on how well the eigenvalues are separated.
* **3**: Our [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") is two-sided, making for proven and optimal precision for square matrices. For non-square matrices, we have to use a QR preconditioner first. The default choice, [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting."), is already very reliable, but if you want it to be proven, use [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with full pivoting.") instead.

 
 Terminology
=============

  
**Selfadjoint**  For a real matrix, selfadjoint is a synonym for symmetric. For a complex matrix, selfadjoint is a synonym for *hermitian*. More generally, a matrix \( A \) is selfadjoint if and only if it is equal to its adjoint \( A^\* \). The adjoint is also called the *conjugate* *transpose*.  
**Positive/negative definite**  A selfadjoint matrix \( A \) is positive definite if \( v^\* A v > 0 \) for any non zero vector \( v \). In the same vein, it is negative definite if \( v^\* A v < 0 \) for any non zero vector \( v \)  
**Positive/negative semidefinite**  
A selfadjoint matrix \( A \) is positive semi-definite if \( v^\* A v \ge 0 \) for any non zero vector \( v \). In the same vein, it is negative semi-definite if \( v^\* A v \le 0 \) for any non zero vector \( v \) 

   
**Blocking**  Means the algorithm can work per block, whence guaranteeing a good scaling of the performance for large matrices.  
**Implicit Multi Threading (MT)**  Means the algorithm can take advantage of multicore processors via OpenMP. "Implicit" means the algortihm itself is not parallelized, but that it relies on parallelized matrix-matrix product routines.  
**Explicit Multi Threading (MT)**  Means the algorithm is explicitly parallelized to take advantage of multicore processors via OpenMP.  
**Meta-unroller**  Means the algorithm is automatically and explicitly unrolled for very small fixed size matrices.  
     

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TopicLinearAlgebraDecompositions.html>

Linear algebra and decompositions
=================================

  This page explains how to solve linear systems, compute various decompositions such as LU, QR, SVD, eigendecompositions... After reading this page, don't miss our [catalogue](group__topiclinearalgebradecompositions)  of dense matrix decompositions.

 
 Basic linear solving
======================

 **The** **problem:** You have a system of equations, that you have written as a single matrix equation 


 \[ Ax \: = \: b \] 

  Where *A* and *b* are matrices (*b* could be a vector, as a special case). You want to find a solution *x*.

 **The** **solution:** You can choose between various decompositions, depending on the properties of your matrix *A*, and depending on whether you favor speed or accuracy. However, let's start with an example that works in all cases, and is a good compromise: 




| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
 
int main()
{
   Matrix3f A;
   Vector3f b;
   A << 1,2,3,  4,5,6,  7,8,10;
   b << 3, 3, 4;
   cout << "Here is the matrix A:\n" << A << endl;
   cout << "Here is the vector b:\n" << b << endl;
   Vector3f x = A.colPivHouseholderQr().solve(b);
   cout << "The solution is:\n" << x << endl;
}
```
 | 
```
Here is the matrix A:
 1  2  3
 4  5  6
 7  8 10
Here is the vector b:
3
3
4
The solution is:
-2
 1
 1

```
 |

 In this example, the colPivHouseholderQr() method returns an object of class [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting."). Since here the matrix is of type Matrix3f, this line could have been replaced by: 



```
ColPivHouseholderQR<Matrix3f> dec(A);
Vector3f x = dec.solve(b);

```

Here, [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting.") is a QR decomposition with column pivoting. It's a good compromise for this tutorial, as it works for all matrices while being quite fast. Here is a table of some other decompositions that you can choose from, depending on your matrix, the problem you are trying to solve, and the trade-off you want to make:

 

| Decomposition  | Method  | Requirements on the matrix  | Speed (small-to-medium)  | Speed (large)  | Accuracy  |
| --- | --- | --- | --- | --- | --- |
| [PartialPivLU](classeigen_1_1partialpivlu "LU decomposition of a matrix with partial pivoting, and related features.") | partialPivLu()  | Invertible  | ++  | ++  | +  |
| [FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features.") | fullPivLu()  | None  | -  | - -  | +++  |
| [HouseholderQR](classeigen_1_1householderqr "Householder QR decomposition of a matrix.") | householderQr()  | None  | ++  | ++  | +  |
| [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting.") | colPivHouseholderQr()  | None  | +  | -  | +++  |
| [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with full pivoting.") | fullPivHouseholderQr()  | None  | -  | - -  | +++  |
| [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition "Complete orthogonal decomposition (COD) of a matrix.") | completeOrthogonalDecomposition()  | None  | +  | -  | +++  |
| [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") | llt()  | Positive definite  | +++  | +++  | +  |
| [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") | ldlt()  | Positive or negative semidefinite  | +++  | +  | ++  |
| [BDCSVD](classeigen_1_1bdcsvd "class Bidiagonal Divide and Conquer SVD") | bdcSvd()  | None  | -  | -  | +++  |
| [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") | jacobiSvd()  | None  | -  | - - -  | +++  |

 To get an overview of the true relative speed of the different decompositions, check this [benchmark](group__densedecompositionbenchmark) .

 All of these decompositions offer a solve() method that works as in the above example.

 If you know more about the properties of your matrix, you can use the above table to select the best method. For example, a good choice for solving linear systems with a non-symmetric matrix of full rank is [PartialPivLU](classeigen_1_1partialpivlu "LU decomposition of a matrix with partial pivoting, and related features."). If you know that your matrix is also symmetric and positive definite, the above table says that a very good choice is the [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") or [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") decomposition. Here's an example, also demonstrating that using a general matrix (not a vector) as right hand side is possible:

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
 
int main()
{
   Matrix2f A, b;
   A << 2, -1, -1, 3;
   b << 1, 2, 3, 1;
   cout << "Here is the matrix A:\n" << A << endl;
   cout << "Here is the right hand side b:\n" << b << endl;
   Matrix2f x = A.ldlt().solve(b);
   cout << "The solution is:\n" << x << endl;
}

```
 | 
```
Here is the matrix A:
 2 -1
-1  3
Here is the right hand side b:
1 2
3 1
The solution is:
1.2 1.4
1.4 0.8

```
 |

 For a [much more complete table](group__topiclinearalgebradecompositions) comparing all decompositions supported by [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") (notice that [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") supports many other decompositions), see our special page on [this topic](group__topiclinearalgebradecompositions).

 
 Least squares solving
=======================

 The most general and accurate method to solve under- or over-determined linear systems in the least squares sense, is the SVD decomposition. [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") provides two implementations. The recommended one is the [BDCSVD](classeigen_1_1bdcsvd "class Bidiagonal Divide and Conquer SVD") class, which scales well for large problems and automatically falls back to the [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") class for smaller problems. For both classes, their solve() method solved the linear system in the least-squares sense.

 Here is an example: 




| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
 
int main()
{
   MatrixXf A = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3, 2);
   cout << "Here is the matrix A:\n" << A << endl;
   VectorXf b = [VectorXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3);
   cout << "Here is the right hand side b:\n" << b << endl;
   cout << "The least-squares solution is:\n"
        << A.bdcSvd([ComputeThinU](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9aa7fb4e98834788d0b1b0f2b8467d2527) | [ComputeThinV](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a540036417bfecf2e791a70948c227f47)).solve(b) << endl;
}
```
 | 
```
Here is the matrix A:
  0.68  0.597
-0.211  0.823
 0.566 -0.605
Here is the right hand side b:
 -0.33
 0.536
-0.444
The least-squares solution is:
-0.67
0.314

```
 |

 An alternative to the SVD, which is usually faster and about as accurate, is [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition "Complete orthogonal decomposition (COD) of a matrix.").

 Again, if you know more about the problem, the table above contains methods that are potentially faster. If your matrix is full rank, HouseHolderQR is the method of choice. If your matrix is full rank and well conditioned, using the Cholesky decomposition ([LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.")) on the matrix of the normal equations can be faster still. Our page on [least squares solving](group__leastsquares)  has more details.

 
 Checking if a matrix is singular
==================================

 Only you know what error margin you want to allow for a solution to be considered valid. So [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") lets you do this computation for yourself, if you want to, as in this example:

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
 
int main()
{
   MatrixXd A = [MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(100,100);
   MatrixXd b = [MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(100,50);
   MatrixXd x = A.fullPivLu().solve(b);
   double relative_error = (A*x - b).norm() / b.norm(); // norm() is L2 norm
   cout << "The relative error is:\n" << relative_error << endl;
}

```
 | 
```
The relative error is:
2.31495e-14

```
 |

 
 Computing eigenvalues and eigenvectors
========================================

 You need an eigendecomposition here, see available such decompositions on [this page](group__topiclinearalgebradecompositions). Make sure to check if your matrix is self-adjoint, as is often the case in these problems. Here's an example using [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver "Computes eigenvalues and eigenvectors of selfadjoint matrices."), it could easily be adapted to general matrices using [EigenSolver](classeigen_1_1eigensolver "Computes eigenvalues and eigenvectors of general matrices.") or [ComplexEigenSolver](classeigen_1_1complexeigensolver "Computes eigenvalues and eigenvectors of general complex matrices.").

 The computation of eigenvalues and eigenvectors does not necessarily converge, but such failure to converge is very rare. The call to info() is to check for this possibility.

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
 
int main()
{
   Matrix2f A;
   A << 1, 2, 2, 3;
   cout << "Here is the matrix A:\n" << A << endl;
   SelfAdjointEigenSolver<Matrix2f> eigensolver(A);
   if (eigensolver.info() != [Success](group__enums#gga85fad7b87587764e5cf6b513a9e0ee5ea671a2aeb0f527802806a441d58a80fcf)) abort();
   cout << "The eigenvalues of A are:\n" << eigensolver.eigenvalues() << endl;
   cout << "Here's a matrix whose columns are eigenvectors of A \n"
        << "corresponding to these eigenvalues:\n"
        << eigensolver.eigenvectors() << endl;
}
```
 | 
```
Here is the matrix A:
1 2
2 3
The eigenvalues of A are:
-0.236
  4.24
Here's a matrix whose columns are eigenvectors of A 
corresponding to these eigenvalues:
-0.851 -0.526
 0.526 -0.851

```
 |

 
 Computing inverse and determinant
===================================

 First of all, make sure that you really want this. While inverse and determinant are fundamental mathematical concepts, in *numerical* linear algebra they are not as useful as in pure mathematics. [Inverse](classeigen_1_1inverse "Expression of the inverse of another expression.") computations are often advantageously replaced by solve() operations, and the determinant is often *not* a good way of checking if a matrix is invertible.

 However, for *very* *small* matrices, the above may not be true, and inverse and determinant can be very useful.

 While certain decompositions, such as [PartialPivLU](classeigen_1_1partialpivlu "LU decomposition of a matrix with partial pivoting, and related features.") and [FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features."), offer [inverse()](namespaceeigen#ae9de9064c3b832ee804c0e0957e80334) and determinant() methods, you can also call [inverse()](namespaceeigen#ae9de9064c3b832ee804c0e0957e80334) and determinant() directly on a matrix. If your matrix is of a very small fixed size (at most 4x4) this allows [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") to avoid performing a LU decomposition, and instead use formulas that are more efficient on such small matrices.

 Here is an example: 




| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
 
int main()
{
   Matrix3f A;
   A << 1, 2, 1,
        2, 1, 0,
        -1, 1, 2;
   cout << "Here is the matrix A:\n" << A << endl;
   cout << "The determinant of A is " << A.determinant() << endl;
   cout << "The inverse of A is:\n" << A.inverse() << endl;
}

```
 | 
```
Here is the matrix A:
 1  2  1
 2  1  0
-1  1  2
The determinant of A is -3
The inverse of A is:
-0.667      1  0.333
  1.33     -1 -0.667
    -1      1      1

```
 |

 
 Separating the computation from the construction
==================================================

 In the above examples, the decomposition was computed at the same time that the decomposition object was constructed. There are however situations where you might want to separate these two things, for example if you don't know, at the time of the construction, the matrix that you will want to decompose; or if you want to reuse an existing decomposition object.

 What makes this possible is that: 


* all decompositions have a default constructor,
* all decompositions have a compute(matrix) method that does the computation, and that may be called again on an already-computed decomposition, reinitializing it.

 For example:

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
 
int main()
{
   Matrix2f A, b;
   LLT<Matrix2f> llt;
   A << 2, -1, -1, 3;
   b << 1, 2, 3, 1;
   cout << "Here is the matrix A:\n" << A << endl;
   cout << "Here is the right hand side b:\n" << b << endl;
   cout << "Computing LLT decomposition..." << endl;
   llt.compute(A);
   cout << "The solution is:\n" << llt.solve(b) << endl;
   A(1,1)++;
   cout << "The matrix A is now:\n" << A << endl;
   cout << "Computing LLT decomposition..." << endl;
   llt.compute(A);
   cout << "The solution is now:\n" << llt.solve(b) << endl;
}

```
 | 
```
Here is the matrix A:
 2 -1
-1  3
Here is the right hand side b:
1 2
3 1
Computing LLT decomposition...
The solution is:
1.2 1.4
1.4 0.8
The matrix A is now:
 2 -1
-1  4
Computing LLT decomposition...
The solution is now:
    1  1.29
    1 0.571

```
 |

 Finally, you can tell the decomposition constructor to preallocate storage for decomposing matrices of a given size, so that when you subsequently decompose such matrices, no dynamic memory allocation is performed (of course, if you are using fixed-size matrices, no dynamic memory allocation happens at all). This is done by just passing the size to the decomposition constructor, as in this example: 



```
HouseholderQR<MatrixXf> qr(50,50);
MatrixXf A = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(50,50);
qr.compute(A); // no dynamic memory allocation

```


 Rank-revealing decompositions
===============================

 Certain decompositions are rank-revealing, i.e. are able to compute the rank of a matrix. These are typically also the decompositions that behave best in the face of a non-full-rank matrix (which in the square case means a singular matrix). On [this table](group__topiclinearalgebradecompositions) you can see for all our decompositions whether they are rank-revealing or not.

 Rank-revealing decompositions offer at least a rank() method. They can also offer convenience methods such as isInvertible(), and some are also providing methods to compute the kernel (null-space) and image (column-space) of the matrix, as is the case with [FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features."):

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
 
int main()
{
   Matrix3f A;
   A << 1, 2, 5,
        2, 1, 4,
        3, 0, 3;
   cout << "Here is the matrix A:\n" << A << endl;
   FullPivLU<Matrix3f> lu_decomp(A);
   cout << "The rank of A is " << lu_decomp.rank() << endl;
   cout << "Here is a matrix whose columns form a basis of the null-space of A:\n"
        << lu_decomp.kernel() << endl;
   cout << "Here is a matrix whose columns form a basis of the column-space of A:\n"
        << lu_decomp.image(A) << endl; // yes, have to pass the original A
}

```
 | 
```
Here is the matrix A:
1 2 5
2 1 4
3 0 3
The rank of A is 2
Here is a matrix whose columns form a basis of the null-space of A:
 0.5
   1
-0.5
Here is a matrix whose columns form a basis of the column-space of A:
5 1
4 2
3 3

```
 |

 Of course, any rank computation depends on the choice of an arbitrary threshold, since practically no floating-point matrix is *exactly* rank-deficient. [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") picks a sensible default threshold, which depends on the decomposition but is typically the diagonal size times machine epsilon. While this is the best default we could pick, only you know what is the right threshold for your application. You can set this by calling setThreshold() on your decomposition object before calling rank() or any other method that needs to use such a threshold. The decomposition itself, i.e. the compute() method, is independent of the threshold. You don't need to recompute the decomposition after you've changed the threshold.

 

| Example: | Output:  |
| --- | --- |
| 
```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
 
int main()
{
   Matrix2d A;
   A << 2, 1,
        2, 0.9999999999;
   FullPivLU<Matrix2d> lu(A);
   cout << "By default, the rank of A is found to be " << lu.rank() << endl;
   lu.setThreshold(1e-5);
   cout << "With threshold 1e-5, the rank of A is found to be " << lu.rank() << endl;
}

```
 | 
```
By default, the rank of A is found to be 2
With threshold 1e-5, the rank of A is found to be 1

```
 |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TutorialLinearAlgebra.html>

Benchmark of dense decompositions
=================================

  This page presents a speed comparison of the dense matrix decompositions offered by Eigen for a wide range of square matrices and overconstrained problems.

 For a more general overview on the features and numerical robustness of linear solvers and decompositions, check this [table](group__topiclinearalgebradecompositions) .

 This benchmark has been run on a laptop equipped with an Intel core i7 @ 2,6 GHz, and compiled with clang with **AVX** and **FMA** instruction sets enabled but without multi-threading. It uses **single** **precision** **float** numbers. For double, you can get a good estimate by multiplying the timings by a factor 2.

 The square matrices are symmetric, and for the overconstrained matrices, the reported timmings include the cost to compute the symmetric covariance matrix \( A^T A \) for the first four solvers based on Cholesky and LU, as denoted by the **\*** symbol (top-right corner part of the table). Timings are in **milliseconds**, and factors are relative to the [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") decomposition which is the fastest but also the least general and robust.

 

| solver/size  | 8x8  | 100x100  | 1000x1000  | 4000x4000  | 10000x8  | 10000x100  | 10000x1000  | 10000x4000  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") | 0.05 | 0.42 | 5.83 | 374.55 | 6.79 [\*](#note_ls) | 30.15 [\*](#note_ls) | 236.34 [\*](#note_ls) | 3847.17 [\*](#note_ls) |
| [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") | 0.07 (x1.3) | 0.65 (x1.5) | 26.86 (x4.6) | 2361.18 (x6.3) | 6.81 (x1) [\*](#note_ls) | 31.91 (x1.1) [\*](#note_ls) | 252.61 (x1.1) [\*](#note_ls) | 5807.66 (x1.5) [\*](#note_ls) |
| [PartialPivLU](classeigen_1_1partialpivlu "LU decomposition of a matrix with partial pivoting, and related features.") | 0.08 (x1.5) | 0.69 (x1.6) | 15.63 (x2.7) | 709.32 (x1.9) | 6.81 (x1) [\*](#note_ls) | 31.32 (x1) [\*](#note_ls) | 241.68 (x1) [\*](#note_ls) | 4270.48 (x1.1) [\*](#note_ls) |
| [FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features.") | 0.1 (x1.9) | 4.48 (x10.6) | 281.33 (x48.2) | - | 6.83 (x1) [\*](#note_ls) | 32.67 (x1.1) [\*](#note_ls) | 498.25 (x2.1) [\*](#note_ls) | -  |
| [HouseholderQR](classeigen_1_1householderqr "Householder QR decomposition of a matrix.") | 0.19 (x3.5) | 2.18 (x5.2) | 23.42 (x4) | 1337.52 (x3.6) | 34.26 (x5) | 129.01 (x4.3) | 377.37 (x1.6) | 4839.1 (x1.3)  |
| [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting.") | 0.23 (x4.3) | 2.23 (x5.3) | 103.34 (x17.7) | 9987.16 (x26.7) | 36.05 (x5.3) | 163.18 (x5.4) | 2354.08 (x10) | 37860.5 (x9.8)  |
| [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition "Complete orthogonal decomposition (COD) of a matrix.") | 0.23 (x4.3) | 2.22 (x5.2) | 99.44 (x17.1) | 10555.3 (x28.2) | 35.75 (x5.3) | 169.39 (x5.6) | 2150.56 (x9.1) | 36981.8 (x9.6)  |
| [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with full pivoting.") | 0.23 (x4.3) | 4.64 (x11) | 289.1 (x49.6) | - | 69.38 (x10.2) | 446.73 (x14.8) | 4852.12 (x20.5) | -  |
| [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") | 1.01 (x18.6) | 71.43 (x168.4) | - | - | 113.81 (x16.7) | 1179.66 (x39.1) | - | -  |
| [BDCSVD](classeigen_1_1bdcsvd "class Bidiagonal Divide and Conquer SVD") | 1.07 (x19.7) | 21.83 (x51.5) | 331.77 (x56.9) | 18587.9 (x49.6) | 110.53 (x16.3) | 397.67 (x13.2) | 2975 (x12.6) | 48593.2 (x12.6)  |

 **\***: This decomposition do not support direct least-square solving for over-constrained problems, and the reported timing include the cost to form the symmetric covariance matrix \( A^T A \).

 **Observations:** 


* [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") is always the fastest solvers.
* For largely over-constrained problems, the cost of Cholesky/LU decompositions is dominated by the computation of the symmetric covariance matrix.
* For large problem sizes, only the decomposition implementing a cache-friendly blocking strategy scale well. Those include [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features."), [PartialPivLU](classeigen_1_1partialpivlu "LU decomposition of a matrix with partial pivoting, and related features."), [HouseholderQR](classeigen_1_1householderqr "Householder QR decomposition of a matrix."), and [BDCSVD](classeigen_1_1bdcsvd "class Bidiagonal Divide and Conquer SVD"). This explain why for a 4k x 4k matrix, [HouseholderQR](classeigen_1_1householderqr "Householder QR decomposition of a matrix.") is faster than [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting."). In the future, [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") and [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting.") will also implement blocking strategies.
* [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition "Complete orthogonal decomposition (COD) of a matrix.") is based on [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting.") and they thus achieve the same level of performance.

 The above table has been generated by the [bench/dense\_solvers.cpp](https://gitlab.com/libeigen/eigen/raw/master/bench/dense_solvers.cpp) file, feel-free to hack it to generate a table matching your hardware, compiler, and favorite problem sizes. 

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__DenseDecompositionBenchmark.html>

Cholesky module
===============

  This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices. Those decompositions are also accessible via the following methods:


* [MatrixBase::llt()](classeigen_1_1matrixbase#a90c45f7a30265df792d5aeaddead2635)
* [MatrixBase::ldlt()](classeigen_1_1matrixbase#a0ecf058a0727a4cab8b42d79e95072e1)
* [SelfAdjointView::llt()](classeigen_1_1selfadjointview#a405e810491642a7f7b785f2ad6f93619)
* [SelfAdjointView::ldlt()](classeigen_1_1selfadjointview#a644155eef17b37c95d85b9f65bb49ac4)

 
```
#include <Eigen/Cholesky>

```
 

|  |
| --- |
|  |
| class  | [Eigen::LDLT< \_MatrixType, \_UpLo >](classeigen_1_1ldlt) |
|  | Robust Cholesky decomposition of a matrix with pivoting. [More...](classeigen_1_1ldlt#details) |
|  |
| class  | [Eigen::LLT< \_MatrixType, \_UpLo >](classeigen_1_1llt) |
|  | Standard Cholesky decomposition (LL^T) of a matrix and associated features. [More...](classeigen_1_1llt#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__Cholesky__Module.html>

LU module
=========

  This module includes LU decomposition and related notions such as matrix inversion and determinant. This module defines the following [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") methods:


* [MatrixBase::inverse()](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf)
* [MatrixBase::determinant()](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061)

 
```
#include <Eigen/LU>

```
 

|  |
| --- |
|  |
| class  | [Eigen::FullPivLU< \_MatrixType >](classeigen_1_1fullpivlu) |
|  | LU decomposition of a matrix with complete pivoting, and related features. [More...](classeigen_1_1fullpivlu#details) |
|  |
| class  | [Eigen::PartialPivLU< \_MatrixType >](classeigen_1_1partialpivlu) |
|  | LU decomposition of a matrix with partial pivoting, and related features. [More...](classeigen_1_1partialpivlu#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__LU__Module.html>

QR module
=========

  This module provides various QR decompositions This module also provides some [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") methods, including:


* [MatrixBase::householderQr()](classeigen_1_1matrixbase#a9a9377aab1cea26db5f25bab7e682f8f)
* [MatrixBase::colPivHouseholderQr()](classeigen_1_1matrixbase#adee8c19c833245bbb00a591dce68e8a4)
* [MatrixBase::fullPivHouseholderQr()](classeigen_1_1matrixbase#a863bc0e06b641a089508eabec6835ab2)

 
```
#include <Eigen/QR>

```
 

|  |
| --- |
|  |
| class  | [Eigen::ColPivHouseholderQR< \_MatrixType >](classeigen_1_1colpivhouseholderqr) |
|  | Householder rank-revealing QR decomposition of a matrix with column-pivoting. [More...](classeigen_1_1colpivhouseholderqr#details) |
|  |
| class  | [Eigen::CompleteOrthogonalDecomposition< \_MatrixType >](classeigen_1_1completeorthogonaldecomposition) |
|  | Complete orthogonal decomposition (COD) of a matrix. [More...](classeigen_1_1completeorthogonaldecomposition#details) |
|  |
| class  | [Eigen::FullPivHouseholderQR< \_MatrixType >](classeigen_1_1fullpivhouseholderqr) |
|  | Householder rank-revealing QR decomposition of a matrix with full pivoting. [More...](classeigen_1_1fullpivhouseholderqr#details) |
|  |
| class  | [Eigen::HouseholderQR< \_MatrixType >](classeigen_1_1householderqr) |
|  | Householder QR decomposition of a matrix. [More...](classeigen_1_1householderqr#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__QR__Module.html>

SVD module
==========

  This module provides SVD decomposition for matrices (both real and complex). Two decomposition algorithms are provided:


* [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") implementing two-sided Jacobi iterations is numerically very accurate, fast for small matrices, but very slow for larger ones.
* [BDCSVD](classeigen_1_1bdcsvd "class Bidiagonal Divide and Conquer SVD") implementing a recursive divide & conquer strategy on top of an upper-bidiagonalization which remains fast for large problems. These decompositions are accessible via the respective classes and following [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") methods:
* [MatrixBase::jacobiSvd()](classeigen_1_1matrixbase#a5745dca9c54390633b434e54a1d1eedd)
* [MatrixBase::bdcSvd()](classeigen_1_1matrixbase#ae171b74b5d530846ee0836135ffcf837)

 
```
#include <Eigen/SVD>

```
 

|  |
| --- |
|  |
| class  | [Eigen::BDCSVD< \_MatrixType >](classeigen_1_1bdcsvd) |
|  | class Bidiagonal Divide and Conquer SVD [More...](classeigen_1_1bdcsvd#details) |
|  |
| class  | [Eigen::JacobiSVD< \_MatrixType, QRPreconditioner >](classeigen_1_1jacobisvd) |
|  | Two-sided Jacobi SVD decomposition of a rectangular matrix. [More...](classeigen_1_1jacobisvd#details) |
|  |
| class  | [Eigen::SVDBase< Derived >](classeigen_1_1svdbase) |
|  | Base class of SVD algorithms. [More...](classeigen_1_1svdbase#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__SVD__Module.html>

Eigenvalues module
==================

  This module mainly provides various eigenvalue solvers. This module also provides some [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") methods, including:


* [MatrixBase::eigenvalues()](classeigen_1_1matrixbase#a30430fa3d5b4e74d312fd4f502ac984d "Computes the eigenvalues of a matrix."),
* [MatrixBase::operatorNorm()](classeigen_1_1matrixbase#a0ff9bc0b9bea2d0822a2bf3192783102 "Computes the L2 operator norm.")

 
```
#include <Eigen/Eigenvalues>

```
 

|  |
| --- |
|  |
| class  | [Eigen::ComplexEigenSolver< \_MatrixType >](classeigen_1_1complexeigensolver) |
|  | Computes eigenvalues and eigenvectors of general complex matrices. [More...](classeigen_1_1complexeigensolver#details) |
|  |
| class  | [Eigen::ComplexSchur< \_MatrixType >](classeigen_1_1complexschur) |
|  | Performs a complex Schur decomposition of a real or complex square matrix. [More...](classeigen_1_1complexschur#details) |
|  |
| class  | [Eigen::EigenSolver< \_MatrixType >](classeigen_1_1eigensolver) |
|  | Computes eigenvalues and eigenvectors of general matrices. [More...](classeigen_1_1eigensolver#details) |
|  |
| class  | [Eigen::GeneralizedEigenSolver< \_MatrixType >](classeigen_1_1generalizedeigensolver) |
|  | Computes the generalized eigenvalues and eigenvectors of a pair of general matrices. [More...](classeigen_1_1generalizedeigensolver#details) |
|  |
| class  | [Eigen::GeneralizedSelfAdjointEigenSolver< \_MatrixType >](classeigen_1_1generalizedselfadjointeigensolver) |
|  | Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem. [More...](classeigen_1_1generalizedselfadjointeigensolver#details) |
|  |
| class  | [Eigen::HessenbergDecomposition< \_MatrixType >](classeigen_1_1hessenbergdecomposition) |
|  | Reduces a square matrix to Hessenberg form by an orthogonal similarity transformation. [More...](classeigen_1_1hessenbergdecomposition#details) |
|  |
| class  | [Eigen::RealQZ< \_MatrixType >](classeigen_1_1realqz) |
|  | Performs a real QZ decomposition of a pair of square matrices. [More...](classeigen_1_1realqz#details) |
|  |
| class  | [Eigen::RealSchur< \_MatrixType >](classeigen_1_1realschur) |
|  | Performs a real Schur decomposition of a square matrix. [More...](classeigen_1_1realschur#details) |
|  |
| class  | [Eigen::SelfAdjointEigenSolver< \_MatrixType >](classeigen_1_1selfadjointeigensolver) |
|  | Computes eigenvalues and eigenvectors of selfadjoint matrices. [More...](classeigen_1_1selfadjointeigensolver#details) |
|  |
| class  | [Eigen::Tridiagonalization< \_MatrixType >](classeigen_1_1tridiagonalization) |
|  | Tridiagonal decomposition of a selfadjoint matrix. [More...](classeigen_1_1tridiagonalization#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__Eigenvalues__Module.html>

SparseCholesky module
=====================

  This module currently provides two variants of the direct sparse Cholesky decomposition for selfadjoint (hermitian) matrices. Those decompositions are accessible via the following classes:


* SimplicialLLt,
* SimplicialLDLt

 Such problems can also be solved using the [ConjugateGradient](classeigen_1_1conjugategradient "A conjugate gradient solver for sparse (or dense) self-adjoint problems.") solver from the IterativeLinearSolvers module.

 
```
#include <Eigen/SparseCholesky>

```
 

|  |
| --- |
|  |
| class  | [Eigen::SimplicialCholesky< \_MatrixType, \_UpLo, \_Ordering >](classeigen_1_1simplicialcholesky) |
|  |
| class  | [Eigen::SimplicialCholeskyBase< Derived >](classeigen_1_1simplicialcholeskybase) |
|  | A base class for direct sparse Cholesky factorizations. [More...](classeigen_1_1simplicialcholeskybase#details) |
|  |
| class  | [Eigen::SimplicialLDLT< \_MatrixType, \_UpLo, \_Ordering >](classeigen_1_1simplicialldlt) |
|  | A direct sparse [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") Cholesky factorizations without square root. [More...](classeigen_1_1simplicialldlt#details) |
|  |
| class  | [Eigen::SimplicialLLT< \_MatrixType, \_UpLo, \_Ordering >](classeigen_1_1simplicialllt) |
|  | A direct sparse [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") Cholesky factorizations. [More...](classeigen_1_1simplicialllt#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__SparseCholesky__Module.html>

Core module
===========

  This is the main module of [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") providing dense matrix and vector support (both fixed and dynamic size) with all the features corresponding to a BLAS library and much more...

 
```
#include <Eigen/Core>

```
 

|  |
| --- |
|  |
|  | [Global array typedefs](group__arraytypedefs) |
|  |
|  | [Global matrix typedefs](group__matrixtypedefs) |
|  |
|  | [Flags](group__flags) |
|  |
|  | [Enumerations](group__enums) |
|  |




|  |
| --- |
|  |
| class  | [Eigen::aligned\_allocator< T >](classeigen_1_1aligned__allocator) |
|  | STL compatible allocator to use with types requiring a non standrad alignment. [More...](classeigen_1_1aligned__allocator#details) |
|  |
| class  | [Eigen::ArithmeticSequence< FirstType, SizeType, IncrType >](classeigen_1_1arithmeticsequence) |
|  |
| class  | [Eigen::Array< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >](classeigen_1_1array) |
|  | General-purpose arrays with easy API for coefficient-wise operations. [More...](classeigen_1_1array#details) |
|  |
| class  | [Eigen::ArrayBase< Derived >](classeigen_1_1arraybase) |
|  | Base class for all 1D and 2D array, and related expressions. [More...](classeigen_1_1arraybase#details) |
|  |
| class  | [Eigen::ArrayWrapper< ExpressionType >](classeigen_1_1arraywrapper) |
|  | Expression of a mathematical vector or matrix as an array object. [More...](classeigen_1_1arraywrapper#details) |
|  |
| class  | [Eigen::symbolic::BaseExpr< Derived >](classeigen_1_1symbolic_1_1baseexpr) |
|  |
| class  | [Eigen::Block< XprType, BlockRows, BlockCols, InnerPanel >](classeigen_1_1block) |
|  | Expression of a fixed-size or dynamic-size block. [More...](classeigen_1_1block#details) |
|  |
| class  | [Eigen::CommaInitializer< XprType >](structeigen_1_1commainitializer) |
|  | Helper class used by the comma initializer operator. [More...](structeigen_1_1commainitializer#details) |
|  |
| class  | [Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >](classeigen_1_1cwisebinaryop) |
|  | Generic expression where a coefficient-wise binary operator is applied to two expressions. [More...](classeigen_1_1cwisebinaryop#details) |
|  |
| class  | [Eigen::CwiseNullaryOp< NullaryOp, PlainObjectType >](classeigen_1_1cwisenullaryop) |
|  | Generic expression of a matrix where all coefficients are defined by a functor. [More...](classeigen_1_1cwisenullaryop#details) |
|  |
| class  | [Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >](classeigen_1_1cwiseternaryop) |
|  | Generic expression where a coefficient-wise ternary operator is applied to two expressions. [More...](classeigen_1_1cwiseternaryop#details) |
|  |
| class  | [Eigen::CwiseUnaryOp< UnaryOp, XprType >](classeigen_1_1cwiseunaryop) |
|  | Generic expression where a coefficient-wise unary operator is applied to an expression. [More...](classeigen_1_1cwiseunaryop#details) |
|  |
| class  | [Eigen::CwiseUnaryView< ViewOp, MatrixType >](classeigen_1_1cwiseunaryview) |
|  | Generic lvalue expression of a coefficient-wise unary operator of a matrix or a vector. [More...](classeigen_1_1cwiseunaryview#details) |
|  |
| class  | [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
|  | Base class for all dense matrices, vectors, and arrays. [More...](classeigen_1_1densebase#details) |
|  |
| class  | [Eigen::DenseCoeffsBase< Derived, DirectAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4) |
|  | Base class providing direct read-only coefficient access to matrices and arrays. [More...](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4#details) |
|  |
| class  | [Eigen::DenseCoeffsBase< Derived, DirectWriteAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4) |
|  | Base class providing direct read/write coefficient access to matrices and arrays. [More...](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#details) |
|  |
| class  | [Eigen::DenseCoeffsBase< Derived, ReadOnlyAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4) |
|  | Base class providing read-only coefficient access to matrices and arrays. [More...](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#details) |
|  |
| class  | [Eigen::DenseCoeffsBase< Derived, WriteAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4) |
|  | Base class providing read/write coefficient access to matrices and arrays. [More...](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#details) |
|  |
| class  | [Eigen::Diagonal< MatrixType, \_DiagIndex >](classeigen_1_1diagonal) |
|  | Expression of a diagonal/subdiagonal/superdiagonal in a matrix. [More...](classeigen_1_1diagonal#details) |
|  |
| class  | [Eigen::DiagonalMatrix< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >](classeigen_1_1diagonalmatrix) |
|  | Represents a diagonal matrix with its storage. [More...](classeigen_1_1diagonalmatrix#details) |
|  |
| class  | [Eigen::DiagonalWrapper< \_DiagonalVectorType >](classeigen_1_1diagonalwrapper) |
|  | Expression of a diagonal matrix. [More...](classeigen_1_1diagonalwrapper#details) |
|  |
| class  | [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
|  |
| class  | [Eigen::ForceAlignedAccess< ExpressionType >](classeigen_1_1forcealignedaccess) |
|  | Enforce aligned packet loads and stores regardless of what is requested. [More...](classeigen_1_1forcealignedaccess#details) |
|  |
| class  | [Eigen::IndexedView< XprType, RowIndices, ColIndices >](classeigen_1_1indexedview) |
|  | Expression of a non-sequential sub-matrix defined by arbitrary sequences of row and column indices. [More...](classeigen_1_1indexedview#details) |
|  |
| class  | [Eigen::IOFormat](structeigen_1_1ioformat) |
|  | Stores a set of parameters controlling the way matrices are printed. [More...](structeigen_1_1ioformat#details) |
|  |
| class  | [Eigen::Map< PlainObjectType, MapOptions, StrideType >](classeigen_1_1map) |
|  | A matrix or vector expression mapping an existing array of data. [More...](classeigen_1_1map#details) |
|  |
| class  | [Eigen::MapBase< Derived, ReadOnlyAccessors >](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4) |
|  | Base class for dense [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") and [Block](classeigen_1_1block "Expression of a fixed-size or dynamic-size block.") expression with direct access. [More...](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#details) |
|  |
| class  | [Eigen::MapBase< Derived, WriteAccessors >](classeigen_1_1mapbase_3_01derived_00_01writeaccessors_01_4) |
|  | Base class for non-const dense [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") and [Block](classeigen_1_1block "Expression of a fixed-size or dynamic-size block.") expression with direct access. [More...](classeigen_1_1mapbase_3_01derived_00_01writeaccessors_01_4#details) |
|  |
| class  | [Eigen::Matrix< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >](classeigen_1_1matrix) |
|  | The matrix class, also used for vectors and row-vectors. [More...](classeigen_1_1matrix#details) |
|  |
| class  | [Eigen::MatrixBase< Derived >](classeigen_1_1matrixbase) |
|  | Base class for all dense matrices, vectors, and expressions. [More...](classeigen_1_1matrixbase#details) |
|  |
| class  | [Eigen::MatrixWrapper< ExpressionType >](classeigen_1_1matrixwrapper) |
|  | Expression of an array as a mathematical vector or matrix. [More...](classeigen_1_1matrixwrapper#details) |
|  |
| class  | [Eigen::NestByValue< ExpressionType >](classeigen_1_1nestbyvalue) |
|  | Expression which must be nested by value. [More...](classeigen_1_1nestbyvalue#details) |
|  |
| class  | [Eigen::NoAlias< ExpressionType, StorageBase >](classeigen_1_1noalias) |
|  | Pseudo expression providing an operator = assuming no aliasing. [More...](classeigen_1_1noalias#details) |
|  |
| class  | [Eigen::NumTraits< T >](structeigen_1_1numtraits) |
|  | Holds information about the various numeric (i.e. scalar) types allowed by [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."). [More...](structeigen_1_1numtraits#details) |
|  |
| class  | [Eigen::PartialReduxExpr< MatrixType, MemberOp, Direction >](classeigen_1_1partialreduxexpr) |
|  | Generic expression of a partially reduxed matrix. [More...](classeigen_1_1partialreduxexpr#details) |
|  |
| class  | [Eigen::PermutationBase< Derived >](classeigen_1_1permutationbase) |
|  | Base class for permutations. [More...](classeigen_1_1permutationbase#details) |
|  |
| class  | [Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >](classeigen_1_1permutationmatrix) |
|  | Permutation matrix. [More...](classeigen_1_1permutationmatrix#details) |
|  |
| class  | [Eigen::PermutationWrapper< \_IndicesType >](classeigen_1_1permutationwrapper) |
|  | Class to view a vector of integers as a permutation matrix. [More...](classeigen_1_1permutationwrapper#details) |
|  |
| class  | [Eigen::PlainObjectBase< Derived >](classeigen_1_1plainobjectbase) |
|  | Dense storage base class for matrices and arrays. [More...](classeigen_1_1plainobjectbase#details) |
|  |
| class  | [Eigen::Product< \_Lhs, \_Rhs, Option >](classeigen_1_1product) |
|  | Expression of the product of two arbitrary matrices or vectors. [More...](classeigen_1_1product#details) |
|  |
| class  | [Eigen::Ref< PlainObjectType, Options, StrideType >](classeigen_1_1ref) |
|  | A matrix or vector expression mapping an existing expression. [More...](classeigen_1_1ref#details) |
|  |
| class  | [Eigen::Replicate< MatrixType, RowFactor, ColFactor >](classeigen_1_1replicate) |
|  | Expression of the multiple replication of a matrix or vector. [More...](classeigen_1_1replicate#details) |
|  |
| class  | [Eigen::Reshaped< XprType, Rows, Cols, Order >](classeigen_1_1reshaped) |
|  | Expression of a fixed-size or dynamic-size reshape. [More...](classeigen_1_1reshaped#details) |
|  |
| class  | [Eigen::Reverse< MatrixType, Direction >](classeigen_1_1reverse) |
|  | Expression of the reverse of a vector or matrix. [More...](classeigen_1_1reverse#details) |
|  |
| class  | [Eigen::ScalarBinaryOpTraits< ScalarA, ScalarB, BinaryOp >](structeigen_1_1scalarbinaryoptraits) |
|  | Determines whether the given binary operation of two numeric types is allowed and what the scalar return type is. [More...](structeigen_1_1scalarbinaryoptraits#details) |
|  |
| class  | [Eigen::Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >](classeigen_1_1select) |
|  | Expression of a coefficient wise version of the C++ ternary operator ?: [More...](classeigen_1_1select#details) |
|  |
| class  | [Eigen::SelfAdjointView< \_MatrixType, UpLo >](classeigen_1_1selfadjointview) |
|  | Expression of a selfadjoint matrix from a triangular part of a dense matrix. [More...](classeigen_1_1selfadjointview#details) |
|  |
| class  | [Eigen::Solve< Decomposition, RhsType >](classeigen_1_1solve) |
|  | Pseudo expression representing a solving operation. [More...](classeigen_1_1solve#details) |
|  |
| class  | [Eigen::Stride< \_OuterStrideAtCompileTime, \_InnerStrideAtCompileTime >](classeigen_1_1stride) |
|  | Holds strides information for [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data."). [More...](classeigen_1_1stride#details) |
|  |
| class  | [Eigen::Transpose< MatrixType >](classeigen_1_1transpose) |
|  | Expression of the transpose of a matrix. [More...](classeigen_1_1transpose#details) |
|  |
| class  | [Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >](classeigen_1_1transpositions) |
|  | Represents a sequence of transpositions (row/column interchange) [More...](classeigen_1_1transpositions#details) |
|  |
| class  | [Eigen::TriangularBase< Derived >](classeigen_1_1triangularbase) |
|  | Base class for triangular part in a matrix. [More...](classeigen_1_1triangularbase#details) |
|  |
| class  | [Eigen::TriangularView< \_MatrixType, \_Mode >](classeigen_1_1triangularview) |
|  | Expression of a triangular part in a matrix. [More...](classeigen_1_1triangularview#details) |
|  |
| class  | [Eigen::TriangularViewImpl< \_MatrixType, \_Mode, Dense >](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4) |
|  | Base class for a triangular part in a **dense** matrix. [More...](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#details) |
|  |
| class  | [Eigen::VectorBlock< VectorType, Size >](classeigen_1_1vectorblock) |
|  | Expression of a fixed-size or dynamic-size sub-vector. [More...](classeigen_1_1vectorblock#details) |
|  |
| class  | [Eigen::VectorwiseOp< ExpressionType, Direction >](classeigen_1_1vectorwiseop) |
|  | Pseudo expression providing broadcasting and partial reduction operations. [More...](classeigen_1_1vectorwiseop#details) |
|  |
| class  | [Eigen::WithFormat< ExpressionType >](classeigen_1_1withformat) |
|  | Pseudo expression providing matrix output with given format. [More...](classeigen_1_1withformat#details) |
|  |




|  |
| --- |
|  |
| template<int N>  |
| static const auto  | [Eigen::fix](group__core__module#gac01f234bce100e39e6928fdc470e5194) () |
|  |
| template<int N>  |
| static const auto  | [Eigen::fix](group__core__module#ga3ce50da8ca83238949c06afce1a4f3c7) (int val) |
|  |




|  |
| --- |
|  |
| static const Eigen::internal::all\_t  | [Eigen::all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14) |
|  |
| static const [symbolic::SymbolExpr](classeigen_1_1symbolic_1_1symbolexpr)< internal::symbolic\_last\_tag >  | [Eigen::last](group__core__module#ga2dd8b20d08336af23947e054a17415ee) |
|  |
| static const auto  | [Eigen::lastp1](group__core__module#ga662ffa801d746b972453080c648765f9) |
|  |

  fix() [1/2]
-----------

    template<int N>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Eigen::fix< N >  | ( |  | ) |  |

 | static |

 
 This *identifier* permits to construct an object embedding a compile-time integer `N`.

 
Template Parameters
 

|  |  |
| --- | --- |
| N | the compile-time integer value |

   It is typically used in conjunction with the [Eigen::seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969) and [Eigen::seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda) functions to pass compile-time values to them: 



```
[seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)(10,fix<4>,fix<-3>)   // <=> [10 7 4 1]
```

See also the function [fix(int)](group__core__module#ga3ce50da8ca83238949c06afce1a4f3c7) to pass both a compile-time and runtime value.

 In c++14, it is implemented as: 



```
template<int N> static const internal::FixedInt<N> [fix](group__core__module#gac01f234bce100e39e6928fdc470e5194){};
```

 where internal::FixedInt<N> is an internal template class similar to [`std::integral_constant`](http://en.cppreference.com/w/cpp/types/integral_constant)  `<int,N>`  Here, `fix<N>` is thus an object of type `internal::FixedInt<N>`.

 In c++98/11, it is implemented as a function: 



```
template<int N> inline internal::FixedInt<N> [fix](group__core__module#gac01f234bce100e39e6928fdc470e5194)();

```

 Here internal::FixedInt<N> is thus a pointer to function.

 If for some reason you want a true object in c++98 then you can write:



```
fix<N>() 

```

 which is also valid in c++14.

 
See also

[fix<N>(int)](group__core__module#ga3ce50da8ca83238949c06afce1a4f3c7), [seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969), [seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda) 
    fix() [2/2]
-----------

    template<int N>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Eigen::fix< N >  | ( | int  | *val* | ) |  |

 | static |

 
 This function returns an object embedding both a compile-time integer `N`, and a fallback runtime value *val*.

 
Template Parameters
 

|  |  |
| --- | --- |
| N | the compile-time integer value  |

   
Parameters
 

|  |  |
| --- | --- |
| val | the fallback runtime integer value |

   This function is a more general version of the [fix](group__core__module#gac01f234bce100e39e6928fdc470e5194) identifier/function that can be used in template code where the compile-time value could turn out to actually mean "undefined at compile-time". For positive integers such as a size or a dimension, this case is identified by [Eigen::Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), whereas runtime signed integers (e.g., an increment/stride) are identified as [Eigen::DynamicIndex](namespaceeigen#a73c597189a4a99127175e8167c456fff). In such a case, the runtime value *val* will be used as a fallback.

 A typical use case would be: 



```
template<typename Derived> void foo(const MatrixBase<Derived> &mat) {
  const int N = Derived::RowsAtCompileTime==[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) ? [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) : Derived::RowsAtCompileTime/2;
  const int n = mat.rows()/2;
  ... mat( [seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda)(0,fix<N>(n) ) ...;
}
```

 In this example, the function [Eigen::seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda) knows that the second argument is expected to be a size. If the passed compile-time value N equals [Eigen::Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), then the proxy object returned by fix will be dissmissed, and converted to an [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde "The Index type as used for the API.") of value `n`. Otherwise, the runtime-value `n` will be dissmissed, and the returned [ArithmeticSequence](classeigen_1_1arithmeticsequence) will be of the exact same type as  `seqN(0,fix<N>)` .

 
See also

[fix](group__core__module#gac01f234bce100e39e6928fdc470e5194), [seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda), class [ArithmeticSequence](classeigen_1_1arithmeticsequence) 
    all
---

   

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| Eigen::all |

 | static |

 
 Can be used as a parameter to DenseBase::operator()(const RowIndices&, const ColIndices&) to index all rows or columns 

    last
----

   

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| Eigen::last |

 | static |

 
 Can be used as a parameter to [Eigen::seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969) and [Eigen::seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda) functions to symbolically reference the last element/row/columns of the underlying vector or matrix once passed to DenseBase::operator()(const RowIndices&, const ColIndices&).

 This symbolic placeholder supports standard arithmetic operations.

 A typical usage example would be: 



```
using namespace [Eigen](namespaceeigen);
using [Eigen::last](group__core__module#ga2dd8b20d08336af23947e054a17415ee);
VectorXd v(n);
v([seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969)(2,[last](group__core__module#ga2dd8b20d08336af23947e054a17415ee)-2)).setOnes();
```


See also
end 
    lastp1
------

   

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| Eigen::lastp1 |

 | static |

 
 Can be used as a parameter to [Eigen::seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969) and [Eigen::seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda) functions to symbolically reference the last+1 element/row/columns of the underlying vector or matrix once passed to DenseBase::operator()(const RowIndices&, const ColIndices&).

 This symbolic placeholder supports standard arithmetic operations. It is essentially an alias to last+fix<1>.

 
See also

[last](group__core__module#ga2dd8b20d08336af23947e054a17415ee) 
    

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__Core__Module.html>

OrderingMethods module
======================

  This module is currently for internal use only

 It defines various built-in and external ordering methods for sparse matrices. They are typically used to reduce the number of elements during the sparse matrix decomposition ([LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features."), LU, QR). Precisely, in a preprocessing step, a permutation matrix P is computed using those ordering methods and applied to the columns of the matrix. Using for instance the sparse Cholesky decomposition, it is expected that the nonzeros elements in LLT(A\*P) will be much smaller than that in LLT(A).

 Usage : 



```
#include <Eigen/OrderingMethods>

```

A simple usage is as a template parameter in the sparse decomposition classes :

 
```
SparseLU<MatrixType, COLAMDOrdering<int> > solver;

```


```
SparseQR<MatrixType, COLAMDOrdering<int> > solver;

```

It is possible as well to call directly a particular ordering method for your own purpose, 



```
AMDOrdering<int> ordering;
PermutationMatrix<Dynamic, Dynamic, int> perm;
SparseMatrix<double> A; 
//Fill the matrix ...
 
ordering(A, perm); // Call AMD

```


Note
Some of these methods (like AMD or METIS), need the sparsity pattern of the input matrix to be symmetric. When the matrix is structurally unsymmetric, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") computes internally the pattern of \(A^T\*A\) before calling the method. If your matrix is already symmetric (at leat in structure), you can avoid that by calling the method with a [SelfAdjointView](classeigen_1_1selfadjointview "Expression of a selfadjoint matrix from a triangular part of a dense matrix.") type.
 
```
 // Call the ordering on the pattern of the lower triangular matrix A
ordering(A.selfadjointView<[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>(), perm);
```
 

|  |
| --- |
|  |
| class  | [Eigen::AMDOrdering< StorageIndex >](classeigen_1_1amdordering) |
|  |
| class  | [Eigen::COLAMDOrdering< StorageIndex >](classeigen_1_1colamdordering) |
|  |
| class  | [Eigen::NaturalOrdering< StorageIndex >](classeigen_1_1naturalordering) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__OrderingMethods__Module.html>

Matrix-free solvers
===================

  Iterative solvers such as [ConjugateGradient](classeigen_1_1conjugategradient "A conjugate gradient solver for sparse (or dense) self-adjoint problems.") and [BiCGSTAB](classeigen_1_1bicgstab "A bi conjugate gradient stabilized solver for sparse square problems.") can be used in a matrix free context. To this end, user must provide a wrapper class inheriting EigenBase<> and implementing the following methods:


* `Index` `rows()` and `Index` `cols()`: returns number of rows and columns respectively
* `operator*` with your type and an Eigen dense column vector (its actual implementation goes in a specialization of the internal::generic\_product\_impl class)

 `Eigen::internal::traits<>` must also be specialized for the wrapper type.

 Here is a complete example wrapping an [Eigen::SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation."): 



```
#include <iostream>
#include <Eigen/Core>
#include <Eigen/Dense>
#include <Eigen/IterativeLinearSolvers>
#include <unsupported/Eigen/IterativeSolvers>
 
class MatrixReplacement;
using [Eigen::SparseMatrix](classeigen_1_1sparsematrix);
 
namespace [Eigen](namespaceeigen) {
namespace internal {
  // MatrixReplacement looks-like a SparseMatrix, so let's inherits its traits:
  template<>
  struct traits<MatrixReplacement> :  public Eigen::internal::traits<Eigen::SparseMatrix<double> >
  {};
}
}
 
// Example of a matrix-free wrapper from a user type to Eigen's compatible type
// For the sake of simplicity, this example simply wrap a Eigen::SparseMatrix.
class MatrixReplacement : public [Eigen::EigenBase](structeigen_1_1eigenbase)<MatrixReplacement> {
public:
  // Required typedefs, constants, and method:
  typedef double Scalar;
  typedef double RealScalar;
  typedef int StorageIndex;
  enum {
    ColsAtCompileTime = [Eigen::Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2),
    MaxColsAtCompileTime = [Eigen::Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2),
    IsRowMajor = false
  };
 
  [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows() const { return mp_mat->rows(); }
  [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols() const { return mp_mat->cols(); }
 
  template<typename Rhs>
  [Eigen::Product<MatrixReplacement,Rhs,Eigen::AliasFreeProduct>](classeigen_1_1product) [operator\*](namespaceeigen#a9723b3ff0f2c99fe1081e3eb14380d4c)(const [Eigen::MatrixBase<Rhs>](classeigen_1_1matrixbase)& x) const {
    return [Eigen::Product<MatrixReplacement,Rhs,Eigen::AliasFreeProduct>](classeigen_1_1product)(*this, x.[derived](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa)());
  }
 
  // Custom API:
  MatrixReplacement() : mp_mat(0) {}
 
  void attachMyMatrix(const SparseMatrix<double> &mat) {
    mp_mat = &mat;
  }
  const SparseMatrix<double> my_matrix() const { return *mp_mat; }
 
private:
  const SparseMatrix<double> *mp_mat;
};
 
 
// Implementation of MatrixReplacement \* Eigen::DenseVector though a specialization of internal::generic\_product\_impl:
namespace [Eigen](namespaceeigen) {
namespace internal {
 
  template<typename Rhs>
  struct generic_product_impl<MatrixReplacement, Rhs, SparseShape, DenseShape, GemvProduct> // GEMV stands for matrix-vector
  : generic_product_impl_base<MatrixReplacement,Rhs,generic_product_impl<MatrixReplacement,Rhs> >
  {
    typedef typename Product<MatrixReplacement,Rhs>::Scalar Scalar;
 
    template<typename Dest>
    static void scaleAndAddTo(Dest& dst, const MatrixReplacement& lhs, const Rhs& rhs, const Scalar& alpha)
    {
      // This method should implement "dst += alpha \* lhs \* rhs" inplace,
      // however, for iterative solvers, alpha is always equal to 1, so let's not bother about it.
      assert(alpha==Scalar(1) && "scaling is not implemented");
      EIGEN_ONLY_USED_FOR_DEBUG(alpha);
 
      // Here we could simply call dst.noalias() += lhs.my\_matrix() \* rhs,
      // but let's do something fancier (and less efficient):
      for([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) i=0; i<lhs.cols(); ++i)
        dst += rhs(i) * lhs.my_matrix().col(i);
    }
  };
 
}
}
 
int main()
{
  int n = 10;
  [Eigen::SparseMatrix<double>](classeigen_1_1sparsematrix) S = [Eigen::MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(n,n).sparseView(0.5,1);
  S = S.transpose()*S;
 
  MatrixReplacement A;
  A.attachMyMatrix(S);
 
  [Eigen::VectorXd](classeigen_1_1matrix) b(n), x;
  b.[setRandom](classeigen_1_1plainobjectbase#a5f0f6cc8039ed5ac026cd32ed5bbe6ea)();
 
  // Solve Ax = b using various iterative solver with matrix-free version:
  {
    [Eigen::ConjugateGradient<MatrixReplacement, Eigen::Lower|Eigen::Upper, Eigen::IdentityPreconditioner>](classeigen_1_1conjugategradient) cg;
    cg.[compute](classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914)(A);
    x = cg.[solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f)(b);
    std::cout << "CG: #iterations: " << cg.[iterations](classeigen_1_1iterativesolverbase#ae778dd098bd5e6655625b20b1e9f15da)() << ", estimated error: " << cg.[error](classeigen_1_1iterativesolverbase#a117c241af3fb1141ad0916a3cf3157ec)() << std::endl;
  }
 
  {
    [Eigen::BiCGSTAB<MatrixReplacement, Eigen::IdentityPreconditioner>](classeigen_1_1bicgstab) bicg;
    bicg.[compute](classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914)(A);
    x = bicg.[solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f)(b);
    std::cout << "BiCGSTAB: #iterations: " << bicg.[iterations](classeigen_1_1iterativesolverbase#ae778dd098bd5e6655625b20b1e9f15da)() << ", estimated error: " << bicg.[error](classeigen_1_1iterativesolverbase#a117c241af3fb1141ad0916a3cf3157ec)() << std::endl;
  }
 
  {
    Eigen::GMRES<MatrixReplacement, Eigen::IdentityPreconditioner> gmres;
    gmres.compute(A);
    x = gmres.solve(b);
    std::cout << "GMRES: #iterations: " << gmres.iterations() << ", estimated error: " << gmres.error() << std::endl;
  }
 
  {
    Eigen::DGMRES<MatrixReplacement, Eigen::IdentityPreconditioner> gmres;
    gmres.compute(A);
    x = gmres.solve(b);
    std::cout << "DGMRES: #iterations: " << gmres.iterations() << ", estimated error: " << gmres.error() << std::endl;
  }
 
  {
    Eigen::MINRES<MatrixReplacement, Eigen::Lower|Eigen::Upper, Eigen::IdentityPreconditioner> minres;
    minres.compute(A);
    x = minres.solve(b);
    std::cout << "MINRES: #iterations: " << minres.iterations() << ", estimated error: " << minres.error() << std::endl;
  }
}
```

 Output: 



```
CG:       #iterations: 20, estimated error: 8.86333e-14
BiCGSTAB: #iterations: 20, estimated error: 2.10809e-15
GMRES:    #iterations: 10, estimated error: 0
DGMRES:   #iterations: 20, estimated error: 1.10455e-28
MINRES:   #iterations: 20, estimated error: 2.94473e-14

```
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__MatrixfreeSolverExample.html>

SparseCore module
=================

  This module provides a sparse matrix representation, and basic associated matrix manipulations and operations.

 See the [Sparse tutorial](group__tutorialsparse)

 
```
#include <Eigen/SparseCore>

```

This module depends on: Core. 

 

|  |
| --- |
|  |
| class  | [Eigen::Map< SparseMatrixType >](classeigen_1_1map_3_01sparsematrixtype_01_4) |
|  | Specialization of class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") for SparseMatrix-like storage. [More...](classeigen_1_1map_3_01sparsematrixtype_01_4#details) |
|  |
| class  | [Eigen::Ref< SparseMatrixType, Options >](classeigen_1_1ref_3_01sparsematrixtype_00_01options_01_4) |
|  | A sparse matrix expression referencing an existing sparse expression. [More...](classeigen_1_1ref_3_01sparsematrixtype_00_01options_01_4#details) |
|  |
| class  | [Eigen::Ref< SparseVectorType >](classeigen_1_1ref_3_01sparsevectortype_01_4) |
|  | A sparse vector expression referencing an existing sparse vector expression. [More...](classeigen_1_1ref_3_01sparsevectortype_01_4#details) |
|  |
| class  | [Eigen::SparseCompressedBase< Derived >](classeigen_1_1sparsecompressedbase) |
|  | Common base class for sparse [compressed]-{row|column}-storage format. [More...](classeigen_1_1sparsecompressedbase#details) |
|  |
| class  | [Eigen::SparseMapBase< Derived, ReadOnlyAccessors >](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4) |
|  | Common base class for [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") and [Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.") instance of sparse matrix and vector. [More...](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#details) |
|  |
| class  | [Eigen::SparseMapBase< Derived, WriteAccessors >](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4) |
|  | Common base class for writable [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") and [Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.") instance of sparse matrix and vector. [More...](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#details) |
|  |
| class  | [Eigen::SparseMatrix< \_Scalar, \_Options, \_StorageIndex >](classeigen_1_1sparsematrix) |
|  | A versatible sparse matrix representation. [More...](classeigen_1_1sparsematrix#details) |
|  |
| class  | [Eigen::SparseMatrixBase< Derived >](classeigen_1_1sparsematrixbase) |
|  | Base class of any sparse matrices or sparse expressions. [More...](classeigen_1_1sparsematrixbase#details) |
|  |
| class  | [Eigen::SparseSelfAdjointView< MatrixType, \_Mode >](classeigen_1_1sparseselfadjointview) |
|  | Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix. [More...](classeigen_1_1sparseselfadjointview#details) |
|  |
| class  | [Eigen::SparseSolverBase< Derived >](classeigen_1_1sparsesolverbase) |
|  | A base class for sparse solvers. [More...](classeigen_1_1sparsesolverbase#details) |
|  |
| class  | [Eigen::SparseVector< \_Scalar, \_Options, \_StorageIndex >](classeigen_1_1sparsevector) |
|  | a sparse vector class [More...](classeigen_1_1sparsevector#details) |
|  |
| class  | [Eigen::SparseView< MatrixType >](classeigen_1_1sparseview) |
|  | Expression of a dense or sparse matrix with zero or too small values removed. [More...](classeigen_1_1sparseview#details) |
|  |
| class  | [Eigen::TriangularViewImpl< MatrixType, Mode, Sparse >](classeigen_1_1triangularviewimpl_3_01matrixtype_00_01mode_00_01sparse_01_4) |
|  | Base class for a triangular part in a **sparse** matrix. [More...](classeigen_1_1triangularviewimpl_3_01matrixtype_00_01mode_00_01sparse_01_4#details) |
|  |
| class  | [Eigen::Triplet< Scalar, StorageIndex >](classeigen_1_1triplet) |
|  | A small structure to hold a non zero as a triplet (i,j,value). [More...](classeigen_1_1triplet#details) |
|  |




|  |
| --- |
|  |
| const [SparseView](classeigen_1_1sparseview)< Derived >  | [Eigen::MatrixBase< Derived >::sparseView](group__sparsecore__module#ga320dd291cbf4339c6118c41521b75350) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &m\_reference=[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)(0), const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real &m\_epsilon=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |

  sparseView()
------------

    template<typename Derived >  

|  |  |  |  |
| --- | --- | --- | --- |
| const [SparseView](classeigen_1_1sparseview)< Derived > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::sparseView  | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *reference* = `[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)(0)`,  |
|  |  | const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real &  | *epsilon* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)>::dummy_precision()` |
|  | ) |  |  const |

 
 
Returns
a sparse expression of the dense expression `*this` with values smaller than *reference* \* *epsilon* removed.
 This method is typically used when prototyping to convert a quickly assembled dense [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") `D` to a [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.") `S:` 



```
MatrixXd D(n,m);
SparseMatrix<double> S;
S = D.sparseView();             // suppress numerical zeros (exact)
S = D.sparseView(reference);
S = D.sparseView(reference,epsilon);

```

 where *reference* is a meaningful non zero reference value, and *epsilon* is a tolerance factor defaulting to NumTraits<Scalar>::dummy\_precision().

 
See also

[SparseMatrixBase::pruned()](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d), class [SparseView](classeigen_1_1sparseview "Expression of a dense or sparse matrix with zero or too small values removed.") 
    

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__SparseCore__Module.html>

SparseLU module
===============

  This module defines a supernodal factorization of general sparse matrices. The code is fully optimized for supernode-panel updates with specialized kernels. Please, see the documentation of the [SparseLU](classeigen_1_1sparselu "Sparse supernodal LU factorization for general matrices.") class for more details. 

 

|  |
| --- |
|  |
| class  | [Eigen::SparseLU< \_MatrixType, \_OrderingType >](classeigen_1_1sparselu) |
|  | [Sparse](structeigen_1_1sparse) supernodal LU factorization for general matrices. [More...](classeigen_1_1sparselu#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__SparseLU__Module.html>

SparseQR module
===============

  Provides QR decomposition for sparse matrices. 

 This module provides a simplicial version of the left-looking [Sparse](structeigen_1_1sparse) QR decomposition. The columns of the input matrix should be reordered to limit the fill-in during the decomposition. Built-in methods (COLAMD, AMD) or external methods (METIS) can be used to this end. See the [OrderingMethods](group__orderingmethods__module) module for the list of built-in and external ordering methods.

 
```
#include <Eigen/SparseQR>

```
 

|  |
| --- |
|  |
| class  | [Eigen::SparseQR< \_MatrixType, \_OrderingType >](classeigen_1_1sparseqr) |
|  | [Sparse](structeigen_1_1sparse) left-looking QR factorization with numerical column pivoting. [More...](classeigen_1_1sparseqr#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__SparseQR__Module.html>

IterativeLinearSolvers module
=============================

  This module currently provides iterative methods to solve problems of the form `A` `x` = `b`, where `A` is a squared matrix, usually very large and sparse. Those solvers are accessible via the following classes:


* [ConjugateGradient](classeigen_1_1conjugategradient "A conjugate gradient solver for sparse (or dense) self-adjoint problems.") for selfadjoint (hermitian) matrices,
* [LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient "A conjugate gradient solver for sparse (or dense) least-square problems.") for rectangular least-square problems,
* [BiCGSTAB](classeigen_1_1bicgstab "A bi conjugate gradient stabilized solver for sparse square problems.") for general square matrices.

 These iterative solvers are associated with some preconditioners:


* [IdentityPreconditioner](classeigen_1_1identitypreconditioner "A naive preconditioner which approximates any matrix as the identity matrix.") - not really useful
* [DiagonalPreconditioner](classeigen_1_1diagonalpreconditioner "A preconditioner based on the digonal entries.") - also called Jacobi preconditioner, work very well on diagonal dominant matrices.
* [IncompleteLUT](classeigen_1_1incompletelut "Incomplete LU factorization with dual-threshold strategy.") - incomplete LU factorization with dual thresholding

 Such problems can also be solved using the direct sparse decomposition modules: SparseCholesky, CholmodSupport, UmfPackSupport, SuperLUSupport.

 
```
#include <Eigen/IterativeLinearSolvers>

```
 

|  |
| --- |
|  |
| class  | [Eigen::BiCGSTAB< \_MatrixType, \_Preconditioner >](classeigen_1_1bicgstab) |
|  | A bi conjugate gradient stabilized solver for sparse square problems. [More...](classeigen_1_1bicgstab#details) |
|  |
| class  | [Eigen::ConjugateGradient< \_MatrixType, \_UpLo, \_Preconditioner >](classeigen_1_1conjugategradient) |
|  | A conjugate gradient solver for sparse (or dense) self-adjoint problems. [More...](classeigen_1_1conjugategradient#details) |
|  |
| class  | [Eigen::DiagonalPreconditioner< \_Scalar >](classeigen_1_1diagonalpreconditioner) |
|  | A preconditioner based on the digonal entries. [More...](classeigen_1_1diagonalpreconditioner#details) |
|  |
| class  | [Eigen::IdentityPreconditioner](classeigen_1_1identitypreconditioner) |
|  | A naive preconditioner which approximates any matrix as the identity matrix. [More...](classeigen_1_1identitypreconditioner#details) |
|  |
| class  | [Eigen::IncompleteLUT< \_Scalar, \_StorageIndex >](classeigen_1_1incompletelut) |
|  | Incomplete LU factorization with dual-threshold strategy. [More...](classeigen_1_1incompletelut#details) |
|  |
| class  | [Eigen::IterativeSolverBase< Derived >](classeigen_1_1iterativesolverbase) |
|  | Base class for linear iterative solvers. [More...](classeigen_1_1iterativesolverbase#details) |
|  |
| class  | [Eigen::LeastSquareDiagonalPreconditioner< \_Scalar >](classeigen_1_1leastsquarediagonalpreconditioner) |
|  | Jacobi preconditioner for [LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient "A conjugate gradient solver for sparse (or dense) least-square problems."). [More...](classeigen_1_1leastsquarediagonalpreconditioner#details) |
|  |
| class  | [Eigen::LeastSquaresConjugateGradient< \_MatrixType, \_Preconditioner >](classeigen_1_1leastsquaresconjugategradient) |
|  | A conjugate gradient solver for sparse (or dense) least-square problems. [More...](classeigen_1_1leastsquaresconjugategradient#details) |
|  |
| class  | [Eigen::SolveWithGuess< Decomposition, RhsType, GuessType >](classeigen_1_1solvewithguess) |
|  | Pseudo expression representing a solving operation. [More...](classeigen_1_1solvewithguess#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__IterativeLinearSolvers__Module.html>

Sparse meta-module
==================

  Meta-module including all related modules:


* [SparseCore module](group__sparsecore__module)
* [OrderingMethods module](group__orderingmethods__module)
* [SparseCholesky module](group__sparsecholesky__module)
* [SparseLU module](group__sparselu__module)
* [SparseQR module](group__sparseqr__module)
* [IterativeLinearSolvers module](group__iterativelinearsolvers__module)

 
```
#include <Eigen/Sparse>

```
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__Sparse__Module.html>

Support modules
===============

  Category of modules which add support for external libraries. 

 

|  |
| --- |
|  |
|  | [CholmodSupport module](group__cholmodsupport__module) |
|  |
|  | [KLUSupport module](group__klusupport__module) |
|  |
|  | [MetisSupport module](group__metissupport__module) |
|  |
|  | [PardisoSupport module](group__pardisosupport__module) |
|  |
|  | [PaStiXSupport module](group__pastixsupport__module) |
|  |
|  | [SuiteSparseQR module](group__spqrsupport__module) |
|  |
|  | [SuperLUSupport module](group__superlusupport__module) |
|  |
|  | [UmfPackSupport module](group__umfpacksupport__module) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__Support__modules.html>

CholmodSupport module
=====================

  This module provides an interface to the Cholmod library which is part of the [suitesparse](http://www.suitesparse.com) package. It provides the two following main factorization classes:


* class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization.
* class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial).

 For the sake of completeness, this module also propose the two following classes:


* class CholmodSimplicialLLT
* class CholmodSimplicialLDLT Note that these classes does not bring any particular advantage compared to the built-in SimplicialLLT and SimplicialLDLT factorization classes.

 
```
#include <Eigen/CholmodSupport>

```

In order to use this module, the cholmod headers must be accessible from the include paths, and your binary must be linked to the cholmod library and its dependencies. The dependencies depend on how cholmod has been compiled. For a cmake based project, you can use our FindCholmod.cmake module to help you in this task. 

 

|  |
| --- |
|  |
| class  | [Eigen::CholmodBase< \_MatrixType, \_UpLo, Derived >](classeigen_1_1cholmodbase) |
|  | The base class for the direct Cholesky factorization of Cholmod. [More...](classeigen_1_1cholmodbase#details) |
|  |
| class  | [Eigen::CholmodDecomposition< \_MatrixType, \_UpLo >](classeigen_1_1cholmoddecomposition) |
|  | A general Cholesky factorization and solver based on Cholmod. [More...](classeigen_1_1cholmoddecomposition#details) |
|  |
| class  | [Eigen::CholmodSimplicialLDLT< \_MatrixType, \_UpLo >](classeigen_1_1cholmodsimplicialldlt) |
|  | A simplicial direct Cholesky ([LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.")) factorization and solver based on Cholmod. [More...](classeigen_1_1cholmodsimplicialldlt#details) |
|  |
| class  | [Eigen::CholmodSimplicialLLT< \_MatrixType, \_UpLo >](classeigen_1_1cholmodsimplicialllt) |
|  | A simplicial direct Cholesky ([LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.")) factorization and solver based on Cholmod. [More...](classeigen_1_1cholmodsimplicialllt#details) |
|  |
| class  | [Eigen::CholmodSupernodalLLT< \_MatrixType, \_UpLo >](classeigen_1_1cholmodsupernodalllt) |
|  | A supernodal Cholesky ([LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.")) factorization and solver based on Cholmod. [More...](classeigen_1_1cholmodsupernodalllt#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__CholmodSupport__Module.html>

KLUSupport module
=================

  This module provides an interface to the KLU library which is part of the [suitesparse](http://www.suitesparse.com) package. It provides the following factorization class:


* class KLU: a sparse LU factorization, well-suited for circuit simulation.

 
```
#include <Eigen/KLUSupport>

```

In order to use this module, the klu and btf headers must be accessible from the include paths, and your binary must be linked to the klu library and its dependencies. The dependencies depend on how umfpack has been compiled. For a cmake based project, you can use our FindKLU.cmake module to help you in this task. 

 

|  |
| --- |
|  |
| int  | [Eigen::klu\_solve](group__klusupport__module#gad6d0ed07a6ee97fcef4fe3bce6a674d4) (klu\_symbolic \*Symbolic, klu\_numeric \*Numeric, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) ldim, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) nrhs, double B[], klu\_common \*Common, double) |
|  | A sparse LU factorization and solver based on KLU. [More...](group__klusupport__module#gad6d0ed07a6ee97fcef4fe3bce6a674d4) |
|  |

  klu\_solve()
------------

   

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| int Eigen::klu\_solve  | ( | klu\_symbolic \*  | *Symbolic*,  |
|  |  | klu\_numeric \*  | *Numeric*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *ldim*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *nrhs*,  |
|  |  | double  | *B*[],  |
|  |  | klu\_common \*  | *Common*,  |
|  |  | double  |  |
|  | ) |  |  |

 | inline |

 
 A sparse LU factorization and solver based on KLU. 

 This class allows to solve for A.X = B sparse linear problems via a LU factorization using the KLU library. The sparse matrix A must be squared and full rank. The vectors or matrices X and B can be either dense or sparse.

 
Warning
The input matrix A should be in a **compressed** and **column-major** form. Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix. 
 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<> |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 
See also

[Sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept), class [UmfPackLU](classeigen_1_1umfpacklu "A sparse LU factorization and solver based on UmfPack."), class [SparseLU](classeigen_1_1sparselu "Sparse supernodal LU factorization for general matrices.") 
    

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__KLUSupport__Module.html>

MetisSupport module
===================

  
```
#include <Eigen/MetisSupport>

```

 This module defines an interface to the METIS reordering package (<http://glaros.dtc.umn.edu/gkhome/views/metis>). It can be used just as any other built-in method as explained in [here.](group__orderingmethods__module)  

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__MetisSupport__Module.html>

PardisoSupport module
=====================

  This module brings support for the Intel(R) MKL PARDISO direct sparse solvers.

 
```
#include <Eigen/PardisoSupport>

```

In order to use this module, the MKL headers must be accessible from the include paths, and your binary must be linked to the MKL library and its dependencies. See this [page](topicusingintelmkl) for more information on MKL-Eigen integration. 

 

|  |
| --- |
|  |
| class  | [Eigen::PardisoLDLT< MatrixType, Options >](classeigen_1_1pardisoldlt) |
|  | A sparse direct Cholesky ([LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.")) factorization and solver based on the PARDISO library. [More...](classeigen_1_1pardisoldlt#details) |
|  |
| class  | [Eigen::PardisoLLT< MatrixType, \_UpLo >](classeigen_1_1pardisollt) |
|  | A sparse direct Cholesky ([LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.")) factorization and solver based on the PARDISO library. [More...](classeigen_1_1pardisollt#details) |
|  |
| class  | [Eigen::PardisoLU< MatrixType >](classeigen_1_1pardisolu) |
|  | A sparse direct LU factorization and solver based on the PARDISO library. [More...](classeigen_1_1pardisolu#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__PardisoSupport__Module.html>

PaStiXSupport module
====================

  This module provides an interface to the [PaSTiX](http://pastix.gforge.inria.fr/) library. PaSTiX is a general **supernodal**, **parallel** and **opensource** sparse solver. It provides the two following main factorization classes:


* class PastixLLT : a supernodal, parallel LLt Cholesky factorization.
* class PastixLDLT: a supernodal, parallel LDLt Cholesky factorization.
* class PastixLU : a supernodal, parallel LU factorization (optimized for a symmetric pattern).

 
```
#include <Eigen/PaStiXSupport>

```

In order to use this module, the PaSTiX headers must be accessible from the include paths, and your binary must be linked to the PaSTiX library and its dependencies. This wrapper resuires PaStiX version 5.x compiled without MPI support. The dependencies depend on how PaSTiX has been compiled. For a cmake based project, you can use our FindPaSTiX.cmake module to help you in this task. 

 

|  |
| --- |
|  |
| class  | [Eigen::PastixLDLT< \_MatrixType, \_UpLo >](classeigen_1_1pastixldlt) |
|  | A sparse direct supernodal Cholesky ([LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.")) factorization and solver based on the PaStiX library. [More...](classeigen_1_1pastixldlt#details) |
|  |
| class  | [Eigen::PastixLLT< \_MatrixType, \_UpLo >](classeigen_1_1pastixllt) |
|  | A sparse direct supernodal Cholesky ([LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.")) factorization and solver based on the PaStiX library. [More...](classeigen_1_1pastixllt#details) |
|  |
| class  | [Eigen::PastixLU< \_MatrixType, IsStrSym >](classeigen_1_1pastixlu) |
|  | Interface to the PaStix solver. [More...](classeigen_1_1pastixlu#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__PaStiXSupport__Module.html>

SuiteSparseQR module
====================

  This module provides an interface to the SPQR library, which is part of the [suitesparse](http://www.suitesparse.com) package.

 
```
#include <Eigen/SPQRSupport>

```

In order to use this module, the SPQR headers must be accessible from the include paths, and your binary must be linked to the SPQR library and its dependencies (Cholmod, AMD, COLAMD,...). For a cmake based project, you can use our FindSPQR.cmake and FindCholmod.Cmake modules 

 

|  |
| --- |
|  |
| class  | [Eigen::SPQR< \_MatrixType >](classeigen_1_1spqr) |
|  | [Sparse](structeigen_1_1sparse) QR factorization based on SuiteSparseQR library. [More...](classeigen_1_1spqr#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__SPQRSupport__Module.html>

SuperLUSupport module
=====================

  This module provides an interface to the [SuperLU](http://crd-legacy.lbl.gov/~xiaoye/SuperLU/) library. It provides the following factorization class:


* class SuperLU: a supernodal sequential LU factorization.
* class SuperILU: a supernodal sequential incomplete LU factorization (to be used as a preconditioner for iterative methods).

 
Warning
This wrapper requires at least versions 4.0 of SuperLU. The 3.x versions are not supported.  When including this module, you have to use SUPERLU\_EMPTY instead of EMPTY which is no longer defined because it is too polluting.
 
```
#include <Eigen/SuperLUSupport>

```

In order to use this module, the superlu headers must be accessible from the include paths, and your binary must be linked to the superlu library and its dependencies. The dependencies depend on how superlu has been compiled. For a cmake based project, you can use our FindSuperLU.cmake module to help you in this task. 

 

|  |
| --- |
|  |
| class  | [Eigen::SuperILU< \_MatrixType >](classeigen_1_1superilu) |
|  | A sparse direct **incomplete** LU factorization and solver based on the [SuperLU](classeigen_1_1superlu "A sparse direct LU factorization and solver based on the SuperLU library.") library. [More...](classeigen_1_1superilu#details) |
|  |
| class  | [Eigen::SuperLU< \_MatrixType >](classeigen_1_1superlu) |
|  | A sparse direct LU factorization and solver based on the [SuperLU](classeigen_1_1superlu "A sparse direct LU factorization and solver based on the SuperLU library.") library. [More...](classeigen_1_1superlu#details) |
|  |
| class  | [Eigen::SuperLUBase< \_MatrixType, Derived >](classeigen_1_1superlubase) |
|  | The base class for the direct and incomplete LU factorization of [SuperLU](classeigen_1_1superlu "A sparse direct LU factorization and solver based on the SuperLU library."). [More...](classeigen_1_1superlubase#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__SuperLUSupport__Module.html>

UmfPackSupport module
=====================

  This module provides an interface to the UmfPack library which is part of the [suitesparse](http://www.suitesparse.com) package. It provides the following factorization class:


* class UmfPackLU: a multifrontal sequential LU factorization.

 
```
#include <Eigen/UmfPackSupport>

```

In order to use this module, the umfpack headers must be accessible from the include paths, and your binary must be linked to the umfpack library and its dependencies. The dependencies depend on how umfpack has been compiled. For a cmake based project, you can use our FindUmfPack.cmake module to help you in this task. 

 

|  |
| --- |
|  |
| class  | [Eigen::UmfPackLU< \_MatrixType >](classeigen_1_1umfpacklu) |
|  | A sparse LU factorization and solver based on UmfPack. [More...](classeigen_1_1umfpacklu#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__UmfPackSupport__Module.html>

Global aligned box typedefs
===========================

  [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") defines several typedef shortcuts for most common aligned box types.

 The general patterns are the following:

 `AlignedBoxSizeType` where `Size` can be `1`, `2`,`3`,`4` for fixed size boxes or `X` for dynamic size, and where `Type` can be `i` for integer, `f` for float, `d` for double.

 For example, `AlignedBox3d` is a fixed-size 3x3 aligned box type of doubles, and `AlignedBoxXf` is a dynamic-size aligned box of floats.

 
See also
class [AlignedBox](classeigen_1_1alignedbox "An axis aligned box.") 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__alignedboxtypedefs.html>

Space transformations
=====================

  In this page, we will introduce the many possibilities offered by the [geometry module](group__geometry__module) to deal with 2D and 3D rotations and projective or affine transformations.

 [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s Geometry module provides two different kinds of geometric transformations:


* Abstract transformations, such as rotations (represented by [angle and axis](classeigen_1_1angleaxis) or by a [quaternion](classeigen_1_1quaternion)), [translations](classeigen_1_1translation), [scalings](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b). These transformations are NOT represented as matrices, but you can nevertheless mix them with matrices and vectors in expressions, and convert them to matrices if you wish.
* Projective or affine transformation matrices: see the [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") class. These are really matrices.

 
Note
If you are working with OpenGL 4x4 matrices then Affine3f and Affine3d are what you want. Since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") defaults to column-major storage, you can directly use the [Transform::data()](classeigen_1_1transform#aefd183e4e0ca89c39b78d5ad7cf3e014) method to pass your transformation matrix to OpenGL.
 You can construct a [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") from an abstract transformation, like this: 



```
Transform t(AngleAxis(angle,axis));

```

 or like this: 



```
Transform t;
t = AngleAxis(angle,axis);

```

 But note that unfortunately, because of how C++ works, you can **not** do this: 



```
Transform t = AngleAxis(angle,axis);

```

 **Explanation:** In the C++ language, this would require [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") to have a non-explicit conversion constructor from [AngleAxis](classeigen_1_1angleaxis "Represents a 3D rotation as a rotation angle around an arbitrary 3D axis."), but we really don't want to allow implicit casting here. 

 
 Transformation types
======================

 

| Transformation type | Typical initialization code  |
| --- | --- |
| [2D rotation](classeigen_1_1rotation2d) from an angle | 
```
Rotation2D<float> rot2(angle_in_radian);

```
 |
| 3D rotation as an [angle + axis](classeigen_1_1angleaxis) | 
```
AngleAxis<float> aa(angle_in_radian, Vector3f(ax,ay,az));

```
 The axis vector must be normalized. |
| 3D rotation as a [quaternion](classeigen_1_1quaternion) | 
```
Quaternion<float> q;  q = AngleAxis<float>(angle_in_radian, axis);

```
 |
| N-D Scaling | 
```
[Scaling](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b)(sx, sy)
[Scaling](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b)(sx, sy, sz)
[Scaling](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b)(s)
[Scaling](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b)(vecN)
```
 |
| N-D [Translation](classeigen_1_1translation "Represents a translation transformation.") | 
```
Translation<float,2>(tx, ty)
Translation<float,3>(tx, ty, tz)
Translation<float,N>(s)
Translation<float,N>(vecN)

```
 |
| N-D [Affine transformation](group__tutorialgeometry#TutorialGeoTransform) | 
```
Transform<float,N,Affine> t = concatenation_of_any_transformations;
Transform<float,3,Affine> t = Translation3f(p) * [AngleAxisf](group__geometry__module#gad823b9c674644b14d950fbfe165dfdbf)(a,axis) * [Scaling](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b)(s);
```
 |
| N-D Linear transformations  *(pure rotations,  scaling, etc.)* | 
```
Matrix<float,N> t = concatenation_of_rotations_and_scalings;
Matrix<float,2> t = [Rotation2Df](group__geometry__module#ga35e2cace3ada497794734edb8bc33b6e)(a) * [Scaling](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b)(s);
Matrix<float,3> t = [AngleAxisf](group__geometry__module#gad823b9c674644b14d950fbfe165dfdbf)(a,axis) * [Scaling](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b)(s);
```
 |

 **Notes on rotations**  
 To transform more than a single vector the preferred representations are rotation matrices, while for other usages [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") is the representation of choice as they are compact, fast and stable. Finally [Rotation2D](classeigen_1_1rotation2d "Represents a rotation/orientation in a 2 dimensional space.") and [AngleAxis](classeigen_1_1angleaxis "Represents a 3D rotation as a rotation angle around an arbitrary 3D axis.") are mainly convenient types to create other rotation objects.

 **Notes on [Translation](classeigen_1_1translation "Represents a translation transformation.") and Scaling**  
 Like [AngleAxis](classeigen_1_1angleaxis "Represents a 3D rotation as a rotation angle around an arbitrary 3D axis."), these classes were designed to simplify the creation/initialization of linear ([Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.")) and affine ([Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.")) transformations. Nevertheless, unlike [AngleAxis](classeigen_1_1angleaxis "Represents a 3D rotation as a rotation angle around an arbitrary 3D axis.") which is inefficient to use, these classes might still be interesting to write generic and efficient algorithms taking as input any kind of transformations.

 Any of the above transformation types can be converted to any other types of the same nature, or to a more generic type. Here are some additional examples: 




|  |
| --- |
| 
```
[Rotation2Df](group__geometry__module#ga35e2cace3ada497794734edb8bc33b6e) r;  r  = Matrix2f(..);       // assumes a pure rotation matrix
[AngleAxisf](group__geometry__module#gad823b9c674644b14d950fbfe165dfdbf) aa;  aa = [Quaternionf](group__geometry__module#ga66aa915a26d698c60ed206818c3e4c9b)(..);
[AngleAxisf](group__geometry__module#gad823b9c674644b14d950fbfe165dfdbf) aa;  aa = Matrix3f(..);       // assumes a pure rotation matrix
Matrix2f m;     m  = [Rotation2Df](group__geometry__module#ga35e2cace3ada497794734edb8bc33b6e)(..);
Matrix3f m;     m  = [Quaternionf](group__geometry__module#ga66aa915a26d698c60ed206818c3e4c9b)(..);       Matrix3f m;   m = [Scaling](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b)(..);
Affine3f m;     m  = AngleAxis3f(..);       Affine3f m;   m = [Scaling](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b)(..);
Affine3f m;     m  = Translation3f(..);     Affine3f m;   m = Matrix3f(..);
```
 |

  
 Common API across transformation types
========================================

 To some extent, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s [geometry module](group__geometry__module) allows you to write generic algorithms working on any kind of transformation representations: 




|  |  |
| --- | --- |
| Concatenation of two transformations | 
```
gen1 * gen2;

```
 |
| Apply the transformation to a vector | 
```
vec2 = gen1 * vec1;

```
 |
| Get the inverse of the transformation | 
```
gen2 = gen1.inverse();

```
 |
| Spherical interpolation  ([Rotation2D](classeigen_1_1rotation2d "Represents a rotation/orientation in a 2 dimensional space.") and [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") only) | 
```
rot3 = rot1.slerp(alpha,rot2);

```
 |

  
 Affine transformations
========================

 Generic affine transformations are represented by the [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") class which internally is a (Dim+1)^2 matrix. In [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") we have chosen to not distinghish between points and vectors such that all points are actually represented by displacement vectors from the origin ( \( \mathbf{p} \equiv \mathbf{p}-0 \) ). With that in mind, real points and vector distinguish when the transformation is applied. 




|  |  |
| --- | --- |
| Apply the transformation to a **point** | 
```
VectorNf p1, p2;
p2 = t * p1;

```
 |
| Apply the transformation to a **vector** | 
```
VectorNf vec1, vec2;
vec2 = t.linear() * vec1;

```
 |
| Apply a *general* transformation  to a **normal** **vector**  | 
```
VectorNf n1, n2;
MatrixNf normalMatrix = t.linear().inverse().transpose();
n2 = (normalMatrix * n1).normalized();

```
 |
| (See subject 5.27 of this [faq](http://www.faqs.org/faqs/graphics/algorithms-faq) for the explanations)  |
| Apply a transformation with *pure* *rotation*  to a **normal** **vector** (no scaling, no shear) | 
```
n2 = t.linear() * n1;

```
 |
| OpenGL compatibility **3D** | 
```
glLoadMatrixf(t.data());

```
 |
| OpenGL compatibility **2D** | 
```
Affine3f aux([Affine3f::Identity](classeigen_1_1transform#a5897c4cba8d6d19ea8711496fe75836f)());
aux.linear().topLeftCorner<2,2>() = t.linear();
aux.translation().start<2>() = t.translation();
glLoadMatrixf(aux.data());
```
 |

 **Component** **accessors** 




|  |  |
| --- | --- |
| full read-write access to the internal matrix | 
```
t.matrix() = matN1xN1;    // N1 means N+1
matN1xN1 = t.matrix();

```
 |
| coefficient accessors | 
```
t(i,j) = scalar;   <=>   t.matrix()(i,j) = scalar;
scalar = t(i,j);   <=>   scalar = t.matrix()(i,j);

```
 |
| translation part | 
```
t.translation() = vecN;
vecN = t.translation();

```
 |
| linear part | 
```
t.linear() = matNxN;
matNxN = t.linear();

```
 |
| extract the rotation matrix | 
```
matNxN = t.rotation();

```
 |

 **Transformation** **creation**   
 While transformation objects can be created and updated concatenating elementary transformations, the [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") class also features a procedural API: 




|  | procedural API | equivalent natural API  |
| --- | --- | --- |
| [Translation](classeigen_1_1translation "Represents a translation transformation.") | 
```
t.translate(Vector_(tx,ty,..));
t.pretranslate(Vector_(tx,ty,..));

```
 | 
```
t *= Translation_(tx,ty,..);
t = Translation_(tx,ty,..) * t;

```
 |
| **Rotation**  *In 2D and for the procedural API, any\_rotation can also  be an angle in radian* | 
```
t.rotate(any_rotation);
t.prerotate(any_rotation);

```
 | 
```
t *= any_rotation;
t = any_rotation * t;

```
 |
| Scaling | 
```
t.scale(Vector_(sx,sy,..));
t.scale(s);
t.prescale(Vector_(sx,sy,..));
t.prescale(s);

```
 | 
```
t *= [Scaling](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b)(sx,sy,..);
t *= [Scaling](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b)(s);
t = [Scaling](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b)(sx,sy,..) * t;
t = [Scaling](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b)(s) * t;

```
 |
| Shear transformation  ( **2D** **only** ! ) | 
```
t.shear(sx,sy);
t.preshear(sx,sy);

```
 |  |

 Note that in both API, any many transformations can be concatenated in a single expression as shown in the two following equivalent examples: 




|  |
| --- |
| 
```
t.pretranslate(..).rotate(..).translate(..).scale(..);

```
 |
| 
```
t = Translation_(..) * t * RotationType(..) * Translation_(..) * [Scaling](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b)(..);

```
 |

  
 Euler angles
==============

 

|  |  |
| --- | --- |
| Euler angles might be convenient to create rotation objects. On the other hand, since there exist 24 different conventions, they are pretty confusing to use. This example shows how to create a rotation matrix according to the 2-1-2 convention. | 
```
Matrix3f m;
m = [AngleAxisf](group__geometry__module#gad823b9c674644b14d950fbfe165dfdbf)(angle1, [Vector3f::UnitZ](classeigen_1_1matrixbase#aabdcdeff1c822a5465fcbe1f78e5afe0)())
    * [AngleAxisf](group__geometry__module#gad823b9c674644b14d950fbfe165dfdbf)(angle2, [Vector3f::UnitY](classeigen_1_1matrixbase#a00850083489e20249b1d05b394fc5efc)())
    * [AngleAxisf](group__geometry__module#gad823b9c674644b14d950fbfe165dfdbf)(angle3, [Vector3f::UnitZ](classeigen_1_1matrixbase#aabdcdeff1c822a5465fcbe1f78e5afe0)());
```
 |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__TutorialGeometry.html>

Eigen::Matrix
=============

  
### template<typename \_Scalar, int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols> class Eigen::Matrix< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >

 The matrix class, also used for vectors and row-vectors. 

 The Matrix class is the work-horse for all *dense* ([note](classeigen_1_1matrix#dense)) matrices and vectors within [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."). Vectors are matrices with one column, and row-vectors are matrices with one row.

 The Matrix class encompasses *both* fixed-size and dynamic-size objects ([note](classeigen_1_1matrix#fixedsize)).

 The first three template parameters are required: 



Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | Numeric type, e.g. float, double, int or std::complex<float>. User defined scalar types are supported as well (see [here](topiccustomizing_customscalar#user_defined_scalars)).  |
| \_Rows | Number of rows, or **Dynamic** |
| \_Cols | Number of columns, or **Dynamic** |

   The remaining template parameters are optional – in most cases you don't have to worry about them. 



Template Parameters
 

|  |  |
| --- | --- |
| \_Options | A combination of either **[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f)** or **[ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62)**, and of either **[AutoAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea)** or **[DontAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a56908522e51443a0aa0567f879c2e78a)**. The former controls [storage order](group__topicstorageorders), and defaults to column-major. The latter controls alignment, which is required for vectorization. It defaults to aligning matrices except for fixed sizes that aren't a multiple of the packet size.  |
| \_MaxRows | Maximum number of rows. Defaults to *\_Rows* ([note](classeigen_1_1matrix#maxrows)).  |
| \_MaxCols | Maximum number of columns. Defaults to *\_Cols* ([note](classeigen_1_1matrix#maxrows)). |

   [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") provides a number of typedefs covering the usual cases. Here are some examples:

 * `Matrix2d` is a 2x2 square matrix of doubles (`Matrix<double, 2, 2>`)
* `Vector4f` is a vector of 4 floats (`Matrix<float, 4, 1>`)
* `RowVector3i` is a row-vector of 3 ints (`Matrix<int, 1, 3>`)

 * `MatrixXf` is a dynamic-size matrix of floats (`Matrix<float, Dynamic, Dynamic>`)
* `VectorXf` is a dynamic-size vector of floats (`Matrix<float, Dynamic, 1>`)

 * `Matrix2Xf` is a partially fixed-size (dynamic-size) matrix of floats (`Matrix<float, 2, Dynamic>`)
* `MatrixX3d` is a partially dynamic-size (fixed-size) matrix of double (`Matrix<double, Dynamic, 3>`)

 See [this page](group__matrixtypedefs)  for a complete list of predefined *Matrix* and *Vector* typedefs.

 You can access elements of vectors and matrices using normal subscripting:

 
```
[Eigen::VectorXd](classeigen_1_1matrix) v(10);
v[0] = 0.1;
v[1] = 0.2;
v(0) = 0.3;
v(1) = 0.4;
 
[Eigen::MatrixXi](classeigen_1_1matrix) m(10, 10);
m(0, 1) = 1;
m(0, 2) = 2;
m(0, 3) = 3;
```

This class can be extended with the help of the plugin mechanism described on the page [Extending MatrixBase (and other classes)](topiccustomizing_plugins) by defining the preprocessor symbol `EIGEN_MATRIX_PLUGIN`.

 ***Some notes:***

  
**[Dense](structeigen_1_1dense) versus sparse:**  
This Matrix class handles dense, not sparse matrices and vectors. For sparse matrices and vectors, see the [Sparse](structeigen_1_1sparse) module.

 [Dense](structeigen_1_1dense) matrices and vectors are plain usual arrays of coefficients. All the coefficients are stored, in an ordinary contiguous array. This is unlike [Sparse](structeigen_1_1sparse) matrices and vectors where the coefficients are stored as a list of nonzero coefficients.

   
**Fixed-size versus dynamic-size:**  
Fixed-size means that the numbers of rows and columns are known are compile-time. In this case, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") allocates the array of coefficients as a fixed-size array, as a class member. This makes sense for very small matrices, typically up to 4x4, sometimes up to 16x16. Larger matrices should be declared as dynamic-size even if one happens to know their size at compile-time.

 Dynamic-size means that the numbers of rows or columns are not necessarily known at compile-time. In this case they are runtime variables, and the array of coefficients is allocated dynamically on the heap.

 Note that *dense* matrices, be they Fixed-size or Dynamic-size, *do not* expand dynamically in the sense of a std::map. If you want this behavior, see the [Sparse](structeigen_1_1sparse) module.

   
**\_MaxRows and \_MaxCols:**  In most cases, one just leaves these parameters to the default values. These parameters mean the maximum size of rows and columns that the matrix may have. They are useful in cases when the exact numbers of rows and columns are not known are compile-time, but it is known at compile-time that they cannot exceed a certain value. This happens when taking dynamic-size blocks inside fixed-size matrices: in this case \_MaxRows and \_MaxCols are the dimensions of the original matrix, while \_Rows and \_Cols are Dynamic.   ***ABI and storage layout***

 The table below summarizes the ABI of some possible [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") instances which is fixed thorough the lifetime of [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3. 




| [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") type | Equivalent C structure  |
| --- | --- |
| 
```
Matrix<T,Dynamic,Dynamic> 

```
 | 
```
struct {
  T *[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116);                  // with (size\_t(data)%EIGEN\_MAX\_ALIGN\_BYTES)==0
  [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, cols;
 };
```
 |
| 
```
Matrix<T,Dynamic,1>
Matrix<T,1,Dynamic> 

```
 | 
```
struct {
  T *[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116);                  // with (size\_t(data)%EIGEN\_MAX\_ALIGN\_BYTES)==0
  [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9);
 };
```
 |
| 
```
Matrix<T,Rows,Cols> 

```
 | 
```
struct {
  T [data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)[Rows*Cols];        // with (size\_t(data)%A(Rows\*Cols\*sizeof(T)))==0
 };

```
 |
| 
```
Matrix<T,Dynamic,Dynamic,0,MaxRows,MaxCols> 

```
 | 
```
struct {
  T [data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)[MaxRows*MaxCols];  // with (size\_t(data)%A(MaxRows\*MaxCols\*sizeof(T)))==0
  [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, cols;
 };

```
 |

 Note that in this table Rows, Cols, MaxRows and MaxCols are all positive integers. A(S) is defined to the largest possible power-of-two smaller to EIGEN\_MAX\_STATIC\_ALIGN\_BYTES.

 
See also

[MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") for the majority of the API methods for matrices, [The class hierarchy](topicclasshierarchy), [Storage orders](group__topicstorageorders) 
     ![Inheritance graph]             

|  |
| --- |
|  |
| typedef [PlainObjectBase](classeigen_1_1plainobjectbase)< [Matrix](classeigen_1_1matrix) >  | [Base](classeigen_1_1matrix#a9f405923954599ec7a71ee6bad2c53f1) |
|  | Base class typedef. [More...](classeigen_1_1matrix#a9f405923954599ec7a71ee6bad2c53f1) |
|  |
| - Public Types inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| enum  | {  [RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab) ,  [ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441) ,  [SizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da25cb495affdbd796198462b8ef06be91) ,  [MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306) ,  [MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) ,  [MaxSizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da3a459062d39cb34452518f5f201161d2) ,  [IsVectorAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da1156955c8099c5072934b74c72654ed0) ,  [NumDimensions](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da4d4548a01ba37a6c2031a3c1f0a37d34) ,  [Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) ,  [IsRowMajor](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da406b6af91d61d348ba1c9764bdd66008) ,  **InnerSizeAtCompileTime** ,  **InnerStrideAtCompileTime** ,  **OuterStrideAtCompileTime**  } |
|  |
| typedef random\_access\_iterator\_type  | [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) |
|  |
| typedef random\_access\_iterator\_type  | [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) |
|  |
| typedef [Array](classeigen_1_1array)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits< Derived >::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits< Derived >::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), [AutoAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea)|(internal::traits< Derived >::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) &[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762) ? [RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f) :[ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62)), internal::traits< Derived >::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits< Derived >::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) >  | [PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits< Derived >::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits< Derived >::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), [AutoAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea)|(internal::traits< Derived >::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) &[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762) ? [RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f) :[ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62)), internal::traits< Derived >::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits< Derived >::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) >  | [PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e) |
|  |
| typedef internal::conditional< internal::is\_same< typename internal::traits< Derived >::XprKind, [MatrixXpr](structeigen_1_1matrixxpr) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), [PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e), [PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb) >::type  | [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) |
|  | The plain matrix or array type corresponding to this expression. [More...](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) |
|  |
| typedef internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) |
|  |
| typedef internal::traits< Derived >::[StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) | [StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) |
|  | The type used to store indices. [More...](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) |
|  |
| typedef [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [value\_type](classeigen_1_1densebase#a9276182dab8236c33f1e7abf491d504d) |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |




|  |
| --- |
|  |
|  | [Matrix](classeigen_1_1matrix#a8f7eef9d36f1057338309afb339c1661) () |
|  | Default constructor. [More...](classeigen_1_1matrix#a8f7eef9d36f1057338309afb339c1661) |
|  |
| template<typename OtherDerived >  |
|  | [Matrix](classeigen_1_1matrix#ac1a504f785d221680d41d25224a64ce3) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  | Copy constructor for generic expressions. [More...](classeigen_1_1matrix#ac1a504f785d221680d41d25224a64ce3) |
|  |
|  | [Matrix](classeigen_1_1matrix#a3615e7b050e4432e19189d5cf6671869) (const [Matrix](classeigen_1_1matrix) &other) |
|  | Copy constructor.  |
|  |
| template<typename OtherDerived >  |
|  | [Matrix](classeigen_1_1matrix#a2f6bdcb76b48999cb9135b828bba4e7d) (const [RotationBase](classeigen_1_1rotationbase)< OtherDerived, [ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441) > &r) |
|  | Constructs a Dim x Dim rotation matrix from the rotation *r*. [More...](classeigen_1_1matrix#a2f6bdcb76b48999cb9135b828bba4e7d) |
|  |
| template<typename... ArgTypes>  |
|  | [Matrix](classeigen_1_1matrix#a25719cfdf1a07ba77708dbc6b3c79e96) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &a0, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &a1, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &a2, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &a3, const ArgTypes &... args) |
|  |
|  | [Matrix](classeigen_1_1matrix#a94173a014c2bdc8add568f43ddfd85af) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000)) |
|  | Constructs an initialized 1x1 matrix with the given coefficient. [More...](classeigen_1_1matrix#a94173a014c2bdc8add568f43ddfd85af) |
|  |
|  | [Matrix](classeigen_1_1matrix#a285010dc9f5dd33b030dd115ff6f6307) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[y](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afeaa80359bf0c1311f91cdd74a2042a8)) |
|  | Constructs an initialized 2D vector with given coefficients. [More...](classeigen_1_1matrix#a285010dc9f5dd33b030dd115ff6f6307) |
|  |
|  | [Matrix](classeigen_1_1matrix#a3166762a368fd1dec9bfa57e4e76bb50) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[y](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afeaa80359bf0c1311f91cdd74a2042a8), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[z](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a858151a06b8c0ff407232d84e695dd73)) |
|  | Constructs an initialized 3D vector with given coefficients. [More...](classeigen_1_1matrix#a3166762a368fd1dec9bfa57e4e76bb50) |
|  |
|  | [Matrix](classeigen_1_1matrix#a1b56bac44d4b7d0d652f03daf6d99dca) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[y](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afeaa80359bf0c1311f91cdd74a2042a8), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[z](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a858151a06b8c0ff407232d84e695dd73), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[w](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af683e04b3926aaf4091581ca24ca09ad)) |
|  | Constructs an initialized 4D vector with given coefficients. [More...](classeigen_1_1matrix#a1b56bac44d4b7d0d652f03daf6d99dca) |
|  |
|  | [Matrix](classeigen_1_1matrix#ac59ab3932980f113533eaed7fc651756) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)) |
|  | Constructs a fixed-sized matrix initialized with coefficients starting at *data*.  |
|  |
|  | [Matrix](classeigen_1_1matrix#afaad3c2d97f248465fa63ce43ac9eb42) (const std::initializer\_list< std::initializer\_list< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >> &list) |
|  | Constructs a [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") and initializes it from the coefficients given as initializer-lists grouped by row. [c++11] [More...](classeigen_1_1matrix#afaad3c2d97f248465fa63ce43ac9eb42) |
|  |
|  | [Matrix](classeigen_1_1matrix#a1c8627a7a051df98bdf6daab12852e02) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) dim) |
|  | Constructs a vector or row-vector with given dimension. This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column. [More...](classeigen_1_1matrix#a1c8627a7a051df98bdf6daab12852e02) |
|  |
|  | [Matrix](classeigen_1_1matrix#adca6b686dcbf607bd53a8cbe4dfed85c) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  | Constructs an uninitialized matrix with *rows* rows and *cols* columns. [More...](classeigen_1_1matrix#adca6b686dcbf607bd53a8cbe4dfed85c) |
|  |
| template<typename OtherDerived >  |
| [Matrix](classeigen_1_1matrix) &  | [operator=](classeigen_1_1matrix#a2477f75c24da9f1a1522a632b5934dd8) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  | Copies the generic expression *other* into \*this. [More...](classeigen_1_1matrix#a2477f75c24da9f1a1522a632b5934dd8) |
|  |
| [Matrix](classeigen_1_1matrix) &  | [operator=](classeigen_1_1matrix#a0b287f226563b8410312bd474b2a1ccc) (const [Matrix](classeigen_1_1matrix) &other) |
|  | Assigns matrices to each other. [More...](classeigen_1_1matrix#a0b287f226563b8410312bd474b2a1ccc) |
|  |
| template<typename OtherDerived >  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Storage, \_MaxRows, \_MaxCols > &  | [operator=](classeigen_1_1matrix#a3fe9da2ac8949d30da03ac35801d34dd) (const [RotationBase](classeigen_1_1rotationbase)< OtherDerived, [ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441) > &r) |
|  | Set a Dim x Dim rotation matrix from the rotation *r*. [More...](classeigen_1_1matrix#a3fe9da2ac8949d30da03ac35801d34dd) |
|  |
| - Public Member Functions inherited from [Eigen::PlainObjectBase< Matrix< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > >](classeigen_1_1plainobjectbase) |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeff](classeigen_1_1plainobjectbase#ac99d445913f04acc50280ae99dffd9c3) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeff](classeigen_1_1plainobjectbase#a954cd075bcd7babb429e3e4b9a418651) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rowId, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) colId) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeffRef](classeigen_1_1plainobjectbase#a72e84dc1bb573ad8ecc9109fbbc1b63b) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeffRef](classeigen_1_1plainobjectbase#a541526a4f452554785e78bc41287b348) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeffRef](classeigen_1_1plainobjectbase#a992d58b5453e441dcfc80f21c2bfd1d7) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rowId, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) colId) |
|  |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeffRef](classeigen_1_1plainobjectbase#a038a419ccb6e2c55593b27f17626fd62) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rowId, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) colId) const |
|  |
| void  | [conservativeResize](classeigen_1_1plainobjectbase#a712c25be1652e5a64a00f28c8ed11462) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| void  | [conservativeResize](classeigen_1_1plainobjectbase#a8c9b27a1df4d180b9fb5755bebea2dbd) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, NoChange\_t) |
|  |
| void  | [conservativeResize](classeigen_1_1plainobjectbase#a78a42a7c0be768374781f67f40c9ab0d) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| void  | [conservativeResize](classeigen_1_1plainobjectbase#afc474a09ec9704629b795d7907fb6c37) (NoChange\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| void  | [conservativeResizeLike](classeigen_1_1plainobjectbase#a4ece7540eda6a1ae7d3730397ce72bec) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*  | [data](classeigen_1_1plainobjectbase#ad12a492bcadea9b65ccd9bc8404c01f1) () |
|  |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*  | [data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116) () const |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [lazyAssign](classeigen_1_1plainobjectbase#a70fc6030f9ee72fbe0b3adade2a4a2bd) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [operator=](classeigen_1_1plainobjectbase#ad90648194e9fa6a0e1296ba1e4db8787) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  | Copies the generic expression *other* into \*this. [More...](classeigen_1_1plainobjectbase#ad90648194e9fa6a0e1296ba1e4db8787) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [operator=](classeigen_1_1plainobjectbase#afbf3af8d6195c9b1b2103c2dd1231247) (const [PlainObjectBase](classeigen_1_1plainobjectbase) &other) |
|  |
| void  | [resize](classeigen_1_1plainobjectbase#a9fd0703bd7bfe89d6dc80e2ce87c312a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| void  | [resize](classeigen_1_1plainobjectbase#ae4bbe4c06c1feb1035573eee7f5c3623) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, NoChange\_t) |
|  |
| void  | [resize](classeigen_1_1plainobjectbase#a8bee1e51417bfa386dd54b37f6d9e2fe) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| void  | [resize](classeigen_1_1plainobjectbase#a0dd078df3ff8b3833723ce84ce519651) (NoChange\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| void  | [resizeLike](classeigen_1_1plainobjectbase#aabf64c98e5415ad39828a83cc5bdac40) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &\_other) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setConstant](classeigen_1_1plainobjectbase#aac6bc5261783ec3008a51c2654de73e8) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setConstant](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setConstant](classeigen_1_1plainobjectbase#a56e04c9e00a84eeb26774842f4a0f6fd) (NoChange\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setConstant](classeigen_1_1plainobjectbase#ae521bf911dfa2823c8056dc9c1776bcd) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, NoChange\_t, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setZero](classeigen_1_1plainobjectbase#acc39eaf7ba22b725c86f1b9b8bb57c3c) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setZero](classeigen_1_1plainobjectbase#a73ab57abb640bf35e0dbf9dba225a1db) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setZero](classeigen_1_1plainobjectbase#af57b7361afefe60e2940802e7ef2ca54) (NoChange\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setZero](classeigen_1_1plainobjectbase#aee6d32f2e6615645b5f1152f99bc8549) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, NoChange\_t) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setOnes](classeigen_1_1plainobjectbase#a8700dc6d8e05436c0b34ae15ca9274a5) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setOnes](classeigen_1_1plainobjectbase#ad06b9d8ddac261a871c9ff550a925975) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setOnes](classeigen_1_1plainobjectbase#a3bd80eb3e6779ba362628b1cb62a665e) (NoChange\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setOnes](classeigen_1_1plainobjectbase#ab04727b1a70e7d0b5ce9d004b3349075) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, NoChange\_t) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setRandom](classeigen_1_1plainobjectbase#a5f0f6cc8039ed5ac026cd32ed5bbe6ea) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setRandom](classeigen_1_1plainobjectbase#a8921e8a7f9a5ea167231d29f8feb8700) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setRandom](classeigen_1_1plainobjectbase#a66a2a4ffc386ca72214d0ac3161fdc03) (NoChange\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setRandom](classeigen_1_1plainobjectbase#ae705648096d7e74b32daa82dd297dc54) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, NoChange\_t) |
|  |
| - Public Member Functions inherited from [Eigen::MatrixBase< Derived >](classeigen_1_1matrixbase) |
| const MatrixFunctionReturnValue< Derived >  | [acosh](classeigen_1_1matrixbase#a765140ddee0c6b39bbfa3b8917de67be) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise inverse hyperbolic cosine use ArrayBase::acosh . [More...](classeigen_1_1matrixbase#a765140ddee0c6b39bbfa3b8917de67be) |
|  |
| const AdjointReturnType  | [adjoint](classeigen_1_1matrixbase#afacca1f88da57e5cd87dd07c8ff926bb) () const |
|  |
| void  | [adjointInPlace](classeigen_1_1matrixbase#a51c5982c1f64e45a939515b701fa6f4a) () |
|  |
| template<typename EssentialPart >  |
| void  | [applyHouseholderOnTheLeft](classeigen_1_1matrixbase#a8f2c8059ef3f04cfa0c73b4c012db855) (const EssentialPart &essential, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &tau, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*workspace) |
|  |
| template<typename EssentialPart >  |
| void  | [applyHouseholderOnTheRight](classeigen_1_1matrixbase#ab3e52262b41fa40e194dda245e0f9675) (const EssentialPart &essential, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &tau, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*workspace) |
|  |
| template<typename OtherDerived >  |
| void  | [applyOnTheLeft](classeigen_1_1matrixbase#a3a08ad41e81d8ad4a37b5d5c7490e765) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| template<typename OtherScalar >  |
| void  | [applyOnTheLeft](classeigen_1_1matrixbase#ae669131f6e18f7e8f06fae271754f435) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) p, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) q, const [JacobiRotation](classeigen_1_1jacobirotation)< OtherScalar > &j) |
|  |
| template<typename OtherDerived >  |
| void  | [applyOnTheRight](classeigen_1_1matrixbase#a45d91752925d2757fc8058a293b15462) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| template<typename OtherScalar >  |
| void  | [applyOnTheRight](group__jacobi__module#gaa07f741c86219601664433777827bf1c) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) p, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) q, const [JacobiRotation](classeigen_1_1jacobirotation)< OtherScalar > &j) |
|  |
| [ArrayWrapper](classeigen_1_1arraywrapper)< Derived >  | [array](classeigen_1_1matrixbase#a354c33eec32ceb4193d002f4d41c0497) () |
|  |
| const [ArrayWrapper](classeigen_1_1arraywrapper)< const Derived >  | [array](classeigen_1_1matrixbase#a72f287fe7b2a7e7a66d16cc88166d47f) () const |
|  |
| const [DiagonalWrapper](classeigen_1_1diagonalwrapper)< const Derived >  | [asDiagonal](classeigen_1_1matrixbase#a14235b62c90f93fe910070b4743782d0) () const |
|  |
| const MatrixFunctionReturnValue< Derived >  | [asinh](classeigen_1_1matrixbase#a8efaf691d9c74b362a43b1b793706ea1) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise inverse hyperbolic sine use ArrayBase::asinh . [More...](classeigen_1_1matrixbase#a8efaf691d9c74b362a43b1b793706ea1) |
|  |
| const MatrixFunctionReturnValue< Derived >  | [atanh](classeigen_1_1matrixbase#ab87d29c00e6d75aeab43eff53bf5164c) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise inverse hyperbolic cosine use ArrayBase::atanh . [More...](classeigen_1_1matrixbase#ab87d29c00e6d75aeab43eff53bf5164c) |
|  |
| [BDCSVD](classeigen_1_1bdcsvd)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [bdcSvd](classeigen_1_1matrixbase#ae171b74b5d530846ee0836135ffcf837) (unsigned int computationOptions=0) const |
|  |
| RealScalar  | [blueNorm](classeigen_1_1matrixbase#a3f3faa00163c16824ff03e58a210c74c) () const |
|  |
| const [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [colPivHouseholderQr](classeigen_1_1matrixbase#adee8c19c833245bbb00a591dce68e8a4) () const |
|  |
| const [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [completeOrthogonalDecomposition](classeigen_1_1matrixbase#ae90b6846f05bd30b8d52b66e427e3e09) () const |
|  |
| template<typename ResultType >  |
| void  | [computeInverseAndDetWithCheck](classeigen_1_1matrixbase#a7baaf2fdec0191a2166cf9fd84a2dcb2) (ResultType &[inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf), typename ResultType::Scalar &[determinant](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061), bool &invertible, const RealScalar &absDeterminantThreshold=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename ResultType >  |
| void  | [computeInverseWithCheck](classeigen_1_1matrixbase#a116f3b50d2af7dbdf7473e517a5b8b0f) (ResultType &[inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf), bool &invertible, const RealScalar &absDeterminantThreshold=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| const MatrixFunctionReturnValue< Derived >  | [cos](classeigen_1_1matrixbase#a34d626eb756bbeb4069d1eb0e6494c65) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise cosine use ArrayBase::cos . [More...](classeigen_1_1matrixbase#a34d626eb756bbeb4069d1eb0e6494c65) |
|  |
| const MatrixFunctionReturnValue< Derived >  | [cosh](classeigen_1_1matrixbase#a627e6f11bf5854ade9a5abfc344c0367) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise hyperbolic cosine use ArrayBase::cosh . [More...](classeigen_1_1matrixbase#a627e6f11bf5854ade9a5abfc344c0367) |
|  |
| template<typename OtherDerived >  |
| [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [cross](group__geometry__module#ga0024b44eca99cb7135887c2aaf319d28) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| template<typename OtherDerived >  |
| [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [cross3](group__geometry__module#gabde56e2a0baba550815a0b05139e4d42) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [determinant](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) () const |
|  |
| [DiagonalReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3) () |
|  |
| [ConstDiagonalReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1matrixbase#aebdeedcf67e46d969c556c6c7d9780ee) () const |
|  |
| [DiagonalDynamicIndexReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1matrixbase#a8a13d4b8efbd7797ee8efd3dd988a7f7) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| [ConstDiagonalDynamicIndexReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1matrixbase#aed11a711c0a3d5dbf8bc094008e29846) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [diagonalSize](classeigen_1_1matrixbase#ab79e511b9322b8b801858e253fb257eb) () const |
|  |
| template<typename OtherDerived >  |
| [ScalarBinaryOpTraits](structeigen_1_1scalarbinaryoptraits)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), typename internal::traits< OtherDerived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::ReturnType  | [dot](classeigen_1_1matrixbase#adfd32bf5fcf6ee603c924dde9bf7bc39) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| EigenvaluesReturnType  | [eigenvalues](classeigen_1_1matrixbase#a30430fa3d5b4e74d312fd4f502ac984d) () const |
|  | Computes the eigenvalues of a matrix. [More...](classeigen_1_1matrixbase#a30430fa3d5b4e74d312fd4f502ac984d) |
|  |
| [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), 3, 1 >  | [eulerAngles](group__geometry__module#ga17994d2e81b723295f5bc3b1f862ed3b) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) a0, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) a1, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) a2) const |
|  |
| const MatrixExponentialReturnValue< Derived >  | [exp](classeigen_1_1matrixbase#a70901e189e876f64d7f3fee1dbe942cc) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise exponential use ArrayBase::exp . [More...](classeigen_1_1matrixbase#a70901e189e876f64d7f3fee1dbe942cc) |
|  |
| Derived &  | [forceAlignedAccess](classeigen_1_1matrixbase#afdaf810ac1708ca6d6ecdcfac1e06699) () |
|  |
| const Derived &  | [forceAlignedAccess](classeigen_1_1matrixbase#ad2fdb842d9a715f8778d0b33c29cfe49) () const |
|  |
| template<bool Enable>  |
| internal::conditional< Enable, [ForceAlignedAccess](classeigen_1_1forcealignedaccess)< Derived >, Derived & >::type  | [forceAlignedAccessIf](classeigen_1_1matrixbase#ae35213d1dd4dd13ebe9a7a762d6bb847) () |
|  |
| template<bool Enable>  |
| internal::add\_const\_on\_value\_type< typename internal::conditional< Enable, [ForceAlignedAccess](classeigen_1_1forcealignedaccess)< Derived >, Derived & >::type >::type  | [forceAlignedAccessIf](classeigen_1_1matrixbase#af42d92f115d4b8fa3d5aa731ed496ed1) () const |
|  |
| const [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [fullPivHouseholderQr](classeigen_1_1matrixbase#a863bc0e06b641a089508eabec6835ab2) () const |
|  |
| const [FullPivLU](classeigen_1_1fullpivlu)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [fullPivLu](classeigen_1_1matrixbase#a25da97d31acab0ee5d9d13bdbb0569da) () const |
|  |
| const HNormalizedReturnType  | [hnormalized](group__geometry__module#gadc0e3dd3510cb5a6e70aca9aab1cbf19) () const |
|  | homogeneous normalization [More...](group__geometry__module#gadc0e3dd3510cb5a6e70aca9aab1cbf19) |
|  |
| [HomogeneousReturnType](classeigen_1_1homogeneous) | [homogeneous](group__geometry__module#gaf3229c2d3669e983075ab91f7f480cb1) () const |
|  |
| const [HouseholderQR](classeigen_1_1householderqr)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [householderQr](classeigen_1_1matrixbase#a9a9377aab1cea26db5f25bab7e682f8f) () const |
|  |
| RealScalar  | [hypotNorm](classeigen_1_1matrixbase#a32222d3b6677e6cdf0b801463f329b72) () const |
|  |
| const [Inverse](classeigen_1_1inverse)< Derived >  | [inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf) () const |
|  |
| bool  | [isDiagonal](classeigen_1_1matrixbase#a97027ea54c8cd1ddb1c578fee5cedc67) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isIdentity](classeigen_1_1matrixbase#a4ccbd8dfa06e9d47b9bf84711f8b9d40) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isLowerTriangular](classeigen_1_1matrixbase#a1e96c42d79a56f0a6ade30ce031e17eb) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename OtherDerived >  |
| bool  | [isOrthogonal](classeigen_1_1matrixbase#aefdc8e4e4c156fdd79a21479e75dcd8a) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isUnitary](classeigen_1_1matrixbase#a8a7ee34ce202cac3eeea9cf20c9e4833) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isUpperTriangular](classeigen_1_1matrixbase#aae3ec1660bb4ac584220481c54ab4a64) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| [JacobiSVD](classeigen_1_1jacobisvd)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [jacobiSvd](classeigen_1_1matrixbase#a5745dca9c54390633b434e54a1d1eedd) (unsigned int computationOptions=0) const |
|  |
| template<typename OtherDerived >  |
| const [Product](classeigen_1_1product)< Derived, OtherDerived, LazyProduct >  | [lazyProduct](classeigen_1_1matrixbase#ae0c280b1066c14ed577021f38876527f) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| const [LDLT](classeigen_1_1ldlt)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [ldlt](classeigen_1_1matrixbase#a0ecf058a0727a4cab8b42d79e95072e1) () const |
|  |
| const [LLT](classeigen_1_1llt)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [llt](classeigen_1_1matrixbase#a90c45f7a30265df792d5aeaddead2635) () const |
|  |
| const MatrixLogarithmReturnValue< Derived >  | [log](classeigen_1_1matrixbase#a4dc57b319fc1cf8c9035016e56602a7d) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise logarithm use ArrayBase::log . [More...](classeigen_1_1matrixbase#a4dc57b319fc1cf8c9035016e56602a7d) |
|  |
| template<int p>  |
| RealScalar  | [lpNorm](classeigen_1_1matrixbase#a72586ab059e889e7d2894ff227747e35) () const |
|  |
| const [PartialPivLU](classeigen_1_1partialpivlu)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [lu](classeigen_1_1matrixbase#afb312afbfe960cbda67811552d876fae) () const |
|  |
| template<typename EssentialPart >  |
| void  | [makeHouseholder](classeigen_1_1matrixbase#a13291e900f7e81ddc6e5b8802f82092b) (EssentialPart &essential, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &tau, RealScalar &beta) const |
|  |
| void  | [makeHouseholderInPlace](classeigen_1_1matrixbase#aebf4bac7dffe2685ab93734fb776e817) ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &tau, RealScalar &beta) |
|  |
|  const MatrixFunctionReturnValue< Derived >  | [matrixFunction](classeigen_1_1matrixbase#a1a6cc9f734eb175e785a1118305245fc) (StemFunction f) const |
|  | Helper function for the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module).  |
|  |
| [NoAlias](classeigen_1_1noalias)< Derived, [Eigen::MatrixBase](classeigen_1_1matrixbase) >  | [noalias](classeigen_1_1matrixbase#a2c1085de7645f23f240876388457da0b) () |
|  |
| RealScalar  | [norm](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975) () const |
|  |
| void  | [normalize](classeigen_1_1matrixbase#ad16303c47ba36f7a41ea264cb26bceb6) () |
|  |
| const [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [normalized](classeigen_1_1matrixbase#a5cf2fd4c57e59604fd4116158fd34308) () const |
|  |
| template<typename OtherDerived >  |
| bool  | [operator!=](classeigen_1_1matrixbase#a028c7ac8094d610042fd0f9feca68f63) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| template<typename DiagonalDerived >  |
| const [Product](classeigen_1_1product)< Derived, DiagonalDerived, LazyProduct >  | [operator\*](classeigen_1_1matrixbase#a36fb95c37f0a454e0e2e5cb120b2df7f) (const DiagonalBase< DiagonalDerived > &[diagonal](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3)) const |
|  |
| template<typename OtherDerived >  |
| const [Product](classeigen_1_1product)< Derived, OtherDerived >  | [operator\*](classeigen_1_1matrixbase#ae2d220efbf7047f0894787888288cfcc) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator\*=](classeigen_1_1matrixbase#a3783b6168995ca117a1c19fea3630ac4) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator+=](classeigen_1_1matrixbase#a983cc3be0bbe11b3d041a415b76ce010) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator-=](classeigen_1_1matrixbase#a1042124b0ddee66e78ac7b0a9ac4cc9c) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) |
|  |
| Derived &  | [operator=](classeigen_1_1matrixbase#a373bf62ad398162df5a71963ed7cbeff) (const [MatrixBase](classeigen_1_1matrixbase) &other) |
|  |
| template<typename OtherDerived >  |
| bool  | [operator==](classeigen_1_1matrixbase#a80e3e1e83fdf43f9f7fb6ff51836b24d) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| RealScalar  | [operatorNorm](classeigen_1_1matrixbase#a0ff9bc0b9bea2d0822a2bf3192783102) () const |
|  | Computes the L2 operator norm. [More...](classeigen_1_1matrixbase#a0ff9bc0b9bea2d0822a2bf3192783102) |
|  |
| const [PartialPivLU](classeigen_1_1partialpivlu)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [partialPivLu](classeigen_1_1matrixbase#a6199d8aaf26c1b8ac3097fdfa7733a1e) () const |
|  |
| const MatrixPowerReturnValue< Derived >  | [pow](classeigen_1_1matrixbase#a7ae6c25e6a94a60e147741e76203a73b) (const RealScalar &p) const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise power to `p` use [ArrayBase::pow](classeigen_1_1arraybase#a5df3d99d47747b72d61f235c9fb925e3) . [More...](classeigen_1_1matrixbase#a7ae6c25e6a94a60e147741e76203a73b) |
|  |
| const MatrixComplexPowerReturnValue< Derived >  | [pow](classeigen_1_1matrixbase#a91dcacf224bd8b18346914bdf7eefc31) (const std::complex< RealScalar > &p) const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise power to `p` use [ArrayBase::pow](classeigen_1_1arraybase#a5df3d99d47747b72d61f235c9fb925e3) . [More...](classeigen_1_1matrixbase#a91dcacf224bd8b18346914bdf7eefc31) |
|  |
| template<unsigned int UpLo>  |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::template SelfAdjointViewReturnType< UpLo >::Type  | [selfadjointView](classeigen_1_1matrixbase#ad446541377593656c1399862fe6a0f94) () |
|  |
| template<unsigned int UpLo>  |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::template ConstSelfAdjointViewReturnType< UpLo >::Type  | [selfadjointView](classeigen_1_1matrixbase#a67eb836f331d9b567e7f36ec0782fa07) () const |
|  |
| Derived &  | [setIdentity](classeigen_1_1matrixbase#a18e969adfdf2db4ac44c47fbdc854683) () |
|  |
| Derived &  | [setIdentity](classeigen_1_1matrixbase#a97dec020729928e328fe8ae9aad1e99e) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  | Resizes to the given size, and writes the identity expression (not necessarily square) into \*this. [More...](classeigen_1_1matrixbase#a97dec020729928e328fe8ae9aad1e99e) |
|  |
| Derived &  | [setUnit](classeigen_1_1matrixbase#ac7cf3e0e69550d36de8778b09a645afd) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) i) |
|  | Set the coefficients of `*this` to the i-th unit (basis) vector. [More...](classeigen_1_1matrixbase#ac7cf3e0e69550d36de8778b09a645afd) |
|  |
| Derived &  | [setUnit](classeigen_1_1matrixbase#a90bed3b6468a17a9054b07cde7a751a6) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) newSize, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) i) |
|  | Resizes to the given *newSize*, and writes the i-th unit (basis) vector into \*this. [More...](classeigen_1_1matrixbase#a90bed3b6468a17a9054b07cde7a751a6) |
|  |
| const MatrixFunctionReturnValue< Derived >  | [sin](classeigen_1_1matrixbase#a02f4ff0fcbbae2f3ccaa5981e8ad5e34) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise sine use ArrayBase::sin . [More...](classeigen_1_1matrixbase#a02f4ff0fcbbae2f3ccaa5981e8ad5e34) |
|  |
| const MatrixFunctionReturnValue< Derived >  | [sinh](classeigen_1_1matrixbase#a9c37eab2dc7baf83809269254c9129e0) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise hyperbolic sine use ArrayBase::sinh . [More...](classeigen_1_1matrixbase#a9c37eab2dc7baf83809269254c9129e0) |
|  |
| const [SparseView](classeigen_1_1sparseview)< Derived >  | [sparseView](group__sparsecore__module#ga320dd291cbf4339c6118c41521b75350) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &m\_reference=[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)(0), const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real &m\_epsilon=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| const MatrixSquareRootReturnValue< Derived >  | [sqrt](classeigen_1_1matrixbase#ad873dca860bd47baeeede8663e161b83) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise square root use ArrayBase::sqrt . [More...](classeigen_1_1matrixbase#ad873dca860bd47baeeede8663e161b83) |
|  |
| RealScalar  | [squaredNorm](classeigen_1_1matrixbase#ac8da566526419f9742a6c471bbd87e0a) () const |
|  |
| RealScalar  | [stableNorm](classeigen_1_1matrixbase#ab84d3e64f855813b1eea4202c0697dc1) () const |
|  |
| void  | [stableNormalize](classeigen_1_1matrixbase#a0b1443fa322615379557ade3399a3c3c) () |
|  |
| const [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [stableNormalized](classeigen_1_1matrixbase#a399dca938633b9f8df5ec4beefeccec0) () const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [trace](classeigen_1_1matrixbase#a544b609f65eb2bd3e368b3fc2d79479e) () const |
|  |
| template<unsigned int Mode>  |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::template TriangularViewReturnType< Mode >::Type  | [triangularView](classeigen_1_1matrixbase#a56665aa894f49f2765291fee0eaeb9c6) () |
|  |
| template<unsigned int Mode>  |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::template ConstTriangularViewReturnType< Mode >::Type  | [triangularView](classeigen_1_1matrixbase#aa044521145e74117ad1df42460d7b520) () const |
|  |
| [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [unitOrthogonal](group__geometry__module#gaa0dc2c32a9379eeb2b4c4a05c1a6fe52) (void) const |
|  |
| - Public Member Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| bool  | [all](classeigen_1_1densebase#ae42ab60296c120e9f45ce3b44e1761a4) () const |
|  |
| bool  | [allFinite](classeigen_1_1densebase#af1e669fd3aaae50a4870dc1b8f3b8884) () const |
|  |
| bool  | [any](classeigen_1_1densebase#abfbf4cb72dd577e62fbe035b1c53e695) () const |
|  |
| [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) | [begin](classeigen_1_1densebase#a57591454af931f9dffa71c9da28d5641) () |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [begin](classeigen_1_1densebase#ad9368ce70b06167ec5fc19398d329f5e) () const |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [cbegin](classeigen_1_1densebase#ae9a3dfd9b826ba3103de0128576fb15b) () const |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [cend](classeigen_1_1densebase#aeb3b76f02986c2af2521d07164b5ffde) () const |
|  |
| [ColwiseReturnType](classeigen_1_1vectorwiseop) | [colwise](classeigen_1_1densebase#a1c0e1b6067ec1de6cb8799da55aa7d30) () |
|  |
| [ConstColwiseReturnType](classeigen_1_1vectorwiseop) | [colwise](classeigen_1_1densebase#a58837c81de446efbdb58da07b73a63c1) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [count](classeigen_1_1densebase#a229be090c665b9bf7d1fcdfd1ab6e0c1) () const |
|  |
| [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) | [end](classeigen_1_1densebase#ae71d079e16d91360d10066b316b48485) () |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [end](classeigen_1_1densebase#ab34773522e43bfb02e9cf652d7b5dd60) () const |
|  |
| EvalReturnType  | [eval](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b) () const |
|  |
| void  | [fill](classeigen_1_1densebase#a9be169c308801411aa24be93d30930bf) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| template<unsigned int Added, unsigned int Removed>  |
| EIGEN\_DEPRECATED const Derived &  | [flagged](classeigen_1_1densebase#a9b3f75f76ae40439be870258e80c7346) () const |
|  |
| const [WithFormat](classeigen_1_1withformat)< Derived >  | [format](classeigen_1_1densebase#ab231f1a6057f28d4244145e12c9fc0c7) (const [IOFormat](structeigen_1_1ioformat) &fmt) const |
|  |
| bool  | [hasNaN](classeigen_1_1densebase#ab13d158c900560d3e1b25d85d2d33dd6) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1densebase#a58ca41d9635a8ab3c5a268ef3f7f0d75) () const |
|  |
| template<typename OtherDerived >  |
| bool  | [isApprox](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isApproxToConstant](classeigen_1_1densebase#af9b150d48bc5e4366887ccb466e40c6b) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isConstant](classeigen_1_1densebase#a1ca84e4179b3e5081ed11d89bbd9e74f) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename OtherDerived >  |
| bool  | [isMuchSmallerThan](classeigen_1_1densebase#a3c4db0c6dd974fa88bbb58b2cf3d5664) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename Derived >  |
| bool  | [isMuchSmallerThan](classeigen_1_1densebase#adfca6ff4e473f68fbbeabbd03b7504a9) (const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real &other, const RealScalar &prec) const |
|  |
| bool  | [isOnes](classeigen_1_1densebase#aa56d6b4477cd3c92a9cf42f4b96e47c2) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isZero](classeigen_1_1densebase#af36014ec300f53a65083057ed4e89822) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename OtherDerived >  |
| EIGEN\_DEPRECATED Derived &  | [lazyAssign](classeigen_1_1densebase#a6bc6c096e3bfc726f28315daecd21b3f) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<int NaNPropagation>  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1) () const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#aced8ffda52ff061b6586ace2657ebf30) (IndexType \*index) const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#a3780b7a9cd184d0b4f3ea797eba9e2b3) (IndexType \*row, IndexType \*col) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [mean](classeigen_1_1densebase#a21ac6c0419a72ad7a88ea0bc189017d7) () const |
|  |
| template<int NaNPropagation>  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#a0739f9c868c331031c7810e21838dcb2) () const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#ac9265f4f91430b9cc75d63fb6865bb29) (IndexType \*index) const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#aa28152ba4a42b2d112e5fec5469ec4c1) (IndexType \*row, IndexType \*col) const |
|  |
| const [NestByValue](classeigen_1_1nestbyvalue)< Derived >  | [nestByValue](classeigen_1_1densebase#a3e2761e2b6da74dba1d17b40cc918bf7) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1densebase#acb8d5574eff335381e7441ade87700a0) () const |
|  |
| template<typename OtherDerived >  |
| [CommaInitializer](structeigen_1_1commainitializer)< Derived >  | [operator<<](classeigen_1_1densebase#a0f0e34696162b34762b2bf4bd948f90c) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| [CommaInitializer](structeigen_1_1commainitializer)< Derived >  | [operator<<](classeigen_1_1densebase#a0e575eb0ba6cc6bc5f347872abd8509d) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &s) |
|  |
| Derived &  | [operator=](classeigen_1_1densebase#a5281dadff89f46eef719b38e5d073a8f) (const [DenseBase](classeigen_1_1densebase) &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator=](classeigen_1_1densebase#ab66155169d20c035e80d521a8b918e97) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator=](classeigen_1_1densebase#a58915510693d64164e567bd762e1032f) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  | Copies the generic expression *other* into \*this. [More...](classeigen_1_1densebase#a58915510693d64164e567bd762e1032f) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1densebase#a03f71699bc26ca2ee4e42ec4538862d7) () const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [prod](classeigen_1_1densebase#af119d9a4efe5a15cd83c1ccdf01b3a4f) () const |
|  |
| template<typename Func >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [redux](classeigen_1_1densebase#a63ce1e4fab36bff43bbadcdd06a67724) (const Func &func) const |
|  |
| template<int RowFactor, int ColFactor>  |
| const [Replicate](classeigen_1_1replicate)< Derived, RowFactor, ColFactor >  | [replicate](classeigen_1_1densebase#a60dadfe80b813d808e91e4521c722a8e) () const |
|  |
| const [Replicate](classeigen_1_1replicate)< Derived, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) >  | [replicate](classeigen_1_1densebase#afae2d5e36f1158d1b1681dac3cdbd58e) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rowFactor, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) colFactor) const |
|  |
| void  | [resize](classeigen_1_1densebase#a2ec5bac4e1ab95808808ef50ccf4cb39) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) newSize) |
|  |
| void  | [resize](classeigen_1_1densebase#a25e2b4887b47b1f2346857d1931efa0f) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| [ReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1densebase#a38ea394036d8b096abf322469c80198f) () |
|  |
| [ConstReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1densebase#a9e2f3ac4019184abf95ca0e1a8d82866) () const |
|  |
| void  | [reverseInPlace](classeigen_1_1densebase#adb8045155ea45f7961fc2a5170e1d921) () |
|  |
| [RowwiseReturnType](classeigen_1_1vectorwiseop) | [rowwise](classeigen_1_1densebase#a6daa3a3156ca0e0722bf78638e1c7f28) () |
|  |
| [ConstRowwiseReturnType](classeigen_1_1vectorwiseop) | [rowwise](classeigen_1_1densebase#aa1cabd3404528fe8cec4bab43d74bffc) () const |
|  |
| template<typename ThenDerived , typename ElseDerived >  |
| const [Select](classeigen_1_1select)< Derived, ThenDerived, ElseDerived >  | [select](classeigen_1_1densebase#a65e78cfcbc9852e6923bebff4323ddca) (const [DenseBase](classeigen_1_1densebase)< ThenDerived > &thenMatrix, const [DenseBase](classeigen_1_1densebase)< ElseDerived > &elseMatrix) const |
|  |
| template<typename ThenDerived >  |
| const [Select](classeigen_1_1select)< Derived, ThenDerived, typename ThenDerived::ConstantReturnType >  | [select](classeigen_1_1densebase#a57ef09a843004095f84c198dd145641b) (const [DenseBase](classeigen_1_1densebase)< ThenDerived > &thenMatrix, const typename ThenDerived::Scalar &elseScalar) const |
|  |
| template<typename ElseDerived >  |
| const [Select](classeigen_1_1select)< Derived, typename ElseDerived::ConstantReturnType, ElseDerived >  | [select](classeigen_1_1densebase#a9e8e78c75887d4539071a0b7a61ca103) (const typename ElseDerived::Scalar &thenScalar, const [DenseBase](classeigen_1_1densebase)< ElseDerived > &elseMatrix) const |
|  |
| Derived &  | [setConstant](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| Derived &  | [setLinSpaced](classeigen_1_1densebase#aeb023532476d3f14c457367e0eb5f3f1) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#aeb023532476d3f14c457367e0eb5f3f1) |
|  |
| Derived &  | [setLinSpaced](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a) |
|  |
| Derived &  | [setOnes](classeigen_1_1densebase#a250ef1b827e748f3f898fb2e55cb96e2) () |
|  |
| Derived &  | [setRandom](classeigen_1_1densebase#ac476e5852129ba32beaa1a8a3d7ee0db) () |
|  |
| Derived &  | [setZero](classeigen_1_1densebase#af230a143de50695d2d1fae93db7e4dcb) () |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [sum](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c) () const |
|  |
| template<typename OtherDerived >  |
| void  | [swap](classeigen_1_1densebase#af9e7e4305fdb7781f2b2f05fa801f21e) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| void  | [swap](classeigen_1_1densebase#a44e25adc6da9cd1d79f4c5bd7c1819cb) ([PlainObjectBase](classeigen_1_1plainobjectbase)< OtherDerived > &other) |
|  |
| [TransposeReturnType](classeigen_1_1transpose) | [transpose](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1densebase#a38c0b074cf93fc194bf91141287cee3f) () const |
|  |
| void  | [transposeInPlace](classeigen_1_1densebase#ac501bd942994af7a95d95bee7a16ad2a) () |
|  |
| CoeffReturnType  | [value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0) () const |
|  |
| template<typename Visitor >  |
| void  | [visit](classeigen_1_1densebase#a4225b90fcc74f18dd479b401124b3841) (Visitor &func) const |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, DirectWriteAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [colStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#af1bac522aee4402639189f387592000b) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a4e94e17926e1cf597deb2928e779cef6) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#abb333f6f10467f6f8d7b59c213dea49e) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rowStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a63bc5874eb4e320e54eb079b43b49d22) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, WriteAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4) |
| Scalar &  | [coeffRef](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae66b7d18b2a85f3139b703126974c900) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| Scalar &  | [coeffRef](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#adc8286576b31e11f056057be666a0ec8) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| Scalar &  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a0171eee1d9e582d1ac7ec0f18f5f615a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| Scalar &  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae6ba07bad9e3026afe54806fdefe32bb) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| Scalar &  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#aa2040f14e60fed1a4a68ca7f042e1bbf) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| Scalar &  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af683e04b3926aaf4091581ca24ca09ad) () |
|  |
| Scalar &  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000) () |
|  |
| Scalar &  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afeaa80359bf0c1311f91cdd74a2042a8) () |
|  |
| Scalar &  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a858151a06b8c0ff407232d84e695dd73) () |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, ReadOnlyAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4) |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af9fadc22d12e48c82745dad534a1671a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ab3dbba4a15d0fe90185d2900e5ef0fd1) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| CoeffReturnType  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a496672306836589fa04a6ab33cb0cf2a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| CoeffReturnType  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a926f52a94f038db63c6b9103f98dcf0f) () const |
|  |
| CoeffReturnType  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a189c80109e76752b598d60dfcdab329e) () const |
|  |
| CoeffReturnType  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a0c6d6904a37805ce47a3238fbd735963) () const |
|  |
| CoeffReturnType  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a7c60c97282d4a0f8bca16ef75e231ddb) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Static Public Member Functions inherited from [Eigen::PlainObjectBase< Matrix< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > >](classeigen_1_1plainobjectbase) |
| static [ConstMapType](classeigen_1_1map) | **Map** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)) |
|  |
| static [MapType](classeigen_1_1map) | **Map** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)) |
|  |
| static [ConstMapType](classeigen_1_1map) | **Map** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static [MapType](classeigen_1_1map) | **Map** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static [ConstMapType](classeigen_1_1map) | **Map** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| static [MapType](classeigen_1_1map) | **Map** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| static StridedConstMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **Map** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **Map** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedConstMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **Map** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **Map** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedConstMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **Map** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols, const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **Map** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols, const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static [ConstAlignedMapType](classeigen_1_1map) | **MapAligned** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)) |
|  |
| static [AlignedMapType](classeigen_1_1map) | **MapAligned** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)) |
|  |
| static [ConstAlignedMapType](classeigen_1_1map) | **MapAligned** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static [AlignedMapType](classeigen_1_1map) | **MapAligned** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static [ConstAlignedMapType](classeigen_1_1map) | **MapAligned** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| static [AlignedMapType](classeigen_1_1map) | **MapAligned** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| static StridedConstAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **MapAligned** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **MapAligned** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedConstAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **MapAligned** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **MapAligned** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedConstAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **MapAligned** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols, const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **MapAligned** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols, const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| - Static Public Member Functions inherited from [Eigen::MatrixBase< Derived >](classeigen_1_1matrixbase) |
| static const IdentityReturnType  | [Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f) () |
|  |
| static const IdentityReturnType  | [Identity](classeigen_1_1matrixbase#acf33ce20ef03ead47cb3dbcd5f416ede) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const BasisReturnType  | [Unit](classeigen_1_1matrixbase#a9daf6d22d10ed8ae00432b0f641455df) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) i) |
|  |
| static const BasisReturnType  | [Unit](classeigen_1_1matrixbase#ac7a03a61014f37ddd2fe61ebac0c9539) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) i) |
|  |
| static const BasisReturnType  | [UnitW](classeigen_1_1matrixbase#af56ba94e5b0330827003eadd26cfadc2) () |
|  |
| static const BasisReturnType  | [UnitX](classeigen_1_1matrixbase#a8a555b7cf626cced54670b98668c4e6d) () |
|  |
| static const BasisReturnType  | [UnitY](classeigen_1_1matrixbase#a00850083489e20249b1d05b394fc5efc) () |
|  |
| static const BasisReturnType  | [UnitZ](classeigen_1_1matrixbase#aabdcdeff1c822a5465fcbe1f78e5afe0) () |
|  |
| - Static Public Member Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#a1fdd3189ae3a41d250593334d82210cf) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#ad8098aa5971139a5585e623dddbea860) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#ad8098aa5971139a5585e623dddbea860) |
|  |
| static const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) |
|  |
| static EIGEN\_DEPRECATED const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#ac8cfbd436a8c9fc50defee5946451176) (Sequential\_t, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| static EIGEN\_DEPRECATED const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d) (Sequential\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a5dc65501accd02c30f7c1840c2a30a41) (const CustomNullaryOp &func) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a3340c9b997f5b53a0131cf927f93b54c) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), const CustomNullaryOp &func) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a9752ee59976a4b4aad860ad1a9093e7f) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const CustomNullaryOp &func) |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101) () |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#a8b2a51018a73a766f5b91aef3487f013) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#ab710a58e4a80fbcb2594242372c8fe56) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19) () |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#ae97f8d9d08f969c733c8144be6225756) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#a7eb5f974a8f0b67eac7080db1da0e308) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) () |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#ae41a9b5050ed27d9e93c82c9c8622cd3) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#ac22f79b812fa564061042407f2ba8f5b) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| - Protected Member Functions inherited from [Eigen::PlainObjectBase< Matrix< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > >](classeigen_1_1plainobjectbase) |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#a73dca0493df0fe4f8e518e379a80cbdd) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#a8fa7e42fd02b266ac54d57cdc735e83d) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#a520234520136dffad88301a507da4fa5) (const [PlainObjectBase](classeigen_1_1plainobjectbase) &other) |
|  |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#a281044f167c388339c2d704e5d292fa5) (const ReturnByValue< OtherDerived > &other) |
|  | Copy constructor with in-place evaluation.  |
|  |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#a5b6ba62bc9d263390e81a77a44f23dd9) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &a0, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &a1, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &a2, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &a3, const ArgTypes &... args) |
|  | Construct a row of column vector with fixed size from an arbitrary number of coefficients. [c++11] [More...](classeigen_1_1plainobjectbase#a5b6ba62bc9d263390e81a77a44f23dd9) |
|  |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#ab6cde095b242924b47479662b16d78b9) (const std::initializer\_list< std::initializer\_list< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >> &list) |
|  | Constructs a Matrix or Array and initializes it by elements given by an initializer list of initializer lists [c++11]  |
|  |
| void  | **\_resize\_to\_match** (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [\_set](classeigen_1_1plainobjectbase#a09c4b519ee4c635144581e9fe03b6174) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  | Copies the value of the expression *other* into `*this` with automatic resizing. [More...](classeigen_1_1plainobjectbase#a09c4b519ee4c635144581e9fe03b6174) |
|  |
| [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | **\_set\_noalias** (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| void  | **\_init2** ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols, typename internal::enable\_if< Base::SizeAtCompileTime!=2, T0 >::type \*=0) |
|  |
| void  | **\_init2** (const T0 &val0, const T1 &val1, typename internal::enable\_if< Base::SizeAtCompileTime==2, T0 >::type \*=0) |
|  |
| void  | **\_init2** (const [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) &val0, const [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) &val1, typename internal::enable\_if<(!internal::is\_same< [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02), [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) &&(internal::is\_same< T0, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) &&(internal::is\_same< T1, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) &&Base::SizeAtCompileTime==2, T1 >::type \*=0) |
|  |
| void  | **\_init1** ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), typename internal::enable\_if<(Base::SizeAtCompileTime!=1||!internal::is\_convertible< T, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) &&((!internal::is\_same< typename internal::traits< [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > >::XprKind, [ArrayXpr](structeigen_1_1arrayxpr) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)||Base::SizeAtCompileTime==Dynamic)), T >::type \*=0) |
|  |
| void  | **\_init1** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val0, typename internal::enable\_if< Base::SizeAtCompileTime==1 &&internal::is\_convertible< T, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), T >::type \*=0) |
|  |
| void  | **\_init1** (const [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) &val0, typename internal::enable\_if<(!internal::is\_same< [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02), [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) &&(internal::is\_same< [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02), T >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) &&Base::SizeAtCompileTime==1 &&internal::is\_convertible< T, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), T \* >::type \*=0) |
|  |
| void  | **\_init1** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)) |
|  |
| void  | **\_init1** (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| void  | **\_init1** (const [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &other) |
|  |
| void  | **\_init1** (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| void  | **\_init1** (const ReturnByValue< OtherDerived > &other) |
|  |
| void  | **\_init1** (const [RotationBase](classeigen_1_1rotationbase)< OtherDerived, [ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441) > &r) |
|  |
| void  | **\_init1** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val0, typename internal::enable\_if< Base::SizeAtCompileTime!=Dynamic &&Base::SizeAtCompileTime!=1 &&internal::is\_convertible< T, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0) &&internal::is\_same< typename internal::traits< [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > >::XprKind, [ArrayXpr](structeigen_1_1arrayxpr) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), T >::type \*=0) |
|  |
| void  | **\_init1** (const [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) &val0, typename internal::enable\_if<(!internal::is\_same< [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02), [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) &&(internal::is\_same< [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02), T >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) &&Base::SizeAtCompileTime!=Dynamic &&Base::SizeAtCompileTime!=1 &&internal::is\_convertible< T, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0) &&internal::is\_same< typename internal::traits< [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > >::XprKind, [ArrayXpr](structeigen_1_1arrayxpr) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), T \* >::type \*=0) |
|  |
| - Protected Member Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
|  | [DenseBase](classeigen_1_1densebase#aa284042d0e1b0ad9b6a00db7fd2d9f7f) () |
|  |
| - Related Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| template<typename Derived >  |
| std::ostream &  | [operator<<](classeigen_1_1densebase#a3806d3f42de165878dace160e6aba40a) (std::ostream &s, const [DenseBase](classeigen_1_1densebase)< Derived > &m) |
|  |

  Base
----

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |
| --- |
| typedef [PlainObjectBase](classeigen_1_1plainobjectbase)<[Matrix](classeigen_1_1matrix)> [Eigen::Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::Base |

 
 Base class typedef. 

 
See also

[PlainObjectBase](classeigen_1_1plainobjectbase "Dense storage base class for matrices and arrays.") 
    Matrix() [1/11]
---------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Matrix](classeigen_1_1matrix) | ( |  | ) |  |

 | inline |

 
 Default constructor. 

 For fixed-size matrices, does nothing.

 For dynamic-size matrices, creates an empty matrix of size 0. Does not allocate any array. Such a matrix is called a null matrix. This constructor is the unique way to create null matrices: resizing a matrix to 0 is not supported.

 
See also

[resize(Index,Index)](classeigen_1_1plainobjectbase#a9fd0703bd7bfe89d6dc80e2ce87c312a) 
    Matrix() [2/11]
---------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>   template<typename... ArgTypes>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Matrix](classeigen_1_1matrix) | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *a0*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *a1*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *a2*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *a3*,  |
|  |  | const ArgTypes &...  | *args* |
|  | ) |  |  |

 | inline |

 
  Example: 



```
Matrix<int, 1, 6> a(1, 2, 3, 4, 5, 6);
Matrix<int, 3, 1> b {1, 2, 3};
cout << a << "\n\n" << b << endl;

```

 Output: 



```
1 2 3 4 5 6

1
2
3

```


See also

[Matrix(const std::initializer\_list<std::initializer\_list<Scalar>>&)](classeigen_1_1matrix#afaad3c2d97f248465fa63ce43ac9eb42 "Constructs a Matrix and initializes it from the coefficients given as initializer-lists grouped by ro...") 
    Matrix() [3/11]
---------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Matrix](classeigen_1_1matrix) | ( | const std::initializer\_list< std::initializer\_list< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >> &  | *list* | ) |  |

 | inlineexplicit |

 
 Constructs a [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") and initializes it from the coefficients given as initializer-lists grouped by row. [c++11] 

 In the general case, the constructor takes a list of rows, each row being represented as a list of coefficients:

 Example: 



```
MatrixXd m {
  {1, 2, 3},
  {4, 5, 6}
};
cout << m << endl;

```

 Output: 



```
1 2 3
4 5 6

```

Each of the inner initializer lists must contain the exact same number of elements, otherwise an assertion is triggered.

 In the case of a compile-time column vector, implicit transposition from a single row is allowed. Therefore `VectorXd{{1,2,3,4,5}}` is legal and the more verbose syntax `RowVectorXd{{1},{2},{3},{4},{5}}` can be avoided:

 Example: 



```
VectorXi v {{1, 2}};
cout << v << endl;

```

 Output: 



```
1
2

```

In the case of fixed-sized matrices, the initializer list sizes must exactly match the matrix sizes, and implicit transposition is allowed for compile-time vectors only.

 
See also

[Matrix(const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args)](classeigen_1_1matrix#a25719cfdf1a07ba77708dbc6b3c79e96) 
    Matrix() [4/11]
---------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Matrix](classeigen_1_1matrix) | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *dim* | ) |  |

 | inlineexplicit |

 
 Constructs a vector or row-vector with given dimension. This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column. 

 This is useful for dynamic-size vectors. For fixed-size vectors, it is redundant to pass these parameters, so one should use the default constructor [Matrix()](classeigen_1_1matrix#a8f7eef9d36f1057338309afb339c1661 "Default constructor.") instead.

 
Warning
This constructor is disabled for fixed-size `1x1` matrices. For instance, calling Matrix<double,1,1>(1) will call the initialization constructor: [Matrix(const Scalar&)](classeigen_1_1matrix#a94173a014c2bdc8add568f43ddfd85af "Constructs an initialized 1x1 matrix with the given coefficient."). For fixed-size `1x1` matrices it is therefore recommended to use the default constructor [Matrix()](classeigen_1_1matrix#a8f7eef9d36f1057338309afb339c1661 "Default constructor.") instead, especially when using one of the non standard `EIGEN_INITIALIZE_MATRICES_BY_{ZERO`,`NAN}` macros (see [Preprocessor directives](topicpreprocessordirectives)). 
    Matrix() [5/11]
---------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Matrix](classeigen_1_1matrix) | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *x* | ) |  |

 
 Constructs an initialized 1x1 matrix with the given coefficient. 

 
See also
Matrix(const Scalar&, const Scalar&, const Scalar&, const Scalar&, const ArgTypes&...) 
    Matrix() [6/11]
---------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Matrix](classeigen_1_1matrix) | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols* |
|  | ) |  |  |

 
 Constructs an uninitialized matrix with *rows* rows and *cols* columns. 

 This is useful for dynamic-size matrices. For fixed-size matrices, it is redundant to pass these parameters, so one should use the default constructor [Matrix()](classeigen_1_1matrix#a8f7eef9d36f1057338309afb339c1661 "Default constructor.") instead.

 
Warning
This constructor is disabled for fixed-size `1x2` and `2x1` vectors. For instance, calling Matrix2f(2,1) will call the initialization constructor: [Matrix(const Scalar& x, const Scalar& y)](classeigen_1_1matrix#a285010dc9f5dd33b030dd115ff6f6307 "Constructs an initialized 2D vector with given coefficients."). For fixed-size `1x2` or `2x1` vectors it is therefore recommended to use the default constructor [Matrix()](classeigen_1_1matrix#a8f7eef9d36f1057338309afb339c1661 "Default constructor.") instead, especially when using one of the non standard `EIGEN_INITIALIZE_MATRICES_BY_{ZERO`,`NAN}` macros (see [Preprocessor directives](topicpreprocessordirectives)). 
    Matrix() [7/11]
---------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Matrix](classeigen_1_1matrix) | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *x*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *y* |
|  | ) |  |  |

 
 Constructs an initialized 2D vector with given coefficients. 

 
See also
Matrix(const Scalar&, const Scalar&, const Scalar&, const Scalar&, const ArgTypes&...) 
    Matrix() [8/11]
---------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Matrix](classeigen_1_1matrix) | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *x*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *y*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *z* |
|  | ) |  |  |

 | inline |

 
 Constructs an initialized 3D vector with given coefficients. 

 
See also
Matrix(const Scalar&, const Scalar&, const Scalar&, const Scalar&, const ArgTypes&...) 
    Matrix() [9/11]
---------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Matrix](classeigen_1_1matrix) | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *x*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *y*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *z*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *w* |
|  | ) |  |  |

 | inline |

 
 Constructs an initialized 4D vector with given coefficients. 

 
See also
Matrix(const Scalar&, const Scalar&, const Scalar&, const Scalar&, const ArgTypes&...) 
    Matrix() [10/11]
----------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Matrix](classeigen_1_1matrix) | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Copy constructor for generic expressions. 

 
See also
MatrixBase::operator=(const EigenBase<OtherDerived>&) 
    Matrix() [11/11]
----------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Storage, int \_MaxRows, int \_MaxCols>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Storage, \_MaxRows, \_MaxCols >::[Matrix](classeigen_1_1matrix) | ( | const [RotationBase](classeigen_1_1rotationbase)< OtherDerived, [ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441) > &  | *r* | ) |  |

 | explicit |

 
 Constructs a Dim x Dim rotation matrix from the rotation *r*. 

 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```
    operator=() [1/3]
-----------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Matrix](classeigen_1_1matrix)& [Eigen::Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::operator=  | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Copies the generic expression *other* into \*this. 

 The expression must provide a (templated) evalTo(Derived& dst) const function which does the actual job. In practice, this allows any user to write its own special matrix without having to modify [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.")

 
Returns
a reference to \*this. 
    operator=() [2/3]
-----------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Matrix](classeigen_1_1matrix)& [Eigen::Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::operator=  | ( | const [Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | *other* | ) |  |

 | inline |

 
 Assigns matrices to each other. 

 
Note
This is a special case of the templated operator=. Its purpose is to prevent a default operator= from hiding the templated operator=. 
    ![] [3/3]
-----------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>   template<typename OtherDerived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Matrix](classeigen_1_1matrix)<\_Scalar, \_Rows, \_Cols, \_Storage, \_MaxRows, \_MaxCols>& [Eigen::Matrix](classeigen_1_1matrix)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::operator=  | ( | const [RotationBase](classeigen_1_1rotationbase)< OtherDerived, [ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441) > &  | *r* | ) |  |

 
 Set a Dim x Dim rotation matrix from the rotation *r*. 

 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```
   

---

The documentation for this class was generated from the following files:* [Matrix.h](https://eigen.tuxfamily.org/dox/Matrix_8h_source.html)
* [RotationBase.h](https://eigen.tuxfamily.org/dox/RotationBase_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Matrix.html>

Eigen::DenseBase
================

  
### template<typename Derived> class Eigen::DenseBase< Derived >

 Base class for all dense matrices, vectors, and arrays. 

 This class is the base that is inherited by all dense objects (matrix, vector, arrays, and related expression types). The common [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") API for dense objects is contained in this class.

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | is the derived type, e.g., a matrix type or an expression. |

   This class can be extended with the help of the plugin mechanism described on the page [Extending MatrixBase (and other classes)](topiccustomizing_plugins) by defining the preprocessor symbol `EIGEN_DENSEBASE_PLUGIN`.

 
See also

[The class hierarchy](topicclasshierarchy) 
     ![Inheritance graph]                   

|  |
| --- |
|  |
| enum  | {  [RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab) ,  [ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441) ,  [SizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da25cb495affdbd796198462b8ef06be91) ,  [MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306) ,  [MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) ,  [MaxSizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da3a459062d39cb34452518f5f201161d2) ,  [IsVectorAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da1156955c8099c5072934b74c72654ed0) ,  [NumDimensions](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da4d4548a01ba37a6c2031a3c1f0a37d34) ,  [Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) ,  [IsRowMajor](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da406b6af91d61d348ba1c9764bdd66008) ,  **InnerSizeAtCompileTime** ,  **InnerStrideAtCompileTime** ,  **OuterStrideAtCompileTime**  } |
|  |
| typedef random\_access\_iterator\_type  | [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) |
|  |
| typedef random\_access\_iterator\_type  | [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) |
|  |
| typedef [Array](classeigen_1_1array)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits< Derived >::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits< Derived >::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), [AutoAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea)|(internal::traits< Derived >::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) &[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762) ? [RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f) :[ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62)), internal::traits< Derived >::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits< Derived >::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) >  | [PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits< Derived >::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits< Derived >::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), [AutoAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea)|(internal::traits< Derived >::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) &[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762) ? [RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f) :[ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62)), internal::traits< Derived >::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits< Derived >::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) >  | [PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e) |
|  |
| typedef internal::conditional< internal::is\_same< typename internal::traits< Derived >::XprKind, [MatrixXpr](structeigen_1_1matrixxpr) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), [PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e), [PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb) >::type  | [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) |
|  | The plain matrix or array type corresponding to this expression. [More...](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) |
|  |
| typedef internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) |
|  |
| typedef internal::traits< Derived >::[StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) | [StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) |
|  | The type used to store indices. [More...](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) |
|  |
| typedef [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [value\_type](classeigen_1_1densebase#a9276182dab8236c33f1e7abf491d504d) |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |




|  |
| --- |
|  |
| bool  | [all](classeigen_1_1densebase#ae42ab60296c120e9f45ce3b44e1761a4) () const |
|  |
| bool  | [allFinite](classeigen_1_1densebase#af1e669fd3aaae50a4870dc1b8f3b8884) () const |
|  |
| bool  | [any](classeigen_1_1densebase#abfbf4cb72dd577e62fbe035b1c53e695) () const |
|  |
| [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) | [begin](classeigen_1_1densebase#a57591454af931f9dffa71c9da28d5641) () |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [begin](classeigen_1_1densebase#ad9368ce70b06167ec5fc19398d329f5e) () const |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [cbegin](classeigen_1_1densebase#ae9a3dfd9b826ba3103de0128576fb15b) () const |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [cend](classeigen_1_1densebase#aeb3b76f02986c2af2521d07164b5ffde) () const |
|  |
| [ColwiseReturnType](classeigen_1_1vectorwiseop) | [colwise](classeigen_1_1densebase#a1c0e1b6067ec1de6cb8799da55aa7d30) () |
|  |
| [ConstColwiseReturnType](classeigen_1_1vectorwiseop) | [colwise](classeigen_1_1densebase#a58837c81de446efbdb58da07b73a63c1) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [count](classeigen_1_1densebase#a229be090c665b9bf7d1fcdfd1ab6e0c1) () const |
|  |
| [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) | [end](classeigen_1_1densebase#ae71d079e16d91360d10066b316b48485) () |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [end](classeigen_1_1densebase#ab34773522e43bfb02e9cf652d7b5dd60) () const |
|  |
| EvalReturnType  | [eval](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b) () const |
|  |
| void  | [fill](classeigen_1_1densebase#a9be169c308801411aa24be93d30930bf) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| template<unsigned int Added, unsigned int Removed>  |
| EIGEN\_DEPRECATED const Derived &  | [flagged](classeigen_1_1densebase#a9b3f75f76ae40439be870258e80c7346) () const |
|  |
| const [WithFormat](classeigen_1_1withformat)< Derived >  | [format](classeigen_1_1densebase#ab231f1a6057f28d4244145e12c9fc0c7) (const [IOFormat](structeigen_1_1ioformat) &fmt) const |
|  |
| bool  | [hasNaN](classeigen_1_1densebase#ab13d158c900560d3e1b25d85d2d33dd6) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1densebase#a58ca41d9635a8ab3c5a268ef3f7f0d75) () const |
|  |
| template<typename OtherDerived >  |
| bool  | [isApprox](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isApproxToConstant](classeigen_1_1densebase#af9b150d48bc5e4366887ccb466e40c6b) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isConstant](classeigen_1_1densebase#a1ca84e4179b3e5081ed11d89bbd9e74f) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename OtherDerived >  |
| bool  | [isMuchSmallerThan](classeigen_1_1densebase#a3c4db0c6dd974fa88bbb58b2cf3d5664) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename Derived >  |
| bool  | [isMuchSmallerThan](classeigen_1_1densebase#adfca6ff4e473f68fbbeabbd03b7504a9) (const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real &other, const RealScalar &prec) const |
|  |
| bool  | [isOnes](classeigen_1_1densebase#aa56d6b4477cd3c92a9cf42f4b96e47c2) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isZero](classeigen_1_1densebase#af36014ec300f53a65083057ed4e89822) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename OtherDerived >  |
| EIGEN\_DEPRECATED Derived &  | [lazyAssign](classeigen_1_1densebase#a6bc6c096e3bfc726f28315daecd21b3f) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<int NaNPropagation>  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1) () const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#aced8ffda52ff061b6586ace2657ebf30) (IndexType \*index) const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#a3780b7a9cd184d0b4f3ea797eba9e2b3) (IndexType \*row, IndexType \*col) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [mean](classeigen_1_1densebase#a21ac6c0419a72ad7a88ea0bc189017d7) () const |
|  |
| template<int NaNPropagation>  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#a0739f9c868c331031c7810e21838dcb2) () const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#ac9265f4f91430b9cc75d63fb6865bb29) (IndexType \*index) const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#aa28152ba4a42b2d112e5fec5469ec4c1) (IndexType \*row, IndexType \*col) const |
|  |
| const [NestByValue](classeigen_1_1nestbyvalue)< Derived >  | [nestByValue](classeigen_1_1densebase#a3e2761e2b6da74dba1d17b40cc918bf7) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1densebase#acb8d5574eff335381e7441ade87700a0) () const |
|  |
| template<typename OtherDerived >  |
| [CommaInitializer](structeigen_1_1commainitializer)< Derived >  | [operator<<](classeigen_1_1densebase#a0f0e34696162b34762b2bf4bd948f90c) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| [CommaInitializer](structeigen_1_1commainitializer)< Derived >  | [operator<<](classeigen_1_1densebase#a0e575eb0ba6cc6bc5f347872abd8509d) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &s) |
|  |
| Derived &  | [operator=](classeigen_1_1densebase#a5281dadff89f46eef719b38e5d073a8f) (const [DenseBase](classeigen_1_1densebase) &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator=](classeigen_1_1densebase#ab66155169d20c035e80d521a8b918e97) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator=](classeigen_1_1densebase#a58915510693d64164e567bd762e1032f) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  | Copies the generic expression *other* into \*this. [More...](classeigen_1_1densebase#a58915510693d64164e567bd762e1032f) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1densebase#a03f71699bc26ca2ee4e42ec4538862d7) () const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [prod](classeigen_1_1densebase#af119d9a4efe5a15cd83c1ccdf01b3a4f) () const |
|  |
| template<typename Func >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [redux](classeigen_1_1densebase#a63ce1e4fab36bff43bbadcdd06a67724) (const Func &func) const |
|  |
| template<int RowFactor, int ColFactor>  |
| const [Replicate](classeigen_1_1replicate)< Derived, RowFactor, ColFactor >  | [replicate](classeigen_1_1densebase#a60dadfe80b813d808e91e4521c722a8e) () const |
|  |
| const [Replicate](classeigen_1_1replicate)< Derived, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) >  | [replicate](classeigen_1_1densebase#afae2d5e36f1158d1b1681dac3cdbd58e) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rowFactor, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) colFactor) const |
|  |
| void  | [resize](classeigen_1_1densebase#a2ec5bac4e1ab95808808ef50ccf4cb39) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) newSize) |
|  |
| void  | [resize](classeigen_1_1densebase#a25e2b4887b47b1f2346857d1931efa0f) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| [ReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1densebase#a38ea394036d8b096abf322469c80198f) () |
|  |
| [ConstReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1densebase#a9e2f3ac4019184abf95ca0e1a8d82866) () const |
|  |
| void  | [reverseInPlace](classeigen_1_1densebase#adb8045155ea45f7961fc2a5170e1d921) () |
|  |
| [RowwiseReturnType](classeigen_1_1vectorwiseop) | [rowwise](classeigen_1_1densebase#a6daa3a3156ca0e0722bf78638e1c7f28) () |
|  |
| [ConstRowwiseReturnType](classeigen_1_1vectorwiseop) | [rowwise](classeigen_1_1densebase#aa1cabd3404528fe8cec4bab43d74bffc) () const |
|  |
| template<typename ThenDerived , typename ElseDerived >  |
| const [Select](classeigen_1_1select)< Derived, ThenDerived, ElseDerived >  | [select](classeigen_1_1densebase#a65e78cfcbc9852e6923bebff4323ddca) (const [DenseBase](classeigen_1_1densebase)< ThenDerived > &thenMatrix, const [DenseBase](classeigen_1_1densebase)< ElseDerived > &elseMatrix) const |
|  |
| template<typename ThenDerived >  |
| const [Select](classeigen_1_1select)< Derived, ThenDerived, typename ThenDerived::ConstantReturnType >  | [select](classeigen_1_1densebase#a57ef09a843004095f84c198dd145641b) (const [DenseBase](classeigen_1_1densebase)< ThenDerived > &thenMatrix, const typename ThenDerived::Scalar &elseScalar) const |
|  |
| template<typename ElseDerived >  |
| const [Select](classeigen_1_1select)< Derived, typename ElseDerived::ConstantReturnType, ElseDerived >  | [select](classeigen_1_1densebase#a9e8e78c75887d4539071a0b7a61ca103) (const typename ElseDerived::Scalar &thenScalar, const [DenseBase](classeigen_1_1densebase)< ElseDerived > &elseMatrix) const |
|  |
| Derived &  | [setConstant](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| Derived &  | [setLinSpaced](classeigen_1_1densebase#aeb023532476d3f14c457367e0eb5f3f1) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#aeb023532476d3f14c457367e0eb5f3f1) |
|  |
| Derived &  | [setLinSpaced](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a) |
|  |
| Derived &  | [setOnes](classeigen_1_1densebase#a250ef1b827e748f3f898fb2e55cb96e2) () |
|  |
| Derived &  | [setRandom](classeigen_1_1densebase#ac476e5852129ba32beaa1a8a3d7ee0db) () |
|  |
| Derived &  | [setZero](classeigen_1_1densebase#af230a143de50695d2d1fae93db7e4dcb) () |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [sum](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c) () const |
|  |
| template<typename OtherDerived >  |
| void  | [swap](classeigen_1_1densebase#af9e7e4305fdb7781f2b2f05fa801f21e) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| void  | [swap](classeigen_1_1densebase#a44e25adc6da9cd1d79f4c5bd7c1819cb) ([PlainObjectBase](classeigen_1_1plainobjectbase)< OtherDerived > &other) |
|  |
| [TransposeReturnType](classeigen_1_1transpose) | [transpose](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1densebase#a38c0b074cf93fc194bf91141287cee3f) () const |
|  |
| void  | [transposeInPlace](classeigen_1_1densebase#ac501bd942994af7a95d95bee7a16ad2a) () |
|  |
| CoeffReturnType  | [value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0) () const |
|  |
| template<typename Visitor >  |
| void  | [visit](classeigen_1_1densebase#a4225b90fcc74f18dd479b401124b3841) (Visitor &func) const |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, DirectWriteAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [colStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#af1bac522aee4402639189f387592000b) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a4e94e17926e1cf597deb2928e779cef6) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#abb333f6f10467f6f8d7b59c213dea49e) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rowStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a63bc5874eb4e320e54eb079b43b49d22) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, WriteAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4) |
| Scalar &  | [coeffRef](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae66b7d18b2a85f3139b703126974c900) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| Scalar &  | [coeffRef](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#adc8286576b31e11f056057be666a0ec8) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| Scalar &  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a0171eee1d9e582d1ac7ec0f18f5f615a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| Scalar &  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae6ba07bad9e3026afe54806fdefe32bb) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| Scalar &  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#aa2040f14e60fed1a4a68ca7f042e1bbf) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| Scalar &  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af683e04b3926aaf4091581ca24ca09ad) () |
|  |
| Scalar &  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000) () |
|  |
| Scalar &  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afeaa80359bf0c1311f91cdd74a2042a8) () |
|  |
| Scalar &  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a858151a06b8c0ff407232d84e695dd73) () |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, ReadOnlyAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4) |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af9fadc22d12e48c82745dad534a1671a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ab3dbba4a15d0fe90185d2900e5ef0fd1) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| CoeffReturnType  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a496672306836589fa04a6ab33cb0cf2a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| CoeffReturnType  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a926f52a94f038db63c6b9103f98dcf0f) () const |
|  |
| CoeffReturnType  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a189c80109e76752b598d60dfcdab329e) () const |
|  |
| CoeffReturnType  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a0c6d6904a37805ce47a3238fbd735963) () const |
|  |
| CoeffReturnType  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a7c60c97282d4a0f8bca16ef75e231ddb) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#a1fdd3189ae3a41d250593334d82210cf) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#ad8098aa5971139a5585e623dddbea860) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#ad8098aa5971139a5585e623dddbea860) |
|  |
| static const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) |
|  |
| static EIGEN\_DEPRECATED const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#ac8cfbd436a8c9fc50defee5946451176) (Sequential\_t, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| static EIGEN\_DEPRECATED const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d) (Sequential\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a5dc65501accd02c30f7c1840c2a30a41) (const CustomNullaryOp &func) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a3340c9b997f5b53a0131cf927f93b54c) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), const CustomNullaryOp &func) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a9752ee59976a4b4aad860ad1a9093e7f) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const CustomNullaryOp &func) |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101) () |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#a8b2a51018a73a766f5b91aef3487f013) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#ab710a58e4a80fbcb2594242372c8fe56) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19) () |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#ae97f8d9d08f969c733c8144be6225756) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#a7eb5f974a8f0b67eac7080db1da0e308) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) () |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#ae41a9b5050ed27d9e93c82c9c8622cd3) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#ac22f79b812fa564061042407f2ba8f5b) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |




|  |
| --- |
|  |
|  | [DenseBase](classeigen_1_1densebase#aa284042d0e1b0ad9b6a00db7fd2d9f7f) () |
|  |




|  |
| --- |
|  |
| (Note that these are not member functions.)  |
| template<typename Derived >  |
| std::ostream &  | [operator<<](classeigen_1_1densebase#a3806d3f42de165878dace160e6aba40a) (std::ostream &s, const [DenseBase](classeigen_1_1densebase)< Derived > &m) |
|  |

  const\_iterator
---------------

    template<typename Derived >  

|  |
| --- |
| typedef random\_access\_iterator\_type [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::[const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) |

 
 This is the const version of iterator (aka read-only) 

    iterator
--------

    template<typename Derived >  

|  |
| --- |
| typedef random\_access\_iterator\_type [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::[iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) |

 
 STL-like [RandomAccessIterator](https://en.cppreference.com/w/cpp/named_req/RandomAccessIterator) iterator type as returned by the [begin()](classeigen_1_1densebase#a57591454af931f9dffa71c9da28d5641) and [end()](classeigen_1_1densebase#ae71d079e16d91360d10066b316b48485) methods. 

    PlainArray
----------

    template<typename Derived >  

|  |
| --- |
| typedef [Array](classeigen_1_1array)<typename internal::traits<Derived>::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits<Derived>::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits<Derived>::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), [AutoAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea) | (internal::traits<Derived>::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581)&[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762) ? [RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f) : [ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62)), internal::traits<Derived>::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits<Derived>::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) > [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::[PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb) |

 
 The plain array type corresponding to this expression. 



See also

[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4 "The plain matrix or array type corresponding to this expression.") 
    PlainMatrix
-----------

    template<typename Derived >  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<typename internal::traits<Derived>::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits<Derived>::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits<Derived>::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), [AutoAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea) | (internal::traits<Derived>::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581)&[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762) ? [RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f) : [ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62)), internal::traits<Derived>::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits<Derived>::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) > [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::[PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e) |

 
 The plain matrix type corresponding to this expression. 



See also

[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4 "The plain matrix or array type corresponding to this expression.") 
    PlainObject
-----------

    template<typename Derived >  

|  |
| --- |
| typedef internal::conditional<internal::is\_same<typename internal::traits<Derived>::XprKind,[MatrixXpr](structeigen_1_1matrixxpr) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), [PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e), [PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb)>::type [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) |

 
 The plain matrix or array type corresponding to this expression. 

 This is not necessarily exactly the return type of [eval()](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b). In the case of plain matrices, the return type of [eval()](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b) is a const reference to a matrix, not a matrix! It is however guaranteed that the return type of [eval()](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b) is either PlainObject or const PlainObject&. 

    Scalar
------

    template<typename Derived >  

|  |
| --- |
| typedef internal::traits<Derived>::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) |

 
 The numeric type of the expression' coefficients, e.g. float, double, int or std::complex<float>, etc. 

    StorageIndex
------------

    template<typename Derived >  

|  |
| --- |
| typedef internal::traits<Derived>::[StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::[StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) |

 
 The type used to store indices. 

 This typedef is relevant for types that store multiple indices such as [PermutationMatrix](classeigen_1_1permutationmatrix "Permutation matrix.") or [Transpositions](classeigen_1_1transpositions "Represents a sequence of transpositions (row/column interchange)"), otherwise it defaults to [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde "The Index type as used for the API.") 



See also

[Preprocessor directives](topicpreprocessordirectives), [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde "The Index type as used for the API."), [SparseMatrixBase](classeigen_1_1sparsematrixbase "Base class of any sparse matrices or sparse expressions."). 
    value\_type
-----------

    template<typename Derived >  

|  |
| --- |
| typedef [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::[value\_type](classeigen_1_1densebase#a9276182dab8236c33f1e7abf491d504d) |

 
 The numeric type of the expression' coefficients, e.g. float, double, int or std::complex<float>, etc.

 It is an alias for the Scalar type 

    anonymous enum
--------------

    template<typename Derived >  

|  |
| --- |
| anonymous enum |

 
 

| Enumerator |
| --- |
| RowsAtCompileTime  | The number of rows at compile-time. This is just a copy of the value provided by the *Derived* type. If a value is not known at compile-time, it is set to the *Dynamic* constant. 

See also

[MatrixBase::rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [MatrixBase::cols()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), [ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), [SizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da25cb495affdbd796198462b8ef06be91) 
 |
| ColsAtCompileTime  | The number of columns at compile-time. This is just a copy of the value provided by the *Derived* type. If a value is not known at compile-time, it is set to the *Dynamic* constant. 

See also

[MatrixBase::rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [MatrixBase::cols()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), [RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), [SizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da25cb495affdbd796198462b8ef06be91) 
 |
| SizeAtCompileTime  | This is equal to the number of coefficients, i.e. the number of rows times the number of columns, or to *Dynamic* if this is not known at compile-time. 

See also

[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), [ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441) 
 |
| MaxRowsAtCompileTime  | This value is equal to the maximum possible number of rows that this expression might have. If this expression might have an arbitrarily high number of rows, this value is set to *Dynamic*. This value is useful to know when evaluating an expression, in order to determine whether it is possible to avoid doing a dynamic memory allocation. 
See also

[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), [MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65), [MaxSizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da3a459062d39cb34452518f5f201161d2) 
 |
| MaxColsAtCompileTime  | This value is equal to the maximum possible number of columns that this expression might have. If this expression might have an arbitrarily high number of columns, this value is set to *Dynamic*. This value is useful to know when evaluating an expression, in order to determine whether it is possible to avoid doing a dynamic memory allocation. 
See also

[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), [MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), [MaxSizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da3a459062d39cb34452518f5f201161d2) 
 |
| MaxSizeAtCompileTime  | This value is equal to the maximum possible number of coefficients that this expression might have. If this expression might have an arbitrarily high number of coefficients, this value is set to *Dynamic*. This value is useful to know when evaluating an expression, in order to determine whether it is possible to avoid doing a dynamic memory allocation. 
See also

[SizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da25cb495affdbd796198462b8ef06be91), [MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), [MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) 
 |
| IsVectorAtCompileTime  | This is set to true if either the number of rows or the number of columns is known at compile-time to be equal to 1. Indeed, in that case, we are dealing with a column-vector (if there is only one column) or with a row-vector (if there is only one row).  |
| NumDimensions  | This value is equal to Tensor::NumDimensions, i.e. 0 for scalars, 1 for vectors, and 2 for matrices.  |
| Flags  | This stores expression [Flags](group__flags) flags which may or may not be inherited by new expressions constructed from this one. See the [list of flags](group__flags).  |
| IsRowMajor  | True if this expression has row-major storage order.  |

    DenseBase()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::[DenseBase](classeigen_1_1densebase) | ( |  | ) |  |

 | inlineprotected |

 
 Default constructor. Do nothing. 

    all()
-----

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| bool [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::all |

 | inline |

 
 
Returns
true if all coefficients are true
 Example: 



```
Vector3f boxMin([Vector3f::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)()), boxMax([Vector3f::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)());
Vector3f p0 = [Vector3f::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(), p1 = [Vector3f::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)().cwiseAbs();
// let's check if p0 and p1 are inside the axis aligned box defined by the corners boxMin,boxMax:
cout << "Is (" << p0.transpose() << ") inside the box: "
     << ((boxMin.array()<p0.array()).[all](classeigen_1_1densebase#ae42ab60296c120e9f45ce3b44e1761a4)() && (boxMax.array()>p0.array()).[all](classeigen_1_1densebase#ae42ab60296c120e9f45ce3b44e1761a4)()) << endl;
cout << "Is (" << p1.transpose() << ") inside the box: "
     << ((boxMin.array()<p1.array()).[all](classeigen_1_1densebase#ae42ab60296c120e9f45ce3b44e1761a4)() && (boxMax.array()>p1.array()).[all](classeigen_1_1densebase#ae42ab60296c120e9f45ce3b44e1761a4)()) << endl;
```

 Output: 



```
Is (  0.68 -0.211  0.566) inside the box: 0
Is (0.597 0.823 0.605) inside the box: 1

```


See also

[any()](classeigen_1_1densebase#abfbf4cb72dd577e62fbe035b1c53e695), Cwise::operator<() 
    allFinite()
-----------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| bool [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::allFinite |

 | inline |

 
 
Returns
true if `*this` contains only finite numbers, i.e., no NaN and no +/-INF values.
 
See also

[hasNaN()](classeigen_1_1densebase#ab13d158c900560d3e1b25d85d2d33dd6) 
    any()
-----

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| bool [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::any |

 | inline |

 
 
Returns
true if at least one coefficient is true
 
See also

[all()](classeigen_1_1densebase#ae42ab60296c120e9f45ce3b44e1761a4) 
    begin() [1/2]
-------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [DenseBase](classeigen_1_1densebase)< Derived >::[iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::begin |

 | inline |

 
 returns an iterator to the first element of the 1D vector or array This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column. 



See also

[end()](classeigen_1_1densebase#ae71d079e16d91360d10066b316b48485), [cbegin()](classeigen_1_1densebase#ae9a3dfd9b826ba3103de0128576fb15b) 
    begin() [2/2]
-------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [DenseBase](classeigen_1_1densebase)< Derived >::[const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::begin |

 | inline |

 
 const version of [begin()](classeigen_1_1densebase#a57591454af931f9dffa71c9da28d5641) 

    cbegin()
--------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [DenseBase](classeigen_1_1densebase)< Derived >::[const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::cbegin |

 | inline |

 
 returns a read-only const\_iterator to the first element of the 1D vector or array This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column. 



See also

[cend()](classeigen_1_1densebase#aeb3b76f02986c2af2521d07164b5ffde), [begin()](classeigen_1_1densebase#a57591454af931f9dffa71c9da28d5641) 
    cend()
------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [DenseBase](classeigen_1_1densebase)< Derived >::[const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::cend |

 | inline |

 
 returns a read-only const\_iterator to the element following the last element of the 1D vector or array This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column. 



See also

[begin()](classeigen_1_1densebase#a57591454af931f9dffa71c9da28d5641), [cend()](classeigen_1_1densebase#aeb3b76f02986c2af2521d07164b5ffde) 
    colwise() [1/2]
---------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [DenseBase](classeigen_1_1densebase)< Derived >::[ColwiseReturnType](classeigen_1_1vectorwiseop) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::colwise |

 | inline |

 
 
Returns
a writable [VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations.") wrapper of \*this providing additional partial reduction operations
 
See also

[rowwise()](classeigen_1_1densebase#a6daa3a3156ca0e0722bf78638e1c7f28), class [VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations."), [Reductions, visitors and broadcasting](group__tutorialreductionsvisitorsbroadcasting) 
    colwise() [2/2]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ConstColwiseReturnType](classeigen_1_1vectorwiseop) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::colwise  | ( |  | ) |  const |

 | inline |

 
 
Returns
a [VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations.") wrapper of \*this broadcasting and partial reductions
 Example: 



```
Matrix3d m = [Matrix3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the sum of each column:" << endl << m.colwise().sum() << endl;
cout << "Here is the maximum absolute value of each column:"
     << endl << m.cwiseAbs().colwise().maxCoeff() << endl;

```

 Output: 



```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Here is the sum of each column:
  1.04  0.815 -0.238
Here is the maximum absolute value of each column:
 0.68 0.823 0.536

```


See also

[rowwise()](classeigen_1_1densebase#a6daa3a3156ca0e0722bf78638e1c7f28), class [VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations."), [Reductions, visitors and broadcasting](group__tutorialreductionsvisitorsbroadcasting) 
    Constant() [1/3]
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [DenseBase](classeigen_1_1densebase)< Derived >::ConstantReturnType [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::Constant  | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *value* | ) |  |

 | inlinestatic |

 
 
Returns
an expression of a constant matrix of value *value* 
 This variant is only for fixed-size [DenseBase](classeigen_1_1densebase "Base class for all dense matrices, vectors, and arrays.") types. For dynamic-size types, you need to use the variants taking size arguments.

 The template parameter *CustomNullaryOp* is the type of the functor.

 
See also
class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.") 
    Constant() [2/3]
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [DenseBase](classeigen_1_1densebase)< Derived >::ConstantReturnType [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::Constant  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *value* |
|  | ) |  |  |

 | inlinestatic |

 
 
Returns
an expression of a constant matrix of value *value* 
 The parameters *rows* and *cols* are the number of rows and of columns of the returned matrix. Must be compatible with this [DenseBase](classeigen_1_1densebase "Base class for all dense matrices, vectors, and arrays.") type.

 This variant is meant to be used for dynamic-size matrix types. For fixed-size types, it is redundant to pass *rows* and *cols* as arguments, so [Zero()](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) should be used instead.

 The template parameter *CustomNullaryOp* is the type of the functor.

 
See also
class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.") 
    Constant() [3/3]
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [DenseBase](classeigen_1_1densebase)< Derived >::ConstantReturnType [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::Constant  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *size*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *value* |
|  | ) |  |  |

 | inlinestatic |

 
 
Returns
an expression of a constant matrix of value *value* 
 The parameter *size* is the size of the returned vector. Must be compatible with this [DenseBase](classeigen_1_1densebase "Base class for all dense matrices, vectors, and arrays.") type.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 This variant is meant to be used for dynamic-size vector types. For fixed-size types, it is redundant to pass *size* as argument, so [Zero()](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) should be used instead.

 The template parameter *CustomNullaryOp* is the type of the functor.

 
See also
class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.") 
    count()
-------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::count |

 | inline |

 
 
Returns
the number of coefficients which evaluate to true
 
See also

[all()](classeigen_1_1densebase#ae42ab60296c120e9f45ce3b44e1761a4), [any()](classeigen_1_1densebase#abfbf4cb72dd577e62fbe035b1c53e695) 
    end() [1/2]
-----------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [DenseBase](classeigen_1_1densebase)< Derived >::[iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::end |

 | inline |

 
 returns an iterator to the element following the last element of the 1D vector or array This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column. 



See also

[begin()](classeigen_1_1densebase#a57591454af931f9dffa71c9da28d5641), [cend()](classeigen_1_1densebase#aeb3b76f02986c2af2521d07164b5ffde) 
    end() [2/2]
-----------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [DenseBase](classeigen_1_1densebase)< Derived >::[const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::end |

 | inline |

 
 const version of [end()](classeigen_1_1densebase#ae71d079e16d91360d10066b316b48485) 

    eval()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EvalReturnType [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::eval  | ( |  | ) |  const |

 | inline |

 
 
Returns
the matrix or vector obtained by evaluating this expression.
 Notice that in the case of a plain matrix or vector (not an expression) this function just returns a const reference, in order to avoid a useless copy.

 
Warning
Be careful with [eval()](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b) and the auto C++ keyword, as detailed in this [page](topicpitfalls#TopicPitfalls_auto_keyword) . 
    fill()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::fill  | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *val* | ) |  |

 | inline |

 
 Alias for [setConstant()](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559): sets all coefficients in this expression to *val*.

 
See also

[setConstant()](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [Constant()](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.") 
    flagged()
---------

    template<typename Derived >   template<unsigned int Added, unsigned int Removed>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_DEPRECATED const Derived& [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::flagged  | ( |  | ) |  const |

 | inline |

 
 
**[Deprecated:](deprecated#_deprecated000004)**
it now returns `*this` 
    format()
--------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [WithFormat](classeigen_1_1withformat)<Derived> [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::format  | ( | const [IOFormat](structeigen_1_1ioformat) &  | *fmt* | ) |  const |

 | inline |

 
 
Returns
a [WithFormat](classeigen_1_1withformat "Pseudo expression providing matrix output with given format.") proxy object allowing to print a matrix the with given format *fmt*.
 See class [IOFormat](structeigen_1_1ioformat "Stores a set of parameters controlling the way matrices are printed.") for some examples.

 
See also
class [IOFormat](structeigen_1_1ioformat "Stores a set of parameters controlling the way matrices are printed."), class [WithFormat](classeigen_1_1withformat "Pseudo expression providing matrix output with given format.") 
    hasNaN()
--------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| bool [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::hasNaN |

 | inline |

 
 
Returns
true is `*this` contains at least one Not A Number (NaN).
 
See also

[allFinite()](classeigen_1_1densebase#af1e669fd3aaae50a4870dc1b8f3b8884) 
    innerSize()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::innerSize  | ( |  | ) |  const |

 | inline |

 
 
Returns
the inner size.
 
Note
For a vector, this is just the size. For a matrix (non-vector), this is the minor dimension with respect to the [storage order](group__topicstorageorders), i.e., the number of rows for a column-major matrix, and the number of columns for a row-major matrix. 
    isApprox()
----------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::isApprox  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other*,  |
|  |  | const RealScalar &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)>::dummy_precision()` |
|  | ) |  |  const |

 
 
Returns

`true` if `*this` is approximately equal to *other*, within the precision determined by *prec*.
 
Note
The fuzzy compares are done multiplicatively. Two vectors \( v \) and \( w \) are considered to be approximately equal within precision \( p \) if  \[ \Vert v - w \Vert \leqslant p\,\min(\Vert v\Vert, \Vert w\Vert). \] 

 For matrices, the comparison is done using the Hilbert-Schmidt norm (aka Frobenius norm L2 norm).  Because of the multiplicativeness of this comparison, one can't use this function to check whether `*this` is approximately equal to the zero matrix or vector. Indeed, `isApprox(zero)` returns false unless `*this` itself is exactly the zero matrix or vector. If you want to test whether `*this` is zero, use internal::isMuchSmallerThan(const RealScalar&, RealScalar) instead.
 
See also
internal::isMuchSmallerThan(const RealScalar&, RealScalar) const 
    isApproxToConstant()
--------------------

    template<typename Derived >  

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::isApproxToConstant  | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *val*,  |
|  |  | const RealScalar &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)>::dummy_precision()` |
|  | ) |  |  const |

 
 
Returns
true if all coefficients in this matrix are approximately equal to *val*, to within precision *prec* 
    isConstant()
------------

    template<typename Derived >  

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::isConstant  | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *val*,  |
|  |  | const RealScalar &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)>::dummy_precision()` |
|  | ) |  |  const |

 
 This is just an alias for [isApproxToConstant()](classeigen_1_1densebase#af9b150d48bc5e4366887ccb466e40c6b).

 
Returns
true if all coefficients in this matrix are approximately equal to *value*, to within precision *prec* 
    isMuchSmallerThan() [1/2]
-------------------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::isMuchSmallerThan  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other*,  |
|  |  | const RealScalar &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)>::dummy_precision()` |
|  | ) |  |  const |

 
 
Returns

`true` if the norm of `*this` is much smaller than the norm of *other*, within the precision determined by *prec*.
 
Note
The fuzzy compares are done multiplicatively. A vector \( v \) is considered to be much smaller than a vector \( w \) within precision \( p \) if  \[ \Vert v \Vert \leqslant p\,\Vert w\Vert. \] 

 For matrices, the comparison is done using the Hilbert-Schmidt norm.
 
See also

[isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c), isMuchSmallerThan(const RealScalar&, RealScalar) const 
    isMuchSmallerThan() [2/2]
-------------------------

    template<typename Derived >   template<typename Derived >  

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::isMuchSmallerThan  | ( | const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real &  | *other*,  |
|  |  | const RealScalar &  | *prec* |
|  | ) |  |  const |

 
 
Returns

`true` if the norm of `*this` is much smaller than *other*, within the precision determined by *prec*.
 
Note
The fuzzy compares are done multiplicatively. A vector \( v \) is considered to be much smaller than \( x \) within precision \( p \) if  \[ \Vert v \Vert \leqslant p\,\vert x\vert. \] 

 
 For matrices, the comparison is done using the Hilbert-Schmidt norm. For this reason, the value of the reference scalar *other* should come from the Hilbert-Schmidt norm of a reference matrix of same dimensions.

 
See also

[isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c), isMuchSmallerThan(const DenseBase<OtherDerived>&, RealScalar) const 
    isOnes()
--------

    template<typename Derived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| bool [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::isOnes  | ( | const RealScalar &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)>::dummy_precision()` | ) |  const |

 
 
Returns
true if \*this is approximately equal to the matrix where all coefficients are equal to 1, within the precision given by *prec*.
 Example: 



```
Matrix3d m = [Matrix3d::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)();
m(0,2) += 1e-4;
cout << "Here's the matrix m:" << endl << m << endl;
cout << "m.isOnes() returns: " << m.isOnes() << endl;
cout << "m.isOnes(1e-3) returns: " << m.isOnes(1e-3) << endl;

```

 Output: 



```
Here's the matrix m:
1 1 1
1 1 1
1 1 1
m.isOnes() returns: 0
m.isOnes(1e-3) returns: 1

```


See also
class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [Ones()](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101) 
    isZero()
--------

    template<typename Derived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| bool [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::isZero  | ( | const RealScalar &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)>::dummy_precision()` | ) |  const |

 
 
Returns
true if \*this is approximately equal to the zero matrix, within the precision given by *prec*.
 Example: 



```
Matrix3d m = [Matrix3d::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)();
m(0,2) = 1e-4;
cout << "Here's the matrix m:" << endl << m << endl;
cout << "m.isZero() returns: " << m.isZero() << endl;
cout << "m.isZero(1e-3) returns: " << m.isZero(1e-3) << endl;

```

 Output: 



```
Here's the matrix m:
     0      0 0.0001
     0      0      0
     0      0      0
m.isZero() returns: 0
m.isZero(1e-3) returns: 1

```


See also
class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [Zero()](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) 
    lazyAssign()
------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_DEPRECATED Derived& [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::lazyAssign  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  |

 
 
**[Deprecated:](deprecated#_deprecated000003)**

    LinSpaced() [1/4]
-----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [DenseBase](classeigen_1_1densebase)< Derived >::RandomAccessLinSpacedReturnType [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::LinSpaced  | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *low*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *high* |
|  | ) |  |  |

 | inlinestatic |

 
 Sets a linearly spaced vector. 

 The function generates 'size' equally spaced values in the closed interval [low,high]. When size is set to 1, a vector of length 1 containing 'high' is returned.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
cout << [VectorXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(4,7,10).transpose() << endl;
cout << [VectorXd::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(5,0.0,1.0).transpose() << endl;
```

 Output: 



```
 7  8  9 10
   0 0.25  0.5 0.75    1

```

For integer scalar types, an even spacing is possible if and only if the length of the range, i.e., `high-low` is a scalar multiple of `size-1`, or if `size` is a scalar multiple of the number of values `high-low+1` (meaning each value can be repeated the same number of time). If one of these two considions is not satisfied, then `high` is lowered to the largest value satisfying one of this constraint. Here are some examples:

 Example: 



```
cout << "Even spacing inputs:" << endl;
cout << [VectorXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(8,1,4).transpose() << endl;
cout << [VectorXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(8,1,8).transpose() << endl;
cout << [VectorXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(8,1,15).transpose() << endl;
cout << "Uneven spacing inputs:" << endl;
cout << [VectorXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(8,1,7).transpose() << endl;
cout << [VectorXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(8,1,9).transpose() << endl;
cout << [VectorXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(8,1,16).transpose() << endl;

```

 Output: 



```
Even spacing inputs:
1 1 2 2 3 3 4 4
1 2 3 4 5 6 7 8
 1  3  5  7  9 11 13 15
Uneven spacing inputs:
1 1 2 2 3 3 4 4
1 2 3 4 5 6 7 8
 1  3  5  7  9 11 13 15

```


See also

[setLinSpaced(Index,const Scalar&,const Scalar&)](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a "Sets a linearly spaced vector."), [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.") Special version for fixed [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) types which does not require the [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) parameter. 
    LinSpaced() [2/4]
-----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [DenseBase](classeigen_1_1densebase)< Derived >::RandomAccessLinSpacedReturnType [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::LinSpaced  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *size*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *low*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *high* |
|  | ) |  |  |

 | inlinestatic |

 
 Sets a linearly spaced vector. 

 The function generates 'size' equally spaced values in the closed interval [low,high]. When size is set to 1, a vector of length 1 containing 'high' is returned.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
cout << [VectorXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(4,7,10).transpose() << endl;
cout << [VectorXd::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(5,0.0,1.0).transpose() << endl;

```

 Output: 



```
 7  8  9 10
   0 0.25  0.5 0.75    1

```

For integer scalar types, an even spacing is possible if and only if the length of the range, i.e., `high-low` is a scalar multiple of `size-1`, or if `size` is a scalar multiple of the number of values `high-low+1` (meaning each value can be repeated the same number of time). If one of these two considions is not satisfied, then `high` is lowered to the largest value satisfying one of this constraint. Here are some examples:

 Example: 



```
cout << "Even spacing inputs:" << endl;
cout << [VectorXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(8,1,4).transpose() << endl;
cout << [VectorXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(8,1,8).transpose() << endl;
cout << [VectorXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(8,1,15).transpose() << endl;
cout << "Uneven spacing inputs:" << endl;
cout << [VectorXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(8,1,7).transpose() << endl;
cout << [VectorXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(8,1,9).transpose() << endl;
cout << [VectorXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(8,1,16).transpose() << endl;

```

 Output: 



```
Even spacing inputs:
1 1 2 2 3 3 4 4
1 2 3 4 5 6 7 8
 1  3  5  7  9 11 13 15
Uneven spacing inputs:
1 1 2 2 3 3 4 4
1 2 3 4 5 6 7 8
 1  3  5  7  9 11 13 15

```


See also

[setLinSpaced(Index,const Scalar&,const Scalar&)](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a "Sets a linearly spaced vector."), [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.") 
    LinSpaced() [3/4]
-----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| EIGEN\_DEPRECATED const [DenseBase](classeigen_1_1densebase)< Derived >::RandomAccessLinSpacedReturnType [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::LinSpaced  | ( | Sequential\_t  | ,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *low*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *high* |
|  | ) |  |  |

 | inlinestatic |

 
 
**[Deprecated:](deprecated#_deprecated000002)**
because of accuracy loss. In [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3, it is an alias for [LinSpaced(const Scalar&,const Scalar&)](classeigen_1_1densebase#ad8098aa5971139a5585e623dddbea860 "Sets a linearly spaced vector.")

 
See also

[LinSpaced(const Scalar&, const Scalar&)](classeigen_1_1densebase#ad8098aa5971139a5585e623dddbea860 "Sets a linearly spaced vector.") 
    LinSpaced() [4/4]
-----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| EIGEN\_DEPRECATED const [DenseBase](classeigen_1_1densebase)< Derived >::RandomAccessLinSpacedReturnType [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::LinSpaced  | ( | Sequential\_t  | ,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *size*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *low*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *high* |
|  | ) |  |  |

 | inlinestatic |

 
 
**[Deprecated:](deprecated#_deprecated000001)**
because of accuracy loss. In [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3, it is an alias for [LinSpaced(Index,const Scalar&,const Scalar&)](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768 "Sets a linearly spaced vector.")

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
cout << [VectorXi::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(Sequential,4,7,10).transpose() << endl;
cout << [VectorXd::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(Sequential,5,0.0,1.0).transpose() << endl;

```

 Output: 



```
 7  8  9 10
   0 0.25  0.5 0.75    1

```


See also

[LinSpaced(Index,const Scalar&, const Scalar&)](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768 "Sets a linearly spaced vector."), [setLinSpaced(Index,const Scalar&,const Scalar&)](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a "Sets a linearly spaced vector.") 
    maxCoeff() [1/3]
----------------

    template<typename Derived >   template<int NaNPropagation>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::maxCoeff |

 | inline |

 
 
Returns
the maximum of all coefficients of `*this`. In case `*this` contains NaN, NaNPropagation determines the behavior: NaNPropagation == PropagateFast : undefined NaNPropagation == PropagateNaN : result is NaN NaNPropagation == PropagateNumbers : result is maximum of elements that are not NaN 
 
Warning
the matrix must be not empty, otherwise an assertion is triggered. 
    maxCoeff() [2/3]
----------------

    template<typename Derived >   template<int NaNPropagation, typename IndexType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::maxCoeff  | ( | IndexType \*  | *index* | ) |  const |

 
 
Returns
the maximum of all coefficients of \*this and puts in \*index its location.
 In case `*this` contains NaN, NaNPropagation determines the behavior: NaNPropagation == PropagateFast : undefined NaNPropagation == PropagateNaN : result is NaN NaNPropagation == PropagateNumbers : result is maximum of elements that are not NaN 



Warning
the matrix must be not empty, otherwise an assertion is triggered.
 
See also
DenseBase::maxCoeff(IndexType\*,IndexType\*), DenseBase::minCoeff(IndexType\*,IndexType\*), DenseBase::visitor(), [DenseBase::maxCoeff()](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1) 
    maxCoeff() [3/3]
----------------

    template<typename Derived >   template<int NaNPropagation, typename IndexType >  

|  |  |  |  |
| --- | --- | --- | --- |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::maxCoeff  | ( | IndexType \*  | *rowId*,  |
|  |  | IndexType \*  | *colId* |
|  | ) |  |  const |

 
 
Returns
the maximum of all coefficients of \*this and puts in \*row and \*col its location.
 In case `*this` contains NaN, NaNPropagation determines the behavior: NaNPropagation == PropagateFast : undefined NaNPropagation == PropagateNaN : result is NaN NaNPropagation == PropagateNumbers : result is maximum of elements that are not NaN 



Warning
the matrix must be not empty, otherwise an assertion is triggered.
 
See also
DenseBase::minCoeff(IndexType\*,IndexType\*), [DenseBase::visit()](classeigen_1_1densebase#a4225b90fcc74f18dd479b401124b3841), [DenseBase::maxCoeff()](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1) 
    mean()
------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::mean |

 | inline |

 
 
Returns
the mean of all coefficients of \*this
 
See also
trace(), [prod()](classeigen_1_1densebase#af119d9a4efe5a15cd83c1ccdf01b3a4f), [sum()](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c) 
    minCoeff() [1/3]
----------------

    template<typename Derived >   template<int NaNPropagation>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::minCoeff |

 | inline |

 
 
Returns
the minimum of all coefficients of `*this`. In case `*this` contains NaN, NaNPropagation determines the behavior: NaNPropagation == PropagateFast : undefined NaNPropagation == PropagateNaN : result is NaN NaNPropagation == PropagateNumbers : result is minimum of elements that are not NaN 
 
Warning
the matrix must be not empty, otherwise an assertion is triggered. 
    minCoeff() [2/3]
----------------

    template<typename Derived >   template<int NaNPropagation, typename IndexType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::minCoeff  | ( | IndexType \*  | *index* | ) |  const |

 
 
Returns
the minimum of all coefficients of \*this and puts in \*index its location.
 In case `*this` contains NaN, NaNPropagation determines the behavior: NaNPropagation == PropagateFast : undefined NaNPropagation == PropagateNaN : result is NaN NaNPropagation == PropagateNumbers : result is maximum of elements that are not NaN 



Warning
the matrix must be not empty, otherwise an assertion is triggered.
 
See also
DenseBase::minCoeff(IndexType\*,IndexType\*), DenseBase::maxCoeff(IndexType\*,IndexType\*), [DenseBase::visit()](classeigen_1_1densebase#a4225b90fcc74f18dd479b401124b3841), [DenseBase::minCoeff()](classeigen_1_1densebase#a0739f9c868c331031c7810e21838dcb2) 
    minCoeff() [3/3]
----------------

    template<typename Derived >   template<int NaNPropagation, typename IndexType >  

|  |  |  |  |
| --- | --- | --- | --- |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::minCoeff  | ( | IndexType \*  | *rowId*,  |
|  |  | IndexType \*  | *colId* |
|  | ) |  |  const |

 
 
Returns
the minimum of all coefficients of \*this and puts in \*row and \*col its location.
 In case `*this` contains NaN, NaNPropagation determines the behavior: NaNPropagation == PropagateFast : undefined NaNPropagation == PropagateNaN : result is NaN NaNPropagation == PropagateNumbers : result is maximum of elements that are not NaN 



Warning
the matrix must be not empty, otherwise an assertion is triggered.
 
See also
DenseBase::minCoeff(Index\*), DenseBase::maxCoeff(Index\*,Index\*), [DenseBase::visit()](classeigen_1_1densebase#a4225b90fcc74f18dd479b401124b3841), [DenseBase::minCoeff()](classeigen_1_1densebase#a0739f9c868c331031c7810e21838dcb2) 
    nestByValue()
-------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [NestByValue](classeigen_1_1nestbyvalue)< Derived > [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::nestByValue |

 | inline |

 
 
Returns
an expression of the temporary version of \*this. 
    nonZeros()
----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::nonZeros  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of nonzero coefficients which is in practice the number of stored coefficients. 
    NullaryExpr() [1/3]
-------------------

    template<typename Derived >   template<typename CustomNullaryOp >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) > [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::NullaryExpr  | ( | const CustomNullaryOp &  | *func* | ) |  |

 | inlinestatic |

 
 
Returns
an expression of a matrix defined by a custom functor *func* 
 This variant is only for fixed-size [DenseBase](classeigen_1_1densebase "Base class for all dense matrices, vectors, and arrays.") types. For dynamic-size types, you need to use the variants taking size arguments.

 The template parameter *CustomNullaryOp* is the type of the functor.

 
See also
class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.") 
    NullaryExpr() [2/3]
-------------------

    template<typename Derived >   template<typename CustomNullaryOp >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) > [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::NullaryExpr  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols*,  |
|  |  | const CustomNullaryOp &  | *func* |
|  | ) |  |  |

 | inlinestatic |

 
 
Returns
an expression of a matrix defined by a custom functor *func* 
 The parameters *rows* and *cols* are the number of rows and of columns of the returned matrix. Must be compatible with this [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") type.

 This variant is meant to be used for dynamic-size matrix types. For fixed-size types, it is redundant to pass *rows* and *cols* as arguments, so [Zero()](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) should be used instead.

 The template parameter *CustomNullaryOp* is the type of the functor.

 
See also
class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.") 
    NullaryExpr() [3/3]
-------------------

    template<typename Derived >   template<typename CustomNullaryOp >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) > [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::NullaryExpr  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *size*,  |
|  |  | const CustomNullaryOp &  | *func* |
|  | ) |  |  |

 | inlinestatic |

 
 
Returns
an expression of a matrix defined by a custom functor *func* 
 The parameter *size* is the size of the returned vector. Must be compatible with this [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") type.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 This variant is meant to be used for dynamic-size vector types. For fixed-size types, it is redundant to pass *size* as argument, so [Zero()](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) should be used instead.

 The template parameter *CustomNullaryOp* is the type of the functor.

 Here is an example with C++11 random generators: 



```
#include <Eigen/Core>
#include <iostream>
#include <random>
 
using namespace [Eigen](namespaceeigen);
 
int main() {
  std::default_random_engine generator;
  std::poisson_distribution<int> distribution(4.1);
  auto poisson = [&] () {return distribution(generator);};
 
  RowVectorXi v = [RowVectorXi::NullaryExpr](classeigen_1_1densebase#a3340c9b997f5b53a0131cf927f93b54c)(10, poisson );
  std::cout << v << "\n";
}
```

 Output: 



```
2 3 1 4 3 4 4 3 2 3

```


See also
class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.") 
    Ones() [1/3]
------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [DenseBase](classeigen_1_1densebase)< Derived >::ConstantReturnType [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::Ones |

 | inlinestatic |

 
 
Returns
an expression of a fixed-size matrix or vector where all coefficients equal one.
 This variant is only for fixed-size [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") types. For dynamic-size types, you need to use the variants taking size arguments.

 Example: 



```
cout << [Matrix2d::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)() << endl;
cout << 6 * [RowVector4i::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)() << endl;

```

 Output: 



```
1 1
1 1
6 6 6 6

```


See also

[Ones(Index)](classeigen_1_1densebase#ab710a58e4a80fbcb2594242372c8fe56), [Ones(Index,Index)](classeigen_1_1densebase#a8b2a51018a73a766f5b91aef3487f013), [isOnes()](classeigen_1_1densebase#aa56d6b4477cd3c92a9cf42f4b96e47c2), class [Ones](classeigen_1_1densebase#a8b2a51018a73a766f5b91aef3487f013) 
    Ones() [2/3]
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [DenseBase](classeigen_1_1densebase)< Derived >::ConstantReturnType [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::Ones  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols* |
|  | ) |  |  |

 | inlinestatic |

 
 
Returns
an expression of a matrix where all coefficients equal one.
 The parameters *rows* and *cols* are the number of rows and of columns of the returned matrix. Must be compatible with this [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") type.

 This variant is meant to be used for dynamic-size matrix types. For fixed-size types, it is redundant to pass *rows* and *cols* as arguments, so [Ones()](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101) should be used instead.

 Example: 



```
cout << [MatrixXi::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)(2,3) << endl;

```

 Output: 



```
1 1 1
1 1 1

```


See also

[Ones()](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101), [Ones(Index)](classeigen_1_1densebase#ab710a58e4a80fbcb2594242372c8fe56), [isOnes()](classeigen_1_1densebase#aa56d6b4477cd3c92a9cf42f4b96e47c2), class [Ones](classeigen_1_1densebase#a8b2a51018a73a766f5b91aef3487f013) 
    Ones() [3/3]
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [DenseBase](classeigen_1_1densebase)< Derived >::ConstantReturnType [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::Ones  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *newSize* | ) |  |

 | inlinestatic |

 
 
Returns
an expression of a vector where all coefficients equal one.
 The parameter *newSize* is the size of the returned vector. Must be compatible with this [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") type.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 This variant is meant to be used for dynamic-size vector types. For fixed-size types, it is redundant to pass *size* as argument, so [Ones()](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101) should be used instead.

 Example: 



```
cout << 6 * [RowVectorXi::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)(4) << endl;
cout << [VectorXf::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)(2) << endl;

```

 Output: 



```
6 6 6 6
1
1

```


See also

[Ones()](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101), [Ones(Index,Index)](classeigen_1_1densebase#a8b2a51018a73a766f5b91aef3487f013), [isOnes()](classeigen_1_1densebase#aa56d6b4477cd3c92a9cf42f4b96e47c2), class [Ones](classeigen_1_1densebase#a8b2a51018a73a766f5b91aef3487f013) 
    operator<<() [1/2]
------------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [CommaInitializer](structeigen_1_1commainitializer)< Derived > [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::operator<<  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 
See also

[operator<<(const Scalar&)](classeigen_1_1densebase#a0e575eb0ba6cc6bc5f347872abd8509d) 
    operator<<() [2/2]
------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [CommaInitializer](structeigen_1_1commainitializer)< Derived > [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::operator<<  | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *s* | ) |  |

 | inline |

 
 Convenient operator to set the coefficients of a matrix.

 The coefficients must be provided in a row major order and exactly match the size of the matrix. Otherwise an assertion is raised.

 Example: 



```
Matrix3i m1;
m1 << 1, 2, 3,
      4, 5, 6,
      7, 8, 9;
cout << m1 << endl << endl;
Matrix3i m2 = [Matrix3i::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)();
m2.block(0,0, 2,2) << 10, 11, 12, 13;
cout << m2 << endl << endl;
Vector2i v1;
v1 << 14, 15;
m2 << v1.transpose(), 16,
      v1, m1.block(1,1,2,2);
cout << m2 << endl;
```

 Output: 



```
1 2 3
4 5 6
7 8 9

10 11  0
12 13  0
 0  0  1

14 15 16
14  5  6
15  8  9

```


Note
According the c++ standard, the argument expressions of this comma initializer are evaluated in arbitrary order.
 
See also

[CommaInitializer::finished()](structeigen_1_1commainitializer#a3cf9e2b8a227940f50103130b2d2859a), class [CommaInitializer](structeigen_1_1commainitializer "Helper class used by the comma initializer operator.") 
    operator=() [1/3]
-----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::operator=  | ( | const [DenseBase](classeigen_1_1densebase)< Derived > &  | *other* | ) |  |

 | inline |

 
 Special case of the template operator=, in order to prevent the compiler from generating a default operator= (issue hit with g++ 4.1) 

    operator=() [2/3]
-----------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::operator=  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Copies *other* into \*this. 



Returns
a reference to \*this. 
    operator=() [3/3]
-----------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::operator=  | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *other* | ) |  |

 
 Copies the generic expression *other* into \*this. 

 The expression must provide a (templated) evalTo(Derived& dst) const function which does the actual job. In practice, this allows any user to write its own special matrix without having to modify [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.")

 
Returns
a reference to \*this. 
    outerSize()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::outerSize  | ( |  | ) |  const |

 | inline |

 
 
Returns
the outer size.
 
Note
For a vector, this returns just 1. For a matrix (non-vector), this is the major dimension with respect to the [storage order](group__topicstorageorders), i.e., the number of columns for a column-major matrix, and the number of rows for a row-major matrix. 
    prod()
------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::prod |

 | inline |

 
 
Returns
the product of all coefficients of \*this
 Example: 



```
Matrix3d m = [Matrix3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the product of all the coefficients:" << endl << m.prod() << endl;

```

 Output: 



```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Here is the product of all the coefficients:
0.0019

```


See also

[sum()](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c), [mean()](classeigen_1_1densebase#a21ac6c0419a72ad7a88ea0bc189017d7), trace() 
    Random() [1/3]
--------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [DenseBase](classeigen_1_1densebase)< Derived >::[RandomReturnType](classeigen_1_1cwisenullaryop) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::Random |

 | inlinestatic |

 
 
Returns
a fixed-size random matrix or vector expression
 Numbers are uniformly spread through their whole definition range for integer types, and in the [-1:1] range for floating point scalar types.

 This variant is only for fixed-size [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") types. For dynamic-size types, you need to use the variants taking size arguments.

 Example: 



```
cout << 100 * [Matrix2i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)() << endl;

```

 Output: 



```
 700  600
-200  600

```

This expression has the "evaluate before nesting" flag so that it will be evaluated into a temporary matrix whenever it is nested in a larger expression. This prevents unexpected behavior with expressions involving random matrices.

 
Warning
This function is not re-entrant.
 
See also

[DenseBase::setRandom()](classeigen_1_1densebase#ac476e5852129ba32beaa1a8a3d7ee0db), [DenseBase::Random(Index,Index)](classeigen_1_1densebase#ae97f8d9d08f969c733c8144be6225756), [DenseBase::Random(Index)](classeigen_1_1densebase#a7eb5f974a8f0b67eac7080db1da0e308) 
    Random() [2/3]
--------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [DenseBase](classeigen_1_1densebase)< Derived >::[RandomReturnType](classeigen_1_1cwisenullaryop) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::Random  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols* |
|  | ) |  |  |

 | inlinestatic |

 
 
Returns
a random matrix expression
 Numbers are uniformly spread through their whole definition range for integer types, and in the [-1:1] range for floating point scalar types.

 The parameters *rows* and *cols* are the number of rows and of columns of the returned matrix. Must be compatible with this [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") type.

 
Warning
This function is not re-entrant.
 This variant is meant to be used for dynamic-size matrix types. For fixed-size types, it is redundant to pass *rows* and *cols* as arguments, so [Random()](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19) should be used instead.

 Example: 



```
cout << [MatrixXi::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(2,3) << endl;

```

 Output: 



```
 7  6  9
-2  6 -6

```

This expression has the "evaluate before nesting" flag so that it will be evaluated into a temporary matrix whenever it is nested in a larger expression. This prevents unexpected behavior with expressions involving random matrices.

 See [DenseBase::NullaryExpr(Index, const CustomNullaryOp&)](classeigen_1_1densebase#a9752ee59976a4b4aad860ad1a9093e7f) for an example using C++11 random generators.

 
See also

[DenseBase::setRandom()](classeigen_1_1densebase#ac476e5852129ba32beaa1a8a3d7ee0db), [DenseBase::Random(Index)](classeigen_1_1densebase#a7eb5f974a8f0b67eac7080db1da0e308), [DenseBase::Random()](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19) 
    Random() [3/3]
--------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [DenseBase](classeigen_1_1densebase)< Derived >::[RandomReturnType](classeigen_1_1cwisenullaryop) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::Random  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *size* | ) |  |

 | inlinestatic |

 
 
Returns
a random vector expression
 Numbers are uniformly spread through their whole definition range for integer types, and in the [-1:1] range for floating point scalar types.

 The parameter *size* is the size of the returned vector. Must be compatible with this [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") type.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column. 



Warning
This function is not re-entrant.
 This variant is meant to be used for dynamic-size vector types. For fixed-size types, it is redundant to pass *size* as argument, so [Random()](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19) should be used instead.

 Example: 



```
cout << [VectorXi::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(2) << endl;

```

 Output: 



```
 7
-2

```

This expression has the "evaluate before nesting" flag so that it will be evaluated into a temporary vector whenever it is nested in a larger expression. This prevents unexpected behavior with expressions involving random matrices.

 
See also

[DenseBase::setRandom()](classeigen_1_1densebase#ac476e5852129ba32beaa1a8a3d7ee0db), [DenseBase::Random(Index,Index)](classeigen_1_1densebase#ae97f8d9d08f969c733c8144be6225756), [DenseBase::Random()](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19) 
    redux()
-------

    template<typename Derived >   template<typename Func >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| internal::traits<Derived>::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::redux  | ( | const Func &  | *func* | ) |  const |

 | inline |

 
 
Returns
the result of a full redux operation on the whole matrix or vector using *func* 
 The template parameter *BinaryOp* is the type of the functor *func* which must be an associative operator. Both current C++98 and C++11 functor styles are handled.

 
Warning
the matrix must be not empty, otherwise an assertion is triggered.
 
See also

[DenseBase::sum()](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c), [DenseBase::minCoeff()](classeigen_1_1densebase#a0739f9c868c331031c7810e21838dcb2), [DenseBase::maxCoeff()](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1), [MatrixBase::colwise()](classeigen_1_1densebase#a1c0e1b6067ec1de6cb8799da55aa7d30), [MatrixBase::rowwise()](classeigen_1_1densebase#a6daa3a3156ca0e0722bf78638e1c7f28) 
    replicate() [1/2]
-----------------

    template<typename Derived >   template<int RowFactor, int ColFactor>  

|  |
| --- |
| const [Replicate](classeigen_1_1replicate)< Derived, RowFactor, ColFactor > [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::replicate |

 
 
Returns
an expression of the replication of `*this` 
 Example: 



```
MatrixXi m = [MatrixXi::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(2,3);
cout << "Here is the matrix m:" << endl << m << endl;
cout << "m.replicate<3,2>() = ..." << endl;
cout << m.replicate<3,2>() << endl;

```

 Output: 



```
Here is the matrix m:
 7  6  9
-2  6 -6
m.replicate<3,2>() = ...
 7  6  9  7  6  9
-2  6 -6 -2  6 -6
 7  6  9  7  6  9
-2  6 -6 -2  6 -6
 7  6  9  7  6  9
-2  6 -6 -2  6 -6

```


See also

[VectorwiseOp::replicate()](classeigen_1_1vectorwiseop#a5f0c8dc9e9c4aeaa2057f15800f5c18c), DenseBase::replicate(Index,Index), class [Replicate](classeigen_1_1replicate "Expression of the multiple replication of a matrix or vector.") 
    replicate() [2/2]
-----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [Replicate](classeigen_1_1replicate)<Derived, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2)> [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::replicate  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rowFactor*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *colFactor* |
|  | ) |  |  const |

 | inline |

 
 
Returns
an expression of the replication of `*this` 
 Example: 



```
Vector3i v = [Vector3i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the vector v:" << endl << v << endl;
cout << "v.replicate(2,5) = ..." << endl;
cout << v.replicate(2,5) << endl;

```

 Output: 



```
Here is the vector v:
 7
-2
 6
v.replicate(2,5) = ...
 7  7  7  7  7
-2 -2 -2 -2 -2
 6  6  6  6  6
 7  7  7  7  7
-2 -2 -2 -2 -2
 6  6  6  6  6

```


See also

[VectorwiseOp::replicate()](classeigen_1_1vectorwiseop#a5f0c8dc9e9c4aeaa2057f15800f5c18c), [DenseBase::replicate<int,int>()](classeigen_1_1densebase#a60dadfe80b813d808e91e4521c722a8e), class [Replicate](classeigen_1_1replicate "Expression of the multiple replication of a matrix or vector.") 
    resize() [1/2]
--------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::resize  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *newSize* | ) |  |

 | inline |

 
 Only plain matrices/arrays, not expressions, may be resized; therefore the only useful resize methods are [Matrix::resize()](classeigen_1_1plainobjectbase#a9fd0703bd7bfe89d6dc80e2ce87c312a) and [Array::resize()](classeigen_1_1plainobjectbase#a9fd0703bd7bfe89d6dc80e2ce87c312a). The present method only asserts that the new size equals the old size, and does nothing else. 

    resize() [2/2]
--------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::resize  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols* |
|  | ) |  |  |

 | inline |

 
 Only plain matrices/arrays, not expressions, may be resized; therefore the only useful resize methods are [Matrix::resize()](classeigen_1_1plainobjectbase#a9fd0703bd7bfe89d6dc80e2ce87c312a) and [Array::resize()](classeigen_1_1plainobjectbase#a9fd0703bd7bfe89d6dc80e2ce87c312a). The present method only asserts that the new size equals the old size, and does nothing else. 

    reverse() [1/2]
---------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [DenseBase](classeigen_1_1densebase)< Derived >::[ReverseReturnType](classeigen_1_1reverse) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::reverse |

 | inline |

 
 
Returns
an expression of the reverse of \*this.
 Example: 



```
MatrixXi m = [MatrixXi::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3,4);
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the reverse of m:" << endl << m.reverse() << endl;
cout << "Here is the coefficient (1,0) in the reverse of m:" << endl
     << m.reverse()(1,0) << endl;
cout << "Let us overwrite this coefficient with the value 4." << endl;
m.reverse()(1,0) = 4;
cout << "Now the matrix m is:" << endl << m << endl;

```

 Output: 



```
Here is the matrix m:
 7  6 -3  1
-2  9  6  0
 6 -6 -5  3
Here is the reverse of m:
 3 -5 -6  6
 0  6  9 -2
 1 -3  6  7
Here is the coefficient (1,0) in the reverse of m:
0
Let us overwrite this coefficient with the value 4.
Now the matrix m is:
 7  6 -3  1
-2  9  6  4
 6 -6 -5  3

```
    reverse() [2/2]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ConstReverseReturnType](classeigen_1_1reverse) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::reverse  | ( |  | ) |  const |

 | inline |

 
 This is the const version of [reverse()](classeigen_1_1densebase#a38ea394036d8b096abf322469c80198f). 

    reverseInPlace()
----------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| void [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::reverseInPlace |

 | inline |

 
 This is the "in place" version of reverse: it reverses `*this`.

 In most cases it is probably better to simply use the reversed expression of a matrix. However, when reversing the matrix data itself is really needed, then this "in-place" version is probably the right choice because it provides the following additional benefits:


* less error prone: doing the same operation with .[reverse()](classeigen_1_1densebase#a38ea394036d8b096abf322469c80198f) requires special care: 
```
m = m.reverse().eval(); 

```
* this API enables reverse operations without the need for a temporary
* it allows future optimizations (cache friendliness, etc.)

 
See also

[VectorwiseOp::reverseInPlace()](classeigen_1_1vectorwiseop#ab9dd7c273eb2ba8defaab2d55156936b), [reverse()](classeigen_1_1densebase#a38ea394036d8b096abf322469c80198f) 
    rowwise() [1/2]
---------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [DenseBase](classeigen_1_1densebase)< Derived >::[RowwiseReturnType](classeigen_1_1vectorwiseop) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::rowwise |

 | inline |

 
 
Returns
a writable [VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations.") wrapper of \*this providing additional partial reduction operations
 
See also

[colwise()](classeigen_1_1densebase#a1c0e1b6067ec1de6cb8799da55aa7d30), class [VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations."), [Reductions, visitors and broadcasting](group__tutorialreductionsvisitorsbroadcasting) 
    rowwise() [2/2]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ConstRowwiseReturnType](classeigen_1_1vectorwiseop) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::rowwise  | ( |  | ) |  const |

 | inline |

 
 
Returns
a [VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations.") wrapper of \*this for broadcasting and partial reductions
 Example: 



```
Matrix3d m = [Matrix3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the sum of each row:" << endl << m.rowwise().sum() << endl;
cout << "Here is the maximum absolute value of each row:"
     << endl << m.cwiseAbs().rowwise().maxCoeff() << endl;

```

 Output: 



```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Here is the sum of each row:
 0.948
  1.15
-0.483
Here is the maximum absolute value of each row:
 0.68
0.823
0.605

```


See also

[colwise()](classeigen_1_1densebase#a1c0e1b6067ec1de6cb8799da55aa7d30), class [VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations."), [Reductions, visitors and broadcasting](group__tutorialreductionsvisitorsbroadcasting) 
    select() [1/3]
--------------

    template<typename Derived >   template<typename ThenDerived , typename ElseDerived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [Select](classeigen_1_1select)< Derived, ThenDerived, ElseDerived > [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::select  | ( | const [DenseBase](classeigen_1_1densebase)< ThenDerived > &  | *thenMatrix*,  |
|  |  | const [DenseBase](classeigen_1_1densebase)< ElseDerived > &  | *elseMatrix* |
|  | ) |  |  const |

 | inline |

 
 
Returns
a matrix where each coefficient (i,j) is equal to *thenMatrix(i,j)* if `*this`(i,j), and *elseMatrix(i,j)* otherwise.
 Example: 



```
MatrixXi m(3, 3);
m << 1, 2, 3,
     4, 5, 6,
     7, 8, 9;
m = (m.array() >= 5).[select](classeigen_1_1densebase#a65e78cfcbc9852e6923bebff4323ddca)(-m, m);
cout << m << endl;
```

 Output: 



```
 1  2  3
 4 -5 -6
-7 -8 -9

```


See also
class [Select](classeigen_1_1select "Expression of a coefficient wise version of the C++ ternary operator ?:") 
    select() [2/3]
--------------

    template<typename Derived >   template<typename ThenDerived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [Select](classeigen_1_1select)< Derived, ThenDerived, typename ThenDerived::ConstantReturnType > [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::select  | ( | const [DenseBase](classeigen_1_1densebase)< ThenDerived > &  | *thenMatrix*,  |
|  |  | const typename ThenDerived::Scalar &  | *elseScalar* |
|  | ) |  |  const |

 | inline |

 
 Version of DenseBase::select(const DenseBase&, const DenseBase&) with the *else* expression being a scalar value.

 
See also

[DenseBase::select(const DenseBase<ThenDerived>&, const DenseBase<ElseDerived>&) const](classeigen_1_1densebase#a65e78cfcbc9852e6923bebff4323ddca), class [Select](classeigen_1_1select "Expression of a coefficient wise version of the C++ ternary operator ?:") 
    select() [3/3]
--------------

    template<typename Derived >   template<typename ElseDerived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [Select](classeigen_1_1select)< Derived, typename ElseDerived::ConstantReturnType, ElseDerived > [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::select  | ( | const typename ElseDerived::Scalar &  | *thenScalar*,  |
|  |  | const [DenseBase](classeigen_1_1densebase)< ElseDerived > &  | *elseMatrix* |
|  | ) |  |  const |

 | inline |

 
 Version of DenseBase::select(const DenseBase&, const DenseBase&) with the *then* expression being a scalar value.

 
See also

[DenseBase::select(const DenseBase<ThenDerived>&, const DenseBase<ElseDerived>&) const](classeigen_1_1densebase#a65e78cfcbc9852e6923bebff4323ddca), class [Select](classeigen_1_1select "Expression of a coefficient wise version of the C++ ternary operator ?:") 
    setConstant()
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::setConstant  | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *val* | ) |  |

 | inline |

 
 Sets all coefficients in this expression to value *val*.

 
See also

[fill()](classeigen_1_1densebase#a9be169c308801411aa24be93d30930bf), setConstant(Index,const Scalar&), setConstant(Index,Index,const Scalar&), [setZero()](classeigen_1_1densebase#af230a143de50695d2d1fae93db7e4dcb), [setOnes()](classeigen_1_1densebase#a250ef1b827e748f3f898fb2e55cb96e2), [Constant()](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [setZero()](classeigen_1_1densebase#af230a143de50695d2d1fae93db7e4dcb), [setOnes()](classeigen_1_1densebase#a250ef1b827e748f3f898fb2e55cb96e2) 
    setLinSpaced() [1/2]
--------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::setLinSpaced  | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *low*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *high* |
|  | ) |  |  |

 | inline |

 
 Sets a linearly spaced vector. 

 The function fills `*this` with equally spaced values in the closed interval [low,high]. When size is set to 1, a vector of length 1 containing 'high' is returned.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 For integer scalar types, do not miss the explanations on the definition of [even spacing](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) .

 
See also

[LinSpaced(Index,const Scalar&,const Scalar&)](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768 "Sets a linearly spaced vector."), [setLinSpaced(Index, const Scalar&, const Scalar&)](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a "Sets a linearly spaced vector."), [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.") 
    setLinSpaced() [2/2]
--------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::setLinSpaced  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *newSize*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *low*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *high* |
|  | ) |  |  |

 | inline |

 
 Sets a linearly spaced vector. 

 The function generates 'size' equally spaced values in the closed interval [low,high]. When size is set to 1, a vector of length 1 containing 'high' is returned.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setLinSpaced(5,0.5f,1.5f);
cout << v << endl;

```

 Output: 



```
 0.5
0.75
   1
1.25
 1.5

```

For integer scalar types, do not miss the explanations on the definition of [even spacing](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) .

 
See also

[LinSpaced(Index,const Scalar&,const Scalar&)](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768 "Sets a linearly spaced vector."), [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.") 
    setOnes()
---------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| Derived & [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::setOnes |

 | inline |

 
 Sets all coefficients in this expression to one.

 Example: 



```
Matrix4i m = [Matrix4i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
m.row(1).setOnes();
cout << m << endl;

```

 Output: 



```
 7  9 -5 -3
 1  1  1  1
 6 -3  0  9
 6  6  3  9

```


See also
class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [Ones()](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101) 
    setRandom()
-----------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| Derived & [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::setRandom |

 | inline |

 
 Sets all coefficients in this expression to random values.

 Numbers are uniformly spread through their whole definition range for integer types, and in the [-1:1] range for floating point scalar types.

 
Warning
This function is not re-entrant.
 Example: 



```
Matrix4i m = [Matrix4i::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)();
m.col(1).setRandom();
cout << m << endl;

```

 Output: 



```
 0  7  0  0
 0 -2  0  0
 0  6  0  0
 0  6  0  0

```


See also
class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), setRandom(Index), setRandom(Index,Index) 
    setZero()
---------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| Derived & [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::setZero |

 | inline |

 
 Sets all coefficients in this expression to zero.

 Example: 



```
Matrix4i m = [Matrix4i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
m.row(1).setZero();
cout << m << endl;

```

 Output: 



```
 7  9 -5 -3
 0  0  0  0
 6 -3  0  9
 6  6  3  9

```


See also
class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [Zero()](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) 
    sum()
-----

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::sum |

 | inline |

 
 
Returns
the sum of all coefficients of `*this` 
 If `*this` is empty, then the value 0 is returned.

 
See also
trace(), [prod()](classeigen_1_1densebase#af119d9a4efe5a15cd83c1ccdf01b3a4f), [mean()](classeigen_1_1densebase#a21ac6c0419a72ad7a88ea0bc189017d7) 
    swap() [1/2]
------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::swap  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 swaps \*this with the expression *other*. 

    swap() [2/2]
------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::swap  | ( | [PlainObjectBase](classeigen_1_1plainobjectbase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 swaps \*this with the matrix or array *other*. 

    transpose() [1/2]
-----------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [Transpose](classeigen_1_1transpose)< Derived > [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::transpose |

 | inline |

 
 
Returns
an expression of the transpose of \*this.
 Example: 



```
Matrix2i m = [Matrix2i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the transpose of m:" << endl << m.transpose() << endl;
cout << "Here is the coefficient (1,0) in the transpose of m:" << endl
     << m.transpose()(1,0) << endl;
cout << "Let us overwrite this coefficient with the value 0." << endl;
m.transpose()(1,0) = 0;
cout << "Now the matrix m is:" << endl << m << endl;

```

 Output: 



```
Here is the matrix m:
 7  6
-2  6
Here is the transpose of m:
 7 -2
 6  6
Here is the coefficient (1,0) in the transpose of m:
6
Let us overwrite this coefficient with the value 0.
Now the matrix m is:
 7  0
-2  6

```


Warning
If you want to replace a matrix by its own transpose, do **NOT** do this: 
```
m = m.transpose(); // bug!!! caused by aliasing effect

```
 Instead, use the [transposeInPlace()](classeigen_1_1densebase#ac501bd942994af7a95d95bee7a16ad2a) method: 
```
m.transposeInPlace();

```
 which gives [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") good opportunities for optimization, or alternatively you can also do: 
```
m = m.transpose().eval();

```


 
See also

[transposeInPlace()](classeigen_1_1densebase#ac501bd942994af7a95d95bee7a16ad2a), adjoint() 
    transpose() [2/2]
-----------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [DenseBase](classeigen_1_1densebase)< Derived >::[ConstTransposeReturnType](classeigen_1_1diagonal) [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::transpose |

 | inline |

 
 This is the const version of [transpose()](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c).

 Make sure you read the warning for [transpose()](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c) !

 
See also

[transposeInPlace()](classeigen_1_1densebase#ac501bd942994af7a95d95bee7a16ad2a), adjoint() 
    transposeInPlace()
------------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| void [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::transposeInPlace |

 | inline |

 
 This is the "in place" version of [transpose()](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c): it replaces `*this` by its own transpose. Thus, doing 



```
m.transposeInPlace();

```

 has the same effect on m as doing 



```
m = m.transpose().eval();

```

 and is faster and also safer because in the latter line of code, forgetting the [eval()](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b) results in a bug caused by [aliasing](group__topicaliasing).

 Notice however that this method is only useful if you want to replace a matrix by its own transpose. If you just need the transpose of a matrix, use [transpose()](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c).

 
Note
if the matrix is not square, then `*this` must be a resizable matrix. This excludes (non-square) fixed-size matrices, block-expressions and maps.
 
See also

[transpose()](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c), adjoint(), adjointInPlace() 
    value()
-------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| CoeffReturnType [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::value  | ( |  | ) |  const |

 | inline |

 
 
Returns
the unique coefficient of a 1x1 expression 
    visit()
-------

    template<typename Derived >   template<typename Visitor >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::visit  | ( | Visitor &  | *visitor* | ) |  const |

 
 Applies the visitor *visitor* to the whole coefficients of the matrix or vector.

 The template parameter *Visitor* is the type of the visitor and provides the following interface: 



```
struct MyVisitor {
  // called for the first coefficient
  void init(const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)& [value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) i, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) j);
  // called for all other coefficients
  void [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae6ba07bad9e3026afe54806fdefe32bb) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)& [value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) i, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) j);
};
```


Note
compared to one or two *for* *loops*, visitors offer automatic unrolling for small fixed size matrix.  if the matrix is empty, then the visitor is left unchanged.
 
See also
minCoeff(Index\*,Index\*), maxCoeff(Index\*,Index\*), DenseBase::redux() 
    Zero() [1/3]
------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [DenseBase](classeigen_1_1densebase)< Derived >::ConstantReturnType [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::Zero |

 | inlinestatic |

 
 
Returns
an expression of a fixed-size zero matrix or vector.
 This variant is only for fixed-size [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") types. For dynamic-size types, you need to use the variants taking size arguments.

 Example: 



```
cout << [Matrix2d::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)() << endl;
cout << [RowVector4i::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)() << endl;

```

 Output: 



```
0 0
0 0
0 0 0 0

```


See also

[Zero(Index)](classeigen_1_1densebase#ac22f79b812fa564061042407f2ba8f5b), [Zero(Index,Index)](classeigen_1_1densebase#ae41a9b5050ed27d9e93c82c9c8622cd3) 
    Zero() [2/3]
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [DenseBase](classeigen_1_1densebase)< Derived >::ConstantReturnType [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::Zero  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols* |
|  | ) |  |  |

 | inlinestatic |

 
 
Returns
an expression of a zero matrix.
 The parameters *rows* and *cols* are the number of rows and of columns of the returned matrix. Must be compatible with this [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") type.

 This variant is meant to be used for dynamic-size matrix types. For fixed-size types, it is redundant to pass *rows* and *cols* as arguments, so [Zero()](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) should be used instead.

 Example: 



```
cout << [MatrixXi::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)(2,3) << endl;

```

 Output: 



```
0 0 0
0 0 0

```


See also

[Zero()](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761), [Zero(Index)](classeigen_1_1densebase#ac22f79b812fa564061042407f2ba8f5b) 
    Zero() [3/3]
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [DenseBase](classeigen_1_1densebase)< Derived >::ConstantReturnType [Eigen::DenseBase](classeigen_1_1densebase)< Derived >::Zero  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *size* | ) |  |

 | inlinestatic |

 
 
Returns
an expression of a zero vector.
 The parameter *size* is the size of the returned vector. Must be compatible with this [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") type.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 This variant is meant to be used for dynamic-size vector types. For fixed-size types, it is redundant to pass *size* as argument, so [Zero()](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) should be used instead.

 Example: 



```
cout << [RowVectorXi::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)(4) << endl;
cout << [VectorXf::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)(2) << endl;

```

 Output: 



```
0 0 0 0
0
0

```


See also

[Zero()](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761), [Zero(Index,Index)](classeigen_1_1densebase#ae41a9b5050ed27d9e93c82c9c8622cd3) 
    operator<<()
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| std::ostream & operator<<  | ( | std::ostream &  | *s*,  |
|  |  | const [DenseBase](classeigen_1_1densebase)< Derived > &  | *m* |
|  | ) |  |  |

 | related |

 
 Outputs the matrix, to the given stream.

 If you wish to print the matrix with a format different than the default, use [DenseBase::format()](classeigen_1_1densebase#ab231f1a6057f28d4244145e12c9fc0c7).

 It is also possible to change the default format by defining EIGEN\_DEFAULT\_IO\_FORMAT before including [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") headers. If not defined, this will automatically be defined to [Eigen::IOFormat()](structeigen_1_1ioformat "Stores a set of parameters controlling the way matrices are printed."), that is the [Eigen::IOFormat](structeigen_1_1ioformat "Stores a set of parameters controlling the way matrices are printed.") with default parameters.

 
See also

[DenseBase::format()](classeigen_1_1densebase#ab231f1a6057f28d4244145e12c9fc0c7) 
   

---

The documentation for this class was generated from the following files:* [DenseBase.h](https://eigen.tuxfamily.org/dox/DenseBase_8h_source.html)
* [Assign.h](https://eigen.tuxfamily.org/dox/Assign_8h_source.html)
* [BooleanRedux.h](https://eigen.tuxfamily.org/dox/BooleanRedux_8h_source.html)
* [CommaInitializer.h](https://eigen.tuxfamily.org/dox/CommaInitializer_8h_source.html)
* [CwiseNullaryOp.h](https://eigen.tuxfamily.org/dox/CwiseNullaryOp_8h_source.html)
* [EigenBase.h](https://eigen.tuxfamily.org/dox/EigenBase_8h_source.html)
* [Fuzzy.h](https://eigen.tuxfamily.org/dox/Fuzzy_8h_source.html)
* [IO.h](https://eigen.tuxfamily.org/dox/IO_8h_source.html)
* [NestByValue.h](https://eigen.tuxfamily.org/dox/NestByValue_8h_source.html)
* [Random.h](https://eigen.tuxfamily.org/dox/Random_8h_source.html)
* [Redux.h](https://eigen.tuxfamily.org/dox/Redux_8h_source.html)
* [Replicate.h](https://eigen.tuxfamily.org/dox/Replicate_8h_source.html)
* [ReturnByValue.h](https://eigen.tuxfamily.org/dox/ReturnByValue_8h_source.html)
* [Reverse.h](https://eigen.tuxfamily.org/dox/Reverse_8h_source.html)
* [Select.h](https://eigen.tuxfamily.org/dox/Select_8h_source.html)
* [SelfCwiseBinaryOp.h](https://eigen.tuxfamily.org/dox/SelfCwiseBinaryOp_8h_source.html)
* [StlIterators.h](https://eigen.tuxfamily.org/dox/StlIterators_8h_source.html)
* [Transpose.h](https://eigen.tuxfamily.org/dox/Transpose_8h_source.html)
* [VectorwiseOp.h](https://eigen.tuxfamily.org/dox/VectorwiseOp_8h_source.html)
* [Visitor.h](https://eigen.tuxfamily.org/dox/Visitor_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1DenseBase.html>

Vectorization
=============

   
TODO: write this dox page! 

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicVectorization.html>

Eigen::CommaInitializer
=======================

  
### template<typename XprType> class Eigen::CommaInitializer< XprType >

 Helper class used by the comma initializer operator. 

 This class is internally used to implement the comma initializer feature. It is the return type of [MatrixBase::operator<<](classeigen_1_1densebase#a0e575eb0ba6cc6bc5f347872abd8509d), and most of the time this is the only way it is used.

 
See also

[MatrixBase::operator<<](classeigen_1_1densebase#MatrixBaseCommaInitRef), [CommaInitializer::finished()](structeigen_1_1commainitializer#a3cf9e2b8a227940f50103130b2d2859a) 
 


|  |
| --- |
|  |
| XprType &  | [finished](structeigen_1_1commainitializer#a3cf9e2b8a227940f50103130b2d2859a) () |
|  |

  finished()
----------

    template<typename XprType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| XprType& [Eigen::CommaInitializer](structeigen_1_1commainitializer)< XprType >::finished  | ( |  | ) |  |

 | inline |

 
 
Returns
the built matrix once all its coefficients have been set. Calling finished is 100% optional. Its purpose is to write expressions like this: 
```
quaternion.fromRotationMatrix((Matrix3f() << axis0, axis1, axis2).[finished](structeigen_1_1commainitializer#a3cf9e2b8a227940f50103130b2d2859a)());
```
 
   

---

The documentation for this class was generated from the following file:* [CommaInitializer.h](https://eigen.tuxfamily.org/dox/CommaInitializer_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/structEigen_1_1CommaInitializer.html>

Eigen::Inverse
==============

  
### template<typename XprType> class Eigen::Inverse< XprType >

 Expression of the inverse of another expression. 

 
Template Parameters
 

|  |  |
| --- | --- |
| XprType | the type of the expression we are taking the inverse |

   This class represents an abstract expression of A.inverse() and most of the time this is the only way it is used. 

  Inherits Eigen::InverseImpl< XprType, internal::traits< XprType >::StorageKind >.

 

---

The documentation for this class was generated from the following file:* [Inverse.h](https://eigen.tuxfamily.org/dox/Inverse_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Inverse.html>

Eigen::EigenBase
================

  
### template<typename Derived> class Eigen::EigenBase< Derived >

 Common base class for all classes T such that [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") has an operator=(T) and a constructor MatrixBase(T).

 In other words, an [EigenBase](structeigen_1_1eigenbase) object is an object that can be copied into a [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.").

 Besides MatrixBase-derived classes, this also includes special matrix classes such as diagonal matrices, etc.

 Notice that this class is trivial, it is only used to disambiguate overloaded functions.

 
See also

[The class hierarchy](topicclasshierarchy) 
     ![Inheritance graph](https://eigen.tuxfamily.org/dox/structEigen_1_1EigenBase__inherit__graph.png)                                                     

|  |
| --- |
|  |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |




|  |
| --- |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |

  Index
-----

    template<typename Derived >  

|  |
| --- |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::[Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |

 
 The interface type of indices. 

 To change this, `#define` the preprocessor symbol `EIGEN_DEFAULT_DENSE_INDEX_TYPE`. 



See also
StorageIndex, [Preprocessor directives](topicpreprocessordirectives). DEPRECATED: Since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3, its usage is deprecated. Use [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde "The Index type as used for the API.") instead. Deprecation is not marked with a doxygen comment because there are too many existing usages to add the deprecation attribute. 
    cols()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::cols  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
the number of columns. 
 
See also

[rows()](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2), ColsAtCompileTime 
    derived() [1/2]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Derived& [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::derived  | ( |  | ) |  |

 | inline |

 
 
Returns
a reference to the derived object 
    derived() [2/2]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const Derived& [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::derived  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const reference to the derived object 
    rows()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::rows  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
the number of rows. 
 
See also

[cols()](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe), RowsAtCompileTime 
    size()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::size  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of coefficients, which is [rows()](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2)\*cols(). 
 
See also

[rows()](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2), [cols()](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe), SizeAtCompileTime. 
   

---

The documentation for this class was generated from the following file:* [EigenBase.h](https://eigen.tuxfamily.org/dox/EigenBase_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/structEigen_1_1EigenBase.html>

Eigen::Translation
==================

  
### template<typename \_Scalar, int \_Dim> class Eigen::Translation< \_Scalar, \_Dim >

 Represents a translation transformation. 

 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the scalar type, i.e., the type of the coefficients.  |
| \_Dim | the dimension of the space, can be a compile time value or Dynamic |

   
Note
This class is not aimed to be used to store a translation transformation, but rather to make easier the constructions and updates of [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") objects.
 
See also
class [Scaling](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b), class [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") 
 


|  |
| --- |
|  |
| enum  |  |
|  |
| typedef [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21), Dim, [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb) >  | [AffineTransformType](classeigen_1_1translation#a25c762409320ba9490a0d12c6652bbad) |
|  |
| typedef [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21), Dim, [Isometry](group__enums#ggaee59a86102f150923b0cac6d4ff05107a84413028615d2d718bafd2dfb93dafef) >  | [IsometryTransformType](classeigen_1_1translation#ad3ac890d85420ba78e16dab1983d1a80) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21), Dim, Dim >  | [LinearMatrixType](classeigen_1_1translation#ac5aca3bc67564e96ad550aba971de8b6) |
|  |
| typedef \_Scalar  | [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21), Dim, 1 >  | [VectorType](classeigen_1_1translation#a339e17dfec5394ae563f62cca0df451f) |
|  |




|  |
| --- |
|  |
| template<typename NewScalarType >  |
| internal::cast\_return\_type< [Translation](classeigen_1_1translation), [Translation](classeigen_1_1translation)< NewScalarType, Dim > >::type  | [cast](classeigen_1_1translation#a6dda00ac348f3061cd501f2822d0e534) () const |
|  |
| [Translation](classeigen_1_1translation) | [inverse](classeigen_1_1translation#aa72ee6bccce7f26cbef57550308e6aaf) () const |
|  |
| bool  | [isApprox](classeigen_1_1translation#a3dfc243795eef9c94bf65f0837f563c8) (const [Translation](classeigen_1_1translation) &other, const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21) >::Real &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21) >::dummy\_precision()) const |
|  |
| template<typename OtherDerived >  |
| [AffineTransformType](classeigen_1_1translation#a25c762409320ba9490a0d12c6652bbad) | [operator\*](classeigen_1_1translation#a2289ae59c8f871d9d9c73ba7eeb035f8) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &linear) const |
|  |
| template<typename Derived >  |
| internal::enable\_if< Derived::IsVectorAtCompileTime, [VectorType](classeigen_1_1translation#a339e17dfec5394ae563f62cca0df451f) >::type  | [operator\*](classeigen_1_1translation#a62a95caa45e0aa178e0b2759c78874b1) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &vec) const |
|  |
| template<typename Derived >  |
| [IsometryTransformType](classeigen_1_1translation#ad3ac890d85420ba78e16dab1983d1a80) | [operator\*](classeigen_1_1translation#a37840d7fa515418e143593efbd21c6b3) (const [RotationBase](classeigen_1_1rotationbase)< Derived, Dim > &r) const |
|  |
| template<int Mode, int Options>  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21), Dim, Mode >  | [operator\*](classeigen_1_1translation#ac0e625c8d90f899be9c73b77592a003f) (const [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21), Dim, Mode, Options > &t) const |
|  |
| [Translation](classeigen_1_1translation) | [operator\*](classeigen_1_1translation#aa79f1217e27556e0524260e172a0b081) (const [Translation](classeigen_1_1translation) &other) const |
|  |
| [AffineTransformType](classeigen_1_1translation#a25c762409320ba9490a0d12c6652bbad) | [operator\*](classeigen_1_1translation#a156c8003ff3830756727e805cf98c0ab) (const [UniformScaling](classeigen_1_1uniformscaling)< [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21) > &other) const |
|  |
|  | [Translation](classeigen_1_1translation#a7e74484699e17444c6d660c17117bf7b) () |
|  |
| template<typename OtherScalarType >  |
|  | [Translation](classeigen_1_1translation#a3048c4c2cf095548454aef051af5a036) (const [Translation](classeigen_1_1translation)< OtherScalarType, Dim > &other) |
|  |
|  | [Translation](classeigen_1_1translation#aef1fd431ac3f2197a8e33ce6d4163061) (const [VectorType](classeigen_1_1translation#a339e17dfec5394ae563f62cca0df451f) &vector) |
|  |
|  [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21) &  | [x](classeigen_1_1translation#afecb7411a94188136c5e08ee3ba6f951) () |
|  | Returns the x-translation as a reference.  |
|  |
|  [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21) | [x](classeigen_1_1translation#a8e30e156676c7be9664e9f09860071dd) () const |
|  | Returns the x-translation by value.  |
|  |
|  [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21) &  | [y](classeigen_1_1translation#afebd7c1aec9a5547c50a0ff9a4cb1fe8) () |
|  | Returns the y-translation as a reference.  |
|  |
|  [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21) | [y](classeigen_1_1translation#aa2302dd0093797e913a7f8d58fba8a79) () const |
|  | Returns the y-translation by value.  |
|  |
|  [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21) &  | [z](classeigen_1_1translation#a91d0b27ab6a76fc235524bf00f15266c) () |
|  | Returns the z-translation as a reference.  |
|  |
|  [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21) | [z](classeigen_1_1translation#ac6e9e75f12c67ccd2aa6741a0531af84) () const |
|  | Returns the z-translation by value.  |
|  |

  AffineTransformType
-------------------

    template<typename \_Scalar , int \_Dim>  

|  |
| --- |
| typedef [Transform](classeigen_1_1transform)<[Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21),Dim,[Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb)> [Eigen::Translation](classeigen_1_1translation)< \_Scalar, \_Dim >::[AffineTransformType](classeigen_1_1translation#a25c762409320ba9490a0d12c6652bbad) |

 
 corresponding affine transformation type 

    IsometryTransformType
---------------------

    template<typename \_Scalar , int \_Dim>  

|  |
| --- |
| typedef [Transform](classeigen_1_1transform)<[Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21),Dim,[Isometry](group__enums#ggaee59a86102f150923b0cac6d4ff05107a84413028615d2d718bafd2dfb93dafef)> [Eigen::Translation](classeigen_1_1translation)< \_Scalar, \_Dim >::[IsometryTransformType](classeigen_1_1translation#ad3ac890d85420ba78e16dab1983d1a80) |

 
 corresponding isometric transformation type 

    LinearMatrixType
----------------

    template<typename \_Scalar , int \_Dim>  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<[Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21),Dim,Dim> [Eigen::Translation](classeigen_1_1translation)< \_Scalar, \_Dim >::[LinearMatrixType](classeigen_1_1translation#ac5aca3bc67564e96ad550aba971de8b6) |

 
 corresponding linear transformation matrix type 

    Scalar
------

    template<typename \_Scalar , int \_Dim>  

|  |
| --- |
| typedef \_Scalar [Eigen::Translation](classeigen_1_1translation)< \_Scalar, \_Dim >::[Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21) |

 
 the scalar type of the coefficients 

    VectorType
----------

    template<typename \_Scalar , int \_Dim>  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<[Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21),Dim,1> [Eigen::Translation](classeigen_1_1translation)< \_Scalar, \_Dim >::[VectorType](classeigen_1_1translation#a339e17dfec5394ae563f62cca0df451f) |

 
 corresponding vector type 

    anonymous enum
--------------

    template<typename \_Scalar , int \_Dim>  

|  |
| --- |
| anonymous enum |

 
 dimension of the space 

    Translation() [1/3]
-------------------

    template<typename \_Scalar , int \_Dim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::Translation](classeigen_1_1translation)< \_Scalar, \_Dim >::[Translation](classeigen_1_1translation) | ( |  | ) |  |

 | inline |

 
 Default constructor without initialization. 

    Translation() [2/3]
-------------------

    template<typename \_Scalar , int \_Dim>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Translation](classeigen_1_1translation)< \_Scalar, \_Dim >::[Translation](classeigen_1_1translation) | ( | const [VectorType](classeigen_1_1translation#a339e17dfec5394ae563f62cca0df451f) &  | *vector* | ) |  |

 | inlineexplicit |

 
 Constructs and initialize the translation transformation from a vector of translation coefficients 

    Translation() [3/3]
-------------------

    template<typename \_Scalar , int \_Dim>   template<typename OtherScalarType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Translation](classeigen_1_1translation)< \_Scalar, \_Dim >::[Translation](classeigen_1_1translation) | ( | const [Translation](classeigen_1_1translation)< OtherScalarType, Dim > &  | *other* | ) |  |

 | inlineexplicit |

 
 Copy constructor with scalar type conversion 

    cast()
------

    template<typename \_Scalar , int \_Dim>   template<typename NewScalarType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::cast\_return\_type<[Translation](classeigen_1_1translation),[Translation](classeigen_1_1translation)<NewScalarType,Dim> >::type [Eigen::Translation](classeigen_1_1translation)< \_Scalar, \_Dim >::cast  | ( |  | ) |  const |

 | inline |

 
 
Returns

`*this` with scalar type casted to *NewScalarType* 
 Note that if *NewScalarType* is equal to the current scalar type of `*this` then this function smartly returns a const reference to `*this`. 

    inverse()
---------

    template<typename \_Scalar , int \_Dim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Translation](classeigen_1_1translation) [Eigen::Translation](classeigen_1_1translation)< \_Scalar, \_Dim >::inverse  | ( |  | ) |  const |

 | inline |

 
 
Returns
the inverse translation (opposite) 
    isApprox()
----------

    template<typename \_Scalar , int \_Dim>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::Translation](classeigen_1_1translation)< \_Scalar, \_Dim >::isApprox  | ( | const [Translation](classeigen_1_1translation)< \_Scalar, \_Dim > &  | *other*,  |
|  |  | const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21) >::Real &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21)>::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 
Returns

`true` if `*this` is approximately equal to *other*, within the precision determined by *prec*.
 
See also

[MatrixBase::isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) 
    operator\*() [1/6]
------------------

    template<typename Scalar , int Dim>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Translation](classeigen_1_1translation)< [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21), Dim >::[AffineTransformType](classeigen_1_1translation#a25c762409320ba9490a0d12c6652bbad) [Eigen::Translation](classeigen_1_1translation)< [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21), Dim >::operator\*  | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *linear* | ) |  const |

 | inline |

 
 Concatenates a translation and a linear transformation 

    operator\*() [2/6]
------------------

    template<typename \_Scalar , int \_Dim>   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| internal::enable\_if<Derived::IsVectorAtCompileTime,[VectorType](classeigen_1_1translation#a339e17dfec5394ae563f62cca0df451f)>::type [Eigen::Translation](classeigen_1_1translation)< \_Scalar, \_Dim >::operator\*  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *vec* | ) |  const |

 | inline |

 
 Applies translation to vector 

    operator\*() [3/6]
------------------

    template<typename \_Scalar , int \_Dim>   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [IsometryTransformType](classeigen_1_1translation#ad3ac890d85420ba78e16dab1983d1a80) [Eigen::Translation](classeigen_1_1translation)< \_Scalar, \_Dim >::operator\*  | ( | const [RotationBase](classeigen_1_1rotationbase)< Derived, Dim > &  | *r* | ) |  const |

 | inline |

 
 Concatenates a translation and a rotation 

    operator\*() [4/6]
------------------

    template<typename \_Scalar , int \_Dim>   template<int Mode, int Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)<[Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21),Dim,Mode> [Eigen::Translation](classeigen_1_1translation)< \_Scalar, \_Dim >::operator\*  | ( | const [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21), Dim, Mode, Options > &  | *t* | ) |  const |

 | inline |

 
 Concatenates a translation and a transformation 

    operator\*() [5/6]
------------------

    template<typename \_Scalar , int \_Dim>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Translation](classeigen_1_1translation) [Eigen::Translation](classeigen_1_1translation)< \_Scalar, \_Dim >::operator\*  | ( | const [Translation](classeigen_1_1translation)< \_Scalar, \_Dim > &  | *other* | ) |  const |

 | inline |

 
 Concatenates two translation 

    operator\*() [6/6]
------------------

    template<typename Scalar , int Dim>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Translation](classeigen_1_1translation)< [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21), Dim >::[AffineTransformType](classeigen_1_1translation#a25c762409320ba9490a0d12c6652bbad) [Eigen::Translation](classeigen_1_1translation)< [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21), Dim >::operator\*  | ( | const [UniformScaling](classeigen_1_1uniformscaling)< [Scalar](classeigen_1_1translation#ad596bf21ced4b902cc242205df486e21) > &  | *other* | ) |  const |

 | inline |

 
 Concatenates a translation and a uniform scaling 

   

---

The documentation for this class was generated from the following file:* [Translation.h](https://eigen.tuxfamily.org/dox/Translation_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Translation.html>

Geometry module
===============

  This module provides support for:


* fixed-size homogeneous transformations
* translation, scaling, 2D and 3D rotations
* [quaternions](classeigen_1_1quaternion)
* cross products ([MatrixBase::cross](group__geometry__module#ga0024b44eca99cb7135887c2aaf319d28), [MatrixBase::cross3](group__geometry__module#gabde56e2a0baba550815a0b05139e4d42))
* orthognal vector generation ([MatrixBase::unitOrthogonal](group__geometry__module#gaa0dc2c32a9379eeb2b4c4a05c1a6fe52))
* some linear components: [parametrized-lines](classeigen_1_1parametrizedline)  and [hyperplanes](classeigen_1_1hyperplane)
* [axis aligned bounding boxes](classeigen_1_1alignedbox)
* [least-square transformation fitting](group__geometry__module#gab3f5a82a24490b936f8694cf8fef8e60)

 
```
#include <Eigen/Geometry>

```
 

|  |
| --- |
|  |
|  | [Global aligned box typedefs](group__alignedboxtypedefs) |
|  |




|  |
| --- |
|  |
| class  | [Eigen::AlignedBox< \_Scalar, \_AmbientDim >](classeigen_1_1alignedbox) |
|  | An axis aligned box. [More...](classeigen_1_1alignedbox#details) |
|  |
| class  | [Eigen::AngleAxis< \_Scalar >](classeigen_1_1angleaxis) |
|  | Represents a 3D rotation as a rotation angle around an arbitrary 3D axis. [More...](classeigen_1_1angleaxis#details) |
|  |
| class  | [Eigen::Homogeneous< MatrixType, \_Direction >](classeigen_1_1homogeneous) |
|  | Expression of one (or a set of) homogeneous vector(s) [More...](classeigen_1_1homogeneous#details) |
|  |
| class  | [Eigen::Hyperplane< \_Scalar, \_AmbientDim, \_Options >](classeigen_1_1hyperplane) |
|  | A hyperplane. [More...](classeigen_1_1hyperplane#details) |
|  |
| class  | [Eigen::Map< const Quaternion< \_Scalar >, \_Options >](classeigen_1_1map_3_01const_01quaternion_3_01__scalar_01_4_00_01__options_01_4) |
|  | [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") expression mapping a constant memory buffer. [More...](classeigen_1_1map_3_01const_01quaternion_3_01__scalar_01_4_00_01__options_01_4#details) |
|  |
| class  | [Eigen::Map< Quaternion< \_Scalar >, \_Options >](classeigen_1_1map_3_01quaternion_3_01__scalar_01_4_00_01__options_01_4) |
|  | Expression of a quaternion from a memory buffer. [More...](classeigen_1_1map_3_01quaternion_3_01__scalar_01_4_00_01__options_01_4#details) |
|  |
| class  | [Eigen::ParametrizedLine< \_Scalar, \_AmbientDim, \_Options >](classeigen_1_1parametrizedline) |
|  | A parametrized line. [More...](classeigen_1_1parametrizedline#details) |
|  |
| class  | [Eigen::Quaternion< \_Scalar, \_Options >](classeigen_1_1quaternion) |
|  | The quaternion class used to represent 3D orientations and rotations. [More...](classeigen_1_1quaternion#details) |
|  |
| class  | [Eigen::QuaternionBase< Derived >](classeigen_1_1quaternionbase) |
|  | Base class for quaternion expressions. [More...](classeigen_1_1quaternionbase#details) |
|  |
| class  | [Eigen::Rotation2D< \_Scalar >](classeigen_1_1rotation2d) |
|  | Represents a rotation/orientation in a 2 dimensional space. [More...](classeigen_1_1rotation2d#details) |
|  |
| class  | [Eigen::Transform< \_Scalar, \_Dim, \_Mode, \_Options >](classeigen_1_1transform) |
|  | Represents an homogeneous transformation in a N dimensional space. [More...](classeigen_1_1transform#details) |
|  |
| class  | [Eigen::Translation< \_Scalar, \_Dim >](classeigen_1_1translation) |
|  | Represents a translation transformation. [More...](classeigen_1_1translation#details) |
|  |
| class  | [Eigen::UniformScaling< \_Scalar >](classeigen_1_1uniformscaling) |
|  | Represents a generic uniform scaling transformation. [More...](classeigen_1_1uniformscaling#details) |
|  |




|  |
| --- |
|  |
| typedef [AngleAxis](classeigen_1_1angleaxis)< double >  | [Eigen::AngleAxisd](group__geometry__module#gaed936d6e9192d97f00a9608081fa9b64) |
|  |
| typedef [AngleAxis](classeigen_1_1angleaxis)< float >  | [Eigen::AngleAxisf](group__geometry__module#gad823b9c674644b14d950fbfe165dfdbf) |
|  |
| typedef [Quaternion](classeigen_1_1quaternion)< double >  | [Eigen::Quaterniond](group__geometry__module#ga5daab8e66aa480465000308455578830) |
|  |
| typedef [Quaternion](classeigen_1_1quaternion)< float >  | [Eigen::Quaternionf](group__geometry__module#ga66aa915a26d698c60ed206818c3e4c9b) |
|  |
| typedef [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< double >, [Aligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ae12d0f8f869c40c76128260af2242bc8) >  | [Eigen::QuaternionMapAlignedd](group__geometry__module#ga4289f38cc6ecf302e07d2365abc6a902) |
|  |
| typedef [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< float >, [Aligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ae12d0f8f869c40c76128260af2242bc8) >  | [Eigen::QuaternionMapAlignedf](group__geometry__module#gadaf7f3ee984d9828ca94d66355f0b226) |
|  |
| typedef [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< double >, 0 >  | [Eigen::QuaternionMapd](group__geometry__module#ga89412d1dcf23537e5990dfb3089ace76) |
|  |
| typedef [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< float >, 0 >  | [Eigen::QuaternionMapf](group__geometry__module#ga867ff508ac860bdf7cab3b8a8fc1048d) |
|  |
| typedef [Rotation2D](classeigen_1_1rotation2d)< double >  | [Eigen::Rotation2Dd](group__geometry__module#gab7af1ccdfb6c865c27fe1fd6bd9e759f) |
|  |
| typedef [Rotation2D](classeigen_1_1rotation2d)< float >  | [Eigen::Rotation2Df](group__geometry__module#ga35e2cace3ada497794734edb8bc33b6e) |
|  |




|  |
| --- |
|  |
| template<typename OtherDerived >  |
| [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [Eigen::MatrixBase< Derived >::cross](group__geometry__module#ga0024b44eca99cb7135887c2aaf319d28) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| template<typename OtherDerived >  |
| const CrossReturnType  | [Eigen::VectorwiseOp< ExpressionType, Direction >::cross](group__geometry__module#ga2fe1a2a012ce0ab0e8da6af134073039) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| template<typename OtherDerived >  |
| [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [Eigen::MatrixBase< Derived >::cross3](group__geometry__module#gabde56e2a0baba550815a0b05139e4d42) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), 3, 1 >  | [Eigen::MatrixBase< Derived >::eulerAngles](group__geometry__module#ga17994d2e81b723295f5bc3b1f862ed3b) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) a0, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) a1, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) a2) const |
|  |
| const HNormalizedReturnType  | [Eigen::MatrixBase< Derived >::hnormalized](group__geometry__module#gadc0e3dd3510cb5a6e70aca9aab1cbf19) () const |
|  | homogeneous normalization [More...](group__geometry__module#gadc0e3dd3510cb5a6e70aca9aab1cbf19) |
|  |
| const [HNormalizedReturnType](classeigen_1_1cwisebinaryop) | [Eigen::VectorwiseOp< ExpressionType, Direction >::hnormalized](group__geometry__module#ga1f220045efa302626c287088b63b6ba9) () const |
|  | column or row-wise homogeneous normalization [More...](group__geometry__module#ga1f220045efa302626c287088b63b6ba9) |
|  |
| [HomogeneousReturnType](classeigen_1_1homogeneous) | [Eigen::MatrixBase< Derived >::homogeneous](group__geometry__module#gaf3229c2d3669e983075ab91f7f480cb1) () const |
|  |
| [HomogeneousReturnType](classeigen_1_1homogeneous) | [Eigen::VectorwiseOp< ExpressionType, Direction >::homogeneous](group__geometry__module#gaf99305a3d7432318236df7b80022df37) () const |
|  |
| template<typename Derived , typename OtherDerived >  |
| internal::umeyama\_transform\_matrix\_type< Derived, OtherDerived >::type  | [Eigen::umeyama](group__geometry__module#gab3f5a82a24490b936f8694cf8fef8e60) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &src, const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &dst, bool with\_scaling=true) |
|  | Returns the transformation between two point sets. [More...](group__geometry__module#gab3f5a82a24490b936f8694cf8fef8e60) |
|  |
| [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [Eigen::MatrixBase< Derived >::unitOrthogonal](group__geometry__module#gaa0dc2c32a9379eeb2b4c4a05c1a6fe52) (void) const |
|  |

  AngleAxisd
----------

   

|  |
| --- |
| typedef [AngleAxis](classeigen_1_1angleaxis)<double> [Eigen::AngleAxisd](group__geometry__module#gaed936d6e9192d97f00a9608081fa9b64) |

 
 double precision angle-axis type 

    AngleAxisf
----------

   

|  |
| --- |
| typedef [AngleAxis](classeigen_1_1angleaxis)<float> [Eigen::AngleAxisf](group__geometry__module#gad823b9c674644b14d950fbfe165dfdbf) |

 
 single precision angle-axis type 

    Quaterniond
-----------

   

|  |
| --- |
| typedef [Quaternion](classeigen_1_1quaternion)<double> [Eigen::Quaterniond](group__geometry__module#ga5daab8e66aa480465000308455578830) |

 
 double precision quaternion type 

    Quaternionf
-----------

   

|  |
| --- |
| typedef [Quaternion](classeigen_1_1quaternion)<float> [Eigen::Quaternionf](group__geometry__module#ga66aa915a26d698c60ed206818c3e4c9b) |

 
 single precision quaternion type 

    QuaternionMapAlignedd
---------------------

   

|  |
| --- |
| typedef [Map](classeigen_1_1map)<[Quaternion](classeigen_1_1quaternion)<double>, [Aligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ae12d0f8f869c40c76128260af2242bc8)> [Eigen::QuaternionMapAlignedd](group__geometry__module#ga4289f38cc6ecf302e07d2365abc6a902) |

 
 [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") a 16-byte aligned array of double precision scalars as a quaternion 

    QuaternionMapAlignedf
---------------------

   

|  |
| --- |
| typedef [Map](classeigen_1_1map)<[Quaternion](classeigen_1_1quaternion)<float>, [Aligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ae12d0f8f869c40c76128260af2242bc8)> [Eigen::QuaternionMapAlignedf](group__geometry__module#gadaf7f3ee984d9828ca94d66355f0b226) |

 
 [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") a 16-byte aligned array of single precision scalars as a quaternion 

    QuaternionMapd
--------------

   

|  |
| --- |
| typedef [Map](classeigen_1_1map)<[Quaternion](classeigen_1_1quaternion)<double>, 0> [Eigen::QuaternionMapd](group__geometry__module#ga89412d1dcf23537e5990dfb3089ace76) |

 
 [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") an unaligned array of double precision scalars as a quaternion 

    QuaternionMapf
--------------

   

|  |
| --- |
| typedef [Map](classeigen_1_1map)<[Quaternion](classeigen_1_1quaternion)<float>, 0> [Eigen::QuaternionMapf](group__geometry__module#ga867ff508ac860bdf7cab3b8a8fc1048d) |

 
 [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") an unaligned array of single precision scalars as a quaternion 

    Rotation2Dd
-----------

   

|  |
| --- |
| typedef [Rotation2D](classeigen_1_1rotation2d)<double> [Eigen::Rotation2Dd](group__geometry__module#gab7af1ccdfb6c865c27fe1fd6bd9e759f) |

 
 double precision 2D rotation type 

    Rotation2Df
-----------

   

|  |
| --- |
| typedef [Rotation2D](classeigen_1_1rotation2d)<float> [Eigen::Rotation2Df](group__geometry__module#ga35e2cace3ada497794734edb8bc33b6e) |

 
 single precision 2D rotation type 

    cross() [1/2]
-------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::cross  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Returns
the cross product of `*this` and *other* 
 Here is a very good explanation of cross-product: <http://xkcd.com/199/>

 With complex numbers, the cross product is implemented as \( (\mathbf{a}+i\mathbf{b}) \times (\mathbf{c}+i\mathbf{d}) = (\mathbf{a} \times \mathbf{c} - \mathbf{b} \times \mathbf{d}) - i(\mathbf{a} \times \mathbf{d} - \mathbf{b} \times \mathbf{c})\)

 
See also

[MatrixBase::cross3()](group__geometry__module#gabde56e2a0baba550815a0b05139e4d42) 
    cross() [2/2]
-------------

    template<typename ExpressionType , int Direction>   template<typename OtherDerived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::CrossReturnType [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::cross  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  const |

 
 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Returns
a matrix expression of the cross product of each column or row of the referenced expression with the *other* vector.
 The referenced matrix must have one dimension equal to 3. The result matrix has the same dimensions than the referenced one.

 
See also

[MatrixBase::cross()](group__geometry__module#ga0024b44eca99cb7135887c2aaf319d28) 
    cross3()
--------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::cross3  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Returns
the cross product of `*this` and *other* using only the x, y, and z coefficients
 The size of `*this` and *other* must be four. This function is especially useful when using 4D vectors instead of 3D ones to get advantage of SSE/AltiVec vectorization.

 
See also

[MatrixBase::cross()](group__geometry__module#ga0024b44eca99cb7135887c2aaf319d28) 
    eulerAngles()
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Matrix](classeigen_1_1matrix)< typename [MatrixBase](classeigen_1_1matrixbase)< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), 3, 1 > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::eulerAngles  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *a0*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *a1*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *a2* |
|  | ) |  |  const |

 | inline |

 
 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Returns
the Euler-angles of the rotation matrix `*this` using the convention defined by the triplet (*a0*,*a1*,*a2*)
 Each of the three parameters *a0*,*a1*,*a2* represents the respective rotation axis as an integer in {0,1,2}. For instance, in: 



```
Vector3f ea = mat.eulerAngles(2, 0, 2); 

```

 "2" represents the z axis and "0" the x axis, etc. The returned angles are such that we have the following equality: 



```
mat == [AngleAxisf](group__geometry__module#gad823b9c674644b14d950fbfe165dfdbf)(ea[0], [Vector3f::UnitZ](classeigen_1_1matrixbase#aabdcdeff1c822a5465fcbe1f78e5afe0)())
     * [AngleAxisf](group__geometry__module#gad823b9c674644b14d950fbfe165dfdbf)(ea[1], [Vector3f::UnitX](classeigen_1_1matrixbase#a8a555b7cf626cced54670b98668c4e6d)())
     * [AngleAxisf](group__geometry__module#gad823b9c674644b14d950fbfe165dfdbf)(ea[2], [Vector3f::UnitZ](classeigen_1_1matrixbase#aabdcdeff1c822a5465fcbe1f78e5afe0)()); 
```

 This corresponds to the right-multiply conventions (with right hand side frames).

 The returned angles are in the ranges [0:pi]x[-pi:pi]x[-pi:pi].

 
See also
class [AngleAxis](classeigen_1_1angleaxis "Represents a 3D rotation as a rotation angle around an arbitrary 3D axis.") 
    hnormalized() [1/2]
-------------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [MatrixBase](classeigen_1_1matrixbase)< Derived >::HNormalizedReturnType [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::hnormalized |

 | inline |

 
 homogeneous normalization 

 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Returns
a vector expression of the N-1 first coefficients of `*this` divided by that last coefficient.
 This can be used to convert homogeneous coordinates to affine coordinates.

 It is essentially a shortcut for: 



```
this->head(this->[size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)()-1)/this->[coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393)(this->[size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)()-1);
```

Example: 



```
Vector4d v = [Vector4d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
Projective3d P([Matrix4d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)());
cout << "v = " << v.transpose() << "]^T" << endl;
cout << "v.hnormalized() = " << v.hnormalized().transpose() << "]^T" << endl;
cout << "P\*v = " << (P*v).[transpose](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c)() << "]^T" << endl;
cout << "(P\*v).hnormalized() = " << (P*v).[hnormalized](group__geometry__module#gadc0e3dd3510cb5a6e70aca9aab1cbf19)().transpose() << "]^T" << endl;
```

 Output: 



```
v                   =   0.68 -0.211  0.566  0.597]^T
v.hnormalized()     =   1.14 -0.354  0.949]^T
P*v                 = 0.663 -0.16 -0.13  0.91]^T
(P*v).hnormalized() =  0.729 -0.176 -0.143]^T

```


See also

[VectorwiseOp::hnormalized()](group__geometry__module#ga1f220045efa302626c287088b63b6ba9 "column or row-wise homogeneous normalization") 
    hnormalized() [2/2]
-------------------

    template<typename ExpressionType , int Direction>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::[HNormalizedReturnType](classeigen_1_1cwisebinaryop) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::hnormalized |

 | inline |

 
 column or row-wise homogeneous normalization 

 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Returns
an expression of the first N-1 coefficients of each column (or row) of `*this` divided by the last coefficient of each column (or row).
 This can be used to convert homogeneous coordinates to affine coordinates.

 It is conceptually equivalent to calling [MatrixBase::hnormalized()](group__geometry__module#gadc0e3dd3510cb5a6e70aca9aab1cbf19 "homogeneous normalization") to each column (or row) of `*this`.

 Example: 



```
Matrix4Xd M = [Matrix4Xd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,5);
Projective3d P([Matrix4d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)());
cout << "The matrix M is:" << endl << M << endl << endl;
cout << "M.colwise().hnormalized():" << endl << M.colwise().hnormalized() << endl << endl;
cout << "P\*M:" << endl << P*M << endl << endl;
cout << "(P\*M).colwise().hnormalized():" << endl << (P*M).colwise().hnormalized() << endl << endl;

```

 Output: 



```
The matrix M is:
   0.68   0.823  -0.444   -0.27   0.271
 -0.211  -0.605   0.108  0.0268   0.435
  0.566   -0.33 -0.0452   0.904  -0.717
  0.597   0.536   0.258   0.832   0.214

M.colwise().hnormalized():
  1.14   1.53  -1.72 -0.325   1.27
-0.354  -1.13  0.419 0.0322   2.03
 0.949 -0.614 -0.175   1.09  -3.35

P*M:
  0.186  -0.589   0.369    1.33   -1.23
 -0.871  -0.337   0.127  -0.715   0.091
 -0.158 -0.0104   0.312   0.429  -0.478
  0.992   0.777  -0.373   0.468  -0.651

(P*M).colwise().hnormalized():
  0.188  -0.759  -0.989    2.85    1.89
 -0.877  -0.433  -0.342   -1.53   -0.14
  -0.16 -0.0134  -0.837   0.915   0.735


```


See also

[MatrixBase::hnormalized()](group__geometry__module#gadc0e3dd3510cb5a6e70aca9aab1cbf19 "homogeneous normalization") 
    homogeneous() [1/2]
-------------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::[HomogeneousReturnType](classeigen_1_1homogeneous) [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::homogeneous |

 | inline |

 
 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Returns
a vector expression that is one longer than the vector argument, with the value 1 symbolically appended as the last coefficient.
 This can be used to convert affine coordinates to homogeneous coordinates.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
Vector3d v = [Vector3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(), [w](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af683e04b3926aaf4091581ca24ca09ad);
Projective3d P([Matrix4d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)());
cout << "v = [" << v.transpose() << "]^T" << endl;
cout << "h.homogeneous() = [" << v.homogeneous().transpose() << "]^T" << endl;
cout << "(P \* v.homogeneous()) = [" << (P * v.homogeneous()).[transpose](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c)() << "]^T" << endl;
cout << "(P \* v.homogeneous()).hnormalized() = [" << (P * v.homogeneous()).[eval](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b)().hnormalized().transpose() << "]^T" << endl;
```

 Output: 



```
v                                   = [  0.68 -0.211  0.566]^T
h.homogeneous()                     = [  0.68 -0.211  0.566      1]^T
(P * v.homogeneous())               = [  1.27  0.772 0.0154 -0.419]^T
(P * v.homogeneous()).hnormalized() = [  -3.03   -1.84 -0.0367]^T

```


See also

[VectorwiseOp::homogeneous()](group__geometry__module#gaf99305a3d7432318236df7b80022df37), class [Homogeneous](classeigen_1_1homogeneous "Expression of one (or a set of) homogeneous vector(s)") 
    homogeneous() [2/2]
-------------------

    template<typename ExpressionType , int Direction>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [Homogeneous](classeigen_1_1homogeneous)< ExpressionType, Direction > [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::homogeneous |

 | inline |

 
 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Returns
an expression where the value 1 is symbolically appended as the final coefficient to each column (or row) of the matrix.
 This can be used to convert affine coordinates to homogeneous coordinates.

 Example: 



```
Matrix3Xd M = [Matrix3Xd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3,5);
Projective3d P([Matrix4d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)());
cout << "The matrix M is:" << endl << M << endl << endl;
cout << "M.colwise().homogeneous():" << endl << M.colwise().homogeneous() << endl << endl;
cout << "P \* M.colwise().homogeneous():" << endl << P * M.colwise().homogeneous() << endl << endl;
cout << "P \* M.colwise().homogeneous().hnormalized(): " << endl << (P * M.colwise().homogeneous()).colwise().hnormalized() << endl << endl;

```

 Output: 



```
The matrix M is:
   0.68   0.597   -0.33   0.108   -0.27
 -0.211   0.823   0.536 -0.0452  0.0268
  0.566  -0.605  -0.444   0.258   0.904

M.colwise().homogeneous():
   0.68   0.597   -0.33   0.108   -0.27
 -0.211   0.823   0.536 -0.0452  0.0268
  0.566  -0.605  -0.444   0.258   0.904
      1       1       1       1       1

P * M.colwise().homogeneous():
0.0832 -0.477  -1.21 -0.545 -0.452
 0.998  0.779  0.695  0.894  0.277
-0.271 -0.608 -0.895 -0.544 -0.874
-0.728 -0.551  0.202  -0.21 -0.469

P * M.colwise().homogeneous().hnormalized(): 
-0.114  0.866     -6    2.6  0.962
 -1.37  -1.41   3.44  -4.27 -0.591
 0.373    1.1  -4.43    2.6   1.86


```


See also

[MatrixBase::homogeneous()](group__geometry__module#gaf3229c2d3669e983075ab91f7f480cb1), class [Homogeneous](classeigen_1_1homogeneous "Expression of one (or a set of) homogeneous vector(s)") 
    umeyama()
---------

    template<typename Derived , typename OtherDerived >  

|  |  |  |  |
| --- | --- | --- | --- |
| internal::umeyama\_transform\_matrix\_type<Derived, OtherDerived>::type Eigen::umeyama  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *src*,  |
|  |  | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *dst*,  |
|  |  | bool  | *with\_scaling* = `true` |
|  | ) |  |  |

 
 Returns the transformation between two point sets. 

 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```

The algorithm is based on: "Least-squares estimation of transformation parameters between two point patterns", Shinji Umeyama, PAMI 1991, DOI: 10.1109/34.88573

 It estimates parameters \( c, \mathbf{R}, \) and \( \mathbf{t} \) such that 


 \begin{align\*} \frac{1}{n} \sum\_{i=1}^n \vert\vert y\_i - (c\mathbf{R}x\_i + \mathbf{t}) \vert\vert\_2^2 \end{align\*} 

  is minimized.

 The algorithm is based on the analysis of the covariance matrix \( \Sigma\_{\mathbf{x}\mathbf{y}} \in \mathbb{R}^{d \times d} \) of the input point sets \( \mathbf{x} \) and \( \mathbf{y} \) where \(d\) is corresponding to the dimension (which is typically small). The analysis is involving the SVD having a complexity of \(O(d^3)\) though the actual computational effort lies in the covariance matrix computation which has an asymptotic lower bound of \(O(dm)\) when the input point sets have dimension \(d \times m\).

 Currently the method is working only for floating point matrices.

 
Parameters
 

|  |  |
| --- | --- |
| src | Source points \( \mathbf{x} = \left( x\_1, \hdots, x\_n \right) \).  |
| dst | Destination points \( \mathbf{y} = \left( y\_1, \hdots, y\_n \right) \).  |
| with\_scaling | Sets \( c=1 \) when `false` is passed.  |

   
Returns
The homogeneous transformation  \begin{align\*} T = \begin{bmatrix} c\mathbf{R} & \mathbf{t} \\ \mathbf{0} & 1 \end{bmatrix} \end{align\*} 

 minimizing the residual above. This transformation is always returned as an [Eigen::Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."). 
    unitOrthogonal()
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::unitOrthogonal  | ( | void  |  | ) |  const |

 | inline |

 
 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Returns
a unit vector which is orthogonal to `*this` 
 The size of `*this` must be at least 2. If the size is exactly 2, then the returned vector is a counter clock wise rotation of `*this`, i.e., (-y,x).[normalized()](classeigen_1_1matrixbase#a5cf2fd4c57e59604fd4116158fd34308).

 
See also

[cross()](group__geometry__module#ga0024b44eca99cb7135887c2aaf319d28) 
    

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/group__Geometry__Module.html>

Eigen::Rotation2D
=================

  
### template<typename \_Scalar> class Eigen::Rotation2D< \_Scalar >

 Represents a rotation/orientation in a 2 dimensional space. 

 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the scalar type, i.e., the type of the coefficients |

   This class is equivalent to a single scalar representing a counter clock wise rotation as a single angle in radian. It provides some additional features such as the automatic conversion from/to a 2x2 rotation matrix. Moreover this class aims to provide a similar interface to [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") in order to facilitate the writing of generic algorithms dealing with rotations.

 
See also
class [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations."), class [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") 
     ![Inheritance graph]      

|  |
| --- |
|  |
| typedef \_Scalar  | [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) |
|  |
| - Public Types inherited from [Eigen::RotationBase< Rotation2D< \_Scalar >, 2 >](classeigen_1_1rotationbase) |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Dim >  | [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) |
|  |
| typedef internal::traits< [Rotation2D](classeigen_1_1rotation2d)< \_Scalar > >::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) |
|  |




|  |
| --- |
|  |
| [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) &  | [angle](classeigen_1_1rotation2d#ab3cde04b655d42682d1f79952f8ef2f8) () |
|  |
| [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) | [angle](classeigen_1_1rotation2d#ab1296dc7fcb23fdcd2c8e648e87d5d6a) () const |
|  |
| template<typename NewScalarType >  |
| internal::cast\_return\_type< [Rotation2D](classeigen_1_1rotation2d), [Rotation2D](classeigen_1_1rotation2d)< NewScalarType > >::type  | [cast](classeigen_1_1rotation2d#a66445e2faf7f98d535fd5a8bf0a974e1) () const |
|  |
| template<typename Derived >  |
| [Rotation2D](classeigen_1_1rotation2d)< [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) > &  | [fromRotationMatrix](classeigen_1_1rotation2d#a3e00ee4d983879c32d615b2a7153a26d) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &mat) |
|  |
| [Rotation2D](classeigen_1_1rotation2d) | [inverse](classeigen_1_1rotation2d#a5c01f57e3a382c7f677ac9ff3b95aea6) () const |
|  |
| bool  | [isApprox](classeigen_1_1rotation2d#a9c6889cb1a96ab8549effc94bfa06cd6) (const [Rotation2D](classeigen_1_1rotation2d) &other, const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) >::Real &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) >::dummy\_precision()) const |
|  |
| [Rotation2D](classeigen_1_1rotation2d) | [operator\*](classeigen_1_1rotation2d#adbfbf2d1ccdf50999bad7688348f4ac2) (const [Rotation2D](classeigen_1_1rotation2d) &other) const |
|  |
| [Vector2](classeigen_1_1matrix) | [operator\*](classeigen_1_1rotation2d#ad0ad69c781232313b7d01f981148f230) (const [Vector2](classeigen_1_1matrix) &vec) const |
|  |
| [Rotation2D](classeigen_1_1rotation2d) &  | [operator\*=](classeigen_1_1rotation2d#a84fd39c79d4ca547ef0ff6c3c1dfcfcb) (const [Rotation2D](classeigen_1_1rotation2d) &other) |
|  |
| template<typename Derived >  |
| [Rotation2D](classeigen_1_1rotation2d) &  | [operator=](classeigen_1_1rotation2d#a9d3da523c37f4ef0574f35fd7b3b9662) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &m) |
|  |
|  | [Rotation2D](classeigen_1_1rotation2d#a4628b82c613b7b85010afd45ea0477a2) () |
|  |
| template<typename Derived >  |
|  | [Rotation2D](classeigen_1_1rotation2d#a566207478cb88f9335c912d35913a0cd) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &m) |
|  |
| template<typename OtherScalarType >  |
|  | [Rotation2D](classeigen_1_1rotation2d#a3cae6e108a999fa1a4b358b3f467aa35) (const [Rotation2D](classeigen_1_1rotation2d)< OtherScalarType > &other) |
|  |
|  | [Rotation2D](classeigen_1_1rotation2d#afac7b8ec55325568e7c374df672d1eb1) (const [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) &a) |
|  |
| [Rotation2D](classeigen_1_1rotation2d) | [slerp](classeigen_1_1rotation2d#ab9ceb217d03c6a2a6438be37a3ccd855) (const [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) &t, const [Rotation2D](classeigen_1_1rotation2d) &other) const |
|  |
| [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) | [smallestAngle](classeigen_1_1rotation2d#ac648b9217d9f7ba4ee7a1a91aec8e46f) () const |
|  |
| [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) | [smallestPositiveAngle](classeigen_1_1rotation2d#a09c5195aa9a154551b2edf6ed4f22ab6) () const |
|  |
| [Matrix2](classeigen_1_1matrix) | [toRotationMatrix](classeigen_1_1rotation2d#a961167d84c8b9a989f2ba8609a6afcaf) () const |
|  |
| - Public Member Functions inherited from [Eigen::RotationBase< Rotation2D< \_Scalar >, 2 >](classeigen_1_1rotationbase) |
| [Rotation2D](classeigen_1_1rotation2d)< \_Scalar >  | [inverse](classeigen_1_1rotationbase#a8532fb716ea4267cf8bbdb99e5e54837) () const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [matrix](classeigen_1_1rotationbase#a91b5bdb1c7b90ec7b33107c6f7d3b171) () const |
|  |
| internal::rotation\_base\_generic\_product\_selector< [Rotation2D](classeigen_1_1rotation2d)< \_Scalar >, OtherDerived, OtherDerived::IsVectorAtCompileTime >::ReturnType  | [operator\*](classeigen_1_1rotationbase#a09a4757e7aff7a95bebf4fa8a965a4eb) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &e) const |
|  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Mode >  | [operator\*](classeigen_1_1rotationbase#aaca1c3d834e2bc7ebfd046d96cac990c) (const [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Mode, Options > &t) const |
|  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Isometry >  | [operator\*](classeigen_1_1rotationbase#a26d0603783666526a98d08bd45d9c751) (const [Translation](classeigen_1_1translation)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim > &t) const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [operator\*](classeigen_1_1rotationbase#a05af64a1bc759c5fed4ff7afd1414ba4) (const [UniformScaling](classeigen_1_1uniformscaling)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) > &s) const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [toRotationMatrix](classeigen_1_1rotationbase#a94fe3683c867c39d34505932b07e956a) () const |
|  |

  Scalar
------

    template<typename \_Scalar >  

|  |
| --- |
| typedef \_Scalar [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::[Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) |

 
 the scalar type of the coefficients 

    Rotation2D() [1/4]
------------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::[Rotation2D](classeigen_1_1rotation2d) | ( | const [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) &  | *a* | ) |  |

 | inlineexplicit |

 
 Construct a 2D counter clock wise rotation from the angle *a* in radian. 

    Rotation2D() [2/4]
------------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::[Rotation2D](classeigen_1_1rotation2d) | ( |  | ) |  |

 | inline |

 
 Default constructor wihtout initialization. The represented rotation is undefined. 

    Rotation2D() [3/4]
------------------

    template<typename \_Scalar >   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::[Rotation2D](classeigen_1_1rotation2d) | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *m* | ) |  |

 | inlineexplicit |

 
 Construct a 2D rotation from a 2x2 rotation matrix *mat*.

 
See also
fromRotationMatrix() 
    Rotation2D() [4/4]
------------------

    template<typename \_Scalar >   template<typename OtherScalarType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::[Rotation2D](classeigen_1_1rotation2d) | ( | const [Rotation2D](classeigen_1_1rotation2d)< OtherScalarType > &  | *other* | ) |  |

 | inlineexplicit |

 
 Copy constructor with scalar type conversion 

    angle() [1/2]
-------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4)& [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::angle  | ( |  | ) |  |

 | inline |

 
 
Returns
a read-write reference to the rotation angle 
    angle() [2/2]
-------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::angle  | ( |  | ) |  const |

 | inline |

 
 
Returns
the rotation angle 
    cast()
------

    template<typename \_Scalar >   template<typename NewScalarType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::cast\_return\_type<[Rotation2D](classeigen_1_1rotation2d),[Rotation2D](classeigen_1_1rotation2d)<NewScalarType> >::type [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::cast  | ( |  | ) |  const |

 | inline |

 
 
Returns

`*this` with scalar type casted to *NewScalarType* 
 Note that if *NewScalarType* is equal to the current scalar type of `*this` then this function smartly returns a const reference to `*this`. 

    fromRotationMatrix()
--------------------

    template<typename \_Scalar >   template<typename Derived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Rotation2D](classeigen_1_1rotation2d)<[Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4)>& [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::fromRotationMatrix  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *mat* | ) |  |

 
 Set `*this` from a 2x2 rotation matrix *mat*. In other words, this function extract the rotation angle from the rotation matrix. 

    inverse()
---------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Rotation2D](classeigen_1_1rotation2d) [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::inverse  | ( |  | ) |  const |

 | inline |

 
 
Returns
the inverse rotation 
    isApprox()
----------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::isApprox  | ( | const [Rotation2D](classeigen_1_1rotation2d)< \_Scalar > &  | *other*,  |
|  |  | const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) >::Real &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4)>::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 
Returns

`true` if `*this` is approximately equal to *other*, within the precision determined by *prec*.
 
See also

[MatrixBase::isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) 
    operator\*() [1/2]
------------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Rotation2D](classeigen_1_1rotation2d) [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::operator\*  | ( | const [Rotation2D](classeigen_1_1rotation2d)< \_Scalar > &  | *other* | ) |  const |

 | inline |

 
 Concatenates two rotations 

    operator\*() [2/2]
------------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Vector2](classeigen_1_1matrix) [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::operator\*  | ( | const [Vector2](classeigen_1_1matrix) &  | *vec* | ) |  const |

 | inline |

 
 Applies the rotation to a 2D vector 

    operator\*=()
-------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Rotation2D](classeigen_1_1rotation2d)& [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::operator\*=  | ( | const [Rotation2D](classeigen_1_1rotation2d)< \_Scalar > &  | *other* | ) |  |

 | inline |

 
 Concatenates two rotations 

    operator=()
-----------

    template<typename \_Scalar >   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Rotation2D](classeigen_1_1rotation2d)& [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::operator=  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *m* | ) |  |

 | inline |

 
 Set `*this` from a 2x2 rotation matrix *mat*. In other words, this function extract the rotation angle from the rotation matrix.

 This method is an alias for fromRotationMatrix()

 
See also
fromRotationMatrix() 
    slerp()
-------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Rotation2D](classeigen_1_1rotation2d) [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::slerp  | ( | const [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) &  | *t*,  |
|  |  | const [Rotation2D](classeigen_1_1rotation2d)< \_Scalar > &  | *other* |
|  | ) |  |  const |

 | inline |

 
 
Returns
the spherical interpolation between `*this` and *other* using parameter *t*. It is in fact equivalent to a linear interpolation. 
    smallestAngle()
---------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::smallestAngle  | ( |  | ) |  const |

 | inline |

 
 
Returns
the rotation angle in [-pi,pi] 
    smallestPositiveAngle()
-----------------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) [Eigen::Rotation2D](classeigen_1_1rotation2d)< \_Scalar >::smallestPositiveAngle  | ( |  | ) |  const |

 | inline |

 
 
Returns
the rotation angle in [0,2pi] 
    toRotationMatrix()
------------------

    template<typename Scalar >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Rotation2D](classeigen_1_1rotation2d)< [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) >::[Matrix2](classeigen_1_1matrix) [Eigen::Rotation2D](classeigen_1_1rotation2d)< [Scalar](classeigen_1_1rotation2d#ac20c665ece0f197a712a2a39ae72e4e4) >::toRotationMatrix  | ( | void  |  | ) |  const |

 
 Constructs and 



Returns
an equivalent 2x2 rotation matrix. 
   

---

The documentation for this class was generated from the following file:* [Rotation2D.h](https://eigen.tuxfamily.org/dox/Rotation2D_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Rotation2D.html>

Eigen::Quaternion
=================

  
### template<typename \_Scalar, int \_Options> class Eigen::Quaternion< \_Scalar, \_Options >

 The quaternion class used to represent 3D orientations and rotations. 

 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the scalar type, i.e., the type of the coefficients  |
| \_Options | controls the memory alignment of the coefficients. Can be # AutoAlign or # DontAlign. Default is AutoAlign. |

   This class represents a quaternion \( w+xi+yj+zk \) that is a convenient representation of orientations and rotations of objects in three dimensions. Compared to other representations like Euler angles or 3x3 matrices, quaternions offer the following advantages: 


* **compact** storage (4 scalars)
* **efficient** to compose (28 flops),
* **stable** spherical interpolation

 The following two typedefs are provided for convenience: 


* `Quaternionf` for `float`
* `Quaterniond` for `double`

 
Warning
Operations interpreting the quaternion as rotation have undefined behavior if the quaternion is not normalized.
 
See also
class [AngleAxis](classeigen_1_1angleaxis "Represents a 3D rotation as a rotation angle around an arbitrary 3D axis."), class [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
| template<typename Derived1 , typename Derived2 >  |
| [Quaternion](classeigen_1_1quaternion)< Scalar, Options >  | [FromTwoVectors](classeigen_1_1quaternion#acdb1eb44eb733b24749bc7892badde64) (const [MatrixBase](classeigen_1_1matrixbase)< Derived1 > &a, const [MatrixBase](classeigen_1_1matrixbase)< Derived2 > &b) |
|  |
|  | [Quaternion](classeigen_1_1quaternion#abf659c4044ea281b399ca2e3420d710a) () |
|  |
|  | [Quaternion](classeigen_1_1quaternion#a8a827dc86c80446a77eebba0e8a9e3e4) (const [AngleAxisType](classeigen_1_1angleaxis) &aa) |
|  |
| template<typename Derived >  |
|  | [Quaternion](classeigen_1_1quaternion#aba694e0bbafcf5554b77cfe8ce69c14a) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &other) |
|  |
| template<typename OtherScalar , int OtherOptions>  |
|  | [Quaternion](classeigen_1_1quaternion#a966673475496b60ea5ccdd0ed07249da) (const [Quaternion](classeigen_1_1quaternion)< OtherScalar, OtherOptions > &other) |
|  |
| template<class Derived >  |
|  | [Quaternion](classeigen_1_1quaternion#a1e8d6929381eca05005fa77e0bf92400) (const [QuaternionBase](classeigen_1_1quaternionbase)< Derived > &other) |
|  |
|  | [Quaternion](classeigen_1_1quaternion#ad30f4da9a2c0c8dd95520ee8a6d14ef6) (const Scalar &[w](classeigen_1_1quaternionbase#ab5eae91bedac0afaab0074cec5e535bc), const Scalar &[x](classeigen_1_1quaternionbase#afdd8e260d5de861a6136cb9e6ceaa4b4), const Scalar &[y](classeigen_1_1quaternionbase#aad37efca5d9fde3f4cb03a208f38d74f), const Scalar &[z](classeigen_1_1quaternionbase#a8389b65a61aa3fc76d3ba4bd4a63e529)) |
|  |
|  | [Quaternion](classeigen_1_1quaternion#af8c298da20d235d1c8029b73acbef6f9) (const Scalar \*data) |
|  |
| - Public Member Functions inherited from [Eigen::QuaternionBase< Quaternion< \_Scalar, \_Options > >](classeigen_1_1quaternionbase) |
| [Vector3](classeigen_1_1quaternionbase#a974c0529d55983b0b3a6d99a8466f331) | [\_transformVector](classeigen_1_1quaternionbase#aabef1f6fc62535f6f85d590108915ee8) (const [Vector3](classeigen_1_1quaternionbase#a974c0529d55983b0b3a6d99a8466f331) &v) const |
|  |
| internal::traits< [Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options > >::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [angularDistance](classeigen_1_1quaternionbase#a74f13d7c853484996494c26c633ae02a) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| internal::cast\_return\_type< [Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options >, [Quaternion](classeigen_1_1quaternion)< NewScalarType > >::type  | [cast](classeigen_1_1quaternionbase#a951d627764be63ca1e8c2c4c7315e43f) () const |
|  |
| internal::traits< [Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options > >::Coefficients &  | [coeffs](classeigen_1_1quaternionbase#ae61294790c0cc308d3f69690a657672c) () |
|  |
| const internal::traits< [Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options > >::Coefficients &  | [coeffs](classeigen_1_1quaternionbase#a193e79f616335a0067e3e784c7cf85fa) () const |
|  |
| [Quaternion](classeigen_1_1quaternion)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [conjugate](classeigen_1_1quaternionbase#a5e63b775d0a93161ce6137ec0a17f6b0) () const |
|  |
| [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [dot](classeigen_1_1quaternionbase#aa2d22c5b321c9539dd625ca415422236) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| [Quaternion](classeigen_1_1quaternion)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [inverse](classeigen_1_1quaternionbase#ab12ee41b3b06adc3062217a795a6a9f5) () const |
|  |
| bool  | [isApprox](classeigen_1_1quaternionbase#a64bc41c96a9e99567e0f8409f8f0f680) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >::dummy\_precision()) const |
|  |
| [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [norm](classeigen_1_1quaternionbase#aad4b1faef1eabdc7fdd4d305e9881149) () const |
|  |
| void  | [normalize](classeigen_1_1quaternionbase#a7a487a8a129b46be562f42044102c1f8) () |
|  |
| [Quaternion](classeigen_1_1quaternion)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [normalized](classeigen_1_1quaternionbase#ade799f18b7ec19c02ddae3a4921fa8a0) () const |
|  |
| bool  | [operator!=](classeigen_1_1quaternionbase#a530edf22f03853cd07ba829ea0d505dc) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| [Quaternion](classeigen_1_1quaternion)< typename internal::traits< [Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options > >::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [operator\*](classeigen_1_1quaternionbase#afdf1dc395c1cff6716ec9b80fd15b414) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| [Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options > &  | [operator\*=](classeigen_1_1quaternionbase#afd8ee6b6420fbdd22fab7cd016212441) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &q) |
|  |
| [Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options > &  | [operator=](classeigen_1_1quaternionbase#aa7c114c6e62a37d4fc53b6e82ed78eac) (const [AngleAxisType](classeigen_1_1quaternionbase#aed266c63b10a4028304901d9c8614199) &aa) |
|  |
| [Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options > &  | [operator=](classeigen_1_1quaternionbase#a20a6702c9da3fc2950178d920d0aaf84) (const [MatrixBase](classeigen_1_1matrixbase)< MatrixDerived > &xpr) |
|  |
| bool  | [operator==](classeigen_1_1quaternionbase#ad206c9014409c06970884dbfc00e6c3c) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| [Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options > &  | [setFromTwoVectors](classeigen_1_1quaternionbase#a7ae84bfbcc9f3f19f10294496a836bee) (const [MatrixBase](classeigen_1_1matrixbase)< Derived1 > &a, const [MatrixBase](classeigen_1_1matrixbase)< Derived2 > &b) |
|  |
| [QuaternionBase](classeigen_1_1quaternionbase) &  | [setIdentity](classeigen_1_1quaternionbase#a4695b0f6eebfb217ae2fbd579ceda24a) () |
|  |
| [Quaternion](classeigen_1_1quaternion)< typename internal::traits< [Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options > >::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [slerp](classeigen_1_1quaternionbase#ac840bde67d22f2deca330561c65d144e) (const [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) &t, const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [squaredNorm](classeigen_1_1quaternionbase#a09730db4ef0b546f5cf29f6b180b3c87) () const |
|  |
| [Matrix3](classeigen_1_1quaternionbase#ac3972e6cb0f56cccbe9e3946a7e494f8) | [toRotationMatrix](classeigen_1_1quaternionbase#a8cf07ab9875baba2eecdd62ff93bfc3f) () const |
|  |
| [VectorBlock](classeigen_1_1vectorblock)< Coefficients, 3 >  | [vec](classeigen_1_1quaternionbase#a91f93bde88f52796cfcd92c3594f39e5) () |
|  |
| const [VectorBlock](classeigen_1_1vectorblock)< const Coefficients, 3 >  | [vec](classeigen_1_1quaternionbase#ada8bdb403471df23511bdc0f227962ea) () const |
|  |
| NonConstCoeffReturnType  | [w](classeigen_1_1quaternionbase#ad884cf20a0b0b92bb63ab3fe9d6d6b7f) () |
|  |
| CoeffReturnType  | [w](classeigen_1_1quaternionbase#ab5eae91bedac0afaab0074cec5e535bc) () const |
|  |
| NonConstCoeffReturnType  | [x](classeigen_1_1quaternionbase#a8b05bac2a1c099b341396f725e85f3b1) () |
|  |
| CoeffReturnType  | [x](classeigen_1_1quaternionbase#afdd8e260d5de861a6136cb9e6ceaa4b4) () const |
|  |
| NonConstCoeffReturnType  | [y](classeigen_1_1quaternionbase#a6005245a72520df258d30af6b5448595) () |
|  |
| CoeffReturnType  | [y](classeigen_1_1quaternionbase#aad37efca5d9fde3f4cb03a208f38d74f) () const |
|  |
| NonConstCoeffReturnType  | [z](classeigen_1_1quaternionbase#a9afed6a7fa4fcdfbe599d7b5b207fc1b) () |
|  |
| CoeffReturnType  | [z](classeigen_1_1quaternionbase#a8389b65a61aa3fc76d3ba4bd4a63e529) () const |
|  |
| - Public Member Functions inherited from [Eigen::RotationBase< Derived, \_Dim >](classeigen_1_1rotationbase) |
| Derived  | [inverse](classeigen_1_1rotationbase#a8532fb716ea4267cf8bbdb99e5e54837) () const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [matrix](classeigen_1_1rotationbase#a91b5bdb1c7b90ec7b33107c6f7d3b171) () const |
|  |
| template<typename OtherDerived >  |
| internal::rotation\_base\_generic\_product\_selector< Derived, OtherDerived, OtherDerived::IsVectorAtCompileTime >::ReturnType  | [operator\*](classeigen_1_1rotationbase#a09a4757e7aff7a95bebf4fa8a965a4eb) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &e) const |
|  |
| template<int Mode, int Options>  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Mode >  | [operator\*](classeigen_1_1rotationbase#aaca1c3d834e2bc7ebfd046d96cac990c) (const [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Mode, Options > &t) const |
|  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, [Isometry](group__enums#ggaee59a86102f150923b0cac6d4ff05107a84413028615d2d718bafd2dfb93dafef) >  | [operator\*](classeigen_1_1rotationbase#a26d0603783666526a98d08bd45d9c751) (const [Translation](classeigen_1_1translation)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim > &t) const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [operator\*](classeigen_1_1rotationbase#a05af64a1bc759c5fed4ff7afd1414ba4) (const [UniformScaling](classeigen_1_1uniformscaling)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) > &s) const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [toRotationMatrix](classeigen_1_1rotationbase#a94fe3683c867c39d34505932b07e956a) () const |
|  |




|  |
| --- |
|  |
| static [Quaternion](classeigen_1_1quaternion) | [UnitRandom](classeigen_1_1quaternion#a7da87cda5567ff1e860782d638643868) () |
|  |
| - Static Public Member Functions inherited from [Eigen::QuaternionBase< Quaternion< \_Scalar, \_Options > >](classeigen_1_1quaternionbase) |
| static [Quaternion](classeigen_1_1quaternion)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [Identity](classeigen_1_1quaternionbase#a6f31a6f98016f186515b3277f4757962) () |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::QuaternionBase< Quaternion< \_Scalar, \_Options > >](classeigen_1_1quaternionbase) |
| typedef [AngleAxis](classeigen_1_1angleaxis)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [AngleAxisType](classeigen_1_1quaternionbase#aed266c63b10a4028304901d9c8614199) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), 3, 3 >  | [Matrix3](classeigen_1_1quaternionbase#ac3972e6cb0f56cccbe9e3946a7e494f8) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), 3, 1 >  | [Vector3](classeigen_1_1quaternionbase#a974c0529d55983b0b3a6d99a8466f331) |
|  |
| - Public Types inherited from [Eigen::RotationBase< Derived, \_Dim >](classeigen_1_1rotationbase) |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Dim >  | [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) |
|  |
| typedef internal::traits< Derived >::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) |
|  |

  Quaternion() [1/7]
------------------

    template<typename \_Scalar , int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options >::[Quaternion](classeigen_1_1quaternion) | ( |  | ) |  |

 | inline |

 
 Default constructor leaving the quaternion uninitialized. 

    Quaternion() [2/7]
------------------

    template<typename \_Scalar , int \_Options>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options >::[Quaternion](classeigen_1_1quaternion) | ( | const Scalar &  | *w*,  |
|  |  | const Scalar &  | *x*,  |
|  |  | const Scalar &  | *y*,  |
|  |  | const Scalar &  | *z* |
|  | ) |  |  |

 | inline |

 
 Constructs and initializes the quaternion \( w+xi+yj+zk \) from its four coefficients *w*, *x*, *y* and *z*.

 
Warning
Note the order of the arguments: the real *w* coefficient first, while internally the coefficients are stored in the following order: [`x`, `y`, `z`, `w`] 
    Quaternion() [3/7]
------------------

    template<typename \_Scalar , int \_Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options >::[Quaternion](classeigen_1_1quaternion) | ( | const Scalar \*  | *data* | ) |  |

 | inlineexplicit |

 
 Constructs and initialize a quaternion from the array data 

    Quaternion() [4/7]
------------------

    template<typename \_Scalar , int \_Options>   template<class Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options >::[Quaternion](classeigen_1_1quaternion) | ( | const [QuaternionBase](classeigen_1_1quaternionbase)< Derived > &  | *other* | ) |  |

 | inline |

 
 Copy constructor 

    Quaternion() [5/7]
------------------

    template<typename \_Scalar , int \_Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options >::[Quaternion](classeigen_1_1quaternion) | ( | const [AngleAxisType](classeigen_1_1angleaxis) &  | *aa* | ) |  |

 | inlineexplicit |

 
 Constructs and initializes a quaternion from the angle-axis *aa* 

    Quaternion() [6/7]
------------------

    template<typename \_Scalar , int \_Options>   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options >::[Quaternion](classeigen_1_1quaternion) | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *other* | ) |  |

 | inlineexplicit |

 
 Constructs and initializes a quaternion from either:


* a rotation matrix expression,
* a 4D vector expression representing quaternion coefficients.

    Quaternion() [7/7]
------------------

    template<typename \_Scalar , int \_Options>   template<typename OtherScalar , int OtherOptions>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options >::[Quaternion](classeigen_1_1quaternion) | ( | const [Quaternion](classeigen_1_1quaternion)< OtherScalar, OtherOptions > &  | *other* | ) |  |

 | inlineexplicit |

 
 Explicit copy constructor with scalar conversion 

    FromTwoVectors()
----------------

    template<typename \_Scalar , int \_Options>   template<typename Derived1 , typename Derived2 >  

|  |  |  |  |
| --- | --- | --- | --- |
| [Quaternion](classeigen_1_1quaternion)<Scalar,Options> [Eigen::Quaternion](classeigen_1_1quaternion)< \_Scalar, \_Options >::FromTwoVectors  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived1 > &  | *a*,  |
|  |  | const [MatrixBase](classeigen_1_1matrixbase)< Derived2 > &  | *b* |
|  | ) |  |  |

 
 Returns a quaternion representing a rotation between the two arbitrary vectors *a* and *b*. In other words, the built rotation represent a rotation sending the line of direction *a* to the line of direction *b*, both lines passing through the origin.

 
Returns
resulting quaternion
 Note that the two input vectors do **not** have to be normalized, and do not need to have the same norm. 

    UnitRandom()
------------

    template<typename Scalar , int Options>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [Quaternion](classeigen_1_1quaternion)< Scalar, Options > [Eigen::Quaternion](classeigen_1_1quaternion)< Scalar, Options >::UnitRandom |

 | static |

 
 
Returns
a random unit quaternion following a uniform distribution law on SO(3)
 
Note
The implementation is based on <http://planning.cs.uiuc.edu/node198.html> 
   

---

The documentation for this class was generated from the following file:* [Quaternion.h](https://eigen.tuxfamily.org/dox/Quaternion_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Quaternion.html>

Eigen::AngleAxis
================

  
### template<typename \_Scalar> class Eigen::AngleAxis< \_Scalar >

 Represents a 3D rotation as a rotation angle around an arbitrary 3D axis. 

 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the scalar type, i.e., the type of the coefficients. |

   
Warning
When setting up an [AngleAxis](classeigen_1_1angleaxis "Represents a 3D rotation as a rotation angle around an arbitrary 3D axis.") object, the axis vector **must** **be** **normalized**.
 The following two typedefs are provided for convenience: 


* `AngleAxisf` for `float`
* `AngleAxisd` for `double`

 Combined with [MatrixBase::Unit](classeigen_1_1matrixbase#ac7a03a61014f37ddd2fe61ebac0c9539){X,Y,Z}, [AngleAxis](classeigen_1_1angleaxis "Represents a 3D rotation as a rotation angle around an arbitrary 3D axis.") can be used to easily mimic Euler-angles. Here is an example: 



```
Matrix3f m;
m = [AngleAxisf](group__geometry__module#gad823b9c674644b14d950fbfe165dfdbf)(0.25*M_PI, [Vector3f::UnitX](classeigen_1_1matrixbase#a8a555b7cf626cced54670b98668c4e6d)())
  * [AngleAxisf](group__geometry__module#gad823b9c674644b14d950fbfe165dfdbf)(0.5*M_PI,  [Vector3f::UnitY](classeigen_1_1matrixbase#a00850083489e20249b1d05b394fc5efc)())
  * [AngleAxisf](group__geometry__module#gad823b9c674644b14d950fbfe165dfdbf)(0.33*M_PI, [Vector3f::UnitZ](classeigen_1_1matrixbase#aabdcdeff1c822a5465fcbe1f78e5afe0)());
cout << m << endl << "is unitary: " << m.isUnitary() << endl;
```

 Output: 



```
1.19e-07        0        1
   0.969   -0.249        0
   0.249    0.969 1.19e-07
is unitary: 1

```


Note
This class is not aimed to be used to store a rotation transformation, but rather to make easier the creation of other rotation ([Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations."), rotation [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.")) and transformation objects.
 
See also
class [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations."), class [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space."), [MatrixBase::UnitX()](classeigen_1_1matrixbase#a8a555b7cf626cced54670b98668c4e6d) 
     ![Inheritance graph]      

|  |
| --- |
|  |
| typedef \_Scalar  | [Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8) |
|  |
| - Public Types inherited from [Eigen::RotationBase< AngleAxis< \_Scalar >, 3 >](classeigen_1_1rotationbase) |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Dim >  | [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) |
|  |
| typedef internal::traits< [AngleAxis](classeigen_1_1angleaxis)< \_Scalar > >::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) |
|  |




|  |
| --- |
|  |
| [Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8) &  | [angle](classeigen_1_1angleaxis#a5bcd8f21aa18b629e2b5c64d03caeb96) () |
|  |
| [Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8) | [angle](classeigen_1_1angleaxis#a5c9671c47a3b26c2b585042f42426d7e) () const |
|  |
|  | [AngleAxis](classeigen_1_1angleaxis#a08752eea5e7762f2585fbd8136dc7b4b) () |
|  |
| template<typename OtherScalarType >  |
|  | [AngleAxis](classeigen_1_1angleaxis#a7c6bdf26fc162c6423d7cff097a9a00e) (const [AngleAxis](classeigen_1_1angleaxis)< OtherScalarType > &other) |
|  |
| template<typename Derived >  |
|  | [AngleAxis](classeigen_1_1angleaxis#a2e6eee34f611e4c762fdd4e4bc5935e6) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &m) |
|  |
| template<typename QuatDerived >  |
|  | [AngleAxis](classeigen_1_1angleaxis#af3476809863b6a0dfe17f49a3dcc6530) (const [QuaternionBase](classeigen_1_1quaternionbase)< QuatDerived > &q) |
|  |
| template<typename Derived >  |
|  | [AngleAxis](classeigen_1_1angleaxis#ab58bae23f0af86d66d8aa1dc5c1dbe39) (const [Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8) &[angle](classeigen_1_1angleaxis#a5c9671c47a3b26c2b585042f42426d7e), const [MatrixBase](classeigen_1_1matrixbase)< Derived > &[axis](classeigen_1_1angleaxis#aeb281dd2ac2332c876da30ee708f15fe)) |
|  |
| [Vector3](classeigen_1_1matrix) &  | [axis](classeigen_1_1angleaxis#a6fe6a68ebe395dd43953592813cdeee5) () |
|  |
| const [Vector3](classeigen_1_1matrix) &  | [axis](classeigen_1_1angleaxis#aeb281dd2ac2332c876da30ee708f15fe) () const |
|  |
| template<typename NewScalarType >  |
| internal::cast\_return\_type< [AngleAxis](classeigen_1_1angleaxis), [AngleAxis](classeigen_1_1angleaxis)< NewScalarType > >::type  | [cast](classeigen_1_1angleaxis#a566d3231bd0e209469ab8ee37aada6a4) () const |
|  |
|  template<typename Derived >  |
| [AngleAxis](classeigen_1_1angleaxis)< [Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8) > &  | [fromRotationMatrix](classeigen_1_1angleaxis#a2e35689645f69ba886df1a0a14b76ffe) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &mat) |
|  | Sets `*this` from a 3x3 rotation matrix.  |
|  |
| [AngleAxis](classeigen_1_1angleaxis) | [inverse](classeigen_1_1angleaxis#af01cf54d9e86fe12b41a4b7f70d06c2b) () const |
|  |
| bool  | [isApprox](classeigen_1_1angleaxis#ac0f2fe0856dedd6f46891a70ec9f402d) (const [AngleAxis](classeigen_1_1angleaxis) &other, const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8) >::Real &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8) >::dummy\_precision()) const |
|  |
| [QuaternionType](classeigen_1_1quaternion) | [operator\*](classeigen_1_1angleaxis#ad0a428546d0ff7ed06cca4c4a1e4522a) (const [AngleAxis](classeigen_1_1angleaxis) &other) const |
|  |
| [QuaternionType](classeigen_1_1quaternion) | [operator\*](classeigen_1_1angleaxis#a36fa315e0326beacbf249b56fcd0596e) (const [QuaternionType](classeigen_1_1quaternion) &other) const |
|  |
| template<typename Derived >  |
| [AngleAxis](classeigen_1_1angleaxis)< [Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8) > &  | [operator=](classeigen_1_1angleaxis#a61747e22cfd8bd36456de2deed877fca) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &mat) |
|  |
| template<typename QuatDerived >  |
| [AngleAxis](classeigen_1_1angleaxis)< [Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8) > &  | [operator=](classeigen_1_1angleaxis#aa79ba9655d1b8fe12d75082902cea88b) (const [QuaternionBase](classeigen_1_1quaternionbase)< QuatDerived > &q) |
|  |
| [Matrix3](classeigen_1_1matrix) | [toRotationMatrix](classeigen_1_1angleaxis#ad333c1b13aa0fa01d7fab30f18d2cd46) (void) const |
|  |
| - Public Member Functions inherited from [Eigen::RotationBase< AngleAxis< \_Scalar >, 3 >](classeigen_1_1rotationbase) |
| [AngleAxis](classeigen_1_1angleaxis)< \_Scalar >  | [inverse](classeigen_1_1rotationbase#a8532fb716ea4267cf8bbdb99e5e54837) () const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [matrix](classeigen_1_1rotationbase#a91b5bdb1c7b90ec7b33107c6f7d3b171) () const |
|  |
| internal::rotation\_base\_generic\_product\_selector< [AngleAxis](classeigen_1_1angleaxis)< \_Scalar >, OtherDerived, OtherDerived::IsVectorAtCompileTime >::ReturnType  | [operator\*](classeigen_1_1rotationbase#a09a4757e7aff7a95bebf4fa8a965a4eb) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &e) const |
|  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Mode >  | [operator\*](classeigen_1_1rotationbase#aaca1c3d834e2bc7ebfd046d96cac990c) (const [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Mode, Options > &t) const |
|  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Isometry >  | [operator\*](classeigen_1_1rotationbase#a26d0603783666526a98d08bd45d9c751) (const [Translation](classeigen_1_1translation)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim > &t) const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [operator\*](classeigen_1_1rotationbase#a05af64a1bc759c5fed4ff7afd1414ba4) (const [UniformScaling](classeigen_1_1uniformscaling)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) > &s) const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [toRotationMatrix](classeigen_1_1rotationbase#a94fe3683c867c39d34505932b07e956a) () const |
|  |

  Scalar
------

    template<typename \_Scalar >  

|  |
| --- |
| typedef \_Scalar [Eigen::AngleAxis](classeigen_1_1angleaxis)< \_Scalar >::[Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8) |

 
 the scalar type of the coefficients 

    AngleAxis() [1/5]
-----------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::AngleAxis](classeigen_1_1angleaxis)< \_Scalar >::[AngleAxis](classeigen_1_1angleaxis) | ( |  | ) |  |

 | inline |

 
 Default constructor without initialization. 

    AngleAxis() [2/5]
-----------------

    template<typename \_Scalar >   template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::AngleAxis](classeigen_1_1angleaxis)< \_Scalar >::[AngleAxis](classeigen_1_1angleaxis) | ( | const [Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8) &  | *angle*,  |
|  |  | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *axis* |
|  | ) |  |  |

 | inline |

 
 Constructs and initialize the angle-axis rotation from an *angle* in radian and an *axis* which **must** **be** **normalized**.

 
Warning
If the *axis* vector is not normalized, then the angle-axis object represents an invalid rotation. 
    AngleAxis() [3/5]
-----------------

    template<typename \_Scalar >   template<typename QuatDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::AngleAxis](classeigen_1_1angleaxis)< \_Scalar >::[AngleAxis](classeigen_1_1angleaxis) | ( | const [QuaternionBase](classeigen_1_1quaternionbase)< QuatDerived > &  | *q* | ) |  |

 | inlineexplicit |

 
 Constructs and initialize the angle-axis rotation from a quaternion *q*. This function implicitly normalizes the quaternion *q*. 

    AngleAxis() [4/5]
-----------------

    template<typename \_Scalar >   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::AngleAxis](classeigen_1_1angleaxis)< \_Scalar >::[AngleAxis](classeigen_1_1angleaxis) | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *m* | ) |  |

 | inlineexplicit |

 
 Constructs and initialize the angle-axis rotation from a 3x3 rotation matrix. 

    AngleAxis() [5/5]
-----------------

    template<typename \_Scalar >   template<typename OtherScalarType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::AngleAxis](classeigen_1_1angleaxis)< \_Scalar >::[AngleAxis](classeigen_1_1angleaxis) | ( | const [AngleAxis](classeigen_1_1angleaxis)< OtherScalarType > &  | *other* | ) |  |

 | inlineexplicit |

 
 Copy constructor with scalar type conversion 

    angle() [1/2]
-------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8)& [Eigen::AngleAxis](classeigen_1_1angleaxis)< \_Scalar >::angle  | ( |  | ) |  |

 | inline |

 
 
Returns
a read-write reference to the stored angle in radian 
    angle() [2/2]
-------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8) [Eigen::AngleAxis](classeigen_1_1angleaxis)< \_Scalar >::angle  | ( |  | ) |  const |

 | inline |

 
 
Returns
the value of the rotation angle in radian 
    axis() [1/2]
------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Vector3](classeigen_1_1matrix)& [Eigen::AngleAxis](classeigen_1_1angleaxis)< \_Scalar >::axis  | ( |  | ) |  |

 | inline |

 
 
Returns
a read-write reference to the stored rotation axis.
 
Warning
The rotation axis must remain a **unit** vector. 
    axis() [2/2]
------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [Vector3](classeigen_1_1matrix)& [Eigen::AngleAxis](classeigen_1_1angleaxis)< \_Scalar >::axis  | ( |  | ) |  const |

 | inline |

 
 
Returns
the rotation axis 
    cast()
------

    template<typename \_Scalar >   template<typename NewScalarType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::cast\_return\_type<[AngleAxis](classeigen_1_1angleaxis),[AngleAxis](classeigen_1_1angleaxis)<NewScalarType> >::type [Eigen::AngleAxis](classeigen_1_1angleaxis)< \_Scalar >::cast  | ( |  | ) |  const |

 | inline |

 
 
Returns

`*this` with scalar type casted to *NewScalarType* 
 Note that if *NewScalarType* is equal to the current scalar type of `*this` then this function smartly returns a const reference to `*this`. 

    inverse()
---------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [AngleAxis](classeigen_1_1angleaxis) [Eigen::AngleAxis](classeigen_1_1angleaxis)< \_Scalar >::inverse  | ( |  | ) |  const |

 | inline |

 
 
Returns
the inverse rotation, i.e., an angle-axis with opposite rotation angle 
    isApprox()
----------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::AngleAxis](classeigen_1_1angleaxis)< \_Scalar >::isApprox  | ( | const [AngleAxis](classeigen_1_1angleaxis)< \_Scalar > &  | *other*,  |
|  |  | const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8) >::Real &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8)>::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 
Returns

`true` if `*this` is approximately equal to *other*, within the precision determined by *prec*.
 
See also

[MatrixBase::isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) 
    operator\*() [1/2]
------------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [QuaternionType](classeigen_1_1quaternion) [Eigen::AngleAxis](classeigen_1_1angleaxis)< \_Scalar >::operator\*  | ( | const [AngleAxis](classeigen_1_1angleaxis)< \_Scalar > &  | *other* | ) |  const |

 | inline |

 
 Concatenates two rotations 

    operator\*() [2/2]
------------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [QuaternionType](classeigen_1_1quaternion) [Eigen::AngleAxis](classeigen_1_1angleaxis)< \_Scalar >::operator\*  | ( | const [QuaternionType](classeigen_1_1quaternion) &  | *other* | ) |  const |

 | inline |

 
 Concatenates two rotations 

    operator=() [1/2]
-----------------

    template<typename \_Scalar >   template<typename Derived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [AngleAxis](classeigen_1_1angleaxis)<[Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8)>& [Eigen::AngleAxis](classeigen_1_1angleaxis)< \_Scalar >::operator=  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *mat* | ) |  |

 
 Set `*this` from a 3x3 rotation matrix *mat*. 

    operator=() [2/2]
-----------------

    template<typename \_Scalar >   template<typename QuatDerived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [AngleAxis](classeigen_1_1angleaxis)<[Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8)>& [Eigen::AngleAxis](classeigen_1_1angleaxis)< \_Scalar >::operator=  | ( | const [QuaternionBase](classeigen_1_1quaternionbase)< QuatDerived > &  | *q* | ) |  |

 
 Set `*this` from a **unit** quaternion.

 The resulting axis is normalized, and the computed angle is in the [0,pi] range.

 This function implicitly normalizes the quaternion *q*. 

    toRotationMatrix()
------------------

    template<typename Scalar >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [AngleAxis](classeigen_1_1angleaxis)< [Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8) >::[Matrix3](classeigen_1_1matrix) [Eigen::AngleAxis](classeigen_1_1angleaxis)< [Scalar](classeigen_1_1angleaxis#acd9b10692d7d726b28670e4d3a282fe8) >::toRotationMatrix  | ( | void  |  | ) |  const |

 
 Constructs and 



Returns
an equivalent 3x3 rotation matrix. 
   

---

The documentation for this class was generated from the following file:* [AngleAxis.h](https://eigen.tuxfamily.org/dox/AngleAxis_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1AngleAxis.html>

Eigen::FullPivLU
================

  
### template<typename \_MatrixType> class Eigen::FullPivLU< \_MatrixType >

 LU decomposition of a matrix with complete pivoting, and related features. 

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which we are computing the LU decomposition |

   This class represents a LU decomposition of any matrix, with complete pivoting: the matrix A is decomposed as \( A = P^{-1} L U Q^{-1} \) where L is unit-lower-triangular, U is upper-triangular, and P and Q are permutation matrices. This is a rank-revealing LU decomposition. The eigenvalues (diagonal coefficients) of U are sorted in such a way that any zeros are at the end.

 This decomposition provides the generic approach to solving systems of linear equations, computing the rank, invertibility, inverse, kernel, and determinant.

 This LU decomposition is very stable and well tested with large matrices. However there are use cases where the SVD decomposition is inherently more stable and/or flexible. For example, when computing the kernel of a matrix, working with the SVD allows to select the smallest singular values of the matrix, something that the LU decomposition doesn't see.

 The data of the LU decomposition can be directly accessed through the methods [matrixLU()](classeigen_1_1fullpivlu#afea0b8fc707a9097d46fe358cb18bbff), [permutationP()](classeigen_1_1fullpivlu#ad8f1d7266a434c524d3e0dbcc7a0f588), [permutationQ()](classeigen_1_1fullpivlu#a8d18190c7618de271cba7293f0493a36).

 As an example, here is how the original matrix can be retrieved: 



```
typedef Matrix<double, 5, 3> Matrix5x3;
typedef Matrix<double, 5, 5> Matrix5x5;
Matrix5x3 m = Matrix5x3::Random();
cout << "Here is the matrix m:" << endl << m << endl;
[Eigen::FullPivLU<Matrix5x3>](classeigen_1_1fullpivlu) lu(m);
cout << "Here is, up to permutations, its LU decomposition matrix:"
     << endl << lu.matrixLU() << endl;
cout << "Here is the L part:" << endl;
Matrix5x5 l = Matrix5x5::Identity();
l.block<5,3>(0,0).triangularView<StrictlyLower>() = lu.matrixLU();
cout << l << endl;
cout << "Here is the U part:" << endl;
Matrix5x3 u = lu.matrixLU().triangularView<[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>();
cout << u << endl;
cout << "Let us now reconstruct the original matrix m:" << endl;
cout << lu.permutationP().inverse() * l * u * lu.permutationQ().inverse() << endl;
```

 Output: 



```
Here is the matrix m:
   0.68  -0.605 -0.0452
 -0.211   -0.33   0.258
  0.566   0.536   -0.27
  0.597  -0.444  0.0268
  0.823   0.108   0.904
Here is, up to permutations, its LU decomposition matrix:
 0.904  0.823  0.108
-0.299  0.812  0.569
 -0.05  0.888   -1.1
0.0296  0.705  0.768
 0.285 -0.549 0.0436
Here is the L part:
     1      0      0      0      0
-0.299      1      0      0      0
 -0.05  0.888      1      0      0
0.0296  0.705  0.768      1      0
 0.285 -0.549 0.0436      0      1
Here is the U part:
0.904 0.823 0.108
    0 0.812 0.569
    0     0  -1.1
    0     0     0
    0     0     0
Let us now reconstruct the original matrix m:
   0.68  -0.605 -0.0452
 -0.211   -0.33   0.258
  0.566   0.536   -0.27
  0.597  -0.444  0.0268
  0.823   0.108   0.904

```

This class supports the [inplace decomposition](group__inplacedecomposition)  mechanism.

 
See also

[MatrixBase::fullPivLu()](classeigen_1_1matrixbase#a25da97d31acab0ee5d9d13bdbb0569da), [MatrixBase::determinant()](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061), [MatrixBase::inverse()](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf) 
     ![Inheritance graph]       

|  |
| --- |
|  |
| template<typename InputType >  |
| [FullPivLU](classeigen_1_1fullpivlu) &  | [compute](classeigen_1_1fullpivlu#a0a3c3b1bbafa31a03567a4573ebabc79) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  |
| internal::traits< MatrixType >::Scalar  | [determinant](classeigen_1_1fullpivlu#a71654e5c60a26407ecccfaa5b34bb0aa) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [dimensionOfKernel](classeigen_1_1fullpivlu#a64e191225834e91161ea53ad4b78167b) () const |
|  |
|  | [FullPivLU](classeigen_1_1fullpivlu#af225528d1c6e623a2b1dce091907d13e) () |
|  | Default Constructor. [More...](classeigen_1_1fullpivlu#af225528d1c6e623a2b1dce091907d13e) |
|  |
| template<typename InputType >  |
|  | [FullPivLU](classeigen_1_1fullpivlu#a31a6a984478a9f721f367667fe4c5ab1) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  |
| template<typename InputType >  |
|  | [FullPivLU](classeigen_1_1fullpivlu#a3e903b9f401e3fc5d1ca7c6951c76185) ([EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  | Constructs a LU factorization from a given matrix. [More...](classeigen_1_1fullpivlu#a3e903b9f401e3fc5d1ca7c6951c76185) |
|  |
|  | [FullPivLU](classeigen_1_1fullpivlu#ae83ebd2a24088f04e3ac835b0dc001e1) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  | Default Constructor with memory preallocation. [More...](classeigen_1_1fullpivlu#ae83ebd2a24088f04e3ac835b0dc001e1) |
|  |
| const internal::image\_retval< [FullPivLU](classeigen_1_1fullpivlu) >  | [image](classeigen_1_1fullpivlu#a0893985d2dab367baa6e57c6fd0c4956) (const MatrixType &originalMatrix) const |
|  |
| const [Inverse](classeigen_1_1inverse)< [FullPivLU](classeigen_1_1fullpivlu) >  | [inverse](classeigen_1_1fullpivlu#ae6f4bb55f859f6353f99cf15ecff4b25) () const |
|  |
| bool  | [isInjective](classeigen_1_1fullpivlu#ab13992c852aa593461d9b81790b56667) () const |
|  |
| bool  | [isInvertible](classeigen_1_1fullpivlu#afdf2579c93473650f2ef2a47a376c4a0) () const |
|  |
| bool  | [isSurjective](classeigen_1_1fullpivlu#a1f6222875fc3a181ee1544b9b36dfda5) () const |
|  |
| const internal::kernel\_retval< [FullPivLU](classeigen_1_1fullpivlu) >  | [kernel](classeigen_1_1fullpivlu#a70f52eeb2cd07dfbf790fce106fb4015) () const |
|  |
| const MatrixType &  | [matrixLU](classeigen_1_1fullpivlu#afea0b8fc707a9097d46fe358cb18bbff) () const |
|  |
| RealScalar  | [maxPivot](classeigen_1_1fullpivlu#abced9f280f5fc49c2e62605c782b237b) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonzeroPivots](classeigen_1_1fullpivlu#aa71132a751ad3c78178e33d6b2987400) () const |
|  |
| const [PermutationPType](classeigen_1_1permutationmatrix) &  | [permutationP](classeigen_1_1fullpivlu#ad8f1d7266a434c524d3e0dbcc7a0f588) () const |
|  |
| const [PermutationQType](classeigen_1_1permutationmatrix) &  | [permutationQ](classeigen_1_1fullpivlu#a8d18190c7618de271cba7293f0493a36) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rank](classeigen_1_1fullpivlu#a67a870aa69e699e058d04802ba0bdad9) () const |
|  |
| RealScalar  | [rcond](classeigen_1_1fullpivlu#a0bc63f910960dc3e35acecc8442025b6) () const |
|  |
| MatrixType  | [reconstructedMatrix](classeigen_1_1fullpivlu#a191a4f598b0c192a83ab48984e87ee51) () const |
|  |
| [FullPivLU](classeigen_1_1fullpivlu) &  | [setThreshold](classeigen_1_1fullpivlu#a414592d82de98f5bd075965caf56d681) (const RealScalar &[threshold](classeigen_1_1fullpivlu#ad77539203694f2d85ff7d11616e5a0a5)) |
|  |
| [FullPivLU](classeigen_1_1fullpivlu) &  | [setThreshold](classeigen_1_1fullpivlu#a1b5e30add3dfb6625da1213d68418f44) (Default\_t) |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< [FullPivLU](classeigen_1_1fullpivlu), Rhs >  | [solve](classeigen_1_1fullpivlu#af563471f6f3283fd10779ef02dd0b748) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| RealScalar  | [threshold](classeigen_1_1fullpivlu#ad77539203694f2d85ff7d11616e5a0a5) () const |
|  |
| - Public Member Functions inherited from [Eigen::SolverBase< FullPivLU< \_MatrixType > >](classeigen_1_1solverbase) |
| AdjointReturnType  | [adjoint](classeigen_1_1solverbase#a05a3686a89888681c8e0c2bcab6d1ce5) () const |
|  |
| [FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType > &  | [derived](classeigen_1_1solverbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const [FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType > &  | [derived](classeigen_1_1solverbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| const [Solve](classeigen_1_1solve)< [FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >, Rhs >  | [solve](classeigen_1_1solverbase#a7fd647d110487799205df6f99547879d) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
|  | [SolverBase](classeigen_1_1solverbase#a4d5e5baddfba3790ab1a5f247dcc4dc1) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1solverbase#a732e75b5132bb4db3775916927b0e86c) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  FullPivLU() [1/4]
-----------------

    template<typename MatrixType >  

|  |
| --- |
| [Eigen::FullPivLU](classeigen_1_1fullpivlu)< MatrixType >::[FullPivLU](classeigen_1_1fullpivlu) |

 
 Default Constructor. 

 The default constructor is useful in cases in which the user intends to perform decompositions via LU::compute(const MatrixType&). 

    FullPivLU() [2/4]
-----------------

    template<typename MatrixType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::FullPivLU](classeigen_1_1fullpivlu)< MatrixType >::[FullPivLU](classeigen_1_1fullpivlu) | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols* |
|  | ) |  |  |

 
 Default Constructor with memory preallocation. 

 Like the default constructor but with preallocation of the internal data according to the specified problem *size*. 



See also

[FullPivLU()](classeigen_1_1fullpivlu#af225528d1c6e623a2b1dce091907d13e "Default Constructor.") 
    FullPivLU() [3/4]
-----------------

    template<typename MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::FullPivLU](classeigen_1_1fullpivlu)< MatrixType >::[FullPivLU](classeigen_1_1fullpivlu) | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | explicit |

 
 Constructor.

 
Parameters
 

|  |  |
| --- | --- |
| matrix | the matrix of which to compute the LU decomposition. It is required to be nonzero.  |

      FullPivLU() [4/4]
-----------------

    template<typename MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::FullPivLU](classeigen_1_1fullpivlu)< MatrixType >::[FullPivLU](classeigen_1_1fullpivlu) | ( | [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | explicit |

 
 Constructs a LU factorization from a given matrix. 

 This overloaded constructor is provided for [inplace decomposition](group__inplacedecomposition)  when `MatrixType` is a [Eigen::Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.").

 
See also
FullPivLU(const EigenBase&) 
    compute()
---------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [FullPivLU](classeigen_1_1fullpivlu)& [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::compute  | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | inline |

 
 Computes the LU decomposition of the given matrix.

 
Parameters
 

|  |  |
| --- | --- |
| matrix | the matrix of which to compute the LU decomposition. It is required to be nonzero. |

   
Returns
a reference to \*this 
    determinant()
-------------

    template<typename MatrixType >  

|  |
| --- |
| internal::traits< MatrixType >::Scalar [Eigen::FullPivLU](classeigen_1_1fullpivlu)< MatrixType >::determinant |

 
 
Returns
the determinant of the matrix of which \*this is the LU decomposition. It has only linear complexity (that is, O(n) where n is the dimension of the square matrix) as the LU decomposition has already been computed.
 
Note
This is only for square matrices.  For fixed-size matrices of size up to 4, [MatrixBase::determinant()](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) offers optimized paths.
 
Warning
a determinant can be very big or small, so for matrices of large enough dimension, there is a risk of overflow/underflow.
 
See also

[MatrixBase::determinant()](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) 
    dimensionOfKernel()
-------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::dimensionOfKernel  | ( |  | ) |  const |

 | inline |

 
 
Returns
the dimension of the kernel of the matrix of which \*this is the LU decomposition.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1fullpivlu#a414592d82de98f5bd075965caf56d681). 
    image()
-------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const internal::image\_retval<[FullPivLU](classeigen_1_1fullpivlu)> [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::image  | ( | const MatrixType &  | *originalMatrix* | ) |  const |

 | inline |

 
 
Returns
the image of the matrix, also called its column-space. The columns of the returned matrix will form a basis of the image (column-space).
 
Parameters
 

|  |  |
| --- | --- |
| originalMatrix | the original matrix, of which \*this is the LU decomposition. The reason why it is needed to pass it here, is that this allows a large optimization, as otherwise this method would need to reconstruct it from the LU decomposition. |

   
Note
If the image has dimension zero, then the returned matrix is a column-vector filled with zeros.  This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1fullpivlu#a414592d82de98f5bd075965caf56d681).
 Example: 



```
Matrix3d m;
m << 1,1,0,
     1,3,2,
     0,1,1;
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Notice that the middle column is the sum of the two others, so the "
     << "columns are linearly dependent." << endl;
cout << "Here is a matrix whose columns have the same span but are linearly independent:"
     << endl << m.fullPivLu().image(m) << endl;

```

 Output: 



```
Here is the matrix m:
1 1 0
1 3 2
0 1 1
Notice that the middle column is the sum of the two others, so the columns are linearly dependent.
Here is a matrix whose columns have the same span but are linearly independent:
1 1
3 1
1 0

```


See also

[kernel()](classeigen_1_1fullpivlu#a70f52eeb2cd07dfbf790fce106fb4015) 
    inverse()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [Inverse](classeigen_1_1inverse)<[FullPivLU](classeigen_1_1fullpivlu)> [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::inverse  | ( |  | ) |  const |

 | inline |

 
 
Returns
the inverse of the matrix of which \*this is the LU decomposition.
 
Note
If this matrix is not invertible, the returned matrix has undefined coefficients. Use [isInvertible()](classeigen_1_1fullpivlu#afdf2579c93473650f2ef2a47a376c4a0) to first determine whether this matrix is invertible.
 
See also

[MatrixBase::inverse()](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf) 
    isInjective()
-------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::isInjective  | ( |  | ) |  const |

 | inline |

 
 
Returns
true if the matrix of which \*this is the LU decomposition represents an injective linear map, i.e. has trivial kernel; false otherwise.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1fullpivlu#a414592d82de98f5bd075965caf56d681). 
    isInvertible()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::isInvertible  | ( |  | ) |  const |

 | inline |

 
 
Returns
true if the matrix of which \*this is the LU decomposition is invertible.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1fullpivlu#a414592d82de98f5bd075965caf56d681). 
    isSurjective()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::isSurjective  | ( |  | ) |  const |

 | inline |

 
 
Returns
true if the matrix of which \*this is the LU decomposition represents a surjective linear map; false otherwise.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1fullpivlu#a414592d82de98f5bd075965caf56d681). 
    kernel()
--------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const internal::kernel\_retval<[FullPivLU](classeigen_1_1fullpivlu)> [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::kernel  | ( |  | ) |  const |

 | inline |

 
 
Returns
the kernel of the matrix, also called its null-space. The columns of the returned matrix will form a basis of the kernel.
 
Note
If the kernel has dimension zero, then the returned matrix is a column-vector filled with zeros.  This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1fullpivlu#a414592d82de98f5bd075965caf56d681).
 Example: 



```
MatrixXf m = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3,5);
cout << "Here is the matrix m:" << endl << m << endl;
MatrixXf ker = m.fullPivLu().kernel();
cout << "Here is a matrix whose columns form a basis of the kernel of m:"
     << endl << ker << endl;
cout << "By definition of the kernel, m\*ker is zero:"
     << endl << m*ker << endl;
```

 Output: 



```
Here is the matrix m:
   0.68   0.597   -0.33   0.108   -0.27
 -0.211   0.823   0.536 -0.0452  0.0268
  0.566  -0.605  -0.444   0.258   0.904
Here is a matrix whose columns form a basis of the kernel of m:
 -0.219   0.763
0.00335  -0.447
      0       1
      1       0
 -0.145  -0.285
By definition of the kernel, m*ker is zero:
 7.45e-09  1.49e-08
-1.86e-09 -4.05e-08
        0 -2.98e-08

```


See also

[image()](classeigen_1_1fullpivlu#a0893985d2dab367baa6e57c6fd0c4956) 
    matrixLU()
----------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixType& [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::matrixLU  | ( |  | ) |  const |

 | inline |

 
 
Returns
the LU decomposition matrix: the upper-triangular part is U, the unit-lower-triangular part is L (at least for square matrices; in the non-square case, special care is needed, see the documentation of class [FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features.")).
 
See also
matrixL(), matrixU() 
    maxPivot()
----------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::maxPivot  | ( |  | ) |  const |

 | inline |

 
 
Returns
the absolute value of the biggest pivot, i.e. the biggest diagonal coefficient of U. 
    nonzeroPivots()
---------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::nonzeroPivots  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of nonzero pivots in the LU decomposition. Here nonzero is meant in the exact sense, not in a fuzzy sense. So that notion isn't really intrinsically interesting, but it is still useful when implementing algorithms.
 
See also

[rank()](classeigen_1_1fullpivlu#a67a870aa69e699e058d04802ba0bdad9) 
    permutationP()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [PermutationPType](classeigen_1_1permutationmatrix)& [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::permutationP  | ( |  | ) |  const |

 | inline |

 
 
Returns
the permutation matrix P
 
See also

[permutationQ()](classeigen_1_1fullpivlu#a8d18190c7618de271cba7293f0493a36) 
    permutationQ()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [PermutationQType](classeigen_1_1permutationmatrix)& [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::permutationQ  | ( |  | ) |  const |

 | inline |

 
 
Returns
the permutation matrix Q
 
See also

[permutationP()](classeigen_1_1fullpivlu#ad8f1d7266a434c524d3e0dbcc7a0f588) 
    rank()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::rank  | ( |  | ) |  const |

 | inline |

 
 
Returns
the rank of the matrix of which \*this is the LU decomposition.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1fullpivlu#a414592d82de98f5bd075965caf56d681). 
    rcond()
-------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::rcond  | ( |  | ) |  const |

 | inline |

 
 
Returns
an estimate of the reciprocal condition number of the matrix of which `*this` is the LU decomposition. 
    reconstructedMatrix()
---------------------

    template<typename MatrixType >  

|  |
| --- |
| MatrixType [Eigen::FullPivLU](classeigen_1_1fullpivlu)< MatrixType >::reconstructedMatrix |

 
 
Returns
the matrix represented by the decomposition, i.e., it returns the product: \( P^{-1} L U Q^{-1} \). This function is provided for debug purposes. 
    setThreshold() [1/2]
--------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [FullPivLU](classeigen_1_1fullpivlu)& [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::setThreshold  | ( | const RealScalar &  | *threshold* | ) |  |

 | inline |

 
 Allows to prescribe a threshold to be used by certain methods, such as [rank()](classeigen_1_1fullpivlu#a67a870aa69e699e058d04802ba0bdad9), who need to determine when pivots are to be considered nonzero. This is not used for the LU decomposition itself.

 When it needs to get the threshold value, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") calls [threshold()](classeigen_1_1fullpivlu#ad77539203694f2d85ff7d11616e5a0a5). By default, this uses a formula to automatically determine a reasonable threshold. Once you have called the present method [setThreshold(const RealScalar&)](classeigen_1_1fullpivlu#a414592d82de98f5bd075965caf56d681), your value is used instead.

 
Parameters
 

|  |  |
| --- | --- |
| threshold | The new value to use as the threshold. |

   A pivot will be considered nonzero if its absolute value is strictly greater than \( \vert pivot \vert \leqslant threshold \times \vert maxpivot \vert \) where maxpivot is the biggest pivot.

 If you want to come back to the default behavior, call [setThreshold(Default\_t)](classeigen_1_1fullpivlu#a1b5e30add3dfb6625da1213d68418f44) 

    setThreshold() [2/2]
--------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [FullPivLU](classeigen_1_1fullpivlu)& [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::setThreshold  | ( | Default\_t  |  | ) |  |

 | inline |

 
 Allows to come back to the default behavior, letting [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") use its default formula for determining the threshold.

 You should pass the special object Eigen::Default as parameter here. 



```
lu.setThreshold(Eigen::Default); 

```

See the documentation of [setThreshold(const RealScalar&)](classeigen_1_1fullpivlu#a414592d82de98f5bd075965caf56d681). 

    solve()
-------

    template<typename \_MatrixType >   template<typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Solve](classeigen_1_1solve)<[FullPivLU](classeigen_1_1fullpivlu), Rhs> [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::solve  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &  | *b* | ) |  const |

 | inline |

 
 
Returns
a solution x to the equation Ax=b, where A is the matrix of which \*this is the LU decomposition.
 
Parameters
 

|  |  |
| --- | --- |
| b | the right-hand-side of the equation to solve. Can be a vector or a matrix, the only requirement in order for the equation to make sense is that b.rows()==A.rows(), where A is the matrix of which \*this is the LU decomposition. |

   
Returns
a solution.
 This method just tries to find as good a solution as possible. If you want to check whether a solution exists or if it is accurate, just call this function to get a result and then compute the error of this result, or use [MatrixBase::isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) directly, for instance like this:



```
bool a_solution_exists = (A*result).isApprox(b, precision); 

```

 This method avoids dividing by zero, so that the non-existence of a solution doesn't by itself mean that you'll get `inf` or `nan` values.

 If there exists more than one solution, this method will arbitrarily choose one. If you need a complete analysis of the space of solutions, take the one solution obtained by this method and add to it elements of the kernel, as determined by [kernel()](classeigen_1_1fullpivlu#a70f52eeb2cd07dfbf790fce106fb4015).

 Example: 



```
Matrix<float,2,3> m = [Matrix<float,2,3>::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
Matrix2f y = [Matrix2f::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the matrix y:" << endl << y << endl;
Matrix<float,3,2> x = m.fullPivLu().solve(y);
if((m*x).isApprox(y))
{
  cout << "Here is a solution x to the equation mx=y:" << endl << x << endl;
}
else
  cout << "The equation mx=y does not have any solution." << endl;

```

 Output: 



```
Here is the matrix m:
  0.68  0.566  0.823
-0.211  0.597 -0.605
Here is the matrix y:
 -0.33 -0.444
 0.536  0.108
Here is a solution x to the equation mx=y:
     0      0
 0.291 -0.216
  -0.6 -0.391

```


See also
TriangularView::solve(), [kernel()](classeigen_1_1fullpivlu#a70f52eeb2cd07dfbf790fce106fb4015), [inverse()](classeigen_1_1fullpivlu#ae6f4bb55f859f6353f99cf15ecff4b25) 
    threshold()
-----------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::FullPivLU](classeigen_1_1fullpivlu)< \_MatrixType >::threshold  | ( |  | ) |  const |

 | inline |

 
 Returns the threshold that will be used by certain methods such as [rank()](classeigen_1_1fullpivlu#a67a870aa69e699e058d04802ba0bdad9).

 See the documentation of [setThreshold(const RealScalar&)](classeigen_1_1fullpivlu#a414592d82de98f5bd075965caf56d681). 

   

---

The documentation for this class was generated from the following file:* [FullPivLU.h](https://eigen.tuxfamily.org/dox/FullPivLU_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1FullPivLU.html>

Eigen::PartialPivLU
===================

  
### template<typename \_MatrixType> class Eigen::PartialPivLU< \_MatrixType >

 LU decomposition of a matrix with partial pivoting, and related features. 

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which we are computing the LU decomposition |

   This class represents a LU decomposition of a **square** **invertible** matrix, with partial pivoting: the matrix A is decomposed as A = PLU where L is unit-lower-triangular, U is upper-triangular, and P is a permutation matrix.

 Typically, partial pivoting LU decomposition is only considered numerically stable for square invertible matrices. Thus LAPACK's dgesv and dgesvx require the matrix to be square and invertible. The present class does the same. It will assert that the matrix is square, but it won't (actually it can't) check that the matrix is invertible: it is your task to check that you only use this decomposition on invertible matrices.

 The guaranteed safe alternative, working for all matrices, is the full pivoting LU decomposition, provided by class [FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features.").

 This is **not** a rank-revealing LU decomposition. Many features are intentionally absent from this class, such as rank computation. If you need these features, use class [FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features.").

 This LU decomposition is suitable to invert invertible matrices. It is what [MatrixBase::inverse()](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf) uses in the general case. On the other hand, it is **not** suitable to determine whether a given matrix is invertible.

 The data of the LU decomposition can be directly accessed through the methods [matrixLU()](classeigen_1_1partialpivlu#abea0d7e51c5591a6db152eade0892d9c), [permutationP()](classeigen_1_1partialpivlu#a1c637530b3215787668a75ebb2e7b882).

 This class supports the [inplace decomposition](group__inplacedecomposition)  mechanism.

 
See also

[MatrixBase::partialPivLu()](classeigen_1_1matrixbase#a6199d8aaf26c1b8ac3097fdfa7733a1e), [MatrixBase::determinant()](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061), [MatrixBase::inverse()](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf), MatrixBase::computeInverse(), class [FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
| Scalar  | [determinant](classeigen_1_1partialpivlu#a54c3d39c9b46ff485a8d2140b9b23193) () const |
|  |
| const [Inverse](classeigen_1_1inverse)< [PartialPivLU](classeigen_1_1partialpivlu) >  | [inverse](classeigen_1_1partialpivlu#aef983470f92aba829e861e32e68681b5) () const |
|  |
| const MatrixType &  | [matrixLU](classeigen_1_1partialpivlu#abea0d7e51c5591a6db152eade0892d9c) () const |
|  |
|  | [PartialPivLU](classeigen_1_1partialpivlu#a5c04818d354f94a98786d8a44cb709c6) () |
|  | Default Constructor. [More...](classeigen_1_1partialpivlu#a5c04818d354f94a98786d8a44cb709c6) |
|  |
| template<typename InputType >  |
|  | [PartialPivLU](classeigen_1_1partialpivlu#acf37214aebb54d0e186ae39ac6c41bdf) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  |
| template<typename InputType >  |
|  | [PartialPivLU](classeigen_1_1partialpivlu#a4efc917d31d0e9d76781a97509309061) ([EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  |
|  | [PartialPivLU](classeigen_1_1partialpivlu#acf892c12d8a229b32bddc3149e32e63a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9)) |
|  | Default Constructor with memory preallocation. [More...](classeigen_1_1partialpivlu#acf892c12d8a229b32bddc3149e32e63a) |
|  |
| const [PermutationType](classeigen_1_1permutationmatrix) &  | [permutationP](classeigen_1_1partialpivlu#a1c637530b3215787668a75ebb2e7b882) () const |
|  |
| RealScalar  | [rcond](classeigen_1_1partialpivlu#a472b46d5d9ff7c328e1dccc13805f690) () const |
|  |
| MatrixType  | [reconstructedMatrix](classeigen_1_1partialpivlu#aba7f1ee83537b0d240ebf206503a4920) () const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< [PartialPivLU](classeigen_1_1partialpivlu), Rhs >  | [solve](classeigen_1_1partialpivlu#a49247bd2f742a46bca1f9c2bf1b19ad8) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| - Public Member Functions inherited from [Eigen::SolverBase< PartialPivLU< \_MatrixType > >](classeigen_1_1solverbase) |
| AdjointReturnType  | [adjoint](classeigen_1_1solverbase#a05a3686a89888681c8e0c2bcab6d1ce5) () const |
|  |
| [PartialPivLU](classeigen_1_1partialpivlu)< \_MatrixType > &  | [derived](classeigen_1_1solverbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const [PartialPivLU](classeigen_1_1partialpivlu)< \_MatrixType > &  | [derived](classeigen_1_1solverbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| const [Solve](classeigen_1_1solve)< [PartialPivLU](classeigen_1_1partialpivlu)< \_MatrixType >, Rhs >  | [solve](classeigen_1_1solverbase#a7fd647d110487799205df6f99547879d) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
|  | [SolverBase](classeigen_1_1solverbase#a4d5e5baddfba3790ab1a5f247dcc4dc1) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1solverbase#a732e75b5132bb4db3775916927b0e86c) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  PartialPivLU() [1/4]
--------------------

    template<typename MatrixType >  

|  |
| --- |
| [Eigen::PartialPivLU](classeigen_1_1partialpivlu)< MatrixType >::[PartialPivLU](classeigen_1_1partialpivlu) |

 
 Default Constructor. 

 The default constructor is useful in cases in which the user intends to perform decompositions via PartialPivLU::compute(const MatrixType&). 

    PartialPivLU() [2/4]
--------------------

    template<typename MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::PartialPivLU](classeigen_1_1partialpivlu)< MatrixType >::[PartialPivLU](classeigen_1_1partialpivlu) | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *size* | ) |  |

 | explicit |

 
 Default Constructor with memory preallocation. 

 Like the default constructor but with preallocation of the internal data according to the specified problem *size*. 



See also

[PartialPivLU()](classeigen_1_1partialpivlu#a5c04818d354f94a98786d8a44cb709c6 "Default Constructor.") 
    PartialPivLU() [3/4]
--------------------

    template<typename MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::PartialPivLU](classeigen_1_1partialpivlu)< MatrixType >::[PartialPivLU](classeigen_1_1partialpivlu) | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | explicit |

 
 Constructor.

 
Parameters
 

|  |  |
| --- | --- |
| matrix | the matrix of which to compute the LU decomposition. |

   
Warning
The matrix should have full rank (e.g. if it's square, it should be invertible). If you need to deal with non-full rank, use class [FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features.") instead. 
    PartialPivLU() [4/4]
--------------------

    template<typename MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::PartialPivLU](classeigen_1_1partialpivlu)< MatrixType >::[PartialPivLU](classeigen_1_1partialpivlu) | ( | [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | explicit |

 
 Constructor for [inplace decomposition](group__inplacedecomposition) 

 
Parameters
 

|  |  |
| --- | --- |
| matrix | the matrix of which to compute the LU decomposition. |

   
Warning
The matrix should have full rank (e.g. if it's square, it should be invertible). If you need to deal with non-full rank, use class [FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features.") instead. 
    determinant()
-------------

    template<typename MatrixType >  

|  |
| --- |
| [PartialPivLU](classeigen_1_1partialpivlu)< MatrixType >::Scalar [Eigen::PartialPivLU](classeigen_1_1partialpivlu)< MatrixType >::determinant |

 
 
Returns
the determinant of the matrix of which \*this is the LU decomposition. It has only linear complexity (that is, O(n) where n is the dimension of the square matrix) as the LU decomposition has already been computed.
 
Note
For fixed-size matrices of size up to 4, [MatrixBase::determinant()](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) offers optimized paths.
 
Warning
a determinant can be very big or small, so for matrices of large enough dimension, there is a risk of overflow/underflow.
 
See also

[MatrixBase::determinant()](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) 
    inverse()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [Inverse](classeigen_1_1inverse)<[PartialPivLU](classeigen_1_1partialpivlu)> [Eigen::PartialPivLU](classeigen_1_1partialpivlu)< \_MatrixType >::inverse  | ( |  | ) |  const |

 | inline |

 
 
Returns
the inverse of the matrix of which \*this is the LU decomposition.
 
Warning
The matrix being decomposed here is assumed to be invertible. If you need to check for invertibility, use class [FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features.") instead.
 
See also

[MatrixBase::inverse()](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf), LU::inverse() 
    matrixLU()
----------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixType& [Eigen::PartialPivLU](classeigen_1_1partialpivlu)< \_MatrixType >::matrixLU  | ( |  | ) |  const |

 | inline |

 
 
Returns
the LU decomposition matrix: the upper-triangular part is U, the unit-lower-triangular part is L (at least for square matrices; in the non-square case, special care is needed, see the documentation of class [FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features.")).
 
See also
matrixL(), matrixU() 
    permutationP()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [PermutationType](classeigen_1_1permutationmatrix)& [Eigen::PartialPivLU](classeigen_1_1partialpivlu)< \_MatrixType >::permutationP  | ( |  | ) |  const |

 | inline |

 
 
Returns
the permutation matrix P. 
    rcond()
-------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::PartialPivLU](classeigen_1_1partialpivlu)< \_MatrixType >::rcond  | ( |  | ) |  const |

 | inline |

 
 
Returns
an estimate of the reciprocal condition number of the matrix of which `*this` is the LU decomposition. 
    reconstructedMatrix()
---------------------

    template<typename MatrixType >  

|  |
| --- |
| MatrixType [Eigen::PartialPivLU](classeigen_1_1partialpivlu)< MatrixType >::reconstructedMatrix |

 
 
Returns
the matrix represented by the decomposition, i.e., it returns the product: P^{-1} L U. This function is provided for debug purpose. 
    solve()
-------

    template<typename \_MatrixType >   template<typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Solve](classeigen_1_1solve)<[PartialPivLU](classeigen_1_1partialpivlu), Rhs> [Eigen::PartialPivLU](classeigen_1_1partialpivlu)< \_MatrixType >::solve  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &  | *b* | ) |  const |

 | inline |

 
 This method returns the solution x to the equation Ax=b, where A is the matrix of which \*this is the LU decomposition.

 
Parameters
 

|  |  |
| --- | --- |
| b | the right-hand-side of the equation to solve. Can be a vector or a matrix, the only requirement in order for the equation to make sense is that b.rows()==A.rows(), where A is the matrix of which \*this is the LU decomposition. |

   
Returns
the solution.
 Example: 



```
MatrixXd A = [MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3,3);
MatrixXd B = [MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3,2);
cout << "Here is the invertible matrix A:" << endl << A << endl;
cout << "Here is the matrix B:" << endl << B << endl;
MatrixXd X = A.lu().solve(B);
cout << "Here is the (unique) solution X to the equation AX=B:" << endl << X << endl;
cout << "Relative error: " << (A*X-B).norm() / B.norm() << endl;
```

 Output: 



```
Here is the invertible matrix A:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Here is the matrix B:
  0.108   -0.27
-0.0452  0.0268
  0.258   0.904
Here is the (unique) solution X to the equation AX=B:
 0.609   2.68
-0.231  -1.57
  0.51   3.51
Relative error: 3.28e-16

```

Since this [PartialPivLU](classeigen_1_1partialpivlu "LU decomposition of a matrix with partial pivoting, and related features.") class assumes anyway that the matrix A is invertible, the solution theoretically exists and is unique regardless of b.

 
See also
TriangularView::solve(), [inverse()](classeigen_1_1partialpivlu#aef983470f92aba829e861e32e68681b5), computeInverse() 
   

---

The documentation for this class was generated from the following file:* [PartialPivLU.h](https://eigen.tuxfamily.org/dox/PartialPivLU_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1PartialPivLU.html>

Eigen::LLT
==========

  
### template<typename \_MatrixType, int \_UpLo> class Eigen::LLT< \_MatrixType, \_UpLo >

 Standard Cholesky decomposition (LL^T) of a matrix and associated features. 

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which we are computing the LL^T Cholesky decomposition  |
| \_UpLo | the triangular part that will be used for the decompositon: Lower (default) or Upper. The other triangular part won't be read. |

   This class performs a LL^T Cholesky decomposition of a symmetric, positive definite matrix A such that A = LL^\* = U^\*U, where L is lower triangular.

 While the Cholesky decomposition is particularly useful to solve selfadjoint problems like D^\*D x = b, for that purpose, we recommend the Cholesky decomposition without square root which is more stable and even faster. Nevertheless, this standard Cholesky decomposition remains useful in many other situations like generalised eigen problems with hermitian matrices.

 Remember that Cholesky decompositions are not rank-revealing. This [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") decomposition is only stable on positive definite matrices, use [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") instead for the semidefinite case. Also, do not use a Cholesky decomposition to determine whether a system of equations has a solution.

 Example: 



```
MatrixXd A(3,3);
A << 4,-1,2, -1,6,0, 2,0,5;
cout << "The matrix A is" << endl << A << endl;
 
LLT<MatrixXd> lltOfA(A); // compute the Cholesky decomposition of A
MatrixXd L = lltOfA.matrixL(); // retrieve factor L in the decomposition
// The previous two lines can also be written as "L = A.llt().matrixL()"
 
cout << "The Cholesky factor L is" << endl << L << endl;
cout << "To check this, let us compute L \* L.transpose()" << endl;
cout << L * L.transpose() << endl;
cout << "This should equal the matrix A" << endl;

```

 Output: 



```
The matrix A is
 4 -1  2
-1  6  0
 2  0  5
The Cholesky factor L is
    2     0     0
 -0.5   2.4     0
    1 0.209  1.99
To check this, let us compute L * L.transpose()
 4 -1  2
-1  6  0
 2  0  5
This should equal the matrix A

```

**Performance:** for best performance, it is recommended to use a column-major storage format with the Lower triangular part (the default), or, equivalently, a row-major storage format with the Upper triangular part. Otherwise, you might get a 20% slowdown for the full factorization step, and rank-updates can be up to 3 times slower.

 This class supports the [inplace decomposition](group__inplacedecomposition)  mechanism.

 Note that during the decomposition, only the lower (or upper, as defined by \_UpLo) triangular part of A is considered. Therefore, the strict lower part does not have to store correct values.

 
See also

[MatrixBase::llt()](classeigen_1_1matrixbase#a90c45f7a30265df792d5aeaddead2635), [SelfAdjointView::llt()](classeigen_1_1selfadjointview#a405e810491642a7f7b785f2ad6f93619), class [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
| const [LLT](classeigen_1_1llt) &  | [adjoint](classeigen_1_1llt#a48efa9d2188ce8d5c8cf5344253fbcf3) () const EIGEN\_NOEXCEPT |
|  |
| template<typename InputType >  |
| [LLT](classeigen_1_1llt)< MatrixType, \_UpLo > &  | [compute](classeigen_1_1llt#aecb45daf711328e0804f272131142b57) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &a) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1llt#adb1295e7d2b1fd825a041345ae08be54) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1llt#adb1295e7d2b1fd825a041345ae08be54) |
|  |
|  | [LLT](classeigen_1_1llt#a16d1ec9ea6497ba1febb242c2e8a7a96) () |
|  | Default Constructor. [More...](classeigen_1_1llt#a16d1ec9ea6497ba1febb242c2e8a7a96) |
|  |
| template<typename InputType >  |
|  | [LLT](classeigen_1_1llt#a1848a00addade9a0f7f70493c52ecc9d) ([EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  | Constructs a [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") factorization from a given matrix. [More...](classeigen_1_1llt#a1848a00addade9a0f7f70493c52ecc9d) |
|  |
|  | [LLT](classeigen_1_1llt#ab3656cfbdf38e03c57d5cf79bf8131b6) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9)) |
|  | Default Constructor with memory preallocation. [More...](classeigen_1_1llt#ab3656cfbdf38e03c57d5cf79bf8131b6) |
|  |
| Traits::MatrixL  | [matrixL](classeigen_1_1llt#a7f4a3eedbf82e7ce2d6bf0dcd84cdfa3) () const |
|  |
| const MatrixType &  | [matrixLLT](classeigen_1_1llt#af62881fc95c7e54a93b63c20f2c62b46) () const |
|  |
| Traits::MatrixU  | [matrixU](classeigen_1_1llt#a18a390f085567e650e8345cc7e7c0df8) () const |
|  |
| template<typename VectorType >  |
| [LLT](classeigen_1_1llt)< \_MatrixType, \_UpLo > &  | [rankUpdate](classeigen_1_1llt#a8ce93e407a2ba75489bcb6e89ea4c153) (const VectorType &v, const RealScalar &sigma) |
|  |
| RealScalar  | [rcond](classeigen_1_1llt#a59338fa78db171d02fd5a2c9e4f3a30c) () const |
|  |
| MatrixType  | [reconstructedMatrix](classeigen_1_1llt#a8b6ba1bc41811c50e65cac8db597d802) () const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< [LLT](classeigen_1_1llt), Rhs >  | [solve](classeigen_1_1llt#a3738bb3ce6f9b837a2beb432b937499f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| - Public Member Functions inherited from [Eigen::SolverBase< LLT< \_MatrixType, \_UpLo > >](classeigen_1_1solverbase) |
| AdjointReturnType  | [adjoint](classeigen_1_1solverbase#a05a3686a89888681c8e0c2bcab6d1ce5) () const |
|  |
| [LLT](classeigen_1_1llt)< \_MatrixType, \_UpLo > &  | [derived](classeigen_1_1solverbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const [LLT](classeigen_1_1llt)< \_MatrixType, \_UpLo > &  | [derived](classeigen_1_1solverbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| const [Solve](classeigen_1_1solve)< [LLT](classeigen_1_1llt)< \_MatrixType, \_UpLo >, Rhs >  | [solve](classeigen_1_1solverbase#a7fd647d110487799205df6f99547879d) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
|  | [SolverBase](classeigen_1_1solverbase#a4d5e5baddfba3790ab1a5f247dcc4dc1) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1solverbase#a732e75b5132bb4db3775916927b0e86c) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  LLT() [1/3]
-----------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::LLT](classeigen_1_1llt)< \_MatrixType, \_UpLo >::[LLT](classeigen_1_1llt) | ( |  | ) |  |

 | inline |

 
 Default Constructor. 

 The default constructor is useful in cases in which the user intends to perform decompositions via LLT::compute(const MatrixType&). 

    LLT() [2/3]
-----------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::LLT](classeigen_1_1llt)< \_MatrixType, \_UpLo >::[LLT](classeigen_1_1llt) | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *size* | ) |  |

 | inlineexplicit |

 
 Default Constructor with memory preallocation. 

 Like the default constructor but with preallocation of the internal data according to the specified problem *size*. 



See also

[LLT()](classeigen_1_1llt#a16d1ec9ea6497ba1febb242c2e8a7a96 "Default Constructor.") 
    LLT() [3/3]
-----------

    template<typename \_MatrixType , int \_UpLo>   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::LLT](classeigen_1_1llt)< \_MatrixType, \_UpLo >::[LLT](classeigen_1_1llt) | ( | [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | inlineexplicit |

 
 Constructs a [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") factorization from a given matrix. 

 This overloaded constructor is provided for [inplace decomposition](group__inplacedecomposition)  when `MatrixType` is a [Eigen::Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.").

 
See also
LLT(const EigenBase&) 
    adjoint()
---------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [LLT](classeigen_1_1llt)& [Eigen::LLT](classeigen_1_1llt)< \_MatrixType, \_UpLo >::adjoint  | ( |  | ) |  const |

 | inline |

 
 
Returns
the adjoint of `*this`, that is, a const reference to the decomposition itself as the underlying matrix is self-adjoint.
 This method is provided for compatibility with other matrix decompositions, thus enabling generic code such as: 



```
x = decomposition.adjoint().solve(b) 

```
    compute()
---------

    template<typename \_MatrixType , int \_UpLo>   template<typename InputType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [LLT](classeigen_1_1llt)<MatrixType,\_UpLo>& [Eigen::LLT](classeigen_1_1llt)< \_MatrixType, \_UpLo >::compute  | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *a* | ) |  |

 
 Computes / recomputes the Cholesky decomposition A = LL^\* = U^\*U of *matrix* 

 
Returns
a reference to \*this
 Example: 



```
#include <iostream>
#include <Eigen/Dense>
 
using namespace std;
using namespace [Eigen](namespaceeigen);
 
int main()
{
   Matrix2f A, b;
   LLT<Matrix2f> llt;
   A << 2, -1, -1, 3;
   b << 1, 2, 3, 1;
   cout << "Here is the matrix A:\n" << A << endl;
   cout << "Here is the right hand side b:\n" << b << endl;
   cout << "Computing LLT decomposition..." << endl;
   llt.compute(A);
   cout << "The solution is:\n" << llt.solve(b) << endl;
   A(1,1)++;
   cout << "The matrix A is now:\n" << A << endl;
   cout << "Computing LLT decomposition..." << endl;
   llt.compute(A);
   cout << "The solution is now:\n" << llt.solve(b) << endl;
}
```

 Output: 



```
Here is the matrix A:
 2 -1
-1  3
Here is the right hand side b:
1 2
3 1
Computing LLT decomposition...
The solution is:
1.2 1.4
1.4 0.8
The matrix A is now:
 2 -1
-1  4
Computing LLT decomposition...
The solution is now:
    1  1.29
    1 0.571

```
    info()
------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::LLT](classeigen_1_1llt)< \_MatrixType, \_UpLo >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether previous computation was successful. 

 
Returns

`Success` if computation was successful, `NumericalIssue` if the matrix.appears not to be positive definite. 
    matrixL()
---------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Traits::MatrixL [Eigen::LLT](classeigen_1_1llt)< \_MatrixType, \_UpLo >::matrixL  | ( |  | ) |  const |

 | inline |

 
 
Returns
a view of the lower triangular matrix L 
    matrixLLT()
-----------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixType& [Eigen::LLT](classeigen_1_1llt)< \_MatrixType, \_UpLo >::matrixLLT  | ( |  | ) |  const |

 | inline |

 
 
Returns
the [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") decomposition matrix
 TODO: document the storage layout 

    matrixU()
---------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Traits::MatrixU [Eigen::LLT](classeigen_1_1llt)< \_MatrixType, \_UpLo >::matrixU  | ( |  | ) |  const |

 | inline |

 
 
Returns
a view of the upper triangular matrix U 
    rankUpdate()
------------

    template<typename \_MatrixType , int \_UpLo>   template<typename VectorType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [LLT](classeigen_1_1llt)<\_MatrixType,\_UpLo>& [Eigen::LLT](classeigen_1_1llt)< \_MatrixType, \_UpLo >::rankUpdate  | ( | const VectorType &  | *v*,  |
|  |  | const RealScalar &  | *sigma* |
|  | ) |  |  |

 
 Performs a rank one update (or dowdate) of the current decomposition. If A = LL^\* before the rank one update, then after it we have LL^\* = A + sigma \* v v^\* where *v* must be a vector of same dimension. 

    rcond()
-------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::LLT](classeigen_1_1llt)< \_MatrixType, \_UpLo >::rcond  | ( |  | ) |  const |

 | inline |

 
 
Returns
an estimate of the reciprocal condition number of the matrix of which `*this` is the Cholesky decomposition. 
    reconstructedMatrix()
---------------------

    template<typename MatrixType , int \_UpLo>  

|  |
| --- |
| MatrixType [Eigen::LLT](classeigen_1_1llt)< MatrixType, \_UpLo >::reconstructedMatrix |

 
 
Returns
the matrix represented by the decomposition, i.e., it returns the product: L L^\*. This function is provided for debug purpose. 
    solve()
-------

    template<typename \_MatrixType , int \_UpLo>   template<typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Solve](classeigen_1_1solve)<[LLT](classeigen_1_1llt), Rhs> [Eigen::LLT](classeigen_1_1llt)< \_MatrixType, \_UpLo >::solve  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &  | *b* | ) |  const |

 | inline |

 
 
Returns
the solution x of \( A x = b \) using the current decomposition of A.
 Since this [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") class assumes anyway that the matrix A is invertible, the solution theoretically exists and is unique regardless of b.

 Example: 



```
typedef Matrix<float,Dynamic,2> DataMatrix;
// let's generate some samples on the 3D plane of equation z = 2x+3y (with some noise)
DataMatrix samples = DataMatrix::Random(12,2);
VectorXf elevations = 2*samples.col(0) + 3*samples.col(1) + [VectorXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(12)*0.1;
// and let's solve samples \* [x y]^T = elevations in least square sense:
Matrix<float,2,1> xy
 = (samples.adjoint() * samples).llt().solve((samples.adjoint()*elevations));
cout << xy << endl;
```

 Output: 



```
2.02
2.97

```


See also
solveInPlace(), [MatrixBase::llt()](classeigen_1_1matrixbase#a90c45f7a30265df792d5aeaddead2635), [SelfAdjointView::llt()](classeigen_1_1selfadjointview#a405e810491642a7f7b785f2ad6f93619) 
   

---

The documentation for this class was generated from the following file:* [LLT.h](https://eigen.tuxfamily.org/dox/LLT_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1LLT.html>

Eigen::BDCSVD
=============

  
### template<typename \_MatrixType> class Eigen::BDCSVD< \_MatrixType >

 class Bidiagonal Divide and Conquer SVD 

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which we are computing the SVD decomposition |

   This class first reduces the input matrix to bi-diagonal form using class UpperBidiagonalization, and then performs a divide-and-conquer diagonalization. Small blocks are diagonalized using class [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix."). You can control the switching size with the setSwitchSize() method, default is 16. For small matrice (<16), it is thus preferable to directly use [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix."). For larger ones, [BDCSVD](classeigen_1_1bdcsvd "class Bidiagonal Divide and Conquer SVD") is highly recommended and can several order of magnitude faster.

 
Warning
this algorithm is unlikely to provide accurate result when compiled with unsafe math optimizations. For instance, this concerns Intel's compiler (ICC), which performs such optimization by default unless you compile with the `-fp-model` `precise` option. Likewise, the `-ffast-math` option of GCC or clang will significantly degrade the accuracy.
 
See also
class [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") 
     ![Inheritance graph]        

|  |
| --- |
|  |
|  | [BDCSVD](classeigen_1_1bdcsvd#a39514816d38f9c418cf3f3514b511c2c) () |
|  | Default Constructor. [More...](classeigen_1_1bdcsvd#a39514816d38f9c418cf3f3514b511c2c) |
|  |
|  | [BDCSVD](classeigen_1_1bdcsvd#a302746d9c534cd513c1df87c7ae4850d) (const MatrixType &matrix, unsigned int computationOptions=0) |
|  | Constructor performing the decomposition of given matrix. [More...](classeigen_1_1bdcsvd#a302746d9c534cd513c1df87c7ae4850d) |
|  |
|  | [BDCSVD](classeigen_1_1bdcsvd#a3e1fa48b3d042b7daf7392724a68bb60) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1bdcsvd#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1bdcsvd#a2d768a9877f5f69f49432d447b552bfe), unsigned int computationOptions=0) |
|  | Default Constructor with memory preallocation. [More...](classeigen_1_1bdcsvd#a3e1fa48b3d042b7daf7392724a68bb60) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1bdcsvd#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| [BDCSVD](classeigen_1_1bdcsvd) &  | [compute](classeigen_1_1bdcsvd#acf27f41ed044d74ea8e8cbaf17ffdb04) (const MatrixType &matrix) |
|  | Method performing the decomposition of given matrix using current options. [More...](classeigen_1_1bdcsvd#acf27f41ed044d74ea8e8cbaf17ffdb04) |
|  |
| [BDCSVD](classeigen_1_1bdcsvd) &  | [compute](classeigen_1_1bdcsvd#a52e3c627775010775c64d16a00cdb770) (const MatrixType &matrix, unsigned int computationOptions) |
|  | Method performing the decomposition of given matrix using custom options. [More...](classeigen_1_1bdcsvd#a52e3c627775010775c64d16a00cdb770) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1bdcsvd#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| - Public Member Functions inherited from [Eigen::SVDBase< BDCSVD< \_MatrixType > >](classeigen_1_1svdbase) |
| bool  | [computeU](classeigen_1_1svdbase#a705a7c2709e1624ccc19aa748a78d473) () const |
|  |
| bool  | [computeV](classeigen_1_1svdbase#a5f12efcb791eb007d4a4890ac5255ac4) () const |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1svdbase#a06c311bc452dc1ca5abce2f640e15292) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1svdbase#a06c311bc452dc1ca5abce2f640e15292) |
|  |
| const [MatrixUType](classeigen_1_1matrix) &  | [matrixU](classeigen_1_1svdbase#afc7fe1546b0f6e1801b86f22f5664cb8) () const |
|  |
| const [MatrixVType](classeigen_1_1matrix) &  | [matrixV](classeigen_1_1svdbase#a245a453b5e7347f737295c23133238c4) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonzeroSingularValues](classeigen_1_1svdbase#afe8a555f38393a319a71ec0f0331c9ef) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rank](classeigen_1_1svdbase#a30b89e24f42f1692079eea31b361d26a) () const |
|  |
| [BDCSVD](classeigen_1_1bdcsvd)< \_MatrixType > &  | [setThreshold](classeigen_1_1svdbase#a1c95d05398fc15e410a28560ef70a5a6) (const RealScalar &[threshold](classeigen_1_1svdbase#a98b2ee98690358951807353812a05c69)) |
|  |
| [BDCSVD](classeigen_1_1bdcsvd)< \_MatrixType > &  | [setThreshold](classeigen_1_1svdbase#a27586b69dbfb63f714d1d45fd6304f97) (Default\_t) |
|  |
| const SingularValuesType &  | [singularValues](classeigen_1_1svdbase#a4e7bac123570c348f7ed6be909e1e474) () const |
|  |
| const [Solve](classeigen_1_1solve)< [BDCSVD](classeigen_1_1bdcsvd)< \_MatrixType >, Rhs >  | [solve](classeigen_1_1svdbase#ab28499936c0764fe5b56b9f4de701e26) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| RealScalar  | [threshold](classeigen_1_1svdbase#a98b2ee98690358951807353812a05c69) () const |
|  |
| - Public Member Functions inherited from [Eigen::SolverBase< Derived >](classeigen_1_1solverbase) |
| AdjointReturnType  | [adjoint](classeigen_1_1solverbase#a05a3686a89888681c8e0c2bcab6d1ce5) () const |
|  |
| Derived &  | [derived](classeigen_1_1solverbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1solverbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1solverbase#a7fd647d110487799205df6f99547879d) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
|  | [SolverBase](classeigen_1_1solverbase#a4d5e5baddfba3790ab1a5f247dcc4dc1) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1solverbase#a732e75b5132bb4db3775916927b0e86c) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::SVDBase< BDCSVD< \_MatrixType > >](classeigen_1_1svdbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1svdbase#a6229a37997eca1072b52cca5ee7a2bec) |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |
| - Protected Member Functions inherited from [Eigen::SVDBase< BDCSVD< \_MatrixType > >](classeigen_1_1svdbase) |
|  | [SVDBase](classeigen_1_1svdbase#abed06fc6f4b743e1f76a7b317539da87) () |
|  | Default Constructor. [More...](classeigen_1_1svdbase#abed06fc6f4b743e1f76a7b317539da87) |
|  |

  BDCSVD() [1/3]
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::BDCSVD](classeigen_1_1bdcsvd)< \_MatrixType >::[BDCSVD](classeigen_1_1bdcsvd) | ( |  | ) |  |

 | inline |

 
 Default Constructor. 

 The default constructor is useful in cases in which the user intends to perform decompositions via [BDCSVD::compute(const MatrixType&)](classeigen_1_1bdcsvd#acf27f41ed044d74ea8e8cbaf17ffdb04 "Method performing the decomposition of given matrix using current options."). 

    BDCSVD() [2/3]
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::BDCSVD](classeigen_1_1bdcsvd)< \_MatrixType >::[BDCSVD](classeigen_1_1bdcsvd) | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols*,  |
|  |  | unsigned int  | *computationOptions* = `0` |
|  | ) |  |  |

 | inline |

 
 Default Constructor with memory preallocation. 

 Like the default constructor but with preallocation of the internal data according to the specified problem size. 



See also

[BDCSVD()](classeigen_1_1bdcsvd#a39514816d38f9c418cf3f3514b511c2c "Default Constructor.") 
    BDCSVD() [3/3]
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::BDCSVD](classeigen_1_1bdcsvd)< \_MatrixType >::[BDCSVD](classeigen_1_1bdcsvd) | ( | const MatrixType &  | *matrix*,  |
|  |  | unsigned int  | *computationOptions* = `0` |
|  | ) |  |  |

 | inline |

 
 Constructor performing the decomposition of given matrix. 

 
Parameters
 

|  |  |
| --- | --- |
| matrix | the matrix to decompose  |
| computationOptions | optional parameter allowing to specify if you want full or thin U or V unitaries to be computed. By default, none is computed. This is a bit - field, the possible bits are [ComputeFullU](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a9fa9302d510cee20c26311154937e23f), [ComputeThinU](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9aa7fb4e98834788d0b1b0f2b8467d2527), [ComputeFullV](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a36581f7c662f7def31efd500c284f930), [ComputeThinV](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a540036417bfecf2e791a70948c227f47). |

   Thin unitaries are only available if your matrix type has a Dynamic number of columns (for example MatrixXf). They also are not available with the (non - default) [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with full pivoting.") preconditioner. 

    cols()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::cols  | ( | void  |  | ) |  |

 | inline |

 
 
Returns
the number of columns. 
 
See also

[rows()](classeigen_1_1bdcsvd#ac22eb0695d00edd7d4a3b2d0a98b81c2), ColsAtCompileTime 
    compute() [1/2]
---------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [BDCSVD](classeigen_1_1bdcsvd)& [Eigen::BDCSVD](classeigen_1_1bdcsvd)< \_MatrixType >::compute  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Method performing the decomposition of given matrix using current options. 

 
Parameters
 

|  |  |
| --- | --- |
| matrix | the matrix to decompose |

   This method uses the current *computationOptions*, as already passed to the constructor or to [compute(const MatrixType&, unsigned int)](classeigen_1_1bdcsvd#a52e3c627775010775c64d16a00cdb770 "Method performing the decomposition of given matrix using custom options."). 

    compute() [2/2]
---------------

    template<typename MatrixType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [BDCSVD](classeigen_1_1bdcsvd)< MatrixType > & [Eigen::BDCSVD](classeigen_1_1bdcsvd)< MatrixType >::compute  | ( | const MatrixType &  | *matrix*,  |
|  |  | unsigned int  | *computationOptions* |
|  | ) |  |  |

 
 Method performing the decomposition of given matrix using custom options. 

 
Parameters
 

|  |  |
| --- | --- |
| matrix | the matrix to decompose  |
| computationOptions | optional parameter allowing to specify if you want full or thin U or V unitaries to be computed. By default, none is computed. This is a bit - field, the possible bits are [ComputeFullU](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a9fa9302d510cee20c26311154937e23f), [ComputeThinU](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9aa7fb4e98834788d0b1b0f2b8467d2527), [ComputeFullV](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a36581f7c662f7def31efd500c284f930), [ComputeThinV](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a540036417bfecf2e791a70948c227f47). |

   Thin unitaries are only available if your matrix type has a Dynamic number of columns (for example MatrixXf). They also are not available with the (non - default) [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with full pivoting.") preconditioner. 

    rows()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::rows  | ( | void  |  | ) |  |

 | inline |

 
 
Returns
the number of rows. 
 
See also

[cols()](classeigen_1_1bdcsvd#a2d768a9877f5f69f49432d447b552bfe), RowsAtCompileTime 
   

---

The documentation for this class was generated from the following file:* [BDCSVD.h](https://eigen.tuxfamily.org/dox/BDCSVD_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1BDCSVD.html>

Eigen::HouseholderQR
====================

  
### template<typename \_MatrixType> class Eigen::HouseholderQR< \_MatrixType >

 Householder QR decomposition of a matrix. 

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which we are computing the QR decomposition |

   This class performs a QR decomposition of a matrix **A** into matrices **Q** and **R** such that 


 \[ \mathbf{A} = \mathbf{Q} \, \mathbf{R} \] 

  by using Householder transformations. Here, **Q** a unitary matrix and **R** an upper triangular matrix. The result is stored in a compact way compatible with LAPACK.

 Note that no pivoting is performed. This is **not** a rank-revealing decomposition. If you want that feature, use [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with full pivoting.") or [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting.") instead.

 This Householder QR decomposition is faster, but less numerically stable and less feature-full than [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with full pivoting.") or [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting.").

 This class supports the [inplace decomposition](group__inplacedecomposition)  mechanism.

 
See also

[MatrixBase::householderQr()](classeigen_1_1matrixbase#a9a9377aab1cea26db5f25bab7e682f8f) 
     ![Inheritance graph]       

|  |
| --- |
|  |
| MatrixType::RealScalar  | [absDeterminant](classeigen_1_1householderqr#aaf4ef26c0b7affc91431ec59c92d64c3) () const |
|  |
| const HCoeffsType &  | [hCoeffs](classeigen_1_1householderqr#ae931aa44cde62317b57a9ae661d184be) () const |
|  |
| [HouseholderSequenceType](classeigen_1_1householdersequence) | [householderQ](classeigen_1_1householderqr#affd506c10ef2d25f56e7b1f9f25ff885) () const |
|  |
|  | [HouseholderQR](classeigen_1_1householderqr#a974adb10a0e066057aeb3b360df68380) () |
|  | Default Constructor. [More...](classeigen_1_1householderqr#a974adb10a0e066057aeb3b360df68380) |
|  |
| template<typename InputType >  |
|  | [HouseholderQR](classeigen_1_1householderqr#afa7cfb4faa89195c4dc8d196924c8230) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  | Constructs a QR factorization from a given matrix. [More...](classeigen_1_1householderqr#afa7cfb4faa89195c4dc8d196924c8230) |
|  |
| template<typename InputType >  |
|  | [HouseholderQR](classeigen_1_1householderqr#a95a53f8479ee147d7b0ccab71c13e45d) ([EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  | Constructs a QR factorization from a given matrix. [More...](classeigen_1_1householderqr#a95a53f8479ee147d7b0ccab71c13e45d) |
|  |
|  | [HouseholderQR](classeigen_1_1householderqr#a1087457610c53e1574de521a51de0cd3) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  | Default Constructor with memory preallocation. [More...](classeigen_1_1householderqr#a1087457610c53e1574de521a51de0cd3) |
|  |
| MatrixType::RealScalar  | [logAbsDeterminant](classeigen_1_1householderqr#af61b6dbef34fc51c825182b16dc43ca1) () const |
|  |
| const MatrixType &  | [matrixQR](classeigen_1_1householderqr#ae837f2fb30099212c53b3042c7d699c9) () const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< [HouseholderQR](classeigen_1_1householderqr), Rhs >  | [solve](classeigen_1_1householderqr#a3e8e56769bbaaed0616ad98c4ff99c7b) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| - Public Member Functions inherited from [Eigen::SolverBase< HouseholderQR< \_MatrixType > >](classeigen_1_1solverbase) |
| AdjointReturnType  | [adjoint](classeigen_1_1solverbase#a05a3686a89888681c8e0c2bcab6d1ce5) () const |
|  |
| [HouseholderQR](classeigen_1_1householderqr)< \_MatrixType > &  | [derived](classeigen_1_1solverbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const [HouseholderQR](classeigen_1_1householderqr)< \_MatrixType > &  | [derived](classeigen_1_1solverbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| const [Solve](classeigen_1_1solve)< [HouseholderQR](classeigen_1_1householderqr)< \_MatrixType >, Rhs >  | [solve](classeigen_1_1solverbase#a7fd647d110487799205df6f99547879d) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
|  | [SolverBase](classeigen_1_1solverbase#a4d5e5baddfba3790ab1a5f247dcc4dc1) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1solverbase#a732e75b5132bb4db3775916927b0e86c) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| void  | [computeInPlace](classeigen_1_1householderqr#a3a16530338a734971fc45efb0ef9ac94) () |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  HouseholderQR() [1/4]
---------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::HouseholderQR](classeigen_1_1householderqr)< \_MatrixType >::[HouseholderQR](classeigen_1_1householderqr) | ( |  | ) |  |

 | inline |

 
 Default Constructor. 

 The default constructor is useful in cases in which the user intends to perform decompositions via HouseholderQR::compute(const MatrixType&). 

    HouseholderQR() [2/4]
---------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::HouseholderQR](classeigen_1_1householderqr)< \_MatrixType >::[HouseholderQR](classeigen_1_1householderqr) | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols* |
|  | ) |  |  |

 | inline |

 
 Default Constructor with memory preallocation. 

 Like the default constructor but with preallocation of the internal data according to the specified problem *size*. 



See also

[HouseholderQR()](classeigen_1_1householderqr#a974adb10a0e066057aeb3b360df68380 "Default Constructor.") 
    HouseholderQR() [3/4]
---------------------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::HouseholderQR](classeigen_1_1householderqr)< \_MatrixType >::[HouseholderQR](classeigen_1_1householderqr) | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | inlineexplicit |

 
 Constructs a QR factorization from a given matrix. 

 This constructor computes the QR factorization of the matrix *matrix* by calling the method compute(). It is a short cut for:

 
```
HouseholderQR<MatrixType> qr(matrix.rows(), matrix.cols());
qr.compute(matrix);

```


See also
compute() 
    HouseholderQR() [4/4]
---------------------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::HouseholderQR](classeigen_1_1householderqr)< \_MatrixType >::[HouseholderQR](classeigen_1_1householderqr) | ( | [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | inlineexplicit |

 
 Constructs a QR factorization from a given matrix. 

 This overloaded constructor is provided for [inplace decomposition](group__inplacedecomposition)  when `MatrixType` is a [Eigen::Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.").

 
See also
HouseholderQR(const EigenBase&) 
    absDeterminant()
----------------

    template<typename MatrixType >  

|  |
| --- |
| MatrixType::RealScalar [Eigen::HouseholderQR](classeigen_1_1householderqr)< MatrixType >::absDeterminant |

 
 
Returns
the absolute value of the determinant of the matrix of which \*this is the QR decomposition. It has only linear complexity (that is, O(n) where n is the dimension of the square matrix) as the QR decomposition has already been computed.
 
Note
This is only for square matrices.
 
Warning
a determinant can be very big or small, so for matrices of large enough dimension, there is a risk of overflow/underflow. One way to work around that is to use [logAbsDeterminant()](classeigen_1_1householderqr#af61b6dbef34fc51c825182b16dc43ca1) instead.
 
See also

[logAbsDeterminant()](classeigen_1_1householderqr#af61b6dbef34fc51c825182b16dc43ca1), [MatrixBase::determinant()](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) 
    computeInPlace()
----------------

    template<typename MatrixType >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| void [Eigen::HouseholderQR](classeigen_1_1householderqr)< MatrixType >::computeInPlace |

 | protected |

 
 Performs the QR factorization of the given matrix *matrix*. The result of the factorization is stored into `*this`, and a reference to `*this` is returned.

 
See also
class [HouseholderQR](classeigen_1_1householderqr "Householder QR decomposition of a matrix."), HouseholderQR(const MatrixType&) 
    hCoeffs()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const HCoeffsType& [Eigen::HouseholderQR](classeigen_1_1householderqr)< \_MatrixType >::hCoeffs  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const reference to the vector of Householder coefficients used to represent the factor `Q`.
 For advanced uses only. 

    householderQ()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [HouseholderSequenceType](classeigen_1_1householdersequence) [Eigen::HouseholderQR](classeigen_1_1householderqr)< \_MatrixType >::householderQ  | ( | void  |  | ) |  const |

 | inline |

 
 This method returns an expression of the unitary matrix Q as a sequence of Householder transformations.

 The returned expression can directly be used to perform matrix products. It can also be assigned to a dense [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") object. Here is an example showing how to recover the full or thin matrix Q, as well as how to perform matrix products using operator\*:

 Example: 



```
MatrixXf A([MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(5,3)), thinQ([MatrixXf::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)(5,3)), Q;
A.setRandom();
HouseholderQR<MatrixXf> qr(A);
Q = qr.householderQ();
thinQ = qr.householderQ() * thinQ;
std::cout << "The complete unitary matrix Q is:\n" << Q << "\n\n";
std::cout << "The thin matrix Q is:\n" << thinQ << "\n\n";
```

 Output: 



```
The complete unitary matrix Q is:
  -0.676   0.0793    0.713  -0.0788   -0.147
  -0.221   -0.322    -0.37   -0.366   -0.759
  -0.353   -0.345   -0.214    0.841  -0.0518
   0.582   -0.462    0.555    0.176   -0.329
  -0.174   -0.747 -0.00907   -0.348    0.539

The thin matrix Q is:
  -0.676   0.0793    0.713
  -0.221   -0.322    -0.37
  -0.353   -0.345   -0.214
   0.582   -0.462    0.555
  -0.174   -0.747 -0.00907


```
    logAbsDeterminant()
-------------------

    template<typename MatrixType >  

|  |
| --- |
| MatrixType::RealScalar [Eigen::HouseholderQR](classeigen_1_1householderqr)< MatrixType >::logAbsDeterminant |

 
 
Returns
the natural log of the absolute value of the determinant of the matrix of which \*this is the QR decomposition. It has only linear complexity (that is, O(n) where n is the dimension of the square matrix) as the QR decomposition has already been computed.
 
Note
This is only for square matrices.  This method is useful to work around the risk of overflow/underflow that's inherent to determinant computation.
 
See also

[absDeterminant()](classeigen_1_1householderqr#aaf4ef26c0b7affc91431ec59c92d64c3), [MatrixBase::determinant()](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) 
    matrixQR()
----------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixType& [Eigen::HouseholderQR](classeigen_1_1householderqr)< \_MatrixType >::matrixQR  | ( |  | ) |  const |

 | inline |

 
 
Returns
a reference to the matrix where the Householder QR decomposition is stored in a LAPACK-compatible way. 
    solve()
-------

    template<typename \_MatrixType >   template<typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Solve](classeigen_1_1solve)<[HouseholderQR](classeigen_1_1householderqr), Rhs> [Eigen::HouseholderQR](classeigen_1_1householderqr)< \_MatrixType >::solve  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &  | *b* | ) |  const |

 | inline |

 
 This method finds a solution x to the equation Ax=b, where A is the matrix of which \*this is the QR decomposition, if any exists.

 
Parameters
 

|  |  |
| --- | --- |
| b | the right-hand-side of the equation to solve. |

   
Returns
a solution.
 This method just tries to find as good a solution as possible. If you want to check whether a solution exists or if it is accurate, just call this function to get a result and then compute the error of this result, or use [MatrixBase::isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) directly, for instance like this:



```
bool a_solution_exists = (A*result).isApprox(b, precision); 

```

 This method avoids dividing by zero, so that the non-existence of a solution doesn't by itself mean that you'll get `inf` or `nan` values.

 If there exists more than one solution, this method will arbitrarily choose one.

 Example: 



```
typedef Matrix<float,3,3> Matrix3x3;
Matrix3x3 m = Matrix3x3::Random();
Matrix3f y = [Matrix3f::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the matrix y:" << endl << y << endl;
Matrix3f x;
x = m.householderQr().solve(y);
assert(y.isApprox(m*x));
cout << "Here is a solution x to the equation mx=y:" << endl << x << endl;

```

 Output: 



```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Here is the matrix y:
  0.108   -0.27   0.832
-0.0452  0.0268   0.271
  0.258   0.904   0.435
Here is a solution x to the equation mx=y:
 0.609   2.68   1.67
-0.231  -1.57 0.0713
  0.51   3.51   1.05

```
   

---

The documentation for this class was generated from the following file:* [HouseholderQR.h](https://eigen.tuxfamily.org/dox/HouseholderQR_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1HouseholderQR.html>

Eigen::LDLT
===========

  
### template<typename \_MatrixType, int \_UpLo> class Eigen::LDLT< \_MatrixType, \_UpLo >

 Robust Cholesky decomposition of a matrix with pivoting. 

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which to compute the LDL^T Cholesky decomposition  |
| \_UpLo | the triangular part that will be used for the decompositon: Lower (default) or Upper. The other triangular part won't be read. |

   Perform a robust Cholesky decomposition of a positive semidefinite or negative semidefinite matrix \( A \) such that \( A = P^TLDL^\*P \), where P is a permutation matrix, L is lower triangular with a unit diagonal and D is a diagonal matrix.

 The decomposition uses pivoting to ensure stability, so that D will have zeros in the bottom right rank(A) - n submatrix. Avoiding the square root on D also stabilizes the computation.

 Remember that Cholesky decompositions are not rank-revealing. Also, do not use a Cholesky decomposition to determine whether a system of equations has a solution.

 This class supports the [inplace decomposition](group__inplacedecomposition)  mechanism.

 
See also

[MatrixBase::ldlt()](classeigen_1_1matrixbase#a0ecf058a0727a4cab8b42d79e95072e1), [SelfAdjointView::ldlt()](classeigen_1_1selfadjointview#a644155eef17b37c95d85b9f65bb49ac4), class [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
| const [LDLT](classeigen_1_1ldlt) &  | [adjoint](classeigen_1_1ldlt#ac656a209860fa0c6a8faa8bb9f9a06ef) () const |
|  |
| template<typename InputType >  |
| [LDLT](classeigen_1_1ldlt)< MatrixType, \_UpLo > &  | [compute](classeigen_1_1ldlt#a1777488d0bde83d5f23a622bf8431ef2) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &a) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1ldlt#a6bd6008501a537d2e16ea672a853bf3e) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1ldlt#a6bd6008501a537d2e16ea672a853bf3e) |
|  |
| bool  | [isNegative](classeigen_1_1ldlt#aabd3e7aebe844034caca4c62dbe9c1eb) (void) const |
|  |
| bool  | [isPositive](classeigen_1_1ldlt#a5e1c6b7ba8d7b82575d6ffdc3bf35bcb) () const |
|  |
|  | [LDLT](classeigen_1_1ldlt#a2e06dedd2651649c5b251fbf9ba4e7d4) () |
|  | Default Constructor. [More...](classeigen_1_1ldlt#a2e06dedd2651649c5b251fbf9ba4e7d4) |
|  |
| template<typename InputType >  |
|  | [LDLT](classeigen_1_1ldlt#ad0e8d2131ea1a626a08d98e9effb1cc5) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  | Constructor with decomposition. [More...](classeigen_1_1ldlt#ad0e8d2131ea1a626a08d98e9effb1cc5) |
|  |
| template<typename InputType >  |
|  | [LDLT](classeigen_1_1ldlt#adf853d6cbbc49f3535a44439bca344d9) ([EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  | Constructs a [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") factorization from a given matrix. [More...](classeigen_1_1ldlt#adf853d6cbbc49f3535a44439bca344d9) |
|  |
|  | [LDLT](classeigen_1_1ldlt#a154aa41bd2460199d48861eaf5e4f597) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9)) |
|  | Default Constructor with memory preallocation. [More...](classeigen_1_1ldlt#a154aa41bd2460199d48861eaf5e4f597) |
|  |
| Traits::MatrixL  | [matrixL](classeigen_1_1ldlt#af0e6a0df5679873b42cf82a372dd8ddb) () const |
|  |
| const MatrixType &  | [matrixLDLT](classeigen_1_1ldlt#aa5e0fd09dcd5251a8521fa248b95db0b) () const |
|  |
| Traits::MatrixU  | [matrixU](classeigen_1_1ldlt#a54838a2e31e53bbe4dcb78b5e80c8484) () const |
|  |
| template<typename Derived >  |
| [LDLT](classeigen_1_1ldlt)< MatrixType, \_UpLo > &  | [rankUpdate](classeigen_1_1ldlt#a858dc77b65dd48248299bb6a6a758abf) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &w, const typename [LDLT](classeigen_1_1ldlt)< MatrixType, \_UpLo >::RealScalar &sigma) |
|  |
| RealScalar  | [rcond](classeigen_1_1ldlt#ae646403fdde3a4b18e278a32c61a0953) () const |
|  |
| MatrixType  | [reconstructedMatrix](classeigen_1_1ldlt#ae3693372ca29f50d87d324dfadaae148) () const |
|  |
| void  | [setZero](classeigen_1_1ldlt#a776d0ab6c980847297d25b03b5d2216a) () |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< [LDLT](classeigen_1_1ldlt), Rhs >  | [solve](classeigen_1_1ldlt#aa257dd7a8acf8b347d5a22a13d6ca3e1) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| const [TranspositionType](classeigen_1_1transpositions) &  | [transpositionsP](classeigen_1_1ldlt#a47257d3500f9f7c9a4478158d0e34941) () const |
|  |
| [Diagonal](classeigen_1_1diagonal)< const MatrixType >  | [vectorD](classeigen_1_1ldlt#af60b2f826a38a00070e0efccf0572066) () const |
|  |
| - Public Member Functions inherited from [Eigen::SolverBase< LDLT< \_MatrixType, \_UpLo > >](classeigen_1_1solverbase) |
| AdjointReturnType  | [adjoint](classeigen_1_1solverbase#a05a3686a89888681c8e0c2bcab6d1ce5) () const |
|  |
| [LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo > &  | [derived](classeigen_1_1solverbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const [LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo > &  | [derived](classeigen_1_1solverbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| const [Solve](classeigen_1_1solve)< [LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >, Rhs >  | [solve](classeigen_1_1solverbase#a7fd647d110487799205df6f99547879d) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
|  | [SolverBase](classeigen_1_1solverbase#a4d5e5baddfba3790ab1a5f247dcc4dc1) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1solverbase#a732e75b5132bb4db3775916927b0e86c) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  LDLT() [1/4]
------------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::[LDLT](classeigen_1_1ldlt) | ( |  | ) |  |

 | inline |

 
 Default Constructor. 

 The default constructor is useful in cases in which the user intends to perform decompositions via LDLT::compute(const MatrixType&). 

    LDLT() [2/4]
------------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::[LDLT](classeigen_1_1ldlt) | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *size* | ) |  |

 | inlineexplicit |

 
 Default Constructor with memory preallocation. 

 Like the default constructor but with preallocation of the internal data according to the specified problem *size*. 



See also

[LDLT()](classeigen_1_1ldlt#a2e06dedd2651649c5b251fbf9ba4e7d4 "Default Constructor.") 
    LDLT() [3/4]
------------

    template<typename \_MatrixType , int \_UpLo>   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::[LDLT](classeigen_1_1ldlt) | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | inlineexplicit |

 
 Constructor with decomposition. 

 This calculates the decomposition for the input *matrix*.

 
See also

[LDLT(Index size)](classeigen_1_1ldlt#a154aa41bd2460199d48861eaf5e4f597 "Default Constructor with memory preallocation.") 
    LDLT() [4/4]
------------

    template<typename \_MatrixType , int \_UpLo>   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::[LDLT](classeigen_1_1ldlt) | ( | [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | inlineexplicit |

 
 Constructs a [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") factorization from a given matrix. 

 This overloaded constructor is provided for [inplace decomposition](group__inplacedecomposition)  when `MatrixType` is a [Eigen::Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.").

 
See also
LDLT(const EigenBase&) 
    adjoint()
---------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [LDLT](classeigen_1_1ldlt)& [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::adjoint  | ( |  | ) |  const |

 | inline |

 
 
Returns
the adjoint of `*this`, that is, a const reference to the decomposition itself as the underlying matrix is self-adjoint.
 This method is provided for compatibility with other matrix decompositions, thus enabling generic code such as: 



```
x = decomposition.adjoint().solve(b) 

```
    compute()
---------

    template<typename \_MatrixType , int \_UpLo>   template<typename InputType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [LDLT](classeigen_1_1ldlt)<MatrixType,\_UpLo>& [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::compute  | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *a* | ) |  |

 
 Compute / recompute the [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") decomposition A = L D L^\* = U^\* D U of *matrix* 

    info()
------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether previous computation was successful. 

 
Returns

`Success` if computation was successful, `NumericalIssue` if the factorization failed because of a zero pivot. 
    isNegative()
------------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| bool [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::isNegative  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
true if the matrix is negative (semidefinite) 
    isPositive()
------------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::isPositive  | ( |  | ) |  const |

 | inline |

 
 
Returns
true if the matrix is positive (semidefinite) 
    matrixL()
---------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Traits::MatrixL [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::matrixL  | ( |  | ) |  const |

 | inline |

 
 
Returns
a view of the lower triangular matrix L 
    matrixLDLT()
------------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixType& [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::matrixLDLT  | ( |  | ) |  const |

 | inline |

 
 
Returns
the internal [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") decomposition matrix
 TODO: document the storage layout 

    matrixU()
---------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Traits::MatrixU [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::matrixU  | ( |  | ) |  const |

 | inline |

 
 
Returns
a view of the upper triangular matrix U 
    rankUpdate()
------------

    template<typename \_MatrixType , int \_UpLo>   template<typename Derived >  

|  |  |  |  |
| --- | --- | --- | --- |
| [LDLT](classeigen_1_1ldlt)<MatrixType,\_UpLo>& [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::rankUpdate  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *w*,  |
|  |  | const typename [LDLT](classeigen_1_1ldlt)< MatrixType, \_UpLo >::RealScalar &  | *sigma* |
|  | ) |  |  |

 
 Update the [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") decomposition: given A = L D L^T, efficiently compute the decomposition of A + sigma w w^T. 



Parameters
 

|  |  |
| --- | --- |
| w | a vector to be incorporated into the decomposition.  |
| sigma | a scalar, +1 for updates and -1 for "downdates," which correspond to removing previously-added column vectors. Optional; default value is +1.  |

   
See also

[setZero()](classeigen_1_1ldlt#a776d0ab6c980847297d25b03b5d2216a) 
    rcond()
-------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::rcond  | ( |  | ) |  const |

 | inline |

 
 
Returns
an estimate of the reciprocal condition number of the matrix of which `*this` is the [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") decomposition. 
    reconstructedMatrix()
---------------------

    template<typename MatrixType , int \_UpLo>  

|  |
| --- |
| MatrixType [Eigen::LDLT](classeigen_1_1ldlt)< MatrixType, \_UpLo >::reconstructedMatrix |

 
 
Returns
the matrix represented by the decomposition, i.e., it returns the product: P^T L D L^\* P. This function is provided for debug purpose. 
    setZero()
---------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::setZero  | ( |  | ) |  |

 | inline |

 
 Clear any existing decomposition 



See also
rankUpdate(w,sigma) 
    solve()
-------

    template<typename \_MatrixType , int \_UpLo>   template<typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Solve](classeigen_1_1solve)<[LDLT](classeigen_1_1ldlt), Rhs> [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::solve  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &  | *b* | ) |  const |

 | inline |

 
 
Returns
a solution x of \( A x = b \) using the current decomposition of A.
 This function also supports in-place solves using the syntax `x = decompositionObject.solve(x)` .

 This method just tries to find as good a solution as possible. If you want to check whether a solution exists or if it is accurate, just call this function to get a result and then compute the error of this result, or use [MatrixBase::isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) directly, for instance like this:



```
bool a_solution_exists = (A*result).isApprox(b, precision); 

```

 This method avoids dividing by zero, so that the non-existence of a solution doesn't by itself mean that you'll get `inf` or `nan` values.

 More precisely, this method solves \( A x = b \) using the decomposition \( A = P^T L D L^\* P \) by solving the systems \( P^T y\_1 = b \), \( L y\_2 = y\_1 \), \( D y\_3 = y\_2 \), \( L^\* y\_4 = y\_3 \) and \( P x = y\_4 \) in succession. If the matrix \( A \) is singular, then \( D \) will also be singular (all the other matrices are invertible). In that case, the least-square solution of \( D y\_3 = y\_2 \) is computed. This does not mean that this function computes the least-square solution of \( A x = b \) if \( A \) is singular.

 
See also

[MatrixBase::ldlt()](classeigen_1_1matrixbase#a0ecf058a0727a4cab8b42d79e95072e1), [SelfAdjointView::ldlt()](classeigen_1_1selfadjointview#a644155eef17b37c95d85b9f65bb49ac4) 
    transpositionsP()
-----------------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [TranspositionType](classeigen_1_1transpositions)& [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::transpositionsP  | ( |  | ) |  const |

 | inline |

 
 
Returns
the permutation matrix P as a transposition sequence. 
    vectorD()
---------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Diagonal](classeigen_1_1diagonal)<const MatrixType> [Eigen::LDLT](classeigen_1_1ldlt)< \_MatrixType, \_UpLo >::vectorD  | ( |  | ) |  const |

 | inline |

 
 
Returns
the coefficients of the diagonal matrix D 
   

---

The documentation for this class was generated from the following file:* [LDLT.h](https://eigen.tuxfamily.org/dox/LDLT_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1LDLT.html>

Eigen::JacobiSVD
================

  
### template<typename \_MatrixType, int QRPreconditioner> class Eigen::JacobiSVD< \_MatrixType, QRPreconditioner >

 Two-sided Jacobi SVD decomposition of a rectangular matrix. 

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which we are computing the SVD decomposition  |
| QRPreconditioner | this optional parameter allows to specify the type of QR decomposition that will be used internally for the R-SVD step for non-square matrices. See discussion of possible values below. |

   SVD decomposition consists in decomposing any n-by-p matrix *A* as a product 


 \[ A = U S V^\* \] 

  where *U* is a n-by-n unitary, *V* is a p-by-p unitary, and *S* is a n-by-p real positive matrix which is zero outside of its main diagonal; the diagonal entries of S are known as the *singular* *values* of *A* and the columns of *U* and *V* are known as the left and right *singular* *vectors* of *A* respectively.

 Singular values are always sorted in decreasing order.

 This [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") decomposition computes only the singular values by default. If you want *U* or *V*, you need to ask for them explicitly.

 You can ask for only *thin* *U* or *V* to be computed, meaning the following. In case of a rectangular n-by-p matrix, letting *m* be the smaller value among *n* and *p*, there are only *m* singular vectors; the remaining columns of *U* and *V* do not correspond to actual singular vectors. Asking for *thin* *U* or *V* means asking for only their *m* first columns to be formed. So *U* is then a n-by-m matrix, and *V* is then a p-by-m matrix. Notice that thin *U* and *V* are all you need for (least squares) solving.

 Here's an example demonstrating basic usage: 



```
MatrixXf m = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3,2);
cout << "Here is the matrix m:" << endl << m << endl;
JacobiSVD<MatrixXf> svd(m, [ComputeThinU](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9aa7fb4e98834788d0b1b0f2b8467d2527) | [ComputeThinV](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a540036417bfecf2e791a70948c227f47));
cout << "Its singular values are:" << endl << svd.singularValues() << endl;
cout << "Its left singular vectors are the columns of the thin U matrix:" << endl << svd.matrixU() << endl;
cout << "Its right singular vectors are the columns of the thin V matrix:" << endl << svd.matrixV() << endl;
Vector3f rhs(1, 0, 0);
cout << "Now consider this rhs vector:" << endl << rhs << endl;
cout << "A least-squares solution of m\*x = rhs is:" << endl << svd.solve(rhs) << endl;
```

 Output: 



```
Here is the matrix m:
  0.68  0.597
-0.211  0.823
 0.566 -0.605
Its singular values are:
 1.19
0.899
Its left singular vectors are the columns of the thin U matrix:
  0.388   0.866
  0.712 -0.0634
 -0.586   0.496
Its right singular vectors are the columns of the thin V matrix:
-0.183  0.983
 0.983  0.183
Now consider this rhs vector:
1
0
0
A least-squares solution of m*x = rhs is:
0.888
0.496

```

This [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") class is a two-sided Jacobi R-SVD decomposition, ensuring optimal reliability and accuracy. The downside is that it's slower than bidiagonalizing SVD algorithms for large square matrices; however its complexity is still \( O(n^2p) \) where *n* is the smaller dimension and *p* is the greater dimension, meaning that it is still of the same order of complexity as the faster bidiagonalizing R-SVD algorithms. In particular, like any R-SVD, it takes advantage of non-squareness in that its complexity is only linear in the greater dimension.

 If the input matrix has inf or nan coefficients, the result of the computation is undefined, but the computation is guaranteed to terminate in finite (and reasonable) time.

 The possible values for QRPreconditioner are: 


* ColPivHouseholderQRPreconditioner is the default. In practice it's very safe. It uses column-pivoting QR.
* FullPivHouseholderQRPreconditioner, is the safest and slowest. It uses full-pivoting QR. Contrary to other QRs, it doesn't allow computing thin unitaries.
* HouseholderQRPreconditioner is the fastest, and less safe and accurate than the pivoting variants. It uses non-pivoting QR. This is very similar in safety and accuracy to the bidiagonalization process used by bidiagonalizing SVD algorithms (since bidiagonalization is inherently non-pivoting). However the resulting SVD is still more reliable than bidiagonalizing SVDs because the Jacobi-based iterarive process is more reliable than the optimized bidiagonal SVD iterations.
* NoQRPreconditioner allows not to use a QR preconditioner at all. This is useful if you know that you will only be computing [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") decompositions of square matrices. Non-square matrices require a QR preconditioner. Using this option will result in faster compilation and smaller executable code. It won't significantly speed up computation, since [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") is always checking if QR preconditioning is needed before applying it anyway.

 
See also

[MatrixBase::jacobiSvd()](classeigen_1_1matrixbase#a5745dca9c54390633b434e54a1d1eedd) 
     ![Inheritance graph]        

|  |
| --- |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1jacobisvd#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| [JacobiSVD](classeigen_1_1jacobisvd) &  | [compute](classeigen_1_1jacobisvd#acc7b9a4068cf7b69ae3227d217ed7efd) (const MatrixType &matrix) |
|  | Method performing the decomposition of given matrix using current options. [More...](classeigen_1_1jacobisvd#acc7b9a4068cf7b69ae3227d217ed7efd) |
|  |
| [JacobiSVD](classeigen_1_1jacobisvd) &  | [compute](classeigen_1_1jacobisvd#a5dab376cc86cf0d36674bcdad4af3f5a) (const MatrixType &matrix, unsigned int computationOptions) |
|  | Method performing the decomposition of given matrix using custom options. [More...](classeigen_1_1jacobisvd#a5dab376cc86cf0d36674bcdad4af3f5a) |
|  |
|  | [JacobiSVD](classeigen_1_1jacobisvd#a55315ab9cd060019a5ad07be798ff3b9) () |
|  | Default Constructor. [More...](classeigen_1_1jacobisvd#a55315ab9cd060019a5ad07be798ff3b9) |
|  |
|  | [JacobiSVD](classeigen_1_1jacobisvd#abfd1dd454a6e3edec7feecd97c818a78) (const MatrixType &matrix, unsigned int computationOptions=0) |
|  | Constructor performing the decomposition of given matrix. [More...](classeigen_1_1jacobisvd#abfd1dd454a6e3edec7feecd97c818a78) |
|  |
|  | [JacobiSVD](classeigen_1_1jacobisvd#a5d9ea7c8f361337727260efd77ee03ac) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1jacobisvd#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1jacobisvd#a2d768a9877f5f69f49432d447b552bfe), unsigned int computationOptions=0) |
|  | Default Constructor with memory preallocation. [More...](classeigen_1_1jacobisvd#a5d9ea7c8f361337727260efd77ee03ac) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1jacobisvd#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| - Public Member Functions inherited from [Eigen::SVDBase< JacobiSVD< \_MatrixType, QRPreconditioner > >](classeigen_1_1svdbase) |
| bool  | [computeU](classeigen_1_1svdbase#a705a7c2709e1624ccc19aa748a78d473) () const |
|  |
| bool  | [computeV](classeigen_1_1svdbase#a5f12efcb791eb007d4a4890ac5255ac4) () const |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1svdbase#a06c311bc452dc1ca5abce2f640e15292) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1svdbase#a06c311bc452dc1ca5abce2f640e15292) |
|  |
| const [MatrixUType](classeigen_1_1matrix) &  | [matrixU](classeigen_1_1svdbase#afc7fe1546b0f6e1801b86f22f5664cb8) () const |
|  |
| const [MatrixVType](classeigen_1_1matrix) &  | [matrixV](classeigen_1_1svdbase#a245a453b5e7347f737295c23133238c4) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonzeroSingularValues](classeigen_1_1svdbase#afe8a555f38393a319a71ec0f0331c9ef) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rank](classeigen_1_1svdbase#a30b89e24f42f1692079eea31b361d26a) () const |
|  |
| [JacobiSVD](classeigen_1_1jacobisvd)< \_MatrixType, QRPreconditioner > &  | [setThreshold](classeigen_1_1svdbase#a1c95d05398fc15e410a28560ef70a5a6) (const RealScalar &[threshold](classeigen_1_1svdbase#a98b2ee98690358951807353812a05c69)) |
|  |
| [JacobiSVD](classeigen_1_1jacobisvd)< \_MatrixType, QRPreconditioner > &  | [setThreshold](classeigen_1_1svdbase#a27586b69dbfb63f714d1d45fd6304f97) (Default\_t) |
|  |
| const SingularValuesType &  | [singularValues](classeigen_1_1svdbase#a4e7bac123570c348f7ed6be909e1e474) () const |
|  |
| const [Solve](classeigen_1_1solve)< [JacobiSVD](classeigen_1_1jacobisvd)< \_MatrixType, QRPreconditioner >, Rhs >  | [solve](classeigen_1_1svdbase#ab28499936c0764fe5b56b9f4de701e26) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| RealScalar  | [threshold](classeigen_1_1svdbase#a98b2ee98690358951807353812a05c69) () const |
|  |
| - Public Member Functions inherited from [Eigen::SolverBase< Derived >](classeigen_1_1solverbase) |
| AdjointReturnType  | [adjoint](classeigen_1_1solverbase#a05a3686a89888681c8e0c2bcab6d1ce5) () const |
|  |
| Derived &  | [derived](classeigen_1_1solverbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1solverbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1solverbase#a7fd647d110487799205df6f99547879d) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
|  | [SolverBase](classeigen_1_1solverbase#a4d5e5baddfba3790ab1a5f247dcc4dc1) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1solverbase#a732e75b5132bb4db3775916927b0e86c) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::SVDBase< JacobiSVD< \_MatrixType, QRPreconditioner > >](classeigen_1_1svdbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1svdbase#a6229a37997eca1072b52cca5ee7a2bec) |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |
| - Protected Member Functions inherited from [Eigen::SVDBase< JacobiSVD< \_MatrixType, QRPreconditioner > >](classeigen_1_1svdbase) |
|  | [SVDBase](classeigen_1_1svdbase#abed06fc6f4b743e1f76a7b317539da87) () |
|  | Default Constructor. [More...](classeigen_1_1svdbase#abed06fc6f4b743e1f76a7b317539da87) |
|  |

  JacobiSVD() [1/3]
-----------------

    template<typename \_MatrixType , int QRPreconditioner>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::JacobiSVD](classeigen_1_1jacobisvd)< \_MatrixType, QRPreconditioner >::[JacobiSVD](classeigen_1_1jacobisvd) | ( |  | ) |  |

 | inline |

 
 Default Constructor. 

 The default constructor is useful in cases in which the user intends to perform decompositions via [JacobiSVD::compute(const MatrixType&)](classeigen_1_1jacobisvd#acc7b9a4068cf7b69ae3227d217ed7efd "Method performing the decomposition of given matrix using current options."). 

    JacobiSVD() [2/3]
-----------------

    template<typename \_MatrixType , int QRPreconditioner>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::JacobiSVD](classeigen_1_1jacobisvd)< \_MatrixType, QRPreconditioner >::[JacobiSVD](classeigen_1_1jacobisvd) | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols*,  |
|  |  | unsigned int  | *computationOptions* = `0` |
|  | ) |  |  |

 | inline |

 
 Default Constructor with memory preallocation. 

 Like the default constructor but with preallocation of the internal data according to the specified problem size. 



See also

[JacobiSVD()](classeigen_1_1jacobisvd#a55315ab9cd060019a5ad07be798ff3b9 "Default Constructor.") 
    JacobiSVD() [3/3]
-----------------

    template<typename \_MatrixType , int QRPreconditioner>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::JacobiSVD](classeigen_1_1jacobisvd)< \_MatrixType, QRPreconditioner >::[JacobiSVD](classeigen_1_1jacobisvd) | ( | const MatrixType &  | *matrix*,  |
|  |  | unsigned int  | *computationOptions* = `0` |
|  | ) |  |  |

 | inlineexplicit |

 
 Constructor performing the decomposition of given matrix. 

 
Parameters
 

|  |  |
| --- | --- |
| matrix | the matrix to decompose  |
| computationOptions | optional parameter allowing to specify if you want full or thin U or V unitaries to be computed. By default, none is computed. This is a bit-field, the possible bits are [ComputeFullU](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a9fa9302d510cee20c26311154937e23f), [ComputeThinU](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9aa7fb4e98834788d0b1b0f2b8467d2527), [ComputeFullV](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a36581f7c662f7def31efd500c284f930), [ComputeThinV](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a540036417bfecf2e791a70948c227f47). |

   Thin unitaries are only available if your matrix type has a Dynamic number of columns (for example MatrixXf). They also are not available with the (non-default) [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with full pivoting.") preconditioner. 

    cols()
------

    template<typename \_MatrixType , int QRPreconditioner>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::cols  | ( | void  |  | ) |  |

 | inline |

 
 
Returns
the number of columns. 
 
See also

[rows()](classeigen_1_1jacobisvd#ac22eb0695d00edd7d4a3b2d0a98b81c2), ColsAtCompileTime 
    compute() [1/2]
---------------

    template<typename \_MatrixType , int QRPreconditioner>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [JacobiSVD](classeigen_1_1jacobisvd)& [Eigen::JacobiSVD](classeigen_1_1jacobisvd)< \_MatrixType, QRPreconditioner >::compute  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Method performing the decomposition of given matrix using current options. 

 
Parameters
 

|  |  |
| --- | --- |
| matrix | the matrix to decompose |

   This method uses the current *computationOptions*, as already passed to the constructor or to [compute(const MatrixType&, unsigned int)](classeigen_1_1jacobisvd#a5dab376cc86cf0d36674bcdad4af3f5a "Method performing the decomposition of given matrix using custom options."). 

    compute() [2/2]
---------------

    template<typename MatrixType , int QRPreconditioner>  

|  |  |  |  |
| --- | --- | --- | --- |
| [JacobiSVD](classeigen_1_1jacobisvd)< MatrixType, QRPreconditioner > & [Eigen::JacobiSVD](classeigen_1_1jacobisvd)< MatrixType, QRPreconditioner >::compute  | ( | const MatrixType &  | *matrix*,  |
|  |  | unsigned int  | *computationOptions* |
|  | ) |  |  |

 
 Method performing the decomposition of given matrix using custom options. 

 
Parameters
 

|  |  |
| --- | --- |
| matrix | the matrix to decompose  |
| computationOptions | optional parameter allowing to specify if you want full or thin U or V unitaries to be computed. By default, none is computed. This is a bit-field, the possible bits are [ComputeFullU](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a9fa9302d510cee20c26311154937e23f), [ComputeThinU](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9aa7fb4e98834788d0b1b0f2b8467d2527), [ComputeFullV](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a36581f7c662f7def31efd500c284f930), [ComputeThinV](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a540036417bfecf2e791a70948c227f47). |

   Thin unitaries are only available if your matrix type has a Dynamic number of columns (for example MatrixXf). They also are not available with the (non-default) [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with full pivoting.") preconditioner. 

    rows()
------

    template<typename \_MatrixType , int QRPreconditioner>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::rows  | ( | void  |  | ) |  |

 | inline |

 
 
Returns
the number of rows. 
 
See also

[cols()](classeigen_1_1jacobisvd#a2d768a9877f5f69f49432d447b552bfe), RowsAtCompileTime 
   

---

The documentation for this class was generated from the following file:* [JacobiSVD.h](https://eigen.tuxfamily.org/dox/JacobiSVD_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1JacobiSVD.html>

Eigen::EigenSolver
==================

  
### template<typename \_MatrixType> class Eigen::EigenSolver< \_MatrixType >

 Computes eigenvalues and eigenvectors of general matrices. 

 This is defined in the Eigenvalues module.



```
#include <Eigen/Eigenvalues> 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which we are computing the eigendecomposition; this is expected to be an instantiation of the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class template. Currently, only real matrices are supported. |

   The eigenvalues and eigenvectors of a matrix \( A \) are scalars \( \lambda \) and vectors \( v \) such that \( Av = \lambda v \). If \( D \) is a diagonal matrix with the eigenvalues on the diagonal, and \( V \) is a matrix with the eigenvectors as its columns, then \( A V = V D \). The matrix \( V \) is almost always invertible, in which case we have \( A = V D V^{-1} \). This is called the eigendecomposition.

 The eigenvalues and eigenvectors of a matrix may be complex, even when the matrix is real. However, we can choose real matrices \( V \) and \( D \) satisfying \( A V = V D \), just like the eigendecomposition, if the matrix \( D \) is not required to be diagonal, but if it is allowed to have blocks of the form 


 \[ \begin{bmatrix} u & v \\ -v & u \end{bmatrix} \] 

  (where \( u \) and \( v \) are real numbers) on the diagonal. These blocks correspond to complex eigenvalue pairs \( u \pm iv \). We call this variant of the eigendecomposition the pseudo-eigendecomposition.

 Call the function [compute()](classeigen_1_1eigensolver#a38d032b75b3e75640e3db42e7ab20c24 "Computes eigendecomposition of given matrix.") to compute the eigenvalues and eigenvectors of a given matrix. Alternatively, you can use the EigenSolver(const MatrixType&, bool) constructor which computes the eigenvalues and eigenvectors at construction time. Once the eigenvalue and eigenvectors are computed, they can be retrieved with the [eigenvalues()](classeigen_1_1eigensolver#a114189009e42f5e03372a7a3dfa33b97 "Returns the eigenvalues of given matrix.") and [eigenvectors()](classeigen_1_1eigensolver#a66288022802172e3ee059283b26201d7 "Returns the eigenvectors of given matrix.") functions. The [pseudoEigenvalueMatrix()](classeigen_1_1eigensolver#a4979eafe0aeef06b19ada7fa5e19db17 "Returns the block-diagonal matrix in the pseudo-eigendecomposition.") and [pseudoEigenvectors()](classeigen_1_1eigensolver#a4e796226f06e1f7347cf03a38755a155 "Returns the pseudo-eigenvectors of given matrix.") methods allow the construction of the pseudo-eigendecomposition.

 The documentation for EigenSolver(const MatrixType&, bool) contains an example of the typical use of this class.

 
Note
The implementation is adapted from [JAMA](http://math.nist.gov/javanumerics/jama/) (public domain). Their code is based on EISPACK.
 
See also

[MatrixBase::eigenvalues()](classeigen_1_1matrixbase#a30430fa3d5b4e74d312fd4f502ac984d "Computes the eigenvalues of a matrix."), class [ComplexEigenSolver](classeigen_1_1complexeigensolver "Computes eigenvalues and eigenvectors of general complex matrices."), class [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver "Computes eigenvalues and eigenvectors of selfadjoint matrices.") 
 


|  |
| --- |
|  |
| typedef std::complex< RealScalar >  | [ComplexScalar](classeigen_1_1eigensolver#a4d0b2a773357d0a6ec98e026f04002ed) |
|  | Complex scalar type for [MatrixType](classeigen_1_1eigensolver#a83acd180404ddaac8a678fa65a6b632b "Synonym for the template parameter _MatrixType."). [More...](classeigen_1_1eigensolver#a4d0b2a773357d0a6ec98e026f04002ed) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [ComplexScalar](classeigen_1_1eigensolver#a4d0b2a773357d0a6ec98e026f04002ed), ColsAtCompileTime, 1, Options &~[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f), MaxColsAtCompileTime, 1 >  | [EigenvalueType](classeigen_1_1eigensolver#adc446bcb60572758fa64515f2825db62) |
|  | Type for vector of eigenvalues as returned by [eigenvalues()](classeigen_1_1eigensolver#a114189009e42f5e03372a7a3dfa33b97 "Returns the eigenvalues of given matrix."). [More...](classeigen_1_1eigensolver#adc446bcb60572758fa64515f2825db62) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [ComplexScalar](classeigen_1_1eigensolver#a4d0b2a773357d0a6ec98e026f04002ed), RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime >  | [EigenvectorsType](classeigen_1_1eigensolver#aa140354e2f7d5ce34c6488c39e19f2c2) |
|  | Type for matrix of eigenvectors as returned by [eigenvectors()](classeigen_1_1eigensolver#a66288022802172e3ee059283b26201d7 "Returns the eigenvectors of given matrix."). [More...](classeigen_1_1eigensolver#aa140354e2f7d5ce34c6488c39e19f2c2) |
|  |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1eigensolver#a5bff6a6bc0efac67d52c60c2c3deb9ee) |
|  |
|  typedef \_MatrixType  | [MatrixType](classeigen_1_1eigensolver#a83acd180404ddaac8a678fa65a6b632b) |
|  | Synonym for the template parameter `_MatrixType`.  |
|  |
|  typedef MatrixType::Scalar  | [Scalar](classeigen_1_1eigensolver#a017d49fe0d59874b70a2fcf35e5aa373) |
|  | Scalar type for matrices of type [MatrixType](classeigen_1_1eigensolver#a83acd180404ddaac8a678fa65a6b632b "Synonym for the template parameter _MatrixType.").  |
|  |




|  |
| --- |
|  |
| template<typename InputType >  |
| [EigenSolver](classeigen_1_1eigensolver) &  | [compute](classeigen_1_1eigensolver#a38d032b75b3e75640e3db42e7ab20c24) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix, bool computeEigenvectors=true) |
|  | Computes eigendecomposition of given matrix. [More...](classeigen_1_1eigensolver#a38d032b75b3e75640e3db42e7ab20c24) |
|  |
|  | [EigenSolver](classeigen_1_1eigensolver#a3af22d721a6401365881b2ef252d26aa) () |
|  | Default constructor. [More...](classeigen_1_1eigensolver#a3af22d721a6401365881b2ef252d26aa) |
|  |
| template<typename InputType >  |
|  | [EigenSolver](classeigen_1_1eigensolver#a7e8ab3d89ea525af5f27f1a8e805fae1) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix, bool computeEigenvectors=true) |
|  | Constructor; computes eigendecomposition of given matrix. [More...](classeigen_1_1eigensolver#a7e8ab3d89ea525af5f27f1a8e805fae1) |
|  |
|  | [EigenSolver](classeigen_1_1eigensolver#aa4edf56ecc178b277b75c13a2ca1089f) ([Index](classeigen_1_1eigensolver#a5bff6a6bc0efac67d52c60c2c3deb9ee) size) |
|  | Default constructor with memory preallocation. [More...](classeigen_1_1eigensolver#aa4edf56ecc178b277b75c13a2ca1089f) |
|  |
| const [EigenvalueType](classeigen_1_1eigensolver#adc446bcb60572758fa64515f2825db62) &  | [eigenvalues](classeigen_1_1eigensolver#a114189009e42f5e03372a7a3dfa33b97) () const |
|  | Returns the eigenvalues of given matrix. [More...](classeigen_1_1eigensolver#a114189009e42f5e03372a7a3dfa33b97) |
|  |
| [EigenvectorsType](classeigen_1_1eigensolver#aa140354e2f7d5ce34c6488c39e19f2c2) | [eigenvectors](classeigen_1_1eigensolver#a66288022802172e3ee059283b26201d7) () const |
|  | Returns the eigenvectors of given matrix. [More...](classeigen_1_1eigensolver#a66288022802172e3ee059283b26201d7) |
|  |
|  [Index](classeigen_1_1eigensolver#a5bff6a6bc0efac67d52c60c2c3deb9ee) | [getMaxIterations](classeigen_1_1eigensolver#aa7668af4bcb47cd92cfe10640589d88f) () |
|  | Returns the maximum number of iterations.  |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1eigensolver#ac4af54fadc33abcdd1778c87bfbf005b) () const |
|  |
| [MatrixType](classeigen_1_1eigensolver#a83acd180404ddaac8a678fa65a6b632b) | [pseudoEigenvalueMatrix](classeigen_1_1eigensolver#a4979eafe0aeef06b19ada7fa5e19db17) () const |
|  | Returns the block-diagonal matrix in the pseudo-eigendecomposition. [More...](classeigen_1_1eigensolver#a4979eafe0aeef06b19ada7fa5e19db17) |
|  |
| const [MatrixType](classeigen_1_1eigensolver#a83acd180404ddaac8a678fa65a6b632b) &  | [pseudoEigenvectors](classeigen_1_1eigensolver#a4e796226f06e1f7347cf03a38755a155) () const |
|  | Returns the pseudo-eigenvectors of given matrix. [More...](classeigen_1_1eigensolver#a4e796226f06e1f7347cf03a38755a155) |
|  |
|  [EigenSolver](classeigen_1_1eigensolver) &  | [setMaxIterations](classeigen_1_1eigensolver#a6cff220aadfd8d8c1366b915ddefd164) ([Index](classeigen_1_1eigensolver#a5bff6a6bc0efac67d52c60c2c3deb9ee) maxIters) |
|  | Sets the maximum number of iterations allowed.  |
|  |

  ComplexScalar
-------------

    template<typename \_MatrixType >  

|  |
| --- |
| typedef std::complex<RealScalar> [Eigen::EigenSolver](classeigen_1_1eigensolver)< \_MatrixType >::[ComplexScalar](classeigen_1_1eigensolver#a4d0b2a773357d0a6ec98e026f04002ed) |

 
 Complex scalar type for [MatrixType](classeigen_1_1eigensolver#a83acd180404ddaac8a678fa65a6b632b "Synonym for the template parameter _MatrixType."). 

 This is `std::complex<Scalar>` if [Scalar](classeigen_1_1eigensolver#a017d49fe0d59874b70a2fcf35e5aa373 "Scalar type for matrices of type MatrixType.") is real (e.g., `float` or `double`) and just `Scalar` if [Scalar](classeigen_1_1eigensolver#a017d49fe0d59874b70a2fcf35e5aa373 "Scalar type for matrices of type MatrixType.") is complex. 

    EigenvalueType
--------------

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<[ComplexScalar](classeigen_1_1eigensolver#a4d0b2a773357d0a6ec98e026f04002ed), ColsAtCompileTime, 1, Options & ~[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f), MaxColsAtCompileTime, 1> [Eigen::EigenSolver](classeigen_1_1eigensolver)< \_MatrixType >::[EigenvalueType](classeigen_1_1eigensolver#adc446bcb60572758fa64515f2825db62) |

 
 Type for vector of eigenvalues as returned by [eigenvalues()](classeigen_1_1eigensolver#a114189009e42f5e03372a7a3dfa33b97 "Returns the eigenvalues of given matrix."). 

 This is a column vector with entries of type [ComplexScalar](classeigen_1_1eigensolver#a4d0b2a773357d0a6ec98e026f04002ed "Complex scalar type for MatrixType."). The length of the vector is the size of [MatrixType](classeigen_1_1eigensolver#a83acd180404ddaac8a678fa65a6b632b "Synonym for the template parameter _MatrixType."). 

    EigenvectorsType
----------------

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<[ComplexScalar](classeigen_1_1eigensolver#a4d0b2a773357d0a6ec98e026f04002ed), RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime> [Eigen::EigenSolver](classeigen_1_1eigensolver)< \_MatrixType >::[EigenvectorsType](classeigen_1_1eigensolver#aa140354e2f7d5ce34c6488c39e19f2c2) |

 
 Type for matrix of eigenvectors as returned by [eigenvectors()](classeigen_1_1eigensolver#a66288022802172e3ee059283b26201d7 "Returns the eigenvectors of given matrix."). 

 This is a square matrix with entries of type [ComplexScalar](classeigen_1_1eigensolver#a4d0b2a773357d0a6ec98e026f04002ed "Complex scalar type for MatrixType."). The size is the same as the size of [MatrixType](classeigen_1_1eigensolver#a83acd180404ddaac8a678fa65a6b632b "Synonym for the template parameter _MatrixType."). 

    Index
-----

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::EigenSolver](classeigen_1_1eigensolver)< \_MatrixType >::[Index](classeigen_1_1eigensolver#a5bff6a6bc0efac67d52c60c2c3deb9ee) |

 
 
**[Deprecated:](deprecated#_deprecated000014)**
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3 
    EigenSolver() [1/3]
-------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::EigenSolver](classeigen_1_1eigensolver)< \_MatrixType >::[EigenSolver](classeigen_1_1eigensolver) | ( |  | ) |  |

 | inline |

 
 Default constructor. 

 The default constructor is useful in cases in which the user intends to perform decompositions via EigenSolver::compute(const MatrixType&, bool).

 
See also

[compute()](classeigen_1_1eigensolver#a38d032b75b3e75640e3db42e7ab20c24 "Computes eigendecomposition of given matrix.") for an example. 
    EigenSolver() [2/3]
-------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::EigenSolver](classeigen_1_1eigensolver)< \_MatrixType >::[EigenSolver](classeigen_1_1eigensolver) | ( | [Index](classeigen_1_1eigensolver#a5bff6a6bc0efac67d52c60c2c3deb9ee) | *size* | ) |  |

 | inlineexplicit |

 
 Default constructor with memory preallocation. 

 Like the default constructor but with preallocation of the internal data according to the specified problem *size*. 



See also

[EigenSolver()](classeigen_1_1eigensolver#a3af22d721a6401365881b2ef252d26aa "Default constructor.") 
    EigenSolver() [3/3]
-------------------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::EigenSolver](classeigen_1_1eigensolver)< \_MatrixType >::[EigenSolver](classeigen_1_1eigensolver) | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix*,  |
|  |  | bool  | *computeEigenvectors* = `true` |
|  | ) |  |  |

 | inlineexplicit |

 
 Constructor; computes eigendecomposition of given matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matrix | Square matrix whose eigendecomposition is to be computed.  |
| [in] | computeEigenvectors | If true, both the eigenvectors and the eigenvalues are computed; if false, only the eigenvalues are computed. |

   This constructor calls [compute()](classeigen_1_1eigensolver#a38d032b75b3e75640e3db42e7ab20c24 "Computes eigendecomposition of given matrix.") to compute the eigenvalues and eigenvectors.

 Example: 



```
MatrixXd A = [MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(6,6);
cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl;
 
EigenSolver<MatrixXd> es(A);
cout << "The eigenvalues of A are:" << endl << es.eigenvalues() << endl;
cout << "The matrix of eigenvectors, V, is:" << endl << es.eigenvectors() << endl << endl;
 
complex<double> lambda = es.eigenvalues()[0];
cout << "Consider the first eigenvalue, lambda = " << lambda << endl;
VectorXcd v = es.eigenvectors().col(0);
cout << "If v is the corresponding eigenvector, then lambda \* v = " << endl << lambda * v << endl;
cout << "... and A \* v = " << endl << A.cast<complex<double> >() * v << endl << endl;
 
MatrixXcd D = es.eigenvalues().asDiagonal();
MatrixXcd V = es.eigenvectors();
cout << "Finally, V \* D \* V^(-1) = " << endl << V * D * V.inverse() << endl;
```

 Output: 



```
Here is a random 6x6 matrix, A:
   0.68   -0.33   -0.27  -0.717  -0.687  0.0259
 -0.211   0.536  0.0268   0.214  -0.198   0.678
  0.566  -0.444   0.904  -0.967   -0.74   0.225
  0.597   0.108   0.832  -0.514  -0.782  -0.408
  0.823 -0.0452   0.271  -0.726   0.998   0.275
 -0.605   0.258   0.435   0.608  -0.563  0.0486

The eigenvalues of A are:
  (0.049,1.06)
 (0.049,-1.06)
     (0.967,0)
     (0.353,0)
 (0.618,0.129)
(0.618,-0.129)
The matrix of eigenvectors, V, is:
 (-0.292,-0.454)   (-0.292,0.454)      (-0.0607,0)       (-0.733,0)    (0.59,-0.121)     (0.59,0.121)
  (0.134,-0.104)    (0.134,0.104)       (-0.799,0)        (0.136,0)    (0.334,0.368)   (0.334,-0.368)
  (-0.422,-0.18)    (-0.422,0.18)        (0.192,0)       (0.0563,0)  (-0.335,-0.143)   (-0.335,0.143)
 (-0.589,0.0274) (-0.589,-0.0274)      (-0.0788,0)       (-0.627,0)   (0.322,-0.155)    (0.322,0.155)
  (-0.248,0.132)  (-0.248,-0.132)        (0.401,0)        (0.218,0) (-0.335,-0.0761)  (-0.335,0.0761)
    (0.105,0.18)    (0.105,-0.18)       (-0.392,0)     (-0.00564,0)  (-0.0324,0.103) (-0.0324,-0.103)

Consider the first eigenvalue, lambda = (0.049,1.06)
If v is the corresponding eigenvector, then lambda * v = 
  (0.466,-0.331)
   (0.117,0.137)
   (0.17,-0.456)
(-0.0578,-0.622)
 (-0.152,-0.256)
   (-0.186,0.12)
... and A * v = 
  (0.466,-0.331)
   (0.117,0.137)
   (0.17,-0.456)
(-0.0578,-0.622)
 (-0.152,-0.256)
   (-0.186,0.12)

Finally, V * D * V^(-1) = 
   (0.68,-4.44e-16)   (-0.33,-5.55e-17)   (-0.27,-1.11e-16)  (-0.717,-4.44e-16)   (-0.687,8.88e-16)          (0.0259,0)
  (-0.211,2.22e-16)    (0.536,1.91e-17)          (0.0268,0)           (0.214,0)   (-0.198,1.33e-15)           (0.678,0)
   (0.566,2.22e-16)  (-0.444,-1.53e-16)   (0.904,-2.22e-16)  (-0.967,-1.11e-16)    (-0.74,4.44e-16)    (0.225,2.22e-16)
  (0.597,-2.22e-16)   (0.108,-2.78e-16)   (0.832,-2.22e-16)  (-0.514,-1.11e-16)          (-0.782,0)  (-0.408,-2.22e-16)
  (0.823,-2.22e-16) (-0.0452,-1.67e-16)           (0.271,0)   (-0.726,1.11e-16)   (0.998,-8.88e-16)    (0.275,4.44e-16)
  (-0.605,2.91e-16)   (0.258,-6.94e-18)   (0.435,-6.94e-17)    (0.608,1.39e-17)   (-0.563,5.27e-16)   (0.0486,7.11e-17)

```


See also

[compute()](classeigen_1_1eigensolver#a38d032b75b3e75640e3db42e7ab20c24 "Computes eigendecomposition of given matrix.") 
    compute()
---------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [EigenSolver](classeigen_1_1eigensolver)& [Eigen::EigenSolver](classeigen_1_1eigensolver)< \_MatrixType >::compute  | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix*,  |
|  |  | bool  | *computeEigenvectors* = `true` |
|  | ) |  |  |

 
 Computes eigendecomposition of given matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matrix | Square matrix whose eigendecomposition is to be computed.  |
| [in] | computeEigenvectors | If true, both the eigenvectors and the eigenvalues are computed; if false, only the eigenvalues are computed.  |

   
Returns
Reference to `*this` 
 This function computes the eigenvalues of the real matrix `matrix`. The [eigenvalues()](classeigen_1_1eigensolver#a114189009e42f5e03372a7a3dfa33b97 "Returns the eigenvalues of given matrix.") function can be used to retrieve them. If `computeEigenvectors` is true, then the eigenvectors are also computed and can be retrieved by calling [eigenvectors()](classeigen_1_1eigensolver#a66288022802172e3ee059283b26201d7 "Returns the eigenvectors of given matrix.").

 The matrix is first reduced to real Schur form using the [RealSchur](classeigen_1_1realschur "Performs a real Schur decomposition of a square matrix.") class. The Schur decomposition is then used to compute the eigenvalues and eigenvectors.

 The cost of the computation is dominated by the cost of the Schur decomposition, which is very approximately \( 25n^3 \) (where \( n \) is the size of the matrix) if `computeEigenvectors` is true, and \( 10n^3 \) if `computeEigenvectors` is false.

 This method reuses of the allocated data in the [EigenSolver](classeigen_1_1eigensolver "Computes eigenvalues and eigenvectors of general matrices.") object.

 Example: 



```
EigenSolver<MatrixXf> es;
MatrixXf A = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
es.compute(A, /\* computeEigenvectors = \*/ false);
cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl;
es.compute(A + [MatrixXf::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)(4,4), false); // re-use es to compute eigenvalues of A+I
cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl;
```

 Output: 



```
The eigenvalues of A are:    (0.755,0.528)   (0.755,-0.528)  (-0.323,0.0965) (-0.323,-0.0965)
The eigenvalues of A+I are:    (1.75,0.528)   (1.75,-0.528)  (0.677,0.0965) (0.677,-0.0965)

```
    eigenvalues()
-------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [EigenvalueType](classeigen_1_1eigensolver#adc446bcb60572758fa64515f2825db62)& [Eigen::EigenSolver](classeigen_1_1eigensolver)< \_MatrixType >::eigenvalues  | ( |  | ) |  const |

 | inline |

 
 Returns the eigenvalues of given matrix. 

 
Returns
A const reference to the column vector containing the eigenvalues.
 
Precondition
Either the constructor EigenSolver(const MatrixType&,bool) or the member function compute(const MatrixType&, bool) has been called before.
 The eigenvalues are repeated according to their algebraic multiplicity, so there are as many eigenvalues as rows in the matrix. The eigenvalues are not sorted in any particular order.

 Example: 



```
MatrixXd ones = [MatrixXd::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)(3,3);
EigenSolver<MatrixXd> es(ones, false);
cout << "The eigenvalues of the 3x3 matrix of ones are:" 
     << endl << es.eigenvalues() << endl;
```

 Output: 



```
The eigenvalues of the 3x3 matrix of ones are:
(-5.31e-17,0)
        (3,0)
        (0,0)

```


See also

[eigenvectors()](classeigen_1_1eigensolver#a66288022802172e3ee059283b26201d7 "Returns the eigenvectors of given matrix."), [pseudoEigenvalueMatrix()](classeigen_1_1eigensolver#a4979eafe0aeef06b19ada7fa5e19db17 "Returns the block-diagonal matrix in the pseudo-eigendecomposition."), [MatrixBase::eigenvalues()](classeigen_1_1matrixbase#a30430fa3d5b4e74d312fd4f502ac984d "Computes the eigenvalues of a matrix.") 
    eigenvectors()
--------------

    template<typename MatrixType >  

|  |
| --- |
| [EigenSolver](classeigen_1_1eigensolver)< [MatrixType](classeigen_1_1eigensolver#a83acd180404ddaac8a678fa65a6b632b) >::[EigenvectorsType](classeigen_1_1eigensolver#aa140354e2f7d5ce34c6488c39e19f2c2) [Eigen::EigenSolver](classeigen_1_1eigensolver)< [MatrixType](classeigen_1_1eigensolver#a83acd180404ddaac8a678fa65a6b632b) >::eigenvectors |

 
 Returns the eigenvectors of given matrix. 

 
Returns
Matrix whose columns are the (possibly complex) eigenvectors.
 
Precondition
Either the constructor EigenSolver(const MatrixType&,bool) or the member function compute(const MatrixType&, bool) has been called before, and `computeEigenvectors` was set to true (the default).
 Column \( k \) of the returned matrix is an eigenvector corresponding to eigenvalue number \( k \) as returned by [eigenvalues()](classeigen_1_1eigensolver#a114189009e42f5e03372a7a3dfa33b97 "Returns the eigenvalues of given matrix."). The eigenvectors are normalized to have (Euclidean) norm equal to one. The matrix returned by this function is the matrix \( V \) in the eigendecomposition \( A = V D V^{-1} \), if it exists.

 Example: 



```
MatrixXd ones = [MatrixXd::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)(3,3);
EigenSolver<MatrixXd> es(ones);
cout << "The first eigenvector of the 3x3 matrix of ones is:"
     << endl << es.eigenvectors().col(0) << endl;

```

 Output: 



```
The first eigenvector of the 3x3 matrix of ones is:
(-0.816,0)
 (0.408,0)
 (0.408,0)

```


See also

[eigenvalues()](classeigen_1_1eigensolver#a114189009e42f5e03372a7a3dfa33b97 "Returns the eigenvalues of given matrix."), [pseudoEigenvectors()](classeigen_1_1eigensolver#a4e796226f06e1f7347cf03a38755a155 "Returns the pseudo-eigenvectors of given matrix.") 
    info()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::EigenSolver](classeigen_1_1eigensolver)< \_MatrixType >::info  | ( |  | ) |  const |

 | inline |

 
 
Returns
NumericalIssue if the input contains INF or NaN values or overflow occurred. Returns Success otherwise. 
    pseudoEigenvalueMatrix()
------------------------

    template<typename MatrixType >  

|  |
| --- |
| [MatrixType](classeigen_1_1eigensolver#a83acd180404ddaac8a678fa65a6b632b) [Eigen::EigenSolver](classeigen_1_1eigensolver)< [MatrixType](classeigen_1_1eigensolver#a83acd180404ddaac8a678fa65a6b632b) >::pseudoEigenvalueMatrix |

 
 Returns the block-diagonal matrix in the pseudo-eigendecomposition. 

 
Returns
A block-diagonal matrix.
 
Precondition
Either the constructor EigenSolver(const MatrixType&,bool) or the member function compute(const MatrixType&, bool) has been called before.
 The matrix \( D \) returned by this function is real and block-diagonal. The blocks on the diagonal are either 1-by-1 or 2-by-2 blocks of the form \( \begin{bmatrix} u & v \\ -v & u \end{bmatrix} \). These blocks are not sorted in any particular order. The matrix \( D \) and the matrix \( V \) returned by [pseudoEigenvectors()](classeigen_1_1eigensolver#a4e796226f06e1f7347cf03a38755a155 "Returns the pseudo-eigenvectors of given matrix.") satisfy \( AV = VD \).

 
See also

[pseudoEigenvectors()](classeigen_1_1eigensolver#a4e796226f06e1f7347cf03a38755a155 "Returns the pseudo-eigenvectors of given matrix.") for an example, [eigenvalues()](classeigen_1_1eigensolver#a114189009e42f5e03372a7a3dfa33b97 "Returns the eigenvalues of given matrix.") 
    pseudoEigenvectors()
--------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [MatrixType](classeigen_1_1eigensolver#a83acd180404ddaac8a678fa65a6b632b)& [Eigen::EigenSolver](classeigen_1_1eigensolver)< \_MatrixType >::pseudoEigenvectors  | ( |  | ) |  const |

 | inline |

 
 Returns the pseudo-eigenvectors of given matrix. 

 
Returns
Const reference to matrix whose columns are the pseudo-eigenvectors.
 
Precondition
Either the constructor EigenSolver(const MatrixType&,bool) or the member function compute(const MatrixType&, bool) has been called before, and `computeEigenvectors` was set to true (the default).
 The real matrix \( V \) returned by this function and the block-diagonal matrix \( D \) returned by [pseudoEigenvalueMatrix()](classeigen_1_1eigensolver#a4979eafe0aeef06b19ada7fa5e19db17 "Returns the block-diagonal matrix in the pseudo-eigendecomposition.") satisfy \( AV = VD \).

 Example: 



```
MatrixXd A = [MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(6,6);
cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl;
 
EigenSolver<MatrixXd> es(A);
MatrixXd D = es.pseudoEigenvalueMatrix();
MatrixXd V = es.pseudoEigenvectors();
cout << "The pseudo-eigenvalue matrix D is:" << endl << D << endl;
cout << "The pseudo-eigenvector matrix V is:" << endl << V << endl;
cout << "Finally, V \* D \* V^(-1) = " << endl << V * D * V.inverse() << endl;

```

 Output: 



```
Here is a random 6x6 matrix, A:
   0.68   -0.33   -0.27  -0.717  -0.687  0.0259
 -0.211   0.536  0.0268   0.214  -0.198   0.678
  0.566  -0.444   0.904  -0.967   -0.74   0.225
  0.597   0.108   0.832  -0.514  -0.782  -0.408
  0.823 -0.0452   0.271  -0.726   0.998   0.275
 -0.605   0.258   0.435   0.608  -0.563  0.0486

The pseudo-eigenvalue matrix D is:
 0.049   1.06      0      0      0      0
 -1.06  0.049      0      0      0      0
     0      0  0.967      0      0      0
     0      0      0  0.353      0      0
     0      0      0      0  0.618  0.129
     0      0      0      0 -0.129  0.618
The pseudo-eigenvector matrix V is:
  -0.571   -0.888   -0.066    -1.13     17.2    -3.53
   0.263   -0.204   -0.869     0.21     9.73     10.7
  -0.827   -0.352    0.209   0.0871    -9.74    -4.17
   -1.15   0.0535  -0.0857   -0.971     9.36    -4.52
  -0.485    0.258    0.436    0.337    -9.74    -2.21
   0.206    0.353   -0.426 -0.00873   -0.944     2.98
Finally, V * D * V^(-1) = 
   0.68   -0.33   -0.27  -0.717  -0.687  0.0259
 -0.211   0.536  0.0268   0.214  -0.198   0.678
  0.566  -0.444   0.904  -0.967   -0.74   0.225
  0.597   0.108   0.832  -0.514  -0.782  -0.408
  0.823 -0.0452   0.271  -0.726   0.998   0.275
 -0.605   0.258   0.435   0.608  -0.563  0.0486

```


See also

[pseudoEigenvalueMatrix()](classeigen_1_1eigensolver#a4979eafe0aeef06b19ada7fa5e19db17 "Returns the block-diagonal matrix in the pseudo-eigendecomposition."), [eigenvectors()](classeigen_1_1eigensolver#a66288022802172e3ee059283b26201d7 "Returns the eigenvectors of given matrix.") 
   

---

The documentation for this class was generated from the following file:* [EigenSolver.h](https://eigen.tuxfamily.org/dox/EigenSolver_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1EigenSolver.html>

Eigen::Product
==============

  
### template<typename \_Lhs, typename \_Rhs, int Option> class Eigen::Product< \_Lhs, \_Rhs, Option >

 Expression of the product of two arbitrary matrices or vectors. 

 
Template Parameters
 

|  |  |
| --- | --- |
| \_Lhs | the type of the left-hand side expression  |
| \_Rhs | the type of the right-hand side expression |

   This class represents an expression of the product of two arbitrary matrices.

 The other template parameters are: 



Template Parameters
 

|  |  |
| --- | --- |
| Option | can be DefaultProduct, AliasFreeProduct, or LazyProduct  |

    Inherits Eigen::ProductImpl< \_Lhs, \_Rhs, Option, internal::product\_promote\_storage\_type< internal::traits< \_Lhs >::StorageKind, internal::traits< \_Rhs >::StorageKind, internal::product\_type< \_Lhs, \_Rhs >::ret >::ret >.

 

---

The documentation for this class was generated from the following file:* [Product.h](https://eigen.tuxfamily.org/dox/Product_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Product.html>

Eigen::ColPivHouseholderQR
==========================

  
### template<typename \_MatrixType> class Eigen::ColPivHouseholderQR< \_MatrixType >

 Householder rank-revealing QR decomposition of a matrix with column-pivoting. 

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which we are computing the QR decomposition |

   This class performs a rank-revealing QR decomposition of a matrix **A** into matrices **P**, **Q** and **R** such that 


 \[ \mathbf{A} \, \mathbf{P} = \mathbf{Q} \, \mathbf{R} \] 

  by using Householder transformations. Here, **P** is a permutation matrix, **Q** a unitary matrix and **R** an upper triangular matrix.

 This decomposition performs column pivoting in order to be rank-revealing and improve numerical stability. It is slower than [HouseholderQR](classeigen_1_1householderqr "Householder QR decomposition of a matrix."), and faster than [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with full pivoting.").

 This class supports the [inplace decomposition](group__inplacedecomposition)  mechanism.

 
See also

[MatrixBase::colPivHouseholderQr()](classeigen_1_1matrixbase#adee8c19c833245bbb00a591dce68e8a4) 
     ![Inheritance graph]       

|  |
| --- |
|  |
| MatrixType::RealScalar  | [absDeterminant](classeigen_1_1colpivhouseholderqr#ac87c3bf42098d6f7324dafbc50fa83f7) () const |
|  |
|  | [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr#a9d8a92c2a2f0debe5454812372237ed4) () |
|  | Default Constructor. [More...](classeigen_1_1colpivhouseholderqr#a9d8a92c2a2f0debe5454812372237ed4) |
|  |
| template<typename InputType >  |
|  | [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr#a1aa6a5b95380df0ceb224cb833316d4f) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  | Constructs a QR factorization from a given matrix. [More...](classeigen_1_1colpivhouseholderqr#a1aa6a5b95380df0ceb224cb833316d4f) |
|  |
| template<typename InputType >  |
|  | [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr#a65782010a93a4c9ef4a9191ac8fe30bc) ([EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  | Constructs a QR factorization from a given matrix. [More...](classeigen_1_1colpivhouseholderqr#a65782010a93a4c9ef4a9191ac8fe30bc) |
|  |
|  | [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr#a5965d4fdebc04b2df71d67ff0b2d0c2c) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  | Default Constructor with memory preallocation. [More...](classeigen_1_1colpivhouseholderqr#a5965d4fdebc04b2df71d67ff0b2d0c2c) |
|  |
| const [PermutationType](classeigen_1_1permutationmatrix) &  | [colsPermutation](classeigen_1_1colpivhouseholderqr#ab6ad43e6a6fb75726eae0d5499948f4a) () const |
|  |
| template<typename InputType >  |
| [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< MatrixType > &  | [compute](classeigen_1_1colpivhouseholderqr#a608016776319abe8fe96b85f83c8dd3d) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [dimensionOfKernel](classeigen_1_1colpivhouseholderqr#a7c9294565d179226133770160b827be1) () const |
|  |
| const HCoeffsType &  | [hCoeffs](classeigen_1_1colpivhouseholderqr#ac5943d19aa5fd96340c7df6874fcb1b9) () const |
|  |
| [HouseholderSequenceType](classeigen_1_1householdersequence) | [householderQ](classeigen_1_1colpivhouseholderqr#a28ab9d8916ca609c5469c4c192fbfa28) () const |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1colpivhouseholderqr#a5c756a789175197cab3eff3a3e479ef2) () const |
|  | Reports whether the QR factorization was successful. [More...](classeigen_1_1colpivhouseholderqr#a5c756a789175197cab3eff3a3e479ef2) |
|  |
| const [Inverse](classeigen_1_1inverse)< [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr) >  | [inverse](classeigen_1_1colpivhouseholderqr#a31c45402e74774d9cd13af0e57a6b72f) () const |
|  |
| bool  | [isInjective](classeigen_1_1colpivhouseholderqr#a0031998053c9c7345c9458f7443aa263) () const |
|  |
| bool  | [isInvertible](classeigen_1_1colpivhouseholderqr#a945720f8d683f8ebe97fa807edd3142a) () const |
|  |
| bool  | [isSurjective](classeigen_1_1colpivhouseholderqr#a87a7d06e0b0479e5b56b19c2a4f56365) () const |
|  |
| MatrixType::RealScalar  | [logAbsDeterminant](classeigen_1_1colpivhouseholderqr#afdc29438a335871f67449c253369ce12) () const |
|  |
| const MatrixType &  | [matrixQR](classeigen_1_1colpivhouseholderqr#aa572ac050c8d4fadd4f08a87f6b1e62b) () const |
|  |
| const MatrixType &  | [matrixR](classeigen_1_1colpivhouseholderqr#a44c534d47bde6b67ce4b5247d142ef30) () const |
|  |
| RealScalar  | [maxPivot](classeigen_1_1colpivhouseholderqr#aac8c43d720170980f582d01494df9e8f) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonzeroPivots](classeigen_1_1colpivhouseholderqr#a796610bab81f0527aa1ae440c71f58a4) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rank](classeigen_1_1colpivhouseholderqr#a2a59aaa689613ce5ef0c9130ad33940e) () const |
|  |
| [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr) &  | [setThreshold](classeigen_1_1colpivhouseholderqr#ae712cdc9f0e521cfc8061bee58ff55ee) (const RealScalar &[threshold](classeigen_1_1colpivhouseholderqr#a72276adb1aa11f870f50d0bd58af014d)) |
|  |
| [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr) &  | [setThreshold](classeigen_1_1colpivhouseholderqr#a648df14c457ceceb09d933d06d3bdded) (Default\_t) |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr), Rhs >  | [solve](classeigen_1_1colpivhouseholderqr#aaa9c4af89930ab3bb7612ed9ae33d3f5) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| RealScalar  | [threshold](classeigen_1_1colpivhouseholderqr#a72276adb1aa11f870f50d0bd58af014d) () const |
|  |
| - Public Member Functions inherited from [Eigen::SolverBase< ColPivHouseholderQR< \_MatrixType > >](classeigen_1_1solverbase) |
| AdjointReturnType  | [adjoint](classeigen_1_1solverbase#a05a3686a89888681c8e0c2bcab6d1ce5) () const |
|  |
| [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType > &  | [derived](classeigen_1_1solverbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType > &  | [derived](classeigen_1_1solverbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| const [Solve](classeigen_1_1solve)< [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >, Rhs >  | [solve](classeigen_1_1solverbase#a7fd647d110487799205df6f99547879d) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
|  | [SolverBase](classeigen_1_1solverbase#a4d5e5baddfba3790ab1a5f247dcc4dc1) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1solverbase#a732e75b5132bb4db3775916927b0e86c) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  ColPivHouseholderQR() [1/4]
---------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::[ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr) | ( |  | ) |  |

 | inline |

 
 Default Constructor. 

 The default constructor is useful in cases in which the user intends to perform decompositions via ColPivHouseholderQR::compute(const MatrixType&). 

    ColPivHouseholderQR() [2/4]
---------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::[ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr) | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols* |
|  | ) |  |  |

 | inline |

 
 Default Constructor with memory preallocation. 

 Like the default constructor but with preallocation of the internal data according to the specified problem *size*. 



See also

[ColPivHouseholderQR()](classeigen_1_1colpivhouseholderqr#a9d8a92c2a2f0debe5454812372237ed4 "Default Constructor.") 
    ColPivHouseholderQR() [3/4]
---------------------------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::[ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr) | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | inlineexplicit |

 
 Constructs a QR factorization from a given matrix. 

 This constructor computes the QR factorization of the matrix *matrix* by calling the method compute(). It is a short cut for:

 
```
ColPivHouseholderQR<MatrixType> qr(matrix.rows(), matrix.cols());
qr.compute(matrix);

```


See also
compute() 
    ColPivHouseholderQR() [4/4]
---------------------------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::[ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr) | ( | [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | inlineexplicit |

 
 Constructs a QR factorization from a given matrix. 

 This overloaded constructor is provided for [inplace decomposition](group__inplacedecomposition)  when `MatrixType` is a [Eigen::Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.").

 
See also
ColPivHouseholderQR(const EigenBase&) 
    absDeterminant()
----------------

    template<typename MatrixType >  

|  |
| --- |
| MatrixType::RealScalar [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< MatrixType >::absDeterminant |

 
 
Returns
the absolute value of the determinant of the matrix of which \*this is the QR decomposition. It has only linear complexity (that is, O(n) where n is the dimension of the square matrix) as the QR decomposition has already been computed.
 
Note
This is only for square matrices.
 
Warning
a determinant can be very big or small, so for matrices of large enough dimension, there is a risk of overflow/underflow. One way to work around that is to use [logAbsDeterminant()](classeigen_1_1colpivhouseholderqr#afdc29438a335871f67449c253369ce12) instead.
 
See also

[logAbsDeterminant()](classeigen_1_1colpivhouseholderqr#afdc29438a335871f67449c253369ce12), [MatrixBase::determinant()](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) 
    colsPermutation()
-----------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [PermutationType](classeigen_1_1permutationmatrix)& [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::colsPermutation  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const reference to the column permutation matrix 
    compute()
---------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)<MatrixType>& [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::compute  | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 
 Performs the QR factorization of the given matrix *matrix*. The result of the factorization is stored into `*this`, and a reference to `*this` is returned.

 
See also
class [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting."), ColPivHouseholderQR(const MatrixType&) 
    dimensionOfKernel()
-------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::dimensionOfKernel  | ( |  | ) |  const |

 | inline |

 
 
Returns
the dimension of the kernel of the matrix of which \*this is the QR decomposition.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1colpivhouseholderqr#ae712cdc9f0e521cfc8061bee58ff55ee). 
    hCoeffs()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const HCoeffsType& [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::hCoeffs  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const reference to the vector of Householder coefficients used to represent the factor `Q`.
 For advanced uses only. 

    householderQ()
--------------

    template<typename MatrixType >  

|  |
| --- |
| [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< MatrixType >::[HouseholderSequenceType](classeigen_1_1householdersequence) [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< MatrixType >::householderQ |

 
 
Returns
the matrix Q as a sequence of householder transformations. You can extract the meaningful part only by using: 
```
qr.householderQ().setLength(qr.nonzeroPivots()) 

```
 
    info()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether the QR factorization was successful. 

 
Note
This function always returns `Success`. It is provided for compatibility with other factorization routines. 
 
Returns

`Success` 
    inverse()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [Inverse](classeigen_1_1inverse)<[ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)> [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::inverse  | ( |  | ) |  const |

 | inline |

 
 
Returns
the inverse of the matrix of which \*this is the QR decomposition.
 
Note
If this matrix is not invertible, the returned matrix has undefined coefficients. Use [isInvertible()](classeigen_1_1colpivhouseholderqr#a945720f8d683f8ebe97fa807edd3142a) to first determine whether this matrix is invertible. 
    isInjective()
-------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::isInjective  | ( |  | ) |  const |

 | inline |

 
 
Returns
true if the matrix of which \*this is the QR decomposition represents an injective linear map, i.e. has trivial kernel; false otherwise.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1colpivhouseholderqr#ae712cdc9f0e521cfc8061bee58ff55ee). 
    isInvertible()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::isInvertible  | ( |  | ) |  const |

 | inline |

 
 
Returns
true if the matrix of which \*this is the QR decomposition is invertible.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1colpivhouseholderqr#ae712cdc9f0e521cfc8061bee58ff55ee). 
    isSurjective()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::isSurjective  | ( |  | ) |  const |

 | inline |

 
 
Returns
true if the matrix of which \*this is the QR decomposition represents a surjective linear map; false otherwise.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1colpivhouseholderqr#ae712cdc9f0e521cfc8061bee58ff55ee). 
    logAbsDeterminant()
-------------------

    template<typename MatrixType >  

|  |
| --- |
| MatrixType::RealScalar [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< MatrixType >::logAbsDeterminant |

 
 
Returns
the natural log of the absolute value of the determinant of the matrix of which \*this is the QR decomposition. It has only linear complexity (that is, O(n) where n is the dimension of the square matrix) as the QR decomposition has already been computed.
 
Note
This is only for square matrices.  This method is useful to work around the risk of overflow/underflow that's inherent to determinant computation.
 
See also

[absDeterminant()](classeigen_1_1colpivhouseholderqr#ac87c3bf42098d6f7324dafbc50fa83f7), [MatrixBase::determinant()](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) 
    matrixQR()
----------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixType& [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::matrixQR  | ( |  | ) |  const |

 | inline |

 
 
Returns
a reference to the matrix where the Householder QR decomposition is stored 
    matrixR()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixType& [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::matrixR  | ( |  | ) |  const |

 | inline |

 
 
Returns
a reference to the matrix where the result Householder QR is stored 
 
Warning
The strict lower part of this matrix contains internal values. Only the upper triangular part should be referenced. To get it, use 
```
[matrixR](classeigen_1_1colpivhouseholderqr#a44c534d47bde6b67ce4b5247d142ef30)().template triangularView<Upper>() 
```
 For rank-deficient matrices, use 
```
[matrixR](classeigen_1_1colpivhouseholderqr#a44c534d47bde6b67ce4b5247d142ef30)().topLeftCorner([rank](classeigen_1_1colpivhouseholderqr#a2a59aaa689613ce5ef0c9130ad33940e)(), [rank](classeigen_1_1colpivhouseholderqr#a2a59aaa689613ce5ef0c9130ad33940e)()).template triangularView<Upper>()
```
 
    maxPivot()
----------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::maxPivot  | ( |  | ) |  const |

 | inline |

 
 
Returns
the absolute value of the biggest pivot, i.e. the biggest diagonal coefficient of R. 
    nonzeroPivots()
---------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::nonzeroPivots  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of nonzero pivots in the QR decomposition. Here nonzero is meant in the exact sense, not in a fuzzy sense. So that notion isn't really intrinsically interesting, but it is still useful when implementing algorithms.
 
See also

[rank()](classeigen_1_1colpivhouseholderqr#a2a59aaa689613ce5ef0c9130ad33940e) 
    rank()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::rank  | ( |  | ) |  const |

 | inline |

 
 
Returns
the rank of the matrix of which \*this is the QR decomposition.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1colpivhouseholderqr#ae712cdc9f0e521cfc8061bee58ff55ee). 
    setThreshold() [1/2]
--------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)& [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::setThreshold  | ( | const RealScalar &  | *threshold* | ) |  |

 | inline |

 
 Allows to prescribe a threshold to be used by certain methods, such as [rank()](classeigen_1_1colpivhouseholderqr#a2a59aaa689613ce5ef0c9130ad33940e), who need to determine when pivots are to be considered nonzero. This is not used for the QR decomposition itself.

 When it needs to get the threshold value, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") calls [threshold()](classeigen_1_1colpivhouseholderqr#a72276adb1aa11f870f50d0bd58af014d). By default, this uses a formula to automatically determine a reasonable threshold. Once you have called the present method [setThreshold(const RealScalar&)](classeigen_1_1colpivhouseholderqr#ae712cdc9f0e521cfc8061bee58ff55ee), your value is used instead.

 
Parameters
 

|  |  |
| --- | --- |
| threshold | The new value to use as the threshold. |

   A pivot will be considered nonzero if its absolute value is strictly greater than \( \vert pivot \vert \leqslant threshold \times \vert maxpivot \vert \) where maxpivot is the biggest pivot.

 If you want to come back to the default behavior, call [setThreshold(Default\_t)](classeigen_1_1colpivhouseholderqr#a648df14c457ceceb09d933d06d3bdded) 

    setThreshold() [2/2]
--------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)& [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::setThreshold  | ( | Default\_t  |  | ) |  |

 | inline |

 
 Allows to come back to the default behavior, letting [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") use its default formula for determining the threshold.

 You should pass the special object Eigen::Default as parameter here. 



```
qr.setThreshold(Eigen::Default); 

```

See the documentation of [setThreshold(const RealScalar&)](classeigen_1_1colpivhouseholderqr#ae712cdc9f0e521cfc8061bee58ff55ee). 

    solve()
-------

    template<typename \_MatrixType >   template<typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Solve](classeigen_1_1solve)<[ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr), Rhs> [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::solve  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &  | *b* | ) |  const |

 | inline |

 
 This method finds a solution x to the equation Ax=b, where A is the matrix of which \*this is the QR decomposition, if any exists.

 
Parameters
 

|  |  |
| --- | --- |
| b | the right-hand-side of the equation to solve. |

   
Returns
a solution.
 This method just tries to find as good a solution as possible. If you want to check whether a solution exists or if it is accurate, just call this function to get a result and then compute the error of this result, or use [MatrixBase::isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) directly, for instance like this:



```
bool a_solution_exists = (A*result).isApprox(b, precision); 

```

 This method avoids dividing by zero, so that the non-existence of a solution doesn't by itself mean that you'll get `inf` or `nan` values.

 If there exists more than one solution, this method will arbitrarily choose one.

 Example: 



```
Matrix3f m = [Matrix3f::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
Matrix3f y = [Matrix3f::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the matrix y:" << endl << y << endl;
Matrix3f x;
x = m.colPivHouseholderQr().solve(y);
assert(y.isApprox(m*x));
cout << "Here is a solution x to the equation mx=y:" << endl << x << endl;
```

 Output: 



```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Here is the matrix y:
  0.108   -0.27   0.832
-0.0452  0.0268   0.271
  0.258   0.904   0.435
Here is a solution x to the equation mx=y:
 0.609   2.68   1.67
-0.231  -1.57 0.0713
  0.51   3.51   1.05

```
    threshold()
-----------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< \_MatrixType >::threshold  | ( |  | ) |  const |

 | inline |

 
 Returns the threshold that will be used by certain methods such as [rank()](classeigen_1_1colpivhouseholderqr#a2a59aaa689613ce5ef0c9130ad33940e).

 See the documentation of [setThreshold(const RealScalar&)](classeigen_1_1colpivhouseholderqr#ae712cdc9f0e521cfc8061bee58ff55ee). 

   

---

The documentation for this class was generated from the following file:* [ColPivHouseholderQR.h](https://eigen.tuxfamily.org/dox/ColPivHouseholderQR_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1ColPivHouseholderQR.html>

Eigen::FullPivHouseholderQR
===========================

  
### template<typename \_MatrixType> class Eigen::FullPivHouseholderQR< \_MatrixType >

 Householder rank-revealing QR decomposition of a matrix with full pivoting. 

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which we are computing the QR decomposition |

   This class performs a rank-revealing QR decomposition of a matrix **A** into matrices **P**, **P'**, **Q** and **R** such that 


 \[ \mathbf{P} \, \mathbf{A} \, \mathbf{P}' = \mathbf{Q} \, \mathbf{R} \] 

  by using Householder transformations. Here, **P** and **P'** are permutation matrices, **Q** a unitary matrix and **R** an upper triangular matrix.

 This decomposition performs a very prudent full pivoting in order to be rank-revealing and achieve optimal numerical stability. The trade-off is that it is slower than [HouseholderQR](classeigen_1_1householderqr "Householder QR decomposition of a matrix.") and [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting.").

 This class supports the [inplace decomposition](group__inplacedecomposition)  mechanism.

 
See also

[MatrixBase::fullPivHouseholderQr()](classeigen_1_1matrixbase#a863bc0e06b641a089508eabec6835ab2) 
     ![Inheritance graph]       

|  |
| --- |
|  |
| MatrixType::RealScalar  | [absDeterminant](classeigen_1_1fullpivhouseholderqr#a1029e1ccc70bb8669043c5775e7f3b75) () const |
|  |
| const [PermutationType](classeigen_1_1permutationmatrix) &  | [colsPermutation](classeigen_1_1fullpivhouseholderqr#abeda6d91e196c13d4dd8b7542fef3e17) () const |
|  |
| template<typename InputType >  |
| [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< MatrixType > &  | [compute](classeigen_1_1fullpivhouseholderqr#a3745d70b826c12d33b8d34f26a5c96e7) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [dimensionOfKernel](classeigen_1_1fullpivhouseholderqr#a3b5fe5edc66acc01c45b16e728470aa0) () const |
|  |
|  | [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr#aeb14b4c1eef33128207b40a00bd0bd08) () |
|  | Default Constructor. [More...](classeigen_1_1fullpivhouseholderqr#aeb14b4c1eef33128207b40a00bd0bd08) |
|  |
| template<typename InputType >  |
|  | [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr#aeeace3abca6b215025e94c3e098b0a97) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  | Constructs a QR factorization from a given matrix. [More...](classeigen_1_1fullpivhouseholderqr#aeeace3abca6b215025e94c3e098b0a97) |
|  |
| template<typename InputType >  |
|  | [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr#ac9bdb4f7fa77c1aa16f238592c248e70) ([EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  | Constructs a QR factorization from a given matrix. [More...](classeigen_1_1fullpivhouseholderqr#ac9bdb4f7fa77c1aa16f238592c248e70) |
|  |
|  | [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr#abf722e1dc7241a5d6f76460ef0c87821) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  | Default Constructor with memory preallocation. [More...](classeigen_1_1fullpivhouseholderqr#abf722e1dc7241a5d6f76460ef0c87821) |
|  |
| const HCoeffsType &  | [hCoeffs](classeigen_1_1fullpivhouseholderqr#a874fcd822871010f7961d9e94f1767e4) () const |
|  |
| const [Inverse](classeigen_1_1inverse)< [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr) >  | [inverse](classeigen_1_1fullpivhouseholderqr#a352ce66397af06da214ddde343cec6f5) () const |
|  |
| bool  | [isInjective](classeigen_1_1fullpivhouseholderqr#a6776788011026b0f63192485a59deaed) () const |
|  |
| bool  | [isInvertible](classeigen_1_1fullpivhouseholderqr#aeb1d779ec22ec68a5a28d4235db02ec1) () const |
|  |
| bool  | [isSurjective](classeigen_1_1fullpivhouseholderqr#aa3593db4708ce9079b0bdf219b99f57e) () const |
|  |
| MatrixType::RealScalar  | [logAbsDeterminant](classeigen_1_1fullpivhouseholderqr#aafde38918912c9b562f44b0fc3b22589) () const |
|  |
| MatrixQReturnType  | [matrixQ](classeigen_1_1fullpivhouseholderqr#ad26dd2d3c002939771d2375e4e051c28) (void) const |
|  |
| const MatrixType &  | [matrixQR](classeigen_1_1fullpivhouseholderqr#a9c16411e5d8f1fc634a5797018d5aa3e) () const |
|  |
| RealScalar  | [maxPivot](classeigen_1_1fullpivhouseholderqr#a7887506237a3bf912aebc9aaa8edacec) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonzeroPivots](classeigen_1_1fullpivhouseholderqr#af1e4d04824084a964c1a6e51db68376f) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rank](classeigen_1_1fullpivhouseholderqr#aeae555220f46477818ccc94aca2de770) () const |
|  |
| const [IntDiagSizeVectorType](classeigen_1_1matrix) &  | [rowsTranspositions](classeigen_1_1fullpivhouseholderqr#abebbfc0ca6e3dd285a0ad0c907abb093) () const |
|  |
| [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr) &  | [setThreshold](classeigen_1_1fullpivhouseholderqr#a92277e572bf98245891015d12dd2b602) (const RealScalar &[threshold](classeigen_1_1fullpivhouseholderqr#af7f6ac15ca19c2b9e45dc3eaae58c201)) |
|  |
| [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr) &  | [setThreshold](classeigen_1_1fullpivhouseholderqr#aaea4bf3dd145e0cddb16e364cca9d887) (Default\_t) |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr), Rhs >  | [solve](classeigen_1_1fullpivhouseholderqr#a6f1b0a116c78e642e3d2a100a29d1a4a) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| RealScalar  | [threshold](classeigen_1_1fullpivhouseholderqr#af7f6ac15ca19c2b9e45dc3eaae58c201) () const |
|  |
| - Public Member Functions inherited from [Eigen::SolverBase< FullPivHouseholderQR< \_MatrixType > >](classeigen_1_1solverbase) |
| AdjointReturnType  | [adjoint](classeigen_1_1solverbase#a05a3686a89888681c8e0c2bcab6d1ce5) () const |
|  |
| [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType > &  | [derived](classeigen_1_1solverbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType > &  | [derived](classeigen_1_1solverbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| const [Solve](classeigen_1_1solve)< [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >, Rhs >  | [solve](classeigen_1_1solverbase#a7fd647d110487799205df6f99547879d) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
|  | [SolverBase](classeigen_1_1solverbase#a4d5e5baddfba3790ab1a5f247dcc4dc1) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1solverbase#a732e75b5132bb4db3775916927b0e86c) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  FullPivHouseholderQR() [1/4]
----------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::[FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr) | ( |  | ) |  |

 | inline |

 
 Default Constructor. 

 The default constructor is useful in cases in which the user intends to perform decompositions via FullPivHouseholderQR::compute(const MatrixType&). 

    FullPivHouseholderQR() [2/4]
----------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::[FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr) | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols* |
|  | ) |  |  |

 | inline |

 
 Default Constructor with memory preallocation. 

 Like the default constructor but with preallocation of the internal data according to the specified problem *size*. 



See also

[FullPivHouseholderQR()](classeigen_1_1fullpivhouseholderqr#aeb14b4c1eef33128207b40a00bd0bd08 "Default Constructor.") 
    FullPivHouseholderQR() [3/4]
----------------------------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::[FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr) | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | inlineexplicit |

 
 Constructs a QR factorization from a given matrix. 

 This constructor computes the QR factorization of the matrix *matrix* by calling the method compute(). It is a short cut for:

 
```
FullPivHouseholderQR<MatrixType> qr(matrix.rows(), matrix.cols());
qr.compute(matrix);

```


See also
compute() 
    FullPivHouseholderQR() [4/4]
----------------------------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::[FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr) | ( | [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | inlineexplicit |

 
 Constructs a QR factorization from a given matrix. 

 This overloaded constructor is provided for [inplace decomposition](group__inplacedecomposition)  when `MatrixType` is a [Eigen::Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.").

 
See also
FullPivHouseholderQR(const EigenBase&) 
    absDeterminant()
----------------

    template<typename MatrixType >  

|  |
| --- |
| MatrixType::RealScalar [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< MatrixType >::absDeterminant |

 
 
Returns
the absolute value of the determinant of the matrix of which \*this is the QR decomposition. It has only linear complexity (that is, O(n) where n is the dimension of the square matrix) as the QR decomposition has already been computed.
 
Note
This is only for square matrices.
 
Warning
a determinant can be very big or small, so for matrices of large enough dimension, there is a risk of overflow/underflow. One way to work around that is to use [logAbsDeterminant()](classeigen_1_1fullpivhouseholderqr#aafde38918912c9b562f44b0fc3b22589) instead.
 
See also

[logAbsDeterminant()](classeigen_1_1fullpivhouseholderqr#aafde38918912c9b562f44b0fc3b22589), [MatrixBase::determinant()](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) 
    colsPermutation()
-----------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [PermutationType](classeigen_1_1permutationmatrix)& [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::colsPermutation  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const reference to the column permutation matrix 
    compute()
---------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)<MatrixType>& [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::compute  | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 
 Performs the QR factorization of the given matrix *matrix*. The result of the factorization is stored into `*this`, and a reference to `*this` is returned.

 
See also
class [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with full pivoting."), FullPivHouseholderQR(const MatrixType&) 
    dimensionOfKernel()
-------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::dimensionOfKernel  | ( |  | ) |  const |

 | inline |

 
 
Returns
the dimension of the kernel of the matrix of which \*this is the QR decomposition.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1fullpivhouseholderqr#a92277e572bf98245891015d12dd2b602). 
    hCoeffs()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const HCoeffsType& [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::hCoeffs  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const reference to the vector of Householder coefficients used to represent the factor `Q`.
 For advanced uses only. 

    inverse()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [Inverse](classeigen_1_1inverse)<[FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)> [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::inverse  | ( |  | ) |  const |

 | inline |

 
 
Returns
the inverse of the matrix of which \*this is the QR decomposition.
 
Note
If this matrix is not invertible, the returned matrix has undefined coefficients. Use [isInvertible()](classeigen_1_1fullpivhouseholderqr#aeb1d779ec22ec68a5a28d4235db02ec1) to first determine whether this matrix is invertible. 
    isInjective()
-------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::isInjective  | ( |  | ) |  const |

 | inline |

 
 
Returns
true if the matrix of which \*this is the QR decomposition represents an injective linear map, i.e. has trivial kernel; false otherwise.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1fullpivhouseholderqr#a92277e572bf98245891015d12dd2b602). 
    isInvertible()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::isInvertible  | ( |  | ) |  const |

 | inline |

 
 
Returns
true if the matrix of which \*this is the QR decomposition is invertible.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1fullpivhouseholderqr#a92277e572bf98245891015d12dd2b602). 
    isSurjective()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::isSurjective  | ( |  | ) |  const |

 | inline |

 
 
Returns
true if the matrix of which \*this is the QR decomposition represents a surjective linear map; false otherwise.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1fullpivhouseholderqr#a92277e572bf98245891015d12dd2b602). 
    logAbsDeterminant()
-------------------

    template<typename MatrixType >  

|  |
| --- |
| MatrixType::RealScalar [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< MatrixType >::logAbsDeterminant |

 
 
Returns
the natural log of the absolute value of the determinant of the matrix of which \*this is the QR decomposition. It has only linear complexity (that is, O(n) where n is the dimension of the square matrix) as the QR decomposition has already been computed.
 
Note
This is only for square matrices.  This method is useful to work around the risk of overflow/underflow that's inherent to determinant computation.
 
See also

[absDeterminant()](classeigen_1_1fullpivhouseholderqr#a1029e1ccc70bb8669043c5775e7f3b75), [MatrixBase::determinant()](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) 
    matrixQ()
---------

    template<typename MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< MatrixType >::MatrixQReturnType [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< MatrixType >::matrixQ  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
Expression object representing the matrix Q 
    matrixQR()
----------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixType& [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::matrixQR  | ( |  | ) |  const |

 | inline |

 
 
Returns
a reference to the matrix where the Householder QR decomposition is stored 
    maxPivot()
----------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::maxPivot  | ( |  | ) |  const |

 | inline |

 
 
Returns
the absolute value of the biggest pivot, i.e. the biggest diagonal coefficient of U. 
    nonzeroPivots()
---------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::nonzeroPivots  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of nonzero pivots in the QR decomposition. Here nonzero is meant in the exact sense, not in a fuzzy sense. So that notion isn't really intrinsically interesting, but it is still useful when implementing algorithms.
 
See also

[rank()](classeigen_1_1fullpivhouseholderqr#aeae555220f46477818ccc94aca2de770) 
    rank()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::rank  | ( |  | ) |  const |

 | inline |

 
 
Returns
the rank of the matrix of which \*this is the QR decomposition.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1fullpivhouseholderqr#a92277e572bf98245891015d12dd2b602). 
    rowsTranspositions()
--------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [IntDiagSizeVectorType](classeigen_1_1matrix)& [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::rowsTranspositions  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const reference to the vector of indices representing the rows transpositions 
    setThreshold() [1/2]
--------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)& [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::setThreshold  | ( | const RealScalar &  | *threshold* | ) |  |

 | inline |

 
 Allows to prescribe a threshold to be used by certain methods, such as [rank()](classeigen_1_1fullpivhouseholderqr#aeae555220f46477818ccc94aca2de770), who need to determine when pivots are to be considered nonzero. This is not used for the QR decomposition itself.

 When it needs to get the threshold value, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") calls [threshold()](classeigen_1_1fullpivhouseholderqr#af7f6ac15ca19c2b9e45dc3eaae58c201). By default, this uses a formula to automatically determine a reasonable threshold. Once you have called the present method [setThreshold(const RealScalar&)](classeigen_1_1fullpivhouseholderqr#a92277e572bf98245891015d12dd2b602), your value is used instead.

 
Parameters
 

|  |  |
| --- | --- |
| threshold | The new value to use as the threshold. |

   A pivot will be considered nonzero if its absolute value is strictly greater than \( \vert pivot \vert \leqslant threshold \times \vert maxpivot \vert \) where maxpivot is the biggest pivot.

 If you want to come back to the default behavior, call [setThreshold(Default\_t)](classeigen_1_1fullpivhouseholderqr#aaea4bf3dd145e0cddb16e364cca9d887) 

    setThreshold() [2/2]
--------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)& [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::setThreshold  | ( | Default\_t  |  | ) |  |

 | inline |

 
 Allows to come back to the default behavior, letting [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") use its default formula for determining the threshold.

 You should pass the special object Eigen::Default as parameter here. 



```
qr.setThreshold(Eigen::Default); 

```

See the documentation of [setThreshold(const RealScalar&)](classeigen_1_1fullpivhouseholderqr#a92277e572bf98245891015d12dd2b602). 

    solve()
-------

    template<typename \_MatrixType >   template<typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Solve](classeigen_1_1solve)<[FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr), Rhs> [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::solve  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &  | *b* | ) |  const |

 | inline |

 
 This method finds a solution x to the equation Ax=b, where A is the matrix of which `*this` is the QR decomposition.

 
Parameters
 

|  |  |
| --- | --- |
| b | the right-hand-side of the equation to solve. |

   
Returns
the exact or least-square solution if the rank is greater or equal to the number of columns of A, and an arbitrary solution otherwise.
 This method just tries to find as good a solution as possible. If you want to check whether a solution exists or if it is accurate, just call this function to get a result and then compute the error of this result, or use [MatrixBase::isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) directly, for instance like this:



```
bool a_solution_exists = (A*result).isApprox(b, precision); 

```

 This method avoids dividing by zero, so that the non-existence of a solution doesn't by itself mean that you'll get `inf` or `nan` values.

 If there exists more than one solution, this method will arbitrarily choose one.

 Example: 



```
Matrix3f m = [Matrix3f::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
Matrix3f y = [Matrix3f::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the matrix y:" << endl << y << endl;
Matrix3f x;
x = m.fullPivHouseholderQr().solve(y);
assert(y.isApprox(m*x));
cout << "Here is a solution x to the equation mx=y:" << endl << x << endl;
```

 Output: 



```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Here is the matrix y:
  0.108   -0.27   0.832
-0.0452  0.0268   0.271
  0.258   0.904   0.435
Here is a solution x to the equation mx=y:
 0.609   2.68   1.67
-0.231  -1.57 0.0713
  0.51   3.51   1.05

```
    threshold()
-----------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< \_MatrixType >::threshold  | ( |  | ) |  const |

 | inline |

 
 Returns the threshold that will be used by certain methods such as [rank()](classeigen_1_1fullpivhouseholderqr#aeae555220f46477818ccc94aca2de770).

 See the documentation of [setThreshold(const RealScalar&)](classeigen_1_1fullpivhouseholderqr#a92277e572bf98245891015d12dd2b602). 

   

---

The documentation for this class was generated from the following file:* [FullPivHouseholderQR.h](https://eigen.tuxfamily.org/dox/FullPivHouseholderQR_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1FullPivHouseholderQR.html>

Eigen::ComplexEigenSolver
=========================

  
### template<typename \_MatrixType> class Eigen::ComplexEigenSolver< \_MatrixType >

 Computes eigenvalues and eigenvectors of general complex matrices. 

 This is defined in the Eigenvalues module.



```
#include <Eigen/Eigenvalues> 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which we are computing the eigendecomposition; this is expected to be an instantiation of the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class template. |

   The eigenvalues and eigenvectors of a matrix \( A \) are scalars \( \lambda \) and vectors \( v \) such that \( Av = \lambda v \). If \( D \) is a diagonal matrix with the eigenvalues on the diagonal, and \( V \) is a matrix with the eigenvectors as its columns, then \( A V = V D \). The matrix \( V \) is almost always invertible, in which case we have \( A = V D V^{-1} \). This is called the eigendecomposition.

 The main function in this class is [compute()](classeigen_1_1complexeigensolver#aeb7e38c6db5369f5c974f3786e94c1f0 "Computes eigendecomposition of given matrix."), which computes the eigenvalues and eigenvectors of a given function. The documentation for that function contains an example showing the main features of the class.

 
See also
class [EigenSolver](classeigen_1_1eigensolver "Computes eigenvalues and eigenvectors of general matrices."), class [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver "Computes eigenvalues and eigenvectors of selfadjoint matrices.") 
 


|  |
| --- |
|  |
| typedef std::complex< RealScalar >  | [ComplexScalar](classeigen_1_1complexeigensolver#a3604c99a69fac3bee42c88cb2b589143) |
|  | Complex scalar type for [MatrixType](classeigen_1_1complexeigensolver#ad61f6278843a601096276c9a72c0252f "Synonym for the template parameter _MatrixType."). [More...](classeigen_1_1complexeigensolver#a3604c99a69fac3bee42c88cb2b589143) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [ComplexScalar](classeigen_1_1complexeigensolver#a3604c99a69fac3bee42c88cb2b589143), ColsAtCompileTime, 1, Options &(~[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f)), MaxColsAtCompileTime, 1 >  | [EigenvalueType](classeigen_1_1complexeigensolver#ad3a663b1ff5200a098dabbbf9b7162b1) |
|  | Type for vector of eigenvalues as returned by [eigenvalues()](classeigen_1_1complexeigensolver#a10c25c7620e7faedcd39991cce3a757b "Returns the eigenvalues of given matrix."). [More...](classeigen_1_1complexeigensolver#ad3a663b1ff5200a098dabbbf9b7162b1) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [ComplexScalar](classeigen_1_1complexeigensolver#a3604c99a69fac3bee42c88cb2b589143), RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime >  | [EigenvectorType](classeigen_1_1complexeigensolver#a67cd4d20590abfd86b2639c4c8ea3dd6) |
|  | Type for matrix of eigenvectors as returned by [eigenvectors()](classeigen_1_1complexeigensolver#a3aa5e27800349990778da8fa532c1270 "Returns the eigenvectors of given matrix."). [More...](classeigen_1_1complexeigensolver#a67cd4d20590abfd86b2639c4c8ea3dd6) |
|  |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1complexeigensolver#abc0218d8b902af0d6c759bfc0a8a8d74) |
|  |
|  typedef \_MatrixType  | [MatrixType](classeigen_1_1complexeigensolver#ad61f6278843a601096276c9a72c0252f) |
|  | Synonym for the template parameter `_MatrixType`.  |
|  |
|  typedef MatrixType::Scalar  | [Scalar](classeigen_1_1complexeigensolver#a61035d40c9498bb1d47628cdd4946785) |
|  | Scalar type for matrices of type [MatrixType](classeigen_1_1complexeigensolver#ad61f6278843a601096276c9a72c0252f "Synonym for the template parameter _MatrixType.").  |
|  |




|  |
| --- |
|  |
|  | [ComplexEigenSolver](classeigen_1_1complexeigensolver#a3322a21574c61eefd450c003515ad802) () |
|  | Default constructor. [More...](classeigen_1_1complexeigensolver#a3322a21574c61eefd450c003515ad802) |
|  |
| template<typename InputType >  |
|  | [ComplexEigenSolver](classeigen_1_1complexeigensolver#a748de5c1e7f730e16421e6d451437600) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix, bool computeEigenvectors=true) |
|  | Constructor; computes eigendecomposition of given matrix. [More...](classeigen_1_1complexeigensolver#a748de5c1e7f730e16421e6d451437600) |
|  |
|  | [ComplexEigenSolver](classeigen_1_1complexeigensolver#a86751f64ebcd5c554551fb5eaaa02db7) ([Index](classeigen_1_1complexeigensolver#abc0218d8b902af0d6c759bfc0a8a8d74) size) |
|  | Default Constructor with memory preallocation. [More...](classeigen_1_1complexeigensolver#a86751f64ebcd5c554551fb5eaaa02db7) |
|  |
| template<typename InputType >  |
| [ComplexEigenSolver](classeigen_1_1complexeigensolver) &  | [compute](classeigen_1_1complexeigensolver#aeb7e38c6db5369f5c974f3786e94c1f0) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix, bool computeEigenvectors=true) |
|  | Computes eigendecomposition of given matrix. [More...](classeigen_1_1complexeigensolver#aeb7e38c6db5369f5c974f3786e94c1f0) |
|  |
| const [EigenvalueType](classeigen_1_1complexeigensolver#ad3a663b1ff5200a098dabbbf9b7162b1) &  | [eigenvalues](classeigen_1_1complexeigensolver#a10c25c7620e7faedcd39991cce3a757b) () const |
|  | Returns the eigenvalues of given matrix. [More...](classeigen_1_1complexeigensolver#a10c25c7620e7faedcd39991cce3a757b) |
|  |
| const [EigenvectorType](classeigen_1_1complexeigensolver#a67cd4d20590abfd86b2639c4c8ea3dd6) &  | [eigenvectors](classeigen_1_1complexeigensolver#a3aa5e27800349990778da8fa532c1270) () const |
|  | Returns the eigenvectors of given matrix. [More...](classeigen_1_1complexeigensolver#a3aa5e27800349990778da8fa532c1270) |
|  |
|  [Index](classeigen_1_1complexeigensolver#abc0218d8b902af0d6c759bfc0a8a8d74) | [getMaxIterations](classeigen_1_1complexeigensolver#aeec4754e32bf2d1c650bf3aed110c3d3) () |
|  | Returns the maximum number of iterations.  |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1complexeigensolver#ad4d9d8b90145900b9686d2dabbe46730) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1complexeigensolver#ad4d9d8b90145900b9686d2dabbe46730) |
|  |
|  [ComplexEigenSolver](classeigen_1_1complexeigensolver) &  | [setMaxIterations](classeigen_1_1complexeigensolver#a0c5a974da17774d75be41e351e6bda62) ([Index](classeigen_1_1complexeigensolver#abc0218d8b902af0d6c759bfc0a8a8d74) maxIters) |
|  | Sets the maximum number of iterations allowed.  |
|  |

  ComplexScalar
-------------

    template<typename \_MatrixType >  

|  |
| --- |
| typedef std::complex<RealScalar> [Eigen::ComplexEigenSolver](classeigen_1_1complexeigensolver)< \_MatrixType >::[ComplexScalar](classeigen_1_1complexeigensolver#a3604c99a69fac3bee42c88cb2b589143) |

 
 Complex scalar type for [MatrixType](classeigen_1_1complexeigensolver#ad61f6278843a601096276c9a72c0252f "Synonym for the template parameter _MatrixType."). 

 This is `std::complex<Scalar>` if [Scalar](classeigen_1_1complexeigensolver#a61035d40c9498bb1d47628cdd4946785 "Scalar type for matrices of type MatrixType.") is real (e.g., `float` or `double`) and just `Scalar` if [Scalar](classeigen_1_1complexeigensolver#a61035d40c9498bb1d47628cdd4946785 "Scalar type for matrices of type MatrixType.") is complex. 

    EigenvalueType
--------------

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<[ComplexScalar](classeigen_1_1complexeigensolver#a3604c99a69fac3bee42c88cb2b589143), ColsAtCompileTime, 1, Options&(~[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f)), MaxColsAtCompileTime, 1> [Eigen::ComplexEigenSolver](classeigen_1_1complexeigensolver)< \_MatrixType >::[EigenvalueType](classeigen_1_1complexeigensolver#ad3a663b1ff5200a098dabbbf9b7162b1) |

 
 Type for vector of eigenvalues as returned by [eigenvalues()](classeigen_1_1complexeigensolver#a10c25c7620e7faedcd39991cce3a757b "Returns the eigenvalues of given matrix."). 

 This is a column vector with entries of type [ComplexScalar](classeigen_1_1complexeigensolver#a3604c99a69fac3bee42c88cb2b589143 "Complex scalar type for MatrixType."). The length of the vector is the size of [MatrixType](classeigen_1_1complexeigensolver#ad61f6278843a601096276c9a72c0252f "Synonym for the template parameter _MatrixType."). 

    EigenvectorType
---------------

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<[ComplexScalar](classeigen_1_1complexeigensolver#a3604c99a69fac3bee42c88cb2b589143), RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime> [Eigen::ComplexEigenSolver](classeigen_1_1complexeigensolver)< \_MatrixType >::[EigenvectorType](classeigen_1_1complexeigensolver#a67cd4d20590abfd86b2639c4c8ea3dd6) |

 
 Type for matrix of eigenvectors as returned by [eigenvectors()](classeigen_1_1complexeigensolver#a3aa5e27800349990778da8fa532c1270 "Returns the eigenvectors of given matrix."). 

 This is a square matrix with entries of type [ComplexScalar](classeigen_1_1complexeigensolver#a3604c99a69fac3bee42c88cb2b589143 "Complex scalar type for MatrixType."). The size is the same as the size of [MatrixType](classeigen_1_1complexeigensolver#ad61f6278843a601096276c9a72c0252f "Synonym for the template parameter _MatrixType."). 

    Index
-----

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::ComplexEigenSolver](classeigen_1_1complexeigensolver)< \_MatrixType >::[Index](classeigen_1_1complexeigensolver#abc0218d8b902af0d6c759bfc0a8a8d74) |

 
 
**[Deprecated:](deprecated#_deprecated000012)**
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3 
    ComplexEigenSolver() [1/3]
--------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::ComplexEigenSolver](classeigen_1_1complexeigensolver)< \_MatrixType >::[ComplexEigenSolver](classeigen_1_1complexeigensolver) | ( |  | ) |  |

 | inline |

 
 Default constructor. 

 The default constructor is useful in cases in which the user intends to perform decompositions via [compute()](classeigen_1_1complexeigensolver#aeb7e38c6db5369f5c974f3786e94c1f0 "Computes eigendecomposition of given matrix."). 

    ComplexEigenSolver() [2/3]
--------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::ComplexEigenSolver](classeigen_1_1complexeigensolver)< \_MatrixType >::[ComplexEigenSolver](classeigen_1_1complexeigensolver) | ( | [Index](classeigen_1_1complexeigensolver#abc0218d8b902af0d6c759bfc0a8a8d74) | *size* | ) |  |

 | inlineexplicit |

 
 Default Constructor with memory preallocation. 

 Like the default constructor but with preallocation of the internal data according to the specified problem *size*. 



See also

[ComplexEigenSolver()](classeigen_1_1complexeigensolver#a3322a21574c61eefd450c003515ad802 "Default constructor.") 
    ComplexEigenSolver() [3/3]
--------------------------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::ComplexEigenSolver](classeigen_1_1complexeigensolver)< \_MatrixType >::[ComplexEigenSolver](classeigen_1_1complexeigensolver) | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix*,  |
|  |  | bool  | *computeEigenvectors* = `true` |
|  | ) |  |  |

 | inlineexplicit |

 
 Constructor; computes eigendecomposition of given matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matrix | Square matrix whose eigendecomposition is to be computed.  |
| [in] | computeEigenvectors | If true, both the eigenvectors and the eigenvalues are computed; if false, only the eigenvalues are computed. |

   This constructor calls [compute()](classeigen_1_1complexeigensolver#aeb7e38c6db5369f5c974f3786e94c1f0 "Computes eigendecomposition of given matrix.") to compute the eigendecomposition. 

    compute()
---------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [ComplexEigenSolver](classeigen_1_1complexeigensolver)& [Eigen::ComplexEigenSolver](classeigen_1_1complexeigensolver)< \_MatrixType >::compute  | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix*,  |
|  |  | bool  | *computeEigenvectors* = `true` |
|  | ) |  |  |

 
 Computes eigendecomposition of given matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matrix | Square matrix whose eigendecomposition is to be computed.  |
| [in] | computeEigenvectors | If true, both the eigenvectors and the eigenvalues are computed; if false, only the eigenvalues are computed.  |

   
Returns
Reference to `*this` 
 This function computes the eigenvalues of the complex matrix `matrix`. The [eigenvalues()](classeigen_1_1complexeigensolver#a10c25c7620e7faedcd39991cce3a757b "Returns the eigenvalues of given matrix.") function can be used to retrieve them. If `computeEigenvectors` is true, then the eigenvectors are also computed and can be retrieved by calling [eigenvectors()](classeigen_1_1complexeigensolver#a3aa5e27800349990778da8fa532c1270 "Returns the eigenvectors of given matrix.").

 The matrix is first reduced to Schur form using the [ComplexSchur](classeigen_1_1complexschur "Performs a complex Schur decomposition of a real or complex square matrix.") class. The Schur decomposition is then used to compute the eigenvalues and eigenvectors.

 The cost of the computation is dominated by the cost of the Schur decomposition, which is \( O(n^3) \) where \( n \) is the size of the matrix.

 Example: 



```
MatrixXcf A = [MatrixXcf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
cout << "Here is a random 4x4 matrix, A:" << endl << A << endl << endl;
 
ComplexEigenSolver<MatrixXcf> ces;
ces.compute(A);
cout << "The eigenvalues of A are:" << endl << ces.eigenvalues() << endl;
cout << "The matrix of eigenvectors, V, is:" << endl << ces.eigenvectors() << endl << endl;
 
complex<float> lambda = ces.eigenvalues()[0];
cout << "Consider the first eigenvalue, lambda = " << lambda << endl;
VectorXcf v = ces.eigenvectors().col(0);
cout << "If v is the corresponding eigenvector, then lambda \* v = " << endl << lambda * v << endl;
cout << "... and A \* v = " << endl << A * v << endl << endl;
 
cout << "Finally, V \* D \* V^(-1) = " << endl
     << ces.eigenvectors() * ces.eigenvalues().asDiagonal() * ces.eigenvectors().inverse() << endl;
```

 Output: 



```
Here is a random 4x4 matrix, A:
  (-0.211,0.68)  (0.108,-0.444)   (0.435,0.271) (-0.198,-0.687)
  (0.597,0.566) (0.258,-0.0452)  (0.214,-0.717)  (-0.782,-0.74)
 (-0.605,0.823)  (0.0268,-0.27) (-0.514,-0.967)  (-0.563,0.998)
  (0.536,-0.33)   (0.832,0.904)  (0.608,-0.726)  (0.678,0.0259)

The eigenvalues of A are:
 (0.137,0.505)
 (-0.758,1.22)
 (1.52,-0.402)
(-0.691,-1.63)
The matrix of eigenvectors, V, is:
  (-0.246,-0.106)     (0.418,0.263)   (0.0417,-0.296)    (-0.122,0.271)
  (-0.205,-0.629)    (0.466,-0.457)    (0.244,-0.456)      (0.247,0.23)
 (-0.432,-0.0359) (-0.0651,-0.0146)    (-0.191,0.334)   (0.859,-0.0877)
    (-0.301,0.46)    (-0.41,-0.397)     (0.623,0.328)    (-0.116,0.195)

Consider the first eigenvalue, lambda = (0.137,0.505)
If v is the corresponding eigenvector, then lambda * v = 
 (0.0197,-0.139)
    (0.29,-0.19)
(-0.0412,-0.223)
(-0.274,-0.0891)
... and A * v = 
 (0.0197,-0.139)
    (0.29,-0.19)
(-0.0412,-0.223)
(-0.274,-0.0891)

Finally, V * D * V^(-1) = 
  (-0.211,0.68)  (0.108,-0.444)   (0.435,0.271) (-0.198,-0.687)
  (0.597,0.566) (0.258,-0.0452)  (0.214,-0.717)  (-0.782,-0.74)
 (-0.605,0.823)  (0.0268,-0.27) (-0.514,-0.967)  (-0.563,0.998)
  (0.536,-0.33)   (0.832,0.904)  (0.608,-0.726)  (0.678,0.0259)

```
    eigenvalues()
-------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [EigenvalueType](classeigen_1_1complexeigensolver#ad3a663b1ff5200a098dabbbf9b7162b1)& [Eigen::ComplexEigenSolver](classeigen_1_1complexeigensolver)< \_MatrixType >::eigenvalues  | ( |  | ) |  const |

 | inline |

 
 Returns the eigenvalues of given matrix. 

 
Returns
A const reference to the column vector containing the eigenvalues.
 
Precondition
Either the constructor ComplexEigenSolver(const MatrixType& matrix, bool) or the member function compute(const MatrixType& matrix, bool) has been called before to compute the eigendecomposition of a matrix.
 This function returns a column vector containing the eigenvalues. Eigenvalues are repeated according to their algebraic multiplicity, so there are as many eigenvalues as rows in the matrix. The eigenvalues are not sorted in any particular order.

 Example: 



```
MatrixXcf ones = [MatrixXcf::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)(3,3);
ComplexEigenSolver<MatrixXcf> ces(ones, /\* computeEigenvectors = \*/ false);
cout << "The eigenvalues of the 3x3 matrix of ones are:" 
     << endl << ces.eigenvalues() << endl;
```

 Output: 



```
The eigenvalues of the 3x3 matrix of ones are:
(0,-0)
 (0,0)
 (3,0)

```
    eigenvectors()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [EigenvectorType](classeigen_1_1complexeigensolver#a67cd4d20590abfd86b2639c4c8ea3dd6)& [Eigen::ComplexEigenSolver](classeigen_1_1complexeigensolver)< \_MatrixType >::eigenvectors  | ( |  | ) |  const |

 | inline |

 
 Returns the eigenvectors of given matrix. 

 
Returns
A const reference to the matrix whose columns are the eigenvectors.
 
Precondition
Either the constructor ComplexEigenSolver(const MatrixType& matrix, bool) or the member function compute(const MatrixType& matrix, bool) has been called before to compute the eigendecomposition of a matrix, and `computeEigenvectors` was set to true (the default).
 This function returns a matrix whose columns are the eigenvectors. Column \( k \) is an eigenvector corresponding to eigenvalue number \( k \) as returned by [eigenvalues()](classeigen_1_1complexeigensolver#a10c25c7620e7faedcd39991cce3a757b "Returns the eigenvalues of given matrix."). The eigenvectors are normalized to have (Euclidean) norm equal to one. The matrix returned by this function is the matrix \( V \) in the eigendecomposition \( A = V D V^{-1} \), if it exists.

 Example: 



```
MatrixXcf ones = [MatrixXcf::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)(3,3);
ComplexEigenSolver<MatrixXcf> ces(ones);
cout << "The first eigenvector of the 3x3 matrix of ones is:" 
     << endl << ces.eigenvectors().col(0) << endl;

```

 Output: 



```
The first eigenvector of the 3x3 matrix of ones is:
(-0.816,0)
 (0.408,0)
 (0.408,0)

```
    info()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::ComplexEigenSolver](classeigen_1_1complexeigensolver)< \_MatrixType >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether previous computation was successful. 

 
Returns

`Success` if computation was successful, `NoConvergence` otherwise. 
   

---

The documentation for this class was generated from the following file:* [ComplexEigenSolver.h](https://eigen.tuxfamily.org/dox/ComplexEigenSolver_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1ComplexEigenSolver.html>

Eigen::TriangularView
=====================

  
### template<typename \_MatrixType, unsigned int \_Mode> class Eigen::TriangularView< \_MatrixType, \_Mode >

 Expression of a triangular part in a matrix. 

 
Parameters
 

|  |  |
| --- | --- |
| MatrixType | the type of the object in which we are taking the triangular part  |
| Mode | the kind of triangular matrix expression to construct. Can be [Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1), [Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749), [UnitUpper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdadd28224d7ea92689930be73c1b50b0ad), [UnitLower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda8f40b928c10a71ba03e5f75ad2a72fda), [StrictlyUpper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda7b37877e0b9b0df28c9c2b669a633265), or [StrictlyLower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda2424988b6fca98be70b595632753ba81). This is in fact a bit field; it must have either [Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1) or [Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749), and additionally it may have [UnitDiag](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda2ef430bff6cc12c2d1e0ef01b95f7ff3) or [ZeroDiag](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdac4dc554a61510151ddd5bafaf6040223) or neither. |

   This class represents a triangular part of a matrix, not necessarily square. Strictly speaking, for rectangular matrices one should speak of "trapezoid" parts. This class is the return type of MatrixBase::triangularView() and SparseMatrixBase::triangularView(), and most of the time this is the only way it is used.

 
See also
MatrixBase::triangularView() 
  Inherits Eigen::TriangularViewImpl< \_MatrixType, \_Mode, internal::traits< \_MatrixType >::StorageKind >.

 

|  |
| --- |
|  |
| const [AdjointReturnType](classeigen_1_1triangularview) | [adjoint](classeigen_1_1triangularview#aaa336e1b759eea3050139bcdd55f8349) () const |
|  |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [cols](classeigen_1_1triangularview#a12d7ac8a095cda817cd241f1aae2f8fb) () const EIGEN\_NOEXCEPT |
|  |
| const [ConjugateReturnType](classeigen_1_1triangularview) | [conjugate](classeigen_1_1triangularview#a53c6a7764a6610f4955788f6134a8d78) () const |
|  |
| template<bool Cond>  |
| internal::conditional< Cond, [ConjugateReturnType](classeigen_1_1triangularview), [ConstTriangularView](classeigen_1_1triangularview) >::type  | [conjugateIf](classeigen_1_1triangularview#a3461c3e9ccb404c66291c298ec986af9) () const |
|  |
| Scalar  | [determinant](classeigen_1_1triangularview#ab8cd6bfc705c0c05a6755ae7437376f9) () const |
|  |
| NestedExpression &  | [nestedExpression](classeigen_1_1triangularview#a5877fec0b1cd3727d08218f9938abf96) () |
|  |
| const NestedExpression &  | [nestedExpression](classeigen_1_1triangularview#a02fdc4b367a9c83f7e2e706037558dd1) () const |
|  |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [rows](classeigen_1_1triangularview#a324c2afde060bc028233e0ba81f4f24b) () const EIGEN\_NOEXCEPT |
|  |
| [SelfAdjointView](classeigen_1_1selfadjointview)< MatrixTypeNestedNonRef, Mode >  | [selfadjointView](classeigen_1_1triangularview#a408d1e6601f83ae8b7cd5edc8ad313a5) () |
|  |
| const [SelfAdjointView](classeigen_1_1selfadjointview)< MatrixTypeNestedNonRef, Mode >  | [selfadjointView](classeigen_1_1triangularview#a669d39567c1a2f805582c7538f2752b5) () const |
|  |
| [TransposeReturnType](classeigen_1_1triangularview) | [transpose](classeigen_1_1triangularview#ac9efe6f446781eb1eb6e62d4a7707fd4) () |
|  |
| const [ConstTransposeReturnType](classeigen_1_1triangularview) | [transpose](classeigen_1_1triangularview#aa45efa0f1d6f8c009b75a4f6fc00e063) () const |
|  |

  adjoint()
---------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [AdjointReturnType](classeigen_1_1triangularview) [Eigen::TriangularView](classeigen_1_1triangularview)< \_MatrixType, \_Mode >::adjoint  | ( |  | ) |  const |

 | inline |

 
 
See also

[MatrixBase::adjoint() const](classeigen_1_1matrixbase#afacca1f88da57e5cd87dd07c8ff926bb)  
    cols()
------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::TriangularView](classeigen_1_1triangularview)< \_MatrixType, \_Mode >::cols  | ( | void  |  | ) |  const |

 | inline |

 
  
Returns
the number of columns. 
 
See also

[rows()](classeigen_1_1triangularview#a324c2afde060bc028233e0ba81f4f24b), ColsAtCompileTime 
    conjugate()
-----------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [ConjugateReturnType](classeigen_1_1triangularview) [Eigen::TriangularView](classeigen_1_1triangularview)< \_MatrixType, \_Mode >::conjugate  | ( | void  |  | ) |  const |

 | inline |

 
 
See also
MatrixBase::conjugate() const 
    conjugateIf()
-------------

    template<typename \_MatrixType , unsigned int \_Mode>   template<bool Cond>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::conditional<Cond,[ConjugateReturnType](classeigen_1_1triangularview),[ConstTriangularView](classeigen_1_1triangularview)>::type [Eigen::TriangularView](classeigen_1_1triangularview)< \_MatrixType, \_Mode >::conjugateIf  | ( |  | ) |  const |

 | inline |

 
 
Returns
an expression of the complex conjugate of `*this` if Cond==true, returns `*this` otherwise. 
    determinant()
-------------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar [Eigen::TriangularView](classeigen_1_1triangularview)< \_MatrixType, \_Mode >::determinant  | ( |  | ) |  const |

 | inline |

 
 
Returns
the determinant of the triangular matrix 
 
See also

[MatrixBase::determinant()](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) 
    nestedExpression() [1/2]
------------------------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| NestedExpression& [Eigen::TriangularView](classeigen_1_1triangularview)< \_MatrixType, \_Mode >::nestedExpression  | ( |  | ) |  |

 | inline |

 
 
Returns
a reference to the nested expression 
    nestedExpression() [2/2]
------------------------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const NestedExpression& [Eigen::TriangularView](classeigen_1_1triangularview)< \_MatrixType, \_Mode >::nestedExpression  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const reference to the nested expression 
    rows()
------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::TriangularView](classeigen_1_1triangularview)< \_MatrixType, \_Mode >::rows  | ( | void  |  | ) |  const |

 | inline |

 
  
Returns
the number of rows. 
 
See also

[cols()](classeigen_1_1triangularview#a12d7ac8a095cda817cd241f1aae2f8fb), RowsAtCompileTime 
    selfadjointView() [1/2]
-----------------------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [SelfAdjointView](classeigen_1_1selfadjointview)<MatrixTypeNestedNonRef,Mode> [Eigen::TriangularView](classeigen_1_1triangularview)< \_MatrixType, \_Mode >::selfadjointView  | ( |  | ) |  |

 | inline |

 
 
Returns
a selfadjoint view of the referenced triangular part which must be either `[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)` or `[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)`.
 This is a shortcut for



```
this->[nestedExpression](classeigen_1_1triangularview#a02fdc4b367a9c83f7e2e706037558dd1)().selfadjointView<(*this)::Mode>() 
```
 
See also
MatrixBase::selfadjointView() 
    selfadjointView() [2/2]
-----------------------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [SelfAdjointView](classeigen_1_1selfadjointview)<MatrixTypeNestedNonRef,Mode> [Eigen::TriangularView](classeigen_1_1triangularview)< \_MatrixType, \_Mode >::selfadjointView  | ( |  | ) |  const |

 | inline |

 
 This is the const version of [selfadjointView()](classeigen_1_1triangularview#a408d1e6601f83ae8b7cd5edc8ad313a5) 

    transpose() [1/2]
-----------------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [TransposeReturnType](classeigen_1_1triangularview) [Eigen::TriangularView](classeigen_1_1triangularview)< \_MatrixType, \_Mode >::transpose  | ( |  | ) |  |

 | inline |

 
 
See also

[MatrixBase::transpose()](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c) 
    transpose() [2/2]
-----------------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [ConstTransposeReturnType](classeigen_1_1triangularview) [Eigen::TriangularView](classeigen_1_1triangularview)< \_MatrixType, \_Mode >::transpose  | ( |  | ) |  const |

 | inline |

 
 
See also

[MatrixBase::transpose() const](classeigen_1_1densebase#a38c0b074cf93fc194bf91141287cee3f)  
   

---

The documentation for this class was generated from the following file:* [TriangularMatrix.h](https://eigen.tuxfamily.org/dox/TriangularMatrix_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1TriangularView.html>

Lazy Evaluation and Aliasing
============================

   
Executive summary: Eigen has intelligent compile-time mechanisms to enable lazy evaluation and removing temporaries where appropriate. It will handle aliasing automatically in most cases, for example with matrix products. The automatic behavior can be overridden manually by using the [MatrixBase::eval()](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b) and [MatrixBase::noalias()](classeigen_1_1matrixbase#a2c1085de7645f23f240876388457da0b) methods.

 When you write a line of code involving a complex expression such as

 
```
mat1 = mat2 + mat3 * (mat4 + mat5);

```

Eigen determines automatically, for each sub-expression, whether to evaluate it into a temporary variable. Indeed, in certain cases it is better to evaluate a sub-expression into a temporary variable, while in other cases it is better to avoid that.

 A traditional math library without expression templates always evaluates all sub-expressions into temporaries. So with this code,

 
```
vec1 = vec2 + vec3;

```

a traditional library would evaluate `vec2` + vec3 into a temporary `vec4` and then copy `vec4` into `vec1`. This is of course inefficient: the arrays are traversed twice, so there are a lot of useless load/store operations.

 Expression-templates-based libraries can avoid evaluating sub-expressions into temporaries, which in many cases results in large speed improvements. This is called *lazy evaluation* as an expression is getting evaluated as late as possible. In Eigen **all expressions are lazy-evaluated**. More precisely, an expression starts to be evaluated once it is assigned to a matrix. Until then nothing happens beyond constructing the abstract expression tree. In contrast to most other expression-templates-based libraries, however, **Eigen might choose to evaluate some sub-expressions into temporaries**. There are two reasons for that: first, pure lazy evaluation is not always a good choice for performance; second, pure lazy evaluation can be very dangerous, for example with matrix products: doing `mat = mat*mat` gives a wrong result if the matrix product is directly evaluated within the destination matrix, because of the way matrix product works.

 For these reasons, Eigen has intelligent compile-time mechanisms to determine automatically which sub-expression should be evaluated into a temporary variable.

 So in the basic example,

 
```
mat1 = mat2 + mat3;

```

Eigen chooses not to introduce any temporary. Thus the arrays are traversed only once, producing optimized code. If you really want to force immediate evaluation, use [eval()](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b):

 
```
mat1 = (mat2 + mat3).eval();

```

Here is now a more involved example:

 
```
mat1 = -mat2 + mat3 + 5 * mat4;

```

Here again Eigen won't introduce any temporary, thus producing a single **fused** evaluation loop, which is clearly the correct choice.

 
 Which sub-expressions are evaluated into temporaries?
=======================================================

 The default evaluation strategy is to fuse the operations in a single loop, and Eigen will choose it except in a few circumstances.

 **The first circumstance** in which Eigen chooses to evaluate a sub-expression is when it sees an assignment `a = b;` and the expression `b` has the evaluate-before-assigning [flag](group__flags). The most important example of such an expression is the [matrix product expression](classeigen_1_1product). For example, when you do

 
```
mat = mat * mat;

```

Eigen will evaluate `mat * mat` into a temporary matrix, and then copies it into the original `mat`. This guarantees a correct result as we saw above that lazy evaluation gives wrong results with matrix products. It also doesn't cost much, as the cost of the matrix product itself is much higher. Note that this temporary is introduced at evaluation time only, that is, within operator= in this example. The expression `mat * mat` still return a abstract product type.

 What if you know that the result does no alias the operand of the product and want to force lazy evaluation? Then use [.noalias()](classeigen_1_1matrixbase#a2c1085de7645f23f240876388457da0b) instead. Here is an example:

 
```
mat1.noalias() = mat2 * mat2;

```

Here, since we know that mat2 is not the same matrix as mat1, we know that lazy evaluation is not dangerous, so we may force lazy evaluation. Concretely, the effect of noalias() here is to bypass the evaluate-before-assigning [flag](group__flags).

 **The second circumstance** in which Eigen chooses to evaluate a sub-expression, is when it sees a nested expression such as `a + b` where `b` is already an expression having the evaluate-before-nesting [flag](group__flags). Again, the most important example of such an expression is the [matrix product expression](classeigen_1_1product). For example, when you do

 
```
mat1 = mat2 * mat3 + mat4 * mat5;

```

the products `mat2 * mat3` and `mat4 * mat5` gets evaluated separately into temporary matrices before being summed up in `mat1`. Indeed, to be efficient matrix products need to be evaluated within a destination matrix at hand, and not as simple "dot products". For small matrices, however, you might want to enforce a "dot-product" based lazy evaluation with lazyProduct(). Again, it is important to understand that those temporaries are created at evaluation time only, that is in operator =. See TopicPitfalls\_auto\_keyword for common pitfalls regarding this remark.

 **The third circumstance** in which Eigen chooses to evaluate a sub-expression, is when its cost model shows that the total cost of an operation is reduced if a sub-expression gets evaluated into a temporary. Indeed, in certain cases, an intermediate result is sufficiently costly to compute and is reused sufficiently many times, that is worth "caching". Here is an example:

 
```
mat1 = mat2 * (mat3 + mat4);

```

Here, provided the matrices have at least 2 rows and 2 columns, each coefficient of the expression `mat3 + mat4` is going to be used several times in the matrix product. Instead of computing the sum every time, it is much better to compute it once and store it in a temporary variable. Eigen understands this and evaluates `mat3 + mat4` into a temporary variable before evaluating the product. 

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicLazyEvaluation.html>

Eigen::indexing
===============

  
The sole purpose of this namespace is to be able to import all functions and symbols that are expected to be used within operator() for indexing and slicing. If you already imported the whole [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") namespace: 



```
using namespace [Eigen](namespaceeigen); 
```

 then you are already all set. Otherwise, if you don't want/cannot import the whole [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") namespace, the following line: 



```
using namespace [Eigen::indexing](namespaceeigen_1_1indexing); 
```

 is equivalent to: 



```
using [Eigen::all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14);
using [Eigen::seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969);
using [Eigen::seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda);
using [Eigen::lastN](namespaceeigen#acc01e5c7293dd3af76e79ae68cc87f77); // c++11 only
using [Eigen::last](group__core__module#ga2dd8b20d08336af23947e054a17415ee);
using [Eigen::lastp1](group__core__module#ga662ffa801d746b972453080c648765f9);
using [Eigen::fix](group__core__module#gac01f234bce100e39e6928fdc470e5194);
```
 
 

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/namespaceEigen_1_1indexing.html>

Eigen::symbolic
===============

  

|  |
| --- |
|  |
| class  | [BaseExpr](classeigen_1_1symbolic_1_1baseexpr) |
|  |
| class  | [SymbolExpr](classeigen_1_1symbolic_1_1symbolexpr) |
|  |
| class  | [SymbolValue](classeigen_1_1symbolic_1_1symbolvalue) |
|  |

 
This namespace defines a set of classes and functions to build and evaluate symbolic expressions of scalar type Index. Here is a simple example:

 
```
// First step, defines symbols:
struct x_tag {};  static const symbolic::SymbolExpr<x_tag> x;
struct y_tag {};  static const symbolic::SymbolExpr<y_tag> y;
struct z_tag {};  static const symbolic::SymbolExpr<z_tag> z;
 
// Defines an expression:
auto expr = (x+3)/y+z;
 
// And evaluate it: (c++14)
std::cout << expr.eval(x=6,y=3,z=-13) << "\n";
 
// In c++98/11, only one symbol per expression is supported for now:
auto expr98 = (3-x)/2;
std::cout << expr98.eval(x=6) << "\n";

```

It is currently only used internally to define and manipulate the [Eigen::last](group__core__module#ga2dd8b20d08336af23947e054a17415ee) and [Eigen::lastp1](group__core__module#ga662ffa801d746b972453080c648765f9) symbols in [Eigen::seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969) and [Eigen::seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda). 

 
 

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/namespaceEigen_1_1symbolic.html>

Eigen::SelfAdjointEigenSolver
=============================

  
### template<typename \_MatrixType> class Eigen::SelfAdjointEigenSolver< \_MatrixType >

 Computes eigenvalues and eigenvectors of selfadjoint matrices. 

 This is defined in the Eigenvalues module.



```
#include <Eigen/Eigenvalues> 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which we are computing the eigendecomposition; this is expected to be an instantiation of the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class template. |

   A matrix \( A \) is selfadjoint if it equals its adjoint. For real matrices, this means that the matrix is symmetric: it equals its transpose. This class computes the eigenvalues and eigenvectors of a selfadjoint matrix. These are the scalars \( \lambda \) and vectors \( v \) such that \( Av = \lambda v \). The eigenvalues of a selfadjoint matrix are always real. If \( D \) is a diagonal matrix with the eigenvalues on the diagonal, and \( V \) is a matrix with the eigenvectors as its columns, then \( A = V D V^{-1} \). This is called the eigendecomposition.

 For a selfadjoint matrix, \( V \) is unitary, meaning its inverse is equal to its adjoint, \( V^{-1} = V^{\dagger} \). If \( A \) is real, then \( V \) is also real and therefore orthogonal, meaning its inverse is equal to its transpose, \( V^{-1} = V^T \).

 The algorithm exploits the fact that the matrix is selfadjoint, making it faster and more accurate than the general purpose eigenvalue algorithms implemented in [EigenSolver](classeigen_1_1eigensolver "Computes eigenvalues and eigenvectors of general matrices.") and [ComplexEigenSolver](classeigen_1_1complexeigensolver "Computes eigenvalues and eigenvectors of general complex matrices.").

 Only the **lower** **triangular** **part** of the input matrix is referenced.

 Call the function [compute()](classeigen_1_1selfadjointeigensolver#adf397f6bce9f93c4b0139a47e261fc24 "Computes eigendecomposition of given matrix.") to compute the eigenvalues and eigenvectors of a given matrix. Alternatively, you can use the SelfAdjointEigenSolver(const MatrixType&, int) constructor which computes the eigenvalues and eigenvectors at construction time. Once the eigenvalue and eigenvectors are computed, they can be retrieved with the [eigenvalues()](classeigen_1_1selfadjointeigensolver#a3df8721abcc71132f7f02bf9dfe78e41 "Returns the eigenvalues of given matrix.") and [eigenvectors()](classeigen_1_1selfadjointeigensolver#a229c4c26d87c5d2663cd3cc8a4c68266 "Returns the eigenvectors of given matrix.") functions.

 The documentation for SelfAdjointEigenSolver(const MatrixType&, int) contains an example of the typical use of this class.

 To solve the *generalized* eigenvalue problem \( Av = \lambda Bv \) and the likes, see the class [GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver "Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem.").

 
See also

[MatrixBase::eigenvalues()](classeigen_1_1matrixbase#a30430fa3d5b4e74d312fd4f502ac984d "Computes the eigenvalues of a matrix."), class [EigenSolver](classeigen_1_1eigensolver "Computes eigenvalues and eigenvectors of general matrices."), class [ComplexEigenSolver](classeigen_1_1complexeigensolver "Computes eigenvalues and eigenvectors of general complex matrices.") 
     ![Inheritance graph]      

|  |
| --- |
|  |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1selfadjointeigensolver#a8a59ab7734b6eae2754fd78bc7c3a360) |
|  |
| typedef [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1selfadjointeigensolver#a0bfcedf4245b6846007ca4f01e4feb1f) >::Real  | [RealScalar](classeigen_1_1selfadjointeigensolver#a5dae5f422a3c71060e6bd31332bf64fd) |
|  | Real scalar type for `_MatrixType`. [More...](classeigen_1_1selfadjointeigensolver#a5dae5f422a3c71060e6bd31332bf64fd) |
|  |
| typedef internal::plain\_col\_type< MatrixType, [RealScalar](classeigen_1_1selfadjointeigensolver#a5dae5f422a3c71060e6bd31332bf64fd) >::type  | [RealVectorType](classeigen_1_1selfadjointeigensolver#acd090d5fdfc3cc017a13b6d8daa92287) |
|  | Type for vector of eigenvalues as returned by [eigenvalues()](classeigen_1_1selfadjointeigensolver#a3df8721abcc71132f7f02bf9dfe78e41 "Returns the eigenvalues of given matrix."). [More...](classeigen_1_1selfadjointeigensolver#acd090d5fdfc3cc017a13b6d8daa92287) |
|  |
|  typedef MatrixType::Scalar  | [Scalar](classeigen_1_1selfadjointeigensolver#a0bfcedf4245b6846007ca4f01e4feb1f) |
|  | Scalar type for matrices of type `_MatrixType`.  |
|  |




|  |
| --- |
|  |
| template<typename InputType >  |
| [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver) &  | [compute](classeigen_1_1selfadjointeigensolver#adf397f6bce9f93c4b0139a47e261fc24) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix, int options=[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)) |
|  | Computes eigendecomposition of given matrix. [More...](classeigen_1_1selfadjointeigensolver#adf397f6bce9f93c4b0139a47e261fc24) |
|  |
| [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver) &  | [computeDirect](classeigen_1_1selfadjointeigensolver#afe520161701f5f585bcc4cedb8657bd1) (const MatrixType &matrix, int options=[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)) |
|  | Computes eigendecomposition of given matrix using a closed-form algorithm. [More...](classeigen_1_1selfadjointeigensolver#afe520161701f5f585bcc4cedb8657bd1) |
|  |
| [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver) &  | [computeFromTridiagonal](classeigen_1_1selfadjointeigensolver#a297893df7098c43278d385e4d4e23fe4) (const [RealVectorType](classeigen_1_1selfadjointeigensolver#acd090d5fdfc3cc017a13b6d8daa92287) &diag, const [SubDiagonalType](classeigen_1_1matrix) &subdiag, int options=[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)) |
|  | Computes the eigen decomposition from a tridiagonal symmetric matrix. [More...](classeigen_1_1selfadjointeigensolver#a297893df7098c43278d385e4d4e23fe4) |
|  |
| const [RealVectorType](classeigen_1_1selfadjointeigensolver#acd090d5fdfc3cc017a13b6d8daa92287) &  | [eigenvalues](classeigen_1_1selfadjointeigensolver#a3df8721abcc71132f7f02bf9dfe78e41) () const |
|  | Returns the eigenvalues of given matrix. [More...](classeigen_1_1selfadjointeigensolver#a3df8721abcc71132f7f02bf9dfe78e41) |
|  |
| const [EigenvectorsType](classeigen_1_1matrix) &  | [eigenvectors](classeigen_1_1selfadjointeigensolver#a229c4c26d87c5d2663cd3cc8a4c68266) () const |
|  | Returns the eigenvectors of given matrix. [More...](classeigen_1_1selfadjointeigensolver#a229c4c26d87c5d2663cd3cc8a4c68266) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1selfadjointeigensolver#a31e8a509231e57e684c53799693607ae) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1selfadjointeigensolver#a31e8a509231e57e684c53799693607ae) |
|  |
| MatrixType  | [operatorInverseSqrt](classeigen_1_1selfadjointeigensolver#ae4b13fe4ce22faf74e50d346fc51a66e) () const |
|  | Computes the inverse square root of the matrix. [More...](classeigen_1_1selfadjointeigensolver#ae4b13fe4ce22faf74e50d346fc51a66e) |
|  |
| MatrixType  | [operatorSqrt](classeigen_1_1selfadjointeigensolver#aeeedb2ae618f21a4eb59465746c1cee5) () const |
|  | Computes the positive-definite square root of the matrix. [More...](classeigen_1_1selfadjointeigensolver#aeeedb2ae618f21a4eb59465746c1cee5) |
|  |
|  | [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver#a8f3dde67faa971dd97e8141617762326) () |
|  | Default constructor for fixed-size matrices. [More...](classeigen_1_1selfadjointeigensolver#a8f3dde67faa971dd97e8141617762326) |
|  |
| template<typename InputType >  |
|  | [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver#a7d8cba55cce60cb3931148208cc5bd0e) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix, int options=[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)) |
|  | Constructor; computes eigendecomposition of given matrix. [More...](classeigen_1_1selfadjointeigensolver#a7d8cba55cce60cb3931148208cc5bd0e) |
|  |
|  | [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver#a825919ee41153a19910c72d1bff31c8e) ([Index](classeigen_1_1selfadjointeigensolver#a8a59ab7734b6eae2754fd78bc7c3a360) size) |
|  | Constructor, pre-allocates memory for dynamic-size matrices. [More...](classeigen_1_1selfadjointeigensolver#a825919ee41153a19910c72d1bff31c8e) |
|  |




|  |
| --- |
|  |
| static const int  | [m\_maxIterations](classeigen_1_1selfadjointeigensolver#a9ba10b83f095b18dbea345db7304acfa) |
|  | Maximum number of iterations. [More...](classeigen_1_1selfadjointeigensolver#a9ba10b83f095b18dbea345db7304acfa) |
|  |

  Index
-----

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)< \_MatrixType >::[Index](classeigen_1_1selfadjointeigensolver#a8a59ab7734b6eae2754fd78bc7c3a360) |

 
 
**[Deprecated:](deprecated#_deprecated000019)**
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3 
    RealScalar
----------

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1selfadjointeigensolver#a0bfcedf4245b6846007ca4f01e4feb1f)>::Real [Eigen::SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)< \_MatrixType >::[RealScalar](classeigen_1_1selfadjointeigensolver#a5dae5f422a3c71060e6bd31332bf64fd) |

 
 Real scalar type for `_MatrixType`. 

 This is just `Scalar` if [Scalar](classeigen_1_1selfadjointeigensolver#a0bfcedf4245b6846007ca4f01e4feb1f "Scalar type for matrices of type _MatrixType.") is real (e.g., `float` or `double`), and the type of the real part of `Scalar` if [Scalar](classeigen_1_1selfadjointeigensolver#a0bfcedf4245b6846007ca4f01e4feb1f "Scalar type for matrices of type _MatrixType.") is complex. 

    RealVectorType
--------------

    template<typename \_MatrixType >  

|  |
| --- |
| typedef internal::plain\_col\_type<MatrixType, [RealScalar](classeigen_1_1selfadjointeigensolver#a5dae5f422a3c71060e6bd31332bf64fd)>::type [Eigen::SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)< \_MatrixType >::[RealVectorType](classeigen_1_1selfadjointeigensolver#acd090d5fdfc3cc017a13b6d8daa92287) |

 
 Type for vector of eigenvalues as returned by [eigenvalues()](classeigen_1_1selfadjointeigensolver#a3df8721abcc71132f7f02bf9dfe78e41 "Returns the eigenvalues of given matrix."). 

 This is a column vector with entries of type [RealScalar](classeigen_1_1selfadjointeigensolver#a5dae5f422a3c71060e6bd31332bf64fd "Real scalar type for _MatrixType."). The length of the vector is the size of `_MatrixType`. 

    SelfAdjointEigenSolver() [1/3]
------------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)< \_MatrixType >::[SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver) | ( |  | ) |  |

 | inline |

 
 Default constructor for fixed-size matrices. 

 The default constructor is useful in cases in which the user intends to perform decompositions via [compute()](classeigen_1_1selfadjointeigensolver#adf397f6bce9f93c4b0139a47e261fc24 "Computes eigendecomposition of given matrix."). This constructor can only be used if `_MatrixType` is a fixed-size matrix; use [SelfAdjointEigenSolver(Index)](classeigen_1_1selfadjointeigensolver#a825919ee41153a19910c72d1bff31c8e "Constructor, pre-allocates memory for dynamic-size matrices.") for dynamic-size matrices.

 Example: 



```
SelfAdjointEigenSolver<Matrix4f> es;
Matrix4f X = [Matrix4f::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
Matrix4f A = X + X.transpose();
es.compute(A);
cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl;
es.compute(A + [Matrix4f::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)(4,4)); // re-use es to compute eigenvalues of A+I
cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl;
```

 Output: 



```
The eigenvalues of A are:  -1.58 -0.473   1.32   2.46
The eigenvalues of A+I are: -0.581  0.527   2.32   3.46

```
    SelfAdjointEigenSolver() [2/3]
------------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)< \_MatrixType >::[SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver) | ( | [Index](classeigen_1_1selfadjointeigensolver#a8a59ab7734b6eae2754fd78bc7c3a360) | *size* | ) |  |

 | inlineexplicit |

 
 Constructor, pre-allocates memory for dynamic-size matrices. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | size | Positive integer, size of the matrix whose eigenvalues and eigenvectors will be computed. |

   This constructor is useful for dynamic-size matrices, when the user intends to perform decompositions via [compute()](classeigen_1_1selfadjointeigensolver#adf397f6bce9f93c4b0139a47e261fc24 "Computes eigendecomposition of given matrix."). The `size` parameter is only used as a hint. It is not an error to give a wrong `size`, but it may impair performance.

 
See also

[compute()](classeigen_1_1selfadjointeigensolver#adf397f6bce9f93c4b0139a47e261fc24 "Computes eigendecomposition of given matrix.") for an example 
    SelfAdjointEigenSolver() [3/3]
------------------------------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)< \_MatrixType >::[SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver) | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix*,  |
|  |  | int  | *options* = `[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)` |
|  | ) |  |  |

 | inlineexplicit |

 
 Constructor; computes eigendecomposition of given matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matrix | Selfadjoint matrix whose eigendecomposition is to be computed. Only the lower triangular part of the matrix is referenced.  |
| [in] | options | Can be [ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4) (default) or [EigenvaluesOnly](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9afd06633f270207c373875fd7ca03e906). |

   This constructor calls compute(const MatrixType&, int) to compute the eigenvalues of the matrix `matrix`. The eigenvectors are computed if `options` equals [ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4).

 Example: 



```
MatrixXd X = [MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(5,5);
MatrixXd A = X + X.transpose();
cout << "Here is a random symmetric 5x5 matrix, A:" << endl << A << endl << endl;
 
SelfAdjointEigenSolver<MatrixXd> es(A);
cout << "The eigenvalues of A are:" << endl << es.eigenvalues() << endl;
cout << "The matrix of eigenvectors, V, is:" << endl << es.eigenvectors() << endl << endl;
 
double lambda = es.eigenvalues()[0];
cout << "Consider the first eigenvalue, lambda = " << lambda << endl;
VectorXd v = es.eigenvectors().col(0);
cout << "If v is the corresponding eigenvector, then lambda \* v = " << endl << lambda * v << endl;
cout << "... and A \* v = " << endl << A * v << endl << endl;
 
MatrixXd D = es.eigenvalues().asDiagonal();
MatrixXd V = es.eigenvectors();
cout << "Finally, V \* D \* V^(-1) = " << endl << V * D * V.inverse() << endl;

```

 Output: 



```
Here is a random symmetric 5x5 matrix, A:
  1.36 -0.816  0.521   1.43 -0.144
-0.816 -0.659  0.794 -0.173 -0.406
 0.521  0.794 -0.541  0.461  0.179
  1.43 -0.173  0.461  -1.43  0.822
-0.144 -0.406  0.179  0.822  -1.37

The eigenvalues of A are:
 -2.65
 -1.77
-0.745
 0.227
  2.29
The matrix of eigenvectors, V, is:
 -0.326 -0.0984   0.347 -0.0109   0.874
 -0.207  -0.642   0.228   0.662  -0.232
 0.0495   0.629  -0.164    0.74   0.164
  0.721  -0.397  -0.402   0.115   0.385
 -0.573  -0.156  -0.799 -0.0256  0.0858

Consider the first eigenvalue, lambda = -2.65
If v is the corresponding eigenvector, then lambda * v = 
 0.865
  0.55
-0.131
 -1.91
  1.52
... and A * v = 
 0.865
  0.55
-0.131
 -1.91
  1.52

Finally, V * D * V^(-1) = 
  1.36 -0.816  0.521   1.43 -0.144
-0.816 -0.659  0.794 -0.173 -0.406
 0.521  0.794 -0.541  0.461  0.179
  1.43 -0.173  0.461  -1.43  0.822
-0.144 -0.406  0.179  0.822  -1.37

```


See also
compute(const MatrixType&, int) 
    compute()
---------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)& [Eigen::SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)< \_MatrixType >::compute  | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix*,  |
|  |  | int  | *options* = `[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)` |
|  | ) |  |  |

 
 Computes eigendecomposition of given matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matrix | Selfadjoint matrix whose eigendecomposition is to be computed. Only the lower triangular part of the matrix is referenced.  |
| [in] | options | Can be [ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4) (default) or [EigenvaluesOnly](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9afd06633f270207c373875fd7ca03e906).  |

   
Returns
Reference to `*this` 
 This function computes the eigenvalues of `matrix`. The [eigenvalues()](classeigen_1_1selfadjointeigensolver#a3df8721abcc71132f7f02bf9dfe78e41 "Returns the eigenvalues of given matrix.") function can be used to retrieve them. If `options` equals [ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4), then the eigenvectors are also computed and can be retrieved by calling [eigenvectors()](classeigen_1_1selfadjointeigensolver#a229c4c26d87c5d2663cd3cc8a4c68266 "Returns the eigenvectors of given matrix.").

 This implementation uses a symmetric QR algorithm. The matrix is first reduced to tridiagonal form using the [Tridiagonalization](classeigen_1_1tridiagonalization "Tridiagonal decomposition of a selfadjoint matrix.") class. The tridiagonal matrix is then brought to diagonal form with implicit symmetric QR steps with Wilkinson shift. Details can be found in Section 8.3 of Golub & Van Loan, *Matrix Computations*.

 The cost of the computation is about \( 9n^3 \) if the eigenvectors are required and \( 4n^3/3 \) if they are not required.

 This method reuses the memory in the [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver "Computes eigenvalues and eigenvectors of selfadjoint matrices.") object that was allocated when the object was constructed, if the size of the matrix does not change.

 Example: 



```
SelfAdjointEigenSolver<MatrixXf> es(4);
MatrixXf X = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
MatrixXf A = X + X.transpose();
es.compute(A);
cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl;
es.compute(A + [MatrixXf::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)(4,4)); // re-use es to compute eigenvalues of A+I
cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl;

```

 Output: 



```
The eigenvalues of A are:  -1.58 -0.473   1.32   2.46
The eigenvalues of A+I are: -0.581  0.527   2.32   3.46

```


See also
SelfAdjointEigenSolver(const MatrixType&, int) 
    computeDirect()
---------------

    template<typename MatrixType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)< MatrixType > & [Eigen::SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)< MatrixType >::computeDirect  | ( | const MatrixType &  | *matrix*,  |
|  |  | int  | *options* = `[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)` |
|  | ) |  |  |

 
 Computes eigendecomposition of given matrix using a closed-form algorithm. 

 This is a variant of compute(const MatrixType&, int options) which directly solves the underlying polynomial equation.

 Currently only 2x2 and 3x3 matrices for which the sizes are known at compile time are supported (e.g., Matrix3d).

 This method is usually significantly faster than the QR iterative algorithm but it might also be less accurate. It is also worth noting that for 3x3 matrices it involves trigonometric operations which are not necessarily available for all scalar types.

 For the 3x3 case, we observed the following worst case relative error regarding the eigenvalues:


* double: 1e-8
* float: 1e-3

 
See also
compute(const MatrixType&, int options) 
    computeFromTridiagonal()
------------------------

    template<typename MatrixType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)< MatrixType > & [Eigen::SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)< MatrixType >::computeFromTridiagonal  | ( | const [RealVectorType](classeigen_1_1selfadjointeigensolver#acd090d5fdfc3cc017a13b6d8daa92287) &  | *diag*,  |
|  |  | const [SubDiagonalType](classeigen_1_1matrix) &  | *subdiag*,  |
|  |  | int  | *options* = `[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)` |
|  | ) |  |  |

 
 Computes the eigen decomposition from a tridiagonal symmetric matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | diag | The vector containing the diagonal of the matrix.  |
| [in] | subdiag | The subdiagonal of the matrix.  |
| [in] | options | Can be [ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4) (default) or [EigenvaluesOnly](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9afd06633f270207c373875fd7ca03e906).  |

   
Returns
Reference to `*this` 
 This function assumes that the matrix has been reduced to tridiagonal form.

 
See also
compute(const MatrixType&, int) for more information 
    eigenvalues()
-------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [RealVectorType](classeigen_1_1selfadjointeigensolver#acd090d5fdfc3cc017a13b6d8daa92287)& [Eigen::SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)< \_MatrixType >::eigenvalues  | ( |  | ) |  const |

 | inline |

 
 Returns the eigenvalues of given matrix. 

 
Returns
A const reference to the column vector containing the eigenvalues.
 
Precondition
The eigenvalues have been computed before.
 The eigenvalues are repeated according to their algebraic multiplicity, so there are as many eigenvalues as rows in the matrix. The eigenvalues are sorted in increasing order.

 Example: 



```
MatrixXd ones = [MatrixXd::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)(3,3);
SelfAdjointEigenSolver<MatrixXd> es(ones);
cout << "The eigenvalues of the 3x3 matrix of ones are:" 
     << endl << es.eigenvalues() << endl;
```

 Output: 



```
The eigenvalues of the 3x3 matrix of ones are:
-3.09e-16
        0
        3

```


See also

[eigenvectors()](classeigen_1_1selfadjointeigensolver#a229c4c26d87c5d2663cd3cc8a4c68266 "Returns the eigenvectors of given matrix."), [MatrixBase::eigenvalues()](classeigen_1_1matrixbase#a30430fa3d5b4e74d312fd4f502ac984d "Computes the eigenvalues of a matrix.") 
    eigenvectors()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [EigenvectorsType](classeigen_1_1matrix)& [Eigen::SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)< \_MatrixType >::eigenvectors  | ( |  | ) |  const |

 | inline |

 
 Returns the eigenvectors of given matrix. 

 
Returns
A const reference to the matrix whose columns are the eigenvectors.
 
Precondition
The eigenvectors have been computed before.
 Column \( k \) of the returned matrix is an eigenvector corresponding to eigenvalue number \( k \) as returned by [eigenvalues()](classeigen_1_1selfadjointeigensolver#a3df8721abcc71132f7f02bf9dfe78e41 "Returns the eigenvalues of given matrix."). The eigenvectors are normalized to have (Euclidean) norm equal to one. If this object was used to solve the eigenproblem for the selfadjoint matrix \( A \), then the matrix returned by this function is the matrix \( V \) in the eigendecomposition \( A = V D V^{-1} \).

 For a selfadjoint matrix, \( V \) is unitary, meaning its inverse is equal to its adjoint, \( V^{-1} = V^{\dagger} \). If \( A \) is real, then \( V \) is also real and therefore orthogonal, meaning its inverse is equal to its transpose, \( V^{-1} = V^T \).

 Example: 



```
MatrixXd ones = [MatrixXd::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)(3,3);
SelfAdjointEigenSolver<MatrixXd> es(ones);
cout << "The first eigenvector of the 3x3 matrix of ones is:" 
     << endl << es.eigenvectors().col(0) << endl;

```

 Output: 



```
The first eigenvector of the 3x3 matrix of ones is:
-0.816
 0.408
 0.408

```


See also

[eigenvalues()](classeigen_1_1selfadjointeigensolver#a3df8721abcc71132f7f02bf9dfe78e41 "Returns the eigenvalues of given matrix.") 
    info()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)< \_MatrixType >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether previous computation was successful. 

 
Returns

`Success` if computation was successful, `NoConvergence` otherwise. 
    operatorInverseSqrt()
---------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| MatrixType [Eigen::SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)< \_MatrixType >::operatorInverseSqrt  | ( |  | ) |  const |

 | inline |

 
 Computes the inverse square root of the matrix. 

 
Returns
the inverse positive-definite square root of the matrix
 
Precondition
The eigenvalues and eigenvectors of a positive-definite matrix have been computed before.
 This function uses the eigendecomposition \( A = V D V^{-1} \) to compute the inverse square root as \( V D^{-1/2} V^{-1} \). This is cheaper than first computing the square root with [operatorSqrt()](classeigen_1_1selfadjointeigensolver#aeeedb2ae618f21a4eb59465746c1cee5 "Computes the positive-definite square root of the matrix.") and then its inverse with [MatrixBase::inverse()](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf).

 Example: 



```
MatrixXd X = [MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
MatrixXd A = X * X.transpose();
cout << "Here is a random positive-definite matrix, A:" << endl << A << endl << endl;
 
SelfAdjointEigenSolver<MatrixXd> es(A);
cout << "The inverse square root of A is: " << endl;
cout << es.operatorInverseSqrt() << endl;
cout << "We can also compute it with operatorSqrt() and inverse(). That yields: " << endl;
cout << es.operatorSqrt().inverse() << endl;

```

 Output: 



```
Here is a random positive-definite matrix, A:
  1.41 -0.697 -0.111  0.508
-0.697  0.423 0.0991   -0.4
-0.111 0.0991   1.25  0.902
 0.508   -0.4  0.902    1.4

The inverse square root of A is: 
  1.88   2.78 -0.546  0.605
  2.78   8.61   -2.3   2.74
-0.546   -2.3   1.92  -1.36
 0.605   2.74  -1.36   2.18
We can also compute it with operatorSqrt() and inverse(). That yields: 
  1.88   2.78 -0.546  0.605
  2.78   8.61   -2.3   2.74
-0.546   -2.3   1.92  -1.36
 0.605   2.74  -1.36   2.18

```


See also

[operatorSqrt()](classeigen_1_1selfadjointeigensolver#aeeedb2ae618f21a4eb59465746c1cee5 "Computes the positive-definite square root of the matrix."), [MatrixBase::inverse()](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf), [MatrixFunctions Module](unsupported/group__matrixfunctions__module) 
    operatorSqrt()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| MatrixType [Eigen::SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)< \_MatrixType >::operatorSqrt  | ( |  | ) |  const |

 | inline |

 
 Computes the positive-definite square root of the matrix. 

 
Returns
the positive-definite square root of the matrix
 
Precondition
The eigenvalues and eigenvectors of a positive-definite matrix have been computed before.
 The square root of a positive-definite matrix \( A \) is the positive-definite matrix whose square equals \( A \). This function uses the eigendecomposition \( A = V D V^{-1} \) to compute the square root as \( A^{1/2} = V D^{1/2} V^{-1} \).

 Example: 



```
MatrixXd X = [MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
MatrixXd A = X * X.transpose();
cout << "Here is a random positive-definite matrix, A:" << endl << A << endl << endl;
 
SelfAdjointEigenSolver<MatrixXd> es(A);
MatrixXd sqrtA = es.operatorSqrt();
cout << "The square root of A is: " << endl << sqrtA << endl;
cout << "If we square this, we get: " << endl << sqrtA*sqrtA << endl;

```

 Output: 



```
Here is a random positive-definite matrix, A:
  1.41 -0.697 -0.111  0.508
-0.697  0.423 0.0991   -0.4
-0.111 0.0991   1.25  0.902
 0.508   -0.4  0.902    1.4

The square root of A is: 
   1.09  -0.432 -0.0685     0.2
 -0.432   0.379   0.141  -0.269
-0.0685   0.141       1   0.468
    0.2  -0.269   0.468    1.04
If we square this, we get: 
  1.41 -0.697 -0.111  0.508
-0.697  0.423 0.0991   -0.4
-0.111 0.0991   1.25  0.902
 0.508   -0.4  0.902    1.4

```


See also

[operatorInverseSqrt()](classeigen_1_1selfadjointeigensolver#ae4b13fe4ce22faf74e50d346fc51a66e "Computes the inverse square root of the matrix."), [MatrixFunctions Module](unsupported/group__matrixfunctions__module) 
    m\_maxIterations
----------------

    template<typename \_MatrixType >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const int [Eigen::SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver)< \_MatrixType >::m\_maxIterations |

 | static |

 
 Maximum number of iterations. 

 The algorithm terminates if it does not converge within m\_maxIterations \* n iterations, where n denotes the size of the matrix. This value is currently set to 30 (copied from LAPACK). 

   

---

The documentation for this class was generated from the following file:* [SelfAdjointEigenSolver.h](https://eigen.tuxfamily.org/dox/SelfAdjointEigenSolver_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SelfAdjointEigenSolver.html>

Eigen::SparseVector
===================

  
### template<typename \_Scalar, int \_Options, typename \_StorageIndex> class Eigen::SparseVector< \_Scalar, \_Options, \_StorageIndex >

 a sparse vector class 

 
Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the scalar type, i.e. the type of the coefficients |

   See <http://www.netlib.org/linalg/html_templates/node91.html> for details on the storage scheme.

 This class can be extended with the help of the plugin mechanism described on the page [Extending MatrixBase (and other classes)](topiccustomizing_plugins) by defining the preprocessor symbol `EIGEN_SPARSEVECTOR_PLUGIN`. 

     ![Inheritance graph]        

|  |
| --- |
|  |
| Scalar &  | [coeffRef](classeigen_1_1sparsevector#a4b1845ada6ae59dd7afe361e30136ace) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) i) |
|  |
| void  | [conservativeResize](classeigen_1_1sparsevector#ab8dbb1f73b6250c10c0860eb13ca5cca) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) newSize) |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1sparsevector#aeaa74603bb1405f622726907795c9b5a) () const |
|  |
| void  | [prune](classeigen_1_1sparsevector#af094e30271da69f865b5d97f338f81d1) (const Scalar &reference, const RealScalar &epsilon=[NumTraits](structeigen_1_1numtraits)< RealScalar >::dummy\_precision()) |
|  |
| void  | [resize](classeigen_1_1sparsevector#a1020011c75fb70b21257c8d04ee07514) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) newSize) |
|  |
| void  | [resize](classeigen_1_1sparsevector#a2dc842b3bb2ba3692e210565c48aff3c) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| Scalar  | [sum](classeigen_1_1sparsevector#a05e8aff0ba5c4dd4ab69e173d80d1a68) () const |
|  |
| void  | [swap](classeigen_1_1sparsevector#a977f1796d4b332a0827c5a1d7b1ed561) ([SparseVector](classeigen_1_1sparsevector) &other) |
|  |
|  | [~SparseVector](classeigen_1_1sparsevector#ad519592c203aedf33c524feb1bdaad1b) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseCompressedBase< SparseVector< \_Scalar, \_Options, \_StorageIndex > >](classeigen_1_1sparsecompressedbase) |
| [Map](classeigen_1_1map)< [Array](classeigen_1_1array)< Scalar, Dynamic, 1 > >  | [coeffs](classeigen_1_1sparsecompressedbase#a7cf299e08d2a4f6d6869e631e51b12fe) () |
|  |
| const [Map](classeigen_1_1map)< const [Array](classeigen_1_1array)< Scalar, Dynamic, 1 > >  | [coeffs](classeigen_1_1sparsecompressedbase#a101b155485ae59ea1261c4f6040f3dc4) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsecompressedbase#a197111c1289644f1ea38fe683ccdd82a) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsecompressedbase#aa64818e1aa43015dad01b114b2ab4687) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsecompressedbase#a411e972b097e6aef225415a4c2d0a0b5) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsecompressedbase#afc056a3895eae1a4c4767252ff04966a) () const |
|  |
| bool  | [isCompressed](classeigen_1_1sparsecompressedbase#a837934b33a80fe996ff20500373d3a61) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1sparsecompressedbase#a03de8b3da2c142ce8698a76123b3e7d3) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsecompressedbase#a53a82f962686e18c8dc07a4b9a85ed7b) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsecompressedbase#a2624d4c2661c582de168246c56e8d71e) () const |
|  |
| Scalar \*  | [valuePtr](classeigen_1_1sparsecompressedbase#a0f12f72d14b6c277d09be9f5ce2eab95) () |
|  |
| const Scalar \*  | [valuePtr](classeigen_1_1sparsecompressedbase#a0f44c739398794ea77f310b745cc5627) () const |
|  |
| - Public Member Functions inherited from [Eigen::SparseMatrixBase< SparseVector< \_Scalar, \_Options, \_StorageIndex > >](classeigen_1_1sparsematrixbase) |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1sparsematrixbase#aca7ce296424ef6e478ab0fb19547a7ee) () const |
|  |
| const internal::eval< [SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_StorageIndex > >::type  | [eval](classeigen_1_1sparsematrixbase#a761bd872a06b59632fcff7b7807a77ce) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1sparsematrixbase#a180fcba1ccf3cdf3252a263bc1de7a1d) () const |
|  |
| bool  | [isVector](classeigen_1_1sparsematrixbase#a7eedffa867031f649fd0fb9cc23ce4be) () const |
|  |
| const [Product](classeigen_1_1product)< [SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_StorageIndex >, OtherDerived, AliasFreeProduct >  | [operator\*](classeigen_1_1sparsematrixbase#a9d4d71b3f34389e6fc01f2b86e43f7a4) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &other) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1sparsematrixbase#ac86cc88a4cfef21db6b64ec0ab4c8f0a) () const |
|  |
| const [SparseView](classeigen_1_1sparseview)< [SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_StorageIndex > >  | [pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d) (const Scalar &reference=Scalar(0), const RealScalar &epsilon=[NumTraits](structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1sparsematrixbase#a1944e9fa9ce7937bfc3a87b2cb94371f) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1sparsematrixbase#a124bc57921775eb9aa2dfd9727e23472) () const |
|  |
| SparseSymmetricPermutationProduct< [SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_StorageIndex >, Upper|Lower >  | [twistedBy](classeigen_1_1sparsematrixbase#a51d4898bd6a57cc3ba543a39b102423e) (const [PermutationMatrix](classeigen_1_1permutationmatrix)< Dynamic, Dynamic, [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) > &perm) const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< SparseVector< \_Scalar, \_Options, \_StorageIndex > >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| [SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_StorageIndex > &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const [SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_StorageIndex > &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::SparseMatrixBase< SparseVector< \_Scalar, \_Options, \_StorageIndex > >](classeigen_1_1sparsematrixbase) |
| typedef internal::traits< [SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_StorageIndex > >::[StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) | [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) |
|  |
| typedef Scalar  | [value\_type](classeigen_1_1sparsematrixbase#ac254d3b61718ebc2136d27bac043dcb7) |
|  |
| - Public Types inherited from [Eigen::EigenBase< SparseVector< \_Scalar, \_Options, \_StorageIndex > >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |
| - Protected Member Functions inherited from [Eigen::SparseCompressedBase< SparseVector< \_Scalar, \_Options, \_StorageIndex > >](classeigen_1_1sparsecompressedbase) |
|  | [SparseCompressedBase](classeigen_1_1sparsecompressedbase#af79f020db965367d97eb954fc68d8f99) () |
|  |

  ~SparseVector()
---------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_StorageIndex >::~[SparseVector](classeigen_1_1sparsevector) | ( |  | ) |  |

 | inline |

 
 Destructor 

    coeffRef()
----------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Scalar& [Eigen::SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_StorageIndex >::coeffRef  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *i* | ) |  |

 | inline |

 
 
Returns
a reference to the coefficient value at given index *i* This operation involes a log(rho\*size) binary search. If the coefficient does not exist yet, then a sorted insertion into a sequential buffer is performed.
 This insertion might be very costly if the number of nonzeros above *i* is large. 

    conservativeResize()
--------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_StorageIndex >::conservativeResize  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *newSize* | ) |  |

 | inline |

 
 Resizes the sparse vector to *newSize*, while leaving old values untouched.

 If the size of the vector is decreased, then the storage of the out-of bounds coefficients is kept and reserved. Call .data().squeeze() to free extra memory.

 
See also
reserve(), setZero() 
    nonZeros()
----------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_StorageIndex >::nonZeros  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of non zero coefficients 
    prune()
-------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_StorageIndex >::prune  | ( | const Scalar &  | *reference*,  |
|  |  | const RealScalar &  | *epsilon* = `[NumTraits](structeigen_1_1numtraits)<RealScalar>::dummy_precision()` |
|  | ) |  |  |

 | inline |

 
  Suppresses all nonzeros which are **much** **smaller** **than** *reference* under the tolerance *epsilon* 

    resize() [1/2]
--------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_StorageIndex >::resize  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *newSize* | ) |  |

 | inline |

 
 Resizes the sparse vector to *newSize* This method deletes all entries, thus leaving an empty sparse vector

 
See also

[conservativeResize()](classeigen_1_1sparsevector#ab8dbb1f73b6250c10c0860eb13ca5cca), setZero() 
    resize() [2/2]
--------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_StorageIndex >::resize  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols* |
|  | ) |  |  |

 | inline |

 
 Resizes the sparse vector to *rows* x *cols* 

 This method is provided for compatibility with matrices. For a column vector, *cols* must be equal to 1. For a row vector, *rows* must be equal to 1.

 
See also

[resize(Index)](classeigen_1_1sparsevector#a1020011c75fb70b21257c8d04ee07514) 
    sum()
-----

    template<typename \_Scalar , int \_Options, typename \_Index >  

|  |
| --- |
| internal::traits< [SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_Index > >::Scalar [Eigen::SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_Index >::sum |

 
 Overloaded for performance 

    swap()
------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_StorageIndex >::swap  | ( | [SparseVector](classeigen_1_1sparsevector)< \_Scalar, \_Options, \_StorageIndex > &  | *other* | ) |  |

 | inline |

 
 Swaps the values of `*this` and *other*. Overloaded for performance: this version performs a *shallow* swap by swapping pointers and attributes only. 



See also
SparseMatrixBase::swap() 
   

---

The documentation for this class was generated from the following files:* [SparseUtil.h](https://eigen.tuxfamily.org/dox/SparseUtil_8h_source.html)
* [SparseVector.h](https://eigen.tuxfamily.org/dox/SparseVector_8h_source.html)
* [SparseRedux.h](https://eigen.tuxfamily.org/dox/SparseRedux_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SparseVector.html>

The class hierarchy
===================

   
This page explains the design of the core classes in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s class hierarchy and how they fit together. Casual users probably need not concern themselves with these details, but it may be useful for both advanced users and [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") developers.

 
 Principles
============

 [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s class hierarchy is designed so that virtual functions are avoided where their overhead would significantly impair performance. Instead, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") achieves polymorphism with the Curiously Recurring Template Pattern (CRTP). In this pattern, the base class (for instance, `[MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.")`) is in fact a template class, and the derived class (for instance, `[Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.")`) inherits the base class with the derived class itself as a template argument (in this case, `[Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.")` inherits from `[MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.")<[Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.")>`). This allows [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") to resolve the polymorphic function calls at compile time.

 In addition, the design avoids multiple inheritance. One reason for this is that in our experience, some compilers (like MSVC) fail to perform empty base class optimization, which is crucial for our fixed-size types.

 
 The core classes
==================

 These are the classes that you need to know about if you want to write functions that accept or return [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") objects.

 * [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") means plain dense matrix. If `m` is a `Matrix`, then, for instance, `m+m` is no longer a `Matrix`, it is a "matrix expression".
* [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") means dense matrix expression. This means that a `MatrixBase` is something that can be added, matrix-multiplied, LU-decomposed, QR-decomposed... All matrix expression classes, including `Matrix` itself, inherit `MatrixBase`.
* [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") means plain dense array. If `x` is an `Array`, then, for instance, `x+x` is no longer an `Array`, it is an "array expression".
* [ArrayBase](classeigen_1_1arraybase "Base class for all 1D and 2D array, and related expressions.") means dense array expression. This means that an `ArrayBase` is something that can be added, array-multiplied, and on which you can perform all sorts of array operations... All array expression classes, including `Array` itself, inherit `ArrayBase`.
* [DenseBase](classeigen_1_1densebase "Base class for all dense matrices, vectors, and arrays.") means dense (matrix or array) expression. Both `ArrayBase` and `MatrixBase` inherit `DenseBase`. `DenseBase` is where all the methods go that apply to dense expressions regardless of whether they are matrix or array expressions. For example, the [block(...)](topicclasshierarchy)  methods are in `DenseBase`.

 
 Base classes
==============

 These classes serve as base classes for the five core classes mentioned above. They are more internal and so less interesting for users of the [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") library.

 * [PlainObjectBase](classeigen_1_1plainobjectbase "Dense storage base class for matrices and arrays.") means dense (matrix or array) plain object, i.e. something that stores its own dense array of coefficients. This is where, for instance, the [resize()](classeigen_1_1plainobjectbase#a9fd0703bd7bfe89d6dc80e2ce87c312a)  methods go. `PlainObjectBase` is inherited by `Matrix` and by `Array`. But above, we said that `Matrix` inherits `MatrixBase` and `Array` inherits `ArrayBase`. So does that mean multiple inheritance? No, because `PlainObjectBase` *itself* inherits `MatrixBase` or `ArrayBase` depending on whether we are in the matrix or array case. When we said above that `Matrix` inherited `MatrixBase`, we omitted to say it does so indirectly via `PlainObjectBase`. Same for `Array`.
* DenseCoeffsBase means something that has dense coefficient accessors. It is a base class for `DenseBase`. The reason for `DenseCoeffsBase` to exist is that the set of available coefficient accessors is very different depending on whether a dense expression has direct memory access or not (the `DirectAccessBit` flag). For example, if `x` is a plain matrix, then `x` has direct access, and `x.transpose()` and `x.block(...)` also have direct access, because their coefficients can be read right off memory, but for example, `x+x` does not have direct memory access, because obtaining any of its coefficients requires a computation (an addition), it can't be just read off memory.
* [EigenBase](structeigen_1_1eigenbase) means anything that can be evaluated into a plain dense matrix or array (even if that would be a bad idea). `EigenBase` is really the absolute base class for anything that remotely looks like a matrix or array. It is a base class for `DenseCoeffsBase`, so it sits below all our dense class hierarchy, but it is not limited to dense expressions. For example, `EigenBase` is also inherited by diagonal matrices, sparse matrices, etc...

 
 Inheritance diagrams
======================

 The inheritance diagram for [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") looks as follows:

 
```

[EigenBase](structeigen_1_1eigenbase)<Matrix>
  <-- DenseCoeffsBase<Matrix>    (direct access case)
    <-- [DenseBase](classeigen_1_1densebase "Base class for all dense matrices, vectors, and arrays.")<Matrix>
      <-- [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.")<Matrix>
        <-- [PlainObjectBase](classeigen_1_1plainobjectbase "Dense storage base class for matrices and arrays.")<Matrix>    (matrix case)
          <-- [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.")

```

The inheritance diagram for [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") looks as follows:

 
```

[EigenBase](structeigen_1_1eigenbase)<Array>
  <-- DenseCoeffsBase<Array>    (direct access case)
    <-- [DenseBase](classeigen_1_1densebase "Base class for all dense matrices, vectors, and arrays.")<Array>
      <-- [ArrayBase](classeigen_1_1arraybase "Base class for all 1D and 2D array, and related expressions.")<Array>
        <-- [PlainObjectBase](classeigen_1_1plainobjectbase "Dense storage base class for matrices and arrays.")<Array>    (array case)
          <-- [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.")

```

The inheritance diagram for some other matrix expression class, here denoted by `SomeMatrixXpr`, looks as follows:

 
```

[EigenBase](structeigen_1_1eigenbase)<SomeMatrixXpr>
  <-- DenseCoeffsBase<SomeMatrixXpr>    (direct access or no direct access case)
    <-- [DenseBase](classeigen_1_1densebase "Base class for all dense matrices, vectors, and arrays.")<SomeMatrixXpr>
      <-- [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.")<SomeMatrixXpr>
        <-- SomeMatrixXpr

```

The inheritance diagram for some other array expression class, here denoted by `SomeArrayXpr`, looks as follows:

 
```

[EigenBase](structeigen_1_1eigenbase)<SomeArrayXpr>
  <-- DenseCoeffsBase<SomeArrayXpr>    (direct access or no direct access case)
    <-- [DenseBase](classeigen_1_1densebase "Base class for all dense matrices, vectors, and arrays.")<SomeArrayXpr>
      <-- [ArrayBase](classeigen_1_1arraybase "Base class for all 1D and 2D array, and related expressions.")<SomeArrayXpr>
        <-- SomeArrayXpr

```

Finally, consider an example of something that is not a dense expression, for instance a diagonal matrix. The corresponding inheritance diagram is:

 
```

[EigenBase](structeigen_1_1eigenbase)<DiagonalMatrix>
  <-- DiagonalBase<DiagonalMatrix>
    <-- [DiagonalMatrix](classeigen_1_1diagonalmatrix "Represents a diagonal matrix with its storage.")

```
 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicClassHierarchy.html>

Eigen::aligned\_allocator
=========================

  
### template<class T> class Eigen::aligned\_allocator< T >

 STL compatible allocator to use with types requiring a non standrad alignment. 

 The memory is aligned as for dynamically aligned matrix/array types such as MatrixXd. By default, it will thus provide at least 16 bytes alignment and more in following cases:


* 32 bytes alignment if AVX is enabled.
* 64 bytes alignment if AVX512 is enabled.

 This can be controlled using the `EIGEN_MAX_ALIGN_BYTES` macro as documented [there](topicpreprocessordirectives#TopicPreprocessorDirectivesPerformance) .

 Example: 



```
// Matrix4f requires 16 bytes alignment:
std::map< int, Matrix4f, std::less<int>,
          aligned_allocator<std::pair<const int, Matrix4f> > > my_map_mat4;
// Vector3f does not require 16 bytes alignment, no need to use Eigen's allocator:
std::map< int, Vector3f > my_map_vec3;

```


See also

[Using STL Containers with Eigen](group__topicstlcontainers). 
  Inherits std::allocator< T >.

 

---

The documentation for this class was generated from the following file:* [Memory.h](https://eigen.tuxfamily.org/dox/Memory_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1aligned__allocator.html>

Eigen::AMDOrdering
==================

  
### template<typename StorageIndex> class Eigen::AMDOrdering< StorageIndex >

 Functor computing the *approximate* *minimum* *degree* ordering If the matrix is not structurally symmetric, an ordering of A^T+A is computed 



Template Parameters
 

|  |  |
| --- | --- |
| StorageIndex | The type of indices of the matrix  |

   
See also

[COLAMDOrdering](classeigen_1_1colamdordering) 
 


|  |
| --- |
|  |
| template<typename MatrixType >  |
| void  | [operator()](classeigen_1_1amdordering#afce433557abcba9e49fa81581a58fa51) (const MatrixType &mat, [PermutationType](classeigen_1_1permutationmatrix) &perm) |
|  |
| template<typename SrcType , unsigned int SrcUpLo>  |
| void  | [operator()](classeigen_1_1amdordering#a7f3fd7224b084f0f5655c97ea8eb6466) (const [SparseSelfAdjointView](classeigen_1_1sparseselfadjointview)< SrcType, SrcUpLo > &mat, [PermutationType](classeigen_1_1permutationmatrix) &perm) |
|  |

  operator()() [1/2]
------------------

    template<typename StorageIndex >   template<typename MatrixType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::AMDOrdering](classeigen_1_1amdordering)< StorageIndex >::operator()  | ( | const MatrixType &  | *mat*,  |
|  |  | [PermutationType](classeigen_1_1permutationmatrix) &  | *perm* |
|  | ) |  |  |

 | inline |

 
 Compute the permutation vector from a sparse matrix This routine is much faster if the input matrix is column-major   
 

    operator()() [2/2]
------------------

    template<typename StorageIndex >   template<typename SrcType , unsigned int SrcUpLo>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::AMDOrdering](classeigen_1_1amdordering)< StorageIndex >::operator()  | ( | const [SparseSelfAdjointView](classeigen_1_1sparseselfadjointview)< SrcType, SrcUpLo > &  | *mat*,  |
|  |  | [PermutationType](classeigen_1_1permutationmatrix) &  | *perm* |
|  | ) |  |  |

 | inline |

 
 Compute the permutation with a selfadjoint matrix 

   

---

The documentation for this class was generated from the following file:* [Ordering.h](https://eigen.tuxfamily.org/dox/Ordering_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1AMDOrdering.html>

Eigen::ArithmeticSequence
=========================

  
### template<typename FirstType, typename SizeType, typename IncrType> class Eigen::ArithmeticSequence< FirstType, SizeType, IncrType >

 This class represents an arithmetic progression \( a\_0, a\_1, a\_2, ..., a\_{n-1}\) defined by its *first* value \( a\_0 \), its *size* (aka length) *n*, and the *increment* (aka stride) that is equal to \( a\_{i+1}-a\_{i}\) for any *i*.

 It is internally used as the return type of the [Eigen::seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969) and [Eigen::seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda) functions, and as the input arguments of DenseBase::operator()(const RowIndices&, const ColIndices&), and most of the time this is the only way it is used.

 
Template Parameters
 

|  |  |
| --- | --- |
| FirstType | type of the first element, usually an Index, but internally it can be a symbolic expression  |
| SizeType | type representing the size of the sequence, usually an Index or a compile time integral constant. Internally, it can also be a symbolic expression  |
| IncrType | type of the increment, can be a runtime Index, or a compile time integral constant (default is compile-time 1) |

   
See also

[Eigen::seq](namespaceeigen#a0c04400203ca9b414e13c9c721399969), [Eigen::seqN](namespaceeigen#a3a3c346d2a61d1e8e86e6fb4cf57fbda), DenseBase::operator()(const RowIndices&, const ColIndices&), class [IndexedView](classeigen_1_1indexedview "Expression of a non-sequential sub-matrix defined by arbitrary sequences of row and column indices.") 
 


|  |
| --- |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [first](classeigen_1_1arithmeticsequence#a780ee27a63b77d4f34f74d8ca2381d12) () const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [operator[]](classeigen_1_1arithmeticsequence#a34a4117a3590ccc99177449f8c47740e) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) i) const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [size](classeigen_1_1arithmeticsequence#aef60a3585c1551c77e6dbf568b06c485) () const |
|  |

  first()
-------

    template<typename FirstType , typename SizeType , typename IncrType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::ArithmeticSequence](classeigen_1_1arithmeticsequence)< FirstType, SizeType, IncrType >::first  | ( |  | ) |  const |

 | inline |

 
 
Returns
the first element \( a\_0 \) in the sequence 
    operator[]()
------------

    template<typename FirstType , typename SizeType , typename IncrType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::ArithmeticSequence](classeigen_1_1arithmeticsequence)< FirstType, SizeType, IncrType >::operator[]  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *i* | ) |  const |

 | inline |

 
 
Returns
the value \( a\_i \) at index *i* in the sequence. 
    size()
------

    template<typename FirstType , typename SizeType , typename IncrType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::ArithmeticSequence](classeigen_1_1arithmeticsequence)< FirstType, SizeType, IncrType >::size  | ( |  | ) |  const |

 | inline |

 
 
Returns
the size, i.e., number of elements, of the sequence 
   

---

The documentation for this class was generated from the following file:* [ArithmeticSequence.h](https://eigen.tuxfamily.org/dox/ArithmeticSequence_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1ArithmeticSequence.html>

Eigen::Transform
================

  
### template<typename \_Scalar, int \_Dim, int \_Mode, int \_Options> class Eigen::Transform< \_Scalar, \_Dim, \_Mode, \_Options >

 Represents an homogeneous transformation in a N dimensional space. 

 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the scalar type, i.e., the type of the coefficients  |
| \_Dim | the dimension of the space  |
| \_Mode | the type of the transformation. Can be:* [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb): the transformation is stored as a (Dim+1)^2 matrix, where the last row is assumed to be [0 ... 0 1].
* [AffineCompact](group__enums#ggaee59a86102f150923b0cac6d4ff05107a8192e8fdb2ec3ec46d92956cc83ef490): the transformation is stored as a (Dim)x(Dim+1) matrix.
* [Projective](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0f7338b8672884554e8642bce9e44183): the transformation is stored as a (Dim+1)^2 matrix without any assumption.
* [Isometry](group__enums#ggaee59a86102f150923b0cac6d4ff05107a84413028615d2d718bafd2dfb93dafef): same as [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb) with the additional assumption that the linear part represents a rotation. This assumption is exploited to speed up some functions such as [inverse()](classeigen_1_1transform#ab8dbcd157bf194efca1a5413c0945211) and [rotation()](classeigen_1_1transform#ad73300a550f878bb7f34485c3d132746).
 |
| \_Options | has the same meaning as in class [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."). It allows to specify DontAlign and/or RowMajor. These Options are passed directly to the underlying matrix type. |

   The homography is internally represented and stored by a matrix which is available through the [matrix()](classeigen_1_1transform#a758fbaf6aa41a5493659aa0c9bfe0dcf) method. To understand the behavior of this class you have to think a [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") object as its internal matrix representation. The chosen convention is right multiply:

 
```
v' = T \* v 

```

Therefore, an affine transformation matrix M is shaped like this:

 \( \left( \begin{array}{cc} linear & translation\\ 0 ... 0 & 1 \end{array} \right) \)

 Note that for a projective transformation the last row can be anything, and then the interpretation of different parts might be slightly different.

 However, unlike a plain matrix, the [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") class provides many features simplifying both its assembly and usage. In particular, it can be composed with any other transformations ([Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space."),[Translation](classeigen_1_1translation "Represents a translation transformation."),[RotationBase](classeigen_1_1rotationbase "Common base class for compact rotation representations."),[DiagonalMatrix](classeigen_1_1diagonalmatrix "Represents a diagonal matrix with its storage.")) and can be directly used to transform implicit homogeneous vectors. All these operations are handled via the operator\*. For the composition of transformations, its principle consists to first convert the right/left hand sides of the product to a compatible (Dim+1)^2 matrix and then perform a pure matrix product. Of course, internally, operator\* tries to perform the minimal number of operations according to the nature of each terms. Likewise, when applying the transform to points, the latters are automatically promoted to homogeneous vectors before doing the matrix product. The conventions to homogeneous representations are performed as follow:

 **[Translation](classeigen_1_1translation "Represents a translation transformation.")** t (Dim)x(1): \( \left( \begin{array}{cc} I & t \\ 0\,...\,0 & 1 \end{array} \right) \)

 **Rotation** R (Dim)x(Dim): \( \left( \begin{array}{cc} R & 0\\ 0\,...\,0 & 1 \end{array} \right) \)

 **Scaling** **[DiagonalMatrix](classeigen_1_1diagonalmatrix "Represents a diagonal matrix with its storage.")** S (Dim)x(Dim): \( \left( \begin{array}{cc} S & 0\\ 0\,...\,0 & 1 \end{array} \right) \)

 **Column** **point** v (Dim)x(1): \( \left( \begin{array}{c} v\\ 1 \end{array} \right) \)

 **Set** **of** **column** **points** V1...Vn (Dim)x(n): \( \left( \begin{array}{ccc} v\_1 & ... & v\_n\\ 1 & ... & 1 \end{array} \right) \)

 The concatenation of a [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") object with any kind of other transformation always returns a [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") object.

 A little exception to the "as pure matrix product" rule is the case of the transformation of non homogeneous vectors by an affine transformation. In that case the last matrix row can be ignored, and the product returns non homogeneous vectors.

 Since, for instance, a Dim x Dim matrix is interpreted as a linear transformation, it is not possible to directly transform Dim vectors stored in a Dim x Dim matrix. The solution is either to use a Dim x Dynamic matrix or explicitly request a vector transformation by making the vector homogeneous: 



```
m' = T \* m.colwise().homogeneous();

```

 Note that there is zero overhead.

 Conversion methods from/to Qt's QMatrix and QTransform are available if the preprocessor token EIGEN\_QT\_SUPPORT is defined.

 This class can be extended with the help of the plugin mechanism described on the page [Extending MatrixBase (and other classes)](topiccustomizing_plugins) by defining the preprocessor symbol `EIGEN_TRANSFORM_PLUGIN`.

 
See also
class [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."), class [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") 
 


|  |
| --- |
|  |
| typedef internal::conditional< int(Mode)==int([AffineCompact](group__enums#ggaee59a86102f150923b0cac6d4ff05107a8192e8fdb2ec3ec46d92956cc83ef490)), [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c) &, [Block](classeigen_1_1block)< [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c), Dim, HDim > >::type  | [AffinePart](classeigen_1_1transform#a8319bad977b0dabf2dfaf2e2dc30f13e) |
|  |
| typedef internal::conditional< int(Mode)==int([AffineCompact](group__enums#ggaee59a86102f150923b0cac6d4ff05107a8192e8fdb2ec3ec46d92956cc83ef490)), const [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c) &, const [Block](classeigen_1_1block)< const [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c), Dim, HDim > >::type  | [ConstAffinePart](classeigen_1_1transform#adfa0bf2d9504548cdc9b9051b2fa9673) |
|  |
| typedef const [Block](classeigen_1_1block)< [ConstMatrixType](classeigen_1_1transform#aed436d14b16bd862bac5367990085795), Dim, Dim, int(Mode)==([AffineCompact](group__enums#ggaee59a86102f150923b0cac6d4ff05107a8192e8fdb2ec3ec46d92956cc83ef490)) &&(int(Options)&[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f))==0 >  | [ConstLinearPart](classeigen_1_1transform#a75810d3f0d098e00b43a5531f33d78e1) |
|  |
| typedef const [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c) | [ConstMatrixType](classeigen_1_1transform#aed436d14b16bd862bac5367990085795) |
|  |
| typedef const [Block](classeigen_1_1block)< [ConstMatrixType](classeigen_1_1transform#aed436d14b16bd862bac5367990085795), Dim, 1,!(internal::traits< [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c) >::Flags &[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762))>  | [ConstTranslationPart](classeigen_1_1transform#a3eab3259d3fac8106eb3139bc96ba852) |
|  |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1transform#a49df3689ac2b736bcb564dec47d6486c) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Dim, Options >  | [LinearMatrixType](classeigen_1_1transform#a48138c0370e55371b95946c90d69e25c) |
|  |
| typedef [Block](classeigen_1_1block)< [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c), Dim, Dim, int(Mode)==([AffineCompact](group__enums#ggaee59a86102f150923b0cac6d4ff05107a8192e8fdb2ec3ec46d92956cc83ef490)) &&(int(Options)&[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f))==0 >  | [LinearPart](classeigen_1_1transform#a2195bd42561e691a8f6e7d989e77f328) |
|  |
| typedef internal::make\_proper\_matrix\_type< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Rows, HDim, Options >::type  | [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c) |
|  |
| typedef \_Scalar  | [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) |
|  |
| typedef [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, TransformTimeDiagonalMode >  | [TransformTimeDiagonalReturnType](classeigen_1_1transform#a51af5e8d8d9d9bfec091ff8aa5b7845a) |
|  |
| typedef [Block](classeigen_1_1block)< [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c), Dim, 1,!(internal::traits< [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c) >::Flags &[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762))>  | [TranslationPart](classeigen_1_1transform#aabeaa2d375bf1b6b1d5cb5d1904fbd06) |
|  |
| typedef [Translation](classeigen_1_1translation)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim >  | [TranslationType](classeigen_1_1transform#a6b463d14d8be4c0eda2eed6e943b831f) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, 1 >  | [VectorType](classeigen_1_1transform#aaeb4ae2f95c8edb0655fd84ab3f89e79) |
|  |




|  |
| --- |
|  |
| [AffinePart](classeigen_1_1transform#a8319bad977b0dabf2dfaf2e2dc30f13e) | [affine](classeigen_1_1transform#a9795374292c085bca4d123397d6b37d9) () |
|  |
| [ConstAffinePart](classeigen_1_1transform#adfa0bf2d9504548cdc9b9051b2fa9673) | [affine](classeigen_1_1transform#a761a9c20fd5eefa58ca2f9babdf4c5d8) () const |
|  |
| template<typename NewScalarType >  |
| internal::cast\_return\_type< [Transform](classeigen_1_1transform), [Transform](classeigen_1_1transform)< NewScalarType, Dim, Mode, Options > >::type  | [cast](classeigen_1_1transform#a86a66867b2a9ee0c9c4e920baf2bdacd) () const |
|  |
| template<typename RotationMatrixType , typename ScalingMatrixType >  |
| void  | [computeRotationScaling](classeigen_1_1transform#a7213fd78501c1185c4a1441e33c812d3) (RotationMatrixType \*[rotation](classeigen_1_1transform#ad73300a550f878bb7f34485c3d132746), ScalingMatrixType \*scaling) const |
|  |
| template<typename ScalingMatrixType , typename RotationMatrixType >  |
| void  | [computeScalingRotation](classeigen_1_1transform#a247b079c63f46bb652b3776484838216) (ScalingMatrixType \*scaling, RotationMatrixType \*[rotation](classeigen_1_1transform#ad73300a550f878bb7f34485c3d132746)) const |
|  |
| [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) \*  | [data](classeigen_1_1transform#aefd183e4e0ca89c39b78d5ad7cf3e014) () |
|  |
| const [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) \*  | [data](classeigen_1_1transform#a432669c64a0d6925ee5ea54f76d24a32) () const |
|  |
|  | [EIGEN\_MAKE\_ALIGNED\_OPERATOR\_NEW\_IF\_VECTORIZABLE\_FIXED\_SIZE](classeigen_1_1transform#a30c94c2156e9345f4bdb6cc9661e275b) (\_Scalar, \_Dim==[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) ? [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) :(\_Dim+1) \*(\_Dim+1)) enum |
|  |
| template<typename PositionDerived , typename OrientationType , typename ScaleDerived >  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options > &  | [fromPositionOrientationScale](classeigen_1_1transform#afac1e7bd782e5cc92cbf70128809d5d1) (const [MatrixBase](classeigen_1_1matrixbase)< PositionDerived > &position, const OrientationType &orientation, const [MatrixBase](classeigen_1_1matrixbase)< ScaleDerived > &scale) |
|  |
| [Transform](classeigen_1_1transform) | [inverse](classeigen_1_1transform#ab8dbcd157bf194efca1a5413c0945211) ([TransformTraits](group__enums#gaee59a86102f150923b0cac6d4ff05107) traits=([TransformTraits](group__enums#gaee59a86102f150923b0cac6d4ff05107)) Mode) const |
|  |
| bool  | [isApprox](classeigen_1_1transform#abd1696d9bb754e5c8734e691e03243f9) (const [Transform](classeigen_1_1transform) &other, const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) >::Real &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) >::dummy\_precision()) const |
|  |
| [LinearPart](classeigen_1_1transform#a2195bd42561e691a8f6e7d989e77f328) | [linear](classeigen_1_1transform#ad36538ee2c2970722eff343ee1bbfc7c) () |
|  |
| [ConstLinearPart](classeigen_1_1transform#a75810d3f0d098e00b43a5531f33d78e1) | [linear](classeigen_1_1transform#af8c38249632146453785add778dc1081) () const |
|  |
| void  | [makeAffine](classeigen_1_1transform#abef09a0e86261aeba4e10227fa3fa26b) () |
|  |
| [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c) &  | [matrix](classeigen_1_1transform#a758fbaf6aa41a5493659aa0c9bfe0dcf) () |
|  |
| const [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c) &  | [matrix](classeigen_1_1transform#a0ac079dc1995058cbbded553b8d4485c) () const |
|  |
| [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) &  | [operator()](classeigen_1_1transform#a09fce82b9bdedb5deb2b223a3d716d3f) ([Index](classeigen_1_1transform#a49df3689ac2b736bcb564dec47d6486c) row, [Index](classeigen_1_1transform#a49df3689ac2b736bcb564dec47d6486c) col) |
|  |
| [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) | [operator()](classeigen_1_1transform#a9672c84cb1477eee118be144e7e5d581) ([Index](classeigen_1_1transform#a49df3689ac2b736bcb564dec47d6486c) row, [Index](classeigen_1_1transform#a49df3689ac2b736bcb564dec47d6486c) col) const |
|  |
| template<typename DiagonalDerived >  |
| const [TransformTimeDiagonalReturnType](classeigen_1_1transform#a51af5e8d8d9d9bfec091ff8aa5b7845a) | [operator\*](classeigen_1_1transform#ab3d93a2aba9d06e7d134798f92617da7) (const DiagonalBase< DiagonalDerived > &b) const |
|  |
| template<typename OtherDerived >  |
| const internal::transform\_right\_product\_impl< [Transform](classeigen_1_1transform), OtherDerived >::ResultType  | [operator\*](classeigen_1_1transform#a257ab8b9141982bd6f56771ba822526f) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) const |
|  |
| const [Transform](classeigen_1_1transform) | [operator\*](classeigen_1_1transform#a7e75d983600d35b603f740a3a28bbc6c) (const [Transform](classeigen_1_1transform) &other) const |
|  |
| template<int OtherMode, int OtherOptions>  |
| internal::transform\_transform\_product\_impl< [Transform](classeigen_1_1transform), [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, OtherMode, OtherOptions > >::ResultType  | [operator\*](classeigen_1_1transform#ad4fc26aef2abfb9fdadb7d64aaf58c31) (const [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, OtherMode, OtherOptions > &other) const |
|  |
| template<typename OtherDerived >  |
| [Transform](classeigen_1_1transform) &  | [operator=](classeigen_1_1transform#a826047489741a19b81c6552f8257b1cf) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| [Transform](classeigen_1_1transform) &  | [operator=](classeigen_1_1transform#a8ed8318285ccc7498197da7df1273bd5) (const QMatrix &other) |
|  |
| [Transform](classeigen_1_1transform) &  | [operator=](classeigen_1_1transform#a54986164dcb1d0f7bfa216b8ef5272f6) (const QTransform &other) |
|  |
| template<typename RotationType >  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options > &  | [prerotate](classeigen_1_1transform#ac5d65c2387e8d8b8f1526fc2c8443661) (const RotationType &[rotation](classeigen_1_1transform#ad73300a550f878bb7f34485c3d132746)) |
|  |
| template<typename OtherDerived >  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options > &  | [prescale](classeigen_1_1transform#a0d87009c9449d1920c037eb58468e757) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) |
|  |
| [Transform](classeigen_1_1transform) &  | [prescale](classeigen_1_1transform#a96c5e49e1d779299f4975dfef93e14b3) (const [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) &s) |
|  |
| [Transform](classeigen_1_1transform) &  | [preshear](classeigen_1_1transform#a17c40209cfd2d094cf654504aca95bf1) (const [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) &sx, const [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) &sy) |
|  |
| template<typename OtherDerived >  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options > &  | [pretranslate](classeigen_1_1transform#ae9be55c2f6f4d56b0878c983c0ff9cc6) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) |
|  |
| template<typename RotationType >  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options > &  | [rotate](classeigen_1_1transform#a992087c44abac402a90e48218632d435) (const RotationType &[rotation](classeigen_1_1transform#ad73300a550f878bb7f34485c3d132746)) |
|  |
| RotationReturnType  | [rotation](classeigen_1_1transform#ad73300a550f878bb7f34485c3d132746) () const |
|  |
| template<typename OtherDerived >  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options > &  | [scale](classeigen_1_1transform#a8eea19fd9f6a6966a1a810acda22f93d) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) |
|  |
| [Transform](classeigen_1_1transform) &  | [scale](classeigen_1_1transform#a7757f5d9e708e625cbd936b19269b2c8) (const [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) &s) |
|  |
| void  | [setIdentity](classeigen_1_1transform#accf8eb8ac609d20cf099c62124c0505a) () |
|  |
| [Transform](classeigen_1_1transform) &  | [shear](classeigen_1_1transform#ae93a25d5e15af9446d7e5bc0e7a959d0) (const [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) &sx, const [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) &sy) |
|  |
| QMatrix  | [toQMatrix](classeigen_1_1transform#adaa35139dce9e7e8e144bbdecf97f63f) (void) const |
|  |
| QTransform  | [toQTransform](classeigen_1_1transform#ae954e369a06472f44b72b199beb83cd2) (void) const |
|  |
|  | [Transform](classeigen_1_1transform#a19d71151dfbbe89db15961c93726dd70) () |
|  |
| template<typename OtherDerived >  |
|  | [Transform](classeigen_1_1transform#aec37de6bc74c0769dc4e47ba759bf9ec) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
|  | [Transform](classeigen_1_1transform#a83d61d4a1bd1c502c97ad67f87d55006) (const QMatrix &other) |
|  |
|  | [Transform](classeigen_1_1transform#a63e9a5b9cf964921c24023dd680dee6d) (const QTransform &other) |
|  |
| template<typename OtherScalarType >  |
|  | [Transform](classeigen_1_1transform#a2c3e732625ec300ef4e4cb1e17a82d35) (const [Transform](classeigen_1_1transform)< OtherScalarType, Dim, Mode, Options > &other) |
|  |
| template<typename OtherDerived >  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options > &  | [translate](classeigen_1_1transform#aa28c8ebe8367243653e8fb151670b24b) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) |
|  |
| [TranslationPart](classeigen_1_1transform#aabeaa2d375bf1b6b1d5cb5d1904fbd06) | [translation](classeigen_1_1transform#aa3e4201cc8d1fd98136af66544148dc7) () |
|  |
| [ConstTranslationPart](classeigen_1_1transform#a3eab3259d3fac8106eb3139bc96ba852) | [translation](classeigen_1_1transform#adf4c6d97bd3f10edfa95bb04331ec8ed) () const |
|  |




|  |
| --- |
|  |
| static const [Transform](classeigen_1_1transform) | [Identity](classeigen_1_1transform#a5897c4cba8d6d19ea8711496fe75836f) () |
|  | Returns an identity transformation. [More...](classeigen_1_1transform#a5897c4cba8d6d19ea8711496fe75836f) |
|  |

  AffinePart
----------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |
| --- |
| typedef internal::conditional<int(Mode)==int([AffineCompact](group__enums#ggaee59a86102f150923b0cac6d4ff05107a8192e8fdb2ec3ec46d92956cc83ef490)), [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c)&, [Block](classeigen_1_1block)<[MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c),Dim,HDim> >::type [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::[AffinePart](classeigen_1_1transform#a8319bad977b0dabf2dfaf2e2dc30f13e) |

 
 type of read/write reference to the affine part of the transformation 

    ConstAffinePart
---------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |
| --- |
| typedef internal::conditional<int(Mode)==int([AffineCompact](group__enums#ggaee59a86102f150923b0cac6d4ff05107a8192e8fdb2ec3ec46d92956cc83ef490)), const [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c)&, const [Block](classeigen_1_1block)<const [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c),Dim,HDim> >::type [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::[ConstAffinePart](classeigen_1_1transform#adfa0bf2d9504548cdc9b9051b2fa9673) |

 
 type of read reference to the affine part of the transformation 

    ConstLinearPart
---------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |
| --- |
| typedef const [Block](classeigen_1_1block)<[ConstMatrixType](classeigen_1_1transform#aed436d14b16bd862bac5367990085795),Dim,Dim,int(Mode)==([AffineCompact](group__enums#ggaee59a86102f150923b0cac6d4ff05107a8192e8fdb2ec3ec46d92956cc83ef490)) && (int(Options)&[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f))==0> [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::[ConstLinearPart](classeigen_1_1transform#a75810d3f0d098e00b43a5531f33d78e1) |

 
 type of read reference to the linear part of the transformation 

    ConstMatrixType
---------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |
| --- |
| typedef const [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c) [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::[ConstMatrixType](classeigen_1_1transform#aed436d14b16bd862bac5367990085795) |

 
 constified MatrixType 

    ConstTranslationPart
--------------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |
| --- |
| typedef const [Block](classeigen_1_1block)<[ConstMatrixType](classeigen_1_1transform#aed436d14b16bd862bac5367990085795),Dim,1,!(internal::traits<[MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c)>::Flags & [RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762))> [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::[ConstTranslationPart](classeigen_1_1transform#a3eab3259d3fac8106eb3139bc96ba852) |

 
 type of a read reference to the translation part of the rotation 

    Index
-----

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |
| --- |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::[Index](classeigen_1_1transform#a49df3689ac2b736bcb564dec47d6486c) |

 
 
**[Deprecated:](deprecated#_deprecated000031)**
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3 
    LinearMatrixType
----------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<[Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d),Dim,Dim,Options> [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::[LinearMatrixType](classeigen_1_1transform#a48138c0370e55371b95946c90d69e25c) |

 
 type of the matrix used to represent the linear part of the transformation 

    LinearPart
----------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |
| --- |
| typedef [Block](classeigen_1_1block)<[MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c),Dim,Dim,int(Mode)==([AffineCompact](group__enums#ggaee59a86102f150923b0cac6d4ff05107a8192e8fdb2ec3ec46d92956cc83ef490)) && (int(Options)&[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f))==0> [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::[LinearPart](classeigen_1_1transform#a2195bd42561e691a8f6e7d989e77f328) |

 
 type of read/write reference to the linear part of the transformation 

    MatrixType
----------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |
| --- |
| typedef internal::make\_proper\_matrix\_type<[Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d),Rows,HDim,Options>::type [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::[MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c) |

 
 type of the matrix used to represent the transformation 

    Scalar
------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |
| --- |
| typedef \_Scalar [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::[Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) |

 
 the scalar type of the coefficients 

    TransformTimeDiagonalReturnType
-------------------------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |
| --- |
| typedef [Transform](classeigen_1_1transform)<[Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d),Dim,TransformTimeDiagonalMode> [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::[TransformTimeDiagonalReturnType](classeigen_1_1transform#a51af5e8d8d9d9bfec091ff8aa5b7845a) |

 
 The return type of the product between a diagonal matrix and a transform 

    TranslationPart
---------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |
| --- |
| typedef [Block](classeigen_1_1block)<[MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c),Dim,1,!(internal::traits<[MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c)>::Flags & [RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762))> [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::[TranslationPart](classeigen_1_1transform#aabeaa2d375bf1b6b1d5cb5d1904fbd06) |

 
 type of a read/write reference to the translation part of the rotation 

    TranslationType
---------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |
| --- |
| typedef [Translation](classeigen_1_1translation)<[Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d),Dim> [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::[TranslationType](classeigen_1_1transform#a6b463d14d8be4c0eda2eed6e943b831f) |

 
 corresponding translation type 

    VectorType
----------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<[Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d),Dim,1> [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::[VectorType](classeigen_1_1transform#aaeb4ae2f95c8edb0655fd84ab3f89e79) |

 
 type of a vector 

    Transform() [1/5]
-----------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::[Transform](classeigen_1_1transform) | ( |  | ) |  |

 | inline |

 
 Default constructor without initialization of the meaningful coefficients. If Mode==Affine or Mode==Isometry, then the last row is set to [0 ... 0 1] 

    Transform() [2/5]
-----------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::[Transform](classeigen_1_1transform) | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *other* | ) |  |

 | inlineexplicit |

 
 Constructs and initializes a transformation from a Dim^2 or a (Dim+1)^2 matrix. 

    Transform() [3/5]
-----------------

    template<typename Scalar , int Dim, int Mode, int Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options >::[Transform](classeigen_1_1transform) | ( | const QMatrix &  | *other* | ) |  |

 | inline |

 
 Initializes `*this` from a QMatrix assuming the dimension is 2.

 This function is available only if the token EIGEN\_QT\_SUPPORT is defined. 

    Transform() [4/5]
-----------------

    template<typename Scalar , int Dim, int Mode, int Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options >::[Transform](classeigen_1_1transform) | ( | const QTransform< \_Scalar, \_Dim, \_Mode, \_Options > &  | *other* | ) |  |

 | inline |

 
 Initializes `*this` from a QTransform assuming the dimension is 2.

 This function is available only if the token EIGEN\_QT\_SUPPORT is defined. 

    Transform() [5/5]
-----------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>   template<typename OtherScalarType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::[Transform](classeigen_1_1transform) | ( | const [Transform](classeigen_1_1transform)< OtherScalarType, Dim, Mode, Options > &  | *other* | ) |  |

 | inlineexplicit |

 
 Copy constructor with scalar type conversion 

    affine() [1/2]
--------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [AffinePart](classeigen_1_1transform#a8319bad977b0dabf2dfaf2e2dc30f13e) [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::affine  | ( |  | ) |  |

 | inline |

 
 
Returns
a writable expression of the Dim x HDim affine part of the transformation 
    affine() [2/2]
--------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ConstAffinePart](classeigen_1_1transform#adfa0bf2d9504548cdc9b9051b2fa9673) [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::affine  | ( |  | ) |  const |

 | inline |

 
 
Returns
a read-only expression of the Dim x HDim affine part of the transformation 
    cast()
------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>   template<typename NewScalarType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::cast\_return\_type<[Transform](classeigen_1_1transform),[Transform](classeigen_1_1transform)<NewScalarType,Dim,Mode,Options> >::type [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::cast  | ( |  | ) |  const |

 | inline |

 
 
Returns

`*this` with scalar type casted to *NewScalarType* 
 Note that if *NewScalarType* is equal to the current scalar type of `*this` then this function smartly returns a const reference to `*this`. 

    computeRotationScaling()
------------------------

    template<typename Scalar , int Dim, int Mode, int Options>   template<typename RotationMatrixType , typename ScalingMatrixType >  

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options >::computeRotationScaling  | ( | RotationMatrixType \*  | *rotation*,  |
|  |  | ScalingMatrixType \*  | *scaling* |
|  | ) |  |  const |

 
 decomposes the linear part of the transformation as a product rotation x scaling, the scaling being not necessarily positive.

 If either pointer is zero, the corresponding computation is skipped.

 This is defined in the SVD module.



```
#include <Eigen/SVD> 

```


See also

[computeScalingRotation()](classeigen_1_1transform#a247b079c63f46bb652b3776484838216), [rotation()](classeigen_1_1transform#ad73300a550f878bb7f34485c3d132746), class SVD 
    computeScalingRotation()
------------------------

    template<typename Scalar , int Dim, int Mode, int Options>   template<typename ScalingMatrixType , typename RotationMatrixType >  

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options >::computeScalingRotation  | ( | ScalingMatrixType \*  | *scaling*,  |
|  |  | RotationMatrixType \*  | *rotation* |
|  | ) |  |  const |

 
 decomposes the linear part of the transformation as a product scaling x rotation, the scaling being not necessarily positive.

 If either pointer is zero, the corresponding computation is skipped.

 This is defined in the SVD module.



```
#include <Eigen/SVD> 

```


See also

[computeRotationScaling()](classeigen_1_1transform#a7213fd78501c1185c4a1441e33c812d3), [rotation()](classeigen_1_1transform#ad73300a550f878bb7f34485c3d132746), class SVD 
    data() [1/2]
------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d)\* [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::data  | ( |  | ) |  |

 | inline |

 
 
Returns
a non-const pointer to the column major internal matrix 
    data() [2/2]
------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d)\* [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::data  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const pointer to the column major internal matrix 
    EIGEN\_MAKE\_ALIGNED\_OPERATOR\_NEW\_IF\_VECTORIZABLE\_FIXED\_SIZE()
--------------------------------------------------------------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::EIGEN\_MAKE\_ALIGNED\_OPERATOR\_NEW\_IF\_VECTORIZABLE\_FIXED\_SIZE  | ( | \_Scalar  | ,  |
|  |  | \_Dim  |  = `=[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) ? [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) : (_Dim+1)*(_Dim+1)` |
|  | ) |  |  |

 | inline |

 
 < space dimension in which the transformation holds

 < size of a respective homogeneous vector

    fromPositionOrientationScale()
------------------------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>   template<typename PositionDerived , typename OrientationType , typename ScaleDerived >  

|  |  |  |  |
| --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)<[Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d),Dim,Mode,Options>& [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::fromPositionOrientationScale  | ( | const [MatrixBase](classeigen_1_1matrixbase)< PositionDerived > &  | *position*,  |
|  |  | const OrientationType &  | *orientation*,  |
|  |  | const [MatrixBase](classeigen_1_1matrixbase)< ScaleDerived > &  | *scale* |
|  | ) |  |  |

 
 Convenient method to set `*this` from a position, orientation and scale of a 3D object. 

    Identity()
----------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| static const [Transform](classeigen_1_1transform) [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::Identity  | ( |  | ) |  |

 | inlinestatic |

 
 Returns an identity transformation. 

    inverse()
---------

    template<typename Scalar , int Dim, int Mode, int Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options > [Eigen::Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options >::inverse  | ( | [TransformTraits](group__enums#gaee59a86102f150923b0cac6d4ff05107) | *hint* = `([TransformTraits](group__enums#gaee59a86102f150923b0cac6d4ff05107))Mode` | ) |  const |

 | inline |

 
 
Returns
the inverse transformation according to some given knowledge on `*this`.
 
Parameters
 

|  |  |
| --- | --- |
| hint | allows to optimize the inversion process when the transformation is known to be not a general transformation (optional). The possible values are:* [Projective](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0f7338b8672884554e8642bce9e44183) if the transformation is not necessarily affine, i.e., if the last row is not guaranteed to be [0 ... 0 1]
* [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb) if the last row can be assumed to be [0 ... 0 1]
* [Isometry](group__enums#ggaee59a86102f150923b0cac6d4ff05107a84413028615d2d718bafd2dfb93dafef) if the transformation is only a concatenations of translations and rotations. The default is the template class parameter `Mode`.
 |

   
Warning
unless *traits* is always set to NoShear or NoScaling, this function requires the generic inverse method of [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") defined in the LU module. If you forget to include this module, then you will get hard to debug linking errors.
 
See also

[MatrixBase::inverse()](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf) 
    isApprox()
----------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::isApprox  | ( | const [Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options > &  | *other*,  |
|  |  | const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) >::Real &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d)>::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 
Returns

`true` if `*this` is approximately equal to *other*, within the precision determined by *prec*.
 
See also

[MatrixBase::isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) 
    linear() [1/2]
--------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [LinearPart](classeigen_1_1transform#a2195bd42561e691a8f6e7d989e77f328) [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::linear  | ( |  | ) |  |

 | inline |

 
 
Returns
a writable expression of the linear part of the transformation 
    linear() [2/2]
--------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ConstLinearPart](classeigen_1_1transform#a75810d3f0d098e00b43a5531f33d78e1) [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::linear  | ( |  | ) |  const |

 | inline |

 
 
Returns
a read-only expression of the linear part of the transformation 
    makeAffine()
------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::makeAffine  | ( |  | ) |  |

 | inline |

 
 Sets the last row to [0 ... 0 1] 

    matrix() [1/2]
--------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c)& [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::matrix  | ( |  | ) |  |

 | inline |

 
 
Returns
a writable expression of the transformation matrix 
    matrix() [2/2]
--------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [MatrixType](classeigen_1_1transform#a30f72ba46abc2bb3c7fa919c1078fc9c)& [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::matrix  | ( |  | ) |  const |

 | inline |

 
 
Returns
a read-only expression of the transformation matrix 
    operator()() [1/2]
------------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d)& [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::operator()  | ( | [Index](classeigen_1_1transform#a49df3689ac2b736bcb564dec47d6486c) | *row*,  |
|  |  | [Index](classeigen_1_1transform#a49df3689ac2b736bcb564dec47d6486c) | *col* |
|  | ) |  |  |

 | inline |

 
 shortcut for m\_matrix(row,col); 



See also
MatrixBase::operator(Index,Index) 
    operator()() [2/2]
------------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::operator()  | ( | [Index](classeigen_1_1transform#a49df3689ac2b736bcb564dec47d6486c) | *row*,  |
|  |  | [Index](classeigen_1_1transform#a49df3689ac2b736bcb564dec47d6486c) | *col* |
|  | ) |  |  const |

 | inline |

 
 shortcut for m\_matrix(row,col); 



See also
MatrixBase::operator(Index,Index) const 
    operator\*() [1/4]
------------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>   template<typename DiagonalDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [TransformTimeDiagonalReturnType](classeigen_1_1transform#a51af5e8d8d9d9bfec091ff8aa5b7845a) [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::operator\*  | ( | const DiagonalBase< DiagonalDerived > &  | *b* | ) |  const |

 | inline |

 
 
Returns
The product expression of a transform *a* times a diagonal matrix *b* 
 The rhs diagonal matrix is interpreted as an affine scaling transformation. The product results in a [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") of the same type (mode) as the lhs only if the lhs mode is no isometry. In that case, the returned transform is an affinity. 

    operator\*() [2/4]
------------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const internal::transform\_right\_product\_impl<[Transform](classeigen_1_1transform), OtherDerived>::ResultType [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::operator\*  | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 
Returns
an expression of the product between the transform `*this` and a matrix expression *other*.
 The right-hand-side *other* can be either: 


* an homogeneous vector of size Dim+1,
* a set of homogeneous vectors of size Dim+1 x N,
* a transformation matrix of size Dim+1 x Dim+1.

 Moreover, if `*this` represents an affine transformation (i.e., Mode!=Projective), then *other* can also be: 


* a point of size Dim (computes:
```
this->[linear](classeigen_1_1transform#af8c38249632146453785add778dc1081)() * other + this->[translation](classeigen_1_1transform#adf4c6d97bd3f10edfa95bb04331ec8ed)()
```
),
* a set of N points as a Dim x N matrix (computes:
```
(this->[linear](classeigen_1_1transform#af8c38249632146453785add778dc1081)() * other).colwise() + this->[translation](classeigen_1_1transform#adf4c6d97bd3f10edfa95bb04331ec8ed)()

```
),

 In all cases, the return type is a matrix or vector of same sizes as the right-hand-side *other*.

 If you want to interpret *other* as a linear or affine transformation, then first convert it to a Transform<> type, or do your own cooking.

 Finally, if you want to apply Affine transformations to vectors, then explicitly apply the linear part only: 



```
Affine3f A;
Vector3f v1, v2;
v2 = A.linear() * v1;

```
    operator\*() [3/4]
------------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Transform](classeigen_1_1transform) [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::operator\*  | ( | const [Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options > &  | *other* | ) |  const |

 | inline |

 
 Concatenates two transformations 

    operator\*() [4/4]
------------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>   template<int OtherMode, int OtherOptions>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| internal::transform\_transform\_product\_impl<[Transform](classeigen_1_1transform),[Transform](classeigen_1_1transform)<[Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d),Dim,OtherMode,OtherOptions> >::ResultType [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::operator\*  | ( | const [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, OtherMode, OtherOptions > &  | *other* | ) |  const |

 | inline |

 
 Concatenates two different transformations 

    operator=() [1/3]
-----------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)& [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::operator=  | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Set `*this` from a Dim^2 or (Dim+1)^2 matrix. 

    operator=() [2/3]
-----------------

    template<typename Scalar , int Dim, int Mode, int Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options > & [Eigen::Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options >::operator=  | ( | const QMatrix &  | *other* | ) |  |

 | inline |

 
 Set `*this` from a QMatrix assuming the dimension is 2.

 This function is available only if the token EIGEN\_QT\_SUPPORT is defined. 

    operator=() [3/3]
-----------------

    template<typename Scalar , int Dim, int Mode, int Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options > & [Eigen::Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options >::operator=  | ( | const QTransform< \_Scalar, \_Dim, \_Mode, \_Options > &  | *other* | ) |  |

 | inline |

 
 Set `*this` from a QTransform assuming the dimension is 2.

 This function is available only if the token EIGEN\_QT\_SUPPORT is defined. 

    prerotate()
-----------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>   template<typename RotationType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)<[Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d),Dim,Mode,Options>& [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::prerotate  | ( | const RotationType &  | *rotation* | ) |  |

 
 Applies on the left the rotation represented by the rotation *rotation* to `*this` and returns a reference to `*this`.

 See rotate() for further details.

 
See also
rotate() 
    prescale() [1/2]
----------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>   template<typename OtherDerived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)<[Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d),Dim,Mode,Options>& [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::prescale  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  |

 
 Applies on the left the non uniform scale transformation represented by the vector *other* to `*this` and returns a reference to `*this`. 



See also
scale() 
    prescale() [2/2]
----------------

    template<typename Scalar , int Dim, int Mode, int Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options > & [Eigen::Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options >::prescale  | ( | const [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) &  | *s* | ) |  |

 | inline |

 
 Applies on the left a uniform scale of a factor *c* to `*this` and returns a reference to `*this`. 



See also
scale(Scalar) 
    preshear()
----------

    template<typename Scalar , int Dim, int Mode, int Options>  

|  |  |  |  |
| --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options > & [Eigen::Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options >::preshear  | ( | const [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) &  | *sx*,  |
|  |  | const [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) &  | *sy* |
|  | ) |  |  |

 
 Applies on the left the shear transformation represented by the vector *other* to `*this` and returns a reference to `*this`. 



Warning
2D only. 
 
See also

[shear()](classeigen_1_1transform#ae93a25d5e15af9446d7e5bc0e7a959d0) 
    pretranslate()
--------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>   template<typename OtherDerived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)<[Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d),Dim,Mode,Options>& [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::pretranslate  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  |

 
 Applies on the left the translation matrix represented by the vector *other* to `*this` and returns a reference to `*this`. 



See also
translate() 
    rotate()
--------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>   template<typename RotationType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)<[Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d),Dim,Mode,Options>& [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::rotate  | ( | const RotationType &  | *rotation* | ) |  |

 
 Applies on the right the rotation represented by the rotation *rotation* to `*this` and returns a reference to `*this`.

 The template parameter *RotationType* is the type of the rotation which must be known by internal::toRotationMatrix<>.

 Natively supported types includes:


* any scalar (2D),
* a Dim x Dim matrix expression,
* a [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") (3D),
* a [AngleAxis](classeigen_1_1angleaxis "Represents a 3D rotation as a rotation angle around an arbitrary 3D axis.") (3D)

 This mechanism is easily extendable to support user types such as Euler angles, or a pair of [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") for 4D rotations.

 
See also
rotate(Scalar), class [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations."), class [AngleAxis](classeigen_1_1angleaxis "Represents a 3D rotation as a rotation angle around an arbitrary 3D axis."), prerotate(RotationType) 
    rotation()
----------

    template<typename Scalar , int Dim, int Mode, int Options>  

|  |
| --- |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options >::RotationReturnType [Eigen::Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options >::rotation |

 
 
Returns
the rotation part of the transformation
 If Mode==Isometry, then this method is an alias for [linear()](classeigen_1_1transform#ad36538ee2c2970722eff343ee1bbfc7c), otherwise it calls [computeRotationScaling()](classeigen_1_1transform#a7213fd78501c1185c4a1441e33c812d3) to extract the rotation through a SVD decomposition.

 This is defined in the SVD module.



```
#include <Eigen/SVD> 

```


See also

[computeRotationScaling()](classeigen_1_1transform#a7213fd78501c1185c4a1441e33c812d3), [computeScalingRotation()](classeigen_1_1transform#a247b079c63f46bb652b3776484838216), class SVD 
    scale() [1/2]
-------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>   template<typename OtherDerived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)<[Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d),Dim,Mode,Options>& [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::scale  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  |

 
 Applies on the right the non uniform scale transformation represented by the vector *other* to `*this` and returns a reference to `*this`. 



See also
prescale() 
    scale() [2/2]
-------------

    template<typename Scalar , int Dim, int Mode, int Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options > & [Eigen::Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options >::scale  | ( | const [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) &  | *s* | ) |  |

 | inline |

 
 Applies on the right a uniform scale of a factor *c* to `*this` and returns a reference to `*this`. 



See also
prescale(Scalar) 
    setIdentity()
-------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::setIdentity  | ( |  | ) |  |

 | inline |

 
 
See also

[MatrixBase::setIdentity()](classeigen_1_1matrixbase#a18e969adfdf2db4ac44c47fbdc854683) 
    shear()
-------

    template<typename Scalar , int Dim, int Mode, int Options>  

|  |  |  |  |
| --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options > & [Eigen::Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options >::shear  | ( | const [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) &  | *sx*,  |
|  |  | const [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d) &  | *sy* |
|  | ) |  |  |

 
 Applies on the right the shear transformation represented by the vector *other* to `*this` and returns a reference to `*this`. 



Warning
2D only. 
 
See also

[preshear()](classeigen_1_1transform#a17c40209cfd2d094cf654504aca95bf1) 
    toQMatrix()
-----------

    template<typename Scalar , int Dim, int Mode, int Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| QMatrix [Eigen::Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options >::toQMatrix  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
a QMatrix from `*this` assuming the dimension is 2.
 
Warning
this conversion might loss data if `*this` is not affine
 This function is available only if the token EIGEN\_QT\_SUPPORT is defined. 

    toQTransform()
--------------

    template<typename Scalar , int Dim, int Mode, int Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| QTransform [Eigen::Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d), Dim, Mode, Options >::toQTransform  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
a QTransform from `*this` assuming the dimension is 2.
 This function is available only if the token EIGEN\_QT\_SUPPORT is defined. 

    translate()
-----------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>   template<typename OtherDerived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)<[Scalar](classeigen_1_1transform#a4e69ced9d651745b8ed4eda46f41795d),Dim,Mode,Options>& [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::translate  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  |

 
 Applies on the right the translation matrix represented by the vector *other* to `*this` and returns a reference to `*this`. 



See also
pretranslate() 
    translation() [1/2]
-------------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [TranslationPart](classeigen_1_1transform#aabeaa2d375bf1b6b1d5cb5d1904fbd06) [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::translation  | ( |  | ) |  |

 | inline |

 
 
Returns
a writable expression of the translation vector of the transformation 
    translation() [2/2]
-------------------

    template<typename \_Scalar , int \_Dim, int \_Mode, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ConstTranslationPart](classeigen_1_1transform#a3eab3259d3fac8106eb3139bc96ba852) [Eigen::Transform](classeigen_1_1transform)< \_Scalar, \_Dim, \_Mode, \_Options >::translation  | ( |  | ) |  const |

 | inline |

 
 
Returns
a read-only expression of the translation vector of the transformation 
   

---

The documentation for this class was generated from the following file:* [Transform.h](https://eigen.tuxfamily.org/dox/Transform_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Transform.html>

Eigen::ArrayXpr
===============

  
The type used to identify an array expression 

 


---

The documentation for this struct was generated from the following file:* [Constants.h](https://eigen.tuxfamily.org/dox/Constants_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/structEigen_1_1ArrayXpr.html>

What happens inside Eigen, on a simple example
==============================================

   


---

 Consider the following example program:

 
```
#include<Eigen/Core>
 
int main()
{
  int size = 50;
  // VectorXf is a vector of floats, with dynamic size.
  [Eigen::VectorXf](classeigen_1_1matrix) u(size), v(size), w(size);
  u = v + w;
}
```

The goal of this page is to understand how [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") compiles it, assuming that SSE2 vectorization is enabled (GCC option -msse2).

 
 Why it's interesting
======================

 Maybe you think, that the above example program is so simple, that compiling it shouldn't involve anything interesting. So before starting, let us explain what is nontrivial in compiling it correctly – that is, producing optimized code – so that the complexity of [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."), that we'll explain here, is really useful.

 Look at the line of code 



```
u = v + w;   // (\*)

```

The first important thing about compiling it, is that the arrays should be traversed only once, like 



```
for(int i = 0; i < size; i++) u[i] = v[i] + w[i];

```

 The problem is that if we make a naive C++ library where the VectorXf class has an operator+ returning a VectorXf, then the line of code (\*) will amount to: 



```
VectorXf tmp = v + w;
VectorXf u = tmp;

```

 Obviously, the introduction of the temporary *tmp* here is useless. It has a very bad effect on performance, first because the creation of *tmp* requires a dynamic memory allocation in this context, and second as there are now two for loops: 



```
for(int i = 0; i < size; i++) tmp[i] = v[i] + w[i];
for(int i = 0; i < size; i++) u[i] = tmp[i];

```

 Traversing the arrays twice instead of once is terrible for performance, as it means that we do many redundant memory accesses.

 The second important thing about compiling the above program, is to make correct use of SSE2 instructions. Notice that [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") also supports AltiVec and that all the discussion that we make here applies also to AltiVec.

 SSE2, like AltiVec, is a set of instructions allowing to perform computations on packets of 128 bits at once. Since a float is 32 bits, this means that SSE2 instructions can handle 4 floats at once. This means that, if correctly used, they can make our computation go up to 4x faster.

 However, in the above program, we have chosen size=50, so our vectors consist of 50 float's, and 50 is not a multiple of 4. This means that we cannot hope to do all of that computation using SSE2 instructions. The second best thing, to which we should aim, is to handle the 48 first coefficients with SSE2 instructions, since 48 is the biggest multiple of 4 below 50, and then handle separately, without SSE2, the 49th and 50th coefficients. Something like this:

 
```
for(int i = 0; i < 4*(size/4); i+=4) u.packet(i)  = v.packet(i) + w.packet(i);
for(int i = 4*(size/4); i < size; i++) u[i] = v[i] + w[i];

```

So let us look line by line at our example program, and let's follow [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") as it compiles it.

 
 Constructing vectors
======================

 Let's analyze the first line:

 
```
[Eigen::VectorXf](classeigen_1_1matrix) u(size), v(size), w(size);

```

First of all, VectorXf is the following typedef: 



```
typedef Matrix<float, Dynamic, 1> VectorXf;

```

The class template [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") is declared in src/Core/util/ForwardDeclarations.h with 6 template parameters, but the last 3 are automatically determined by the first 3. So you don't need to worry about them for now. Here, [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.")<float, Dynamic, 1> means a matrix of floats, with a dynamic number of rows and 1 column.

 The [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class inherits a base class, [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions."). Don't worry about it, for now it suffices to say that [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") is what unifies matrices/vectors and all the expressions types – more on that below.

 When we do 



```
[Eigen::VectorXf](classeigen_1_1matrix) u(size);

```

 the constructor that is called is Matrix::Matrix(int), in [src/Core/Matrix.h](https://eigen.tuxfamily.org/dox/Matrix_8h_source.html). Besides some assertions, all it does is to construct the *m\_storage* member, which is of type DenseStorage<float, Dynamic, Dynamic, 1>.

 You may wonder, isn't it overengineering to have the storage in a separate class? The reason is that the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class template covers all kinds of matrices and vector: both fixed-size and dynamic-size. The storage method is not the same in these two cases. For fixed-size, the matrix coefficients are stored as a plain member array. For dynamic-size, the coefficients will be stored as a pointer to a dynamically-allocated array. Because of this, we need to abstract storage away from the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class. That's DenseStorage.

 Let's look at this constructor, in [src/Core/DenseStorage.h](https://eigen.tuxfamily.org/dox/DenseStorage_8h_source.html). You can see that there are many partial template specializations of DenseStorages here, treating separately the cases where dimensions are Dynamic or fixed at compile-time. The partial specialization that we are looking at is: 



```
template<typename T, int _Cols> class DenseStorage<T, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), _Cols>
```

Here, the constructor called is DenseStorage::DenseStorage(int size, int rows, int columns) with size=50, rows=50, columns=1.

 Here is this constructor: 



```
inline DenseStorage(int size, int rows, int) : m_data(internal::aligned_new<T>(size)), m_rows(rows) {}

```

Here, the *m\_data* member is the actual array of coefficients of the matrix. As you see, it is dynamically allocated. Rather than calling new[] or malloc(), as you can see, we have our own internal::aligned\_new defined in [src/Core/util/Memory.h](https://eigen.tuxfamily.org/dox/Memory_8h_source.html). What it does is that if vectorization is enabled, then it uses a platform-specific call to allocate a 128-bit-aligned array, as that is very useful for vectorization with both SSE2 and AltiVec. If vectorization is disabled, it amounts to the standard new[].

 As you can see, the constructor also sets the *m\_rows* member to *size*. Notice that there is no *m\_columns* member: indeed, in this partial specialization of DenseStorage, we know the number of columns at compile-time, since the \_Cols template parameter is different from Dynamic. Namely, in our case, \_Cols is 1, which is to say that our vector is just a matrix with 1 column. Hence, there is no need to store the number of columns as a runtime variable.

 When you call [VectorXf::data()](classeigen_1_1plainobjectbase#ad12a492bcadea9b65ccd9bc8404c01f1) to get the pointer to the array of coefficients, it returns DenseStorage::data() which returns the *m\_data* member.

 When you call [VectorXf::size()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) to get the size of the vector, this is actually a method in the base class [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions."). It determines that the vector is a column-vector, since ColsAtCompileTime==1 (this comes from the template parameters in the typedef VectorXf). It deduces that the size is the number of rows, so it returns [VectorXf::rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), which returns DenseStorage::rows(), which returns the *m\_rows* member, which was set to *size* by the constructor.

 
 Construction of the sum expression
====================================

 Now that our vectors are constructed, let's move on to the next line:

 
```
u = v + w;

```

The executive summary is that operator+ returns a "sum of vectors" expression, but doesn't actually perform the computation. It is the operator=, whose call occurs thereafter, that does the computation.

 Let us now see what [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") does when it sees this:

 
```
v + w

```

Here, v and w are of type VectorXf, which is a typedef for a specialization of [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") (as we explained above), which is a subclass of [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions."). So what is being called is

 
```
MatrixBase::operator+(const MatrixBase&)

```

The return type of this operator is 



```
CwiseBinaryOp<internal::scalar_sum_op<float>, VectorXf, VectorXf>

```

 The [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions.") class is our first encounter with an expression template. As we said, the operator+ doesn't by itself perform any computation, it just returns an abstract "sum of vectors" expression. Since there are also "difference of vectors" and "coefficient-wise product of vectors" expressions, we unify them all as "coefficient-wise binary operations", which we abbreviate as "CwiseBinaryOp". "Coefficient-wise" means that the operations is performed coefficient by coefficient. "binary" means that there are two operands – we are adding two vectors with one another.

 Now you might ask, what if we did something like

 
```
v + w + u;

```

The first v + w would return a [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions.") as above, so in order for this to compile, we'd need to define an operator+ also in the class [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions.")... at this point it starts looking like a nightmare: are we going to have to define all operators in each of the expression classes (as you guessed, [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions.") is only one of many) ? This looks like a dead end!

 The solution is that [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions.") itself, as well as [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") and all the other expression types, is a subclass of [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions."). So it is enough to define once and for all the operators in class [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.").

 Since [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") is the common base class of different subclasses, the aspects that depend on the subclass must be abstracted from [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions."). This is called polymorphism.

 The classical approach to polymorphism in C++ is by means of virtual functions. This is dynamic polymorphism. Here we don't want dynamic polymorphism because the whole design of [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") is based around the assumption that all the complexity, all the abstraction, gets resolved at compile-time. This is crucial: if the abstraction can't get resolved at compile-time, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s compile-time optimization mechanisms become useless, not to mention that if that abstraction has to be resolved at runtime it'll incur an overhead by itself.

 Here, what we want is to have a single class [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") as the base of many subclasses, in such a way that each [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") object (be it a matrix, or vector, or any kind of expression) knows at compile-time (as opposed to run-time) of which particular subclass it is an object (i.e. whether it is a matrix, or an expression, and what kind of expression).

 The solution is the [Curiously Recurring Template Pattern](http://en.wikipedia.org/wiki/Curiously_Recurring_Template_Pattern). Let's do the break now. Hopefully you can read this wikipedia page during the break if needed, but it won't be allowed during the exam.

 In short, [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") takes a template parameter *Derived*. Whenever we define a subclass Subclass, we actually make Subclass inherit [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.")<Subclass>. The point is that different subclasses inherit different [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") types. Thanks to this, whenever we have an object of a subclass, and we call on it some [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") method, we still remember even from inside the [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") method which particular subclass we're talking about.

 This means that we can put almost all the methods and operators in the base class [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions."), and have only the bare minimum in the subclasses. If you look at the subclasses in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."), like for instance the [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions.") class, they have very few methods. There are coeff() and sometimes coeffRef() methods for access to the coefficients, there are rows() and cols() methods returning the number of rows and columns, but there isn't much more than that. All the meat is in [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions."), so it only needs to be coded once for all kinds of expressions, matrices, and vectors.

 So let's end this digression and come back to the piece of code from our example program that we were currently analyzing,

 
```
v + w

```

Now that [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") is a good friend, let's write fully the prototype of the operator+ that gets called here (this code is from [src/Core/MatrixBase.h](https://eigen.tuxfamily.org/dox/MatrixBase_8h_source.html)):

 
```
template<typename Derived>
class MatrixBase
{
  // ...
 
  template<typename OtherDerived>
  const CwiseBinaryOp<internal::scalar_sum_op<typename internal::traits<Derived>::Scalar>, Derived, OtherDerived>
  operator+(const MatrixBase<OtherDerived> &other) const;
 
  // ...
};

```

Here of course, *Derived* and *OtherDerived* are VectorXf.

 As we said, [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions.") is also used for other operations such as substration, so it takes another template parameter determining the operation that will be applied to coefficients. This template parameter is a functor, that is, a class in which we have an operator() so it behaves like a function. Here, the functor used is internal::scalar\_sum\_op. It is defined in src/Core/Functors.h.

 Let us now explain the internal::traits here. The internal::scalar\_sum\_op class takes one template parameter: the type of the numbers to handle. Here of course we want to pass the scalar type (a.k.a. numeric type) of VectorXf, which is `float`. How do we determine which is the scalar type of *Derived* ? Throughout [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."), all matrix and expression types define a typedef *Scalar* which gives its scalar type. For example, VectorXf::Scalar is a typedef for `float`. So here, if life was easy, we could find the numeric type of *Derived* as just 



```
typename Derived::Scalar

```

 Unfortunately, we can't do that here, as the compiler would complain that the type Derived hasn't yet been defined. So we use a workaround: in src/Core/util/ForwardDeclarations.h, we declared (not defined!) all our subclasses, like [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."), and we also declared the following class template: 



```
template<typename T> struct internal::traits;

```

 In [src/Core/Matrix.h](https://eigen.tuxfamily.org/dox/Matrix_8h_source.html), right *before* the definition of class [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."), we define a partial specialization of internal::traits for T=[Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.")<any template parameters>. In this specialization of internal::traits, we define the Scalar typedef. So when we actually define [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."), it is legal to refer to "typename internal::traits\<Matrix\>::Scalar".

 Anyway, we have declared our operator+. In our case, where *Derived* and *OtherDerived* are VectorXf, the above declaration amounts to: 



```
class MatrixBase<VectorXf>
{
  // ...
 
  const CwiseBinaryOp<internal::scalar_sum_op<float>, VectorXf, VectorXf>
  operator+(const MatrixBase<VectorXf> &other) const;
 
  // ...
};

```

Let's now jump to [src/Core/CwiseBinaryOp.h](https://eigen.tuxfamily.org/dox/CwiseBinaryOp_8h_source.html) to see how it is defined. As you can see there, all it does is to return a [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions.") object, and this object is just storing references to the left-hand-side and right-hand-side expressions – here, these are the vectors *v* and *w*. Well, the [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions.") object is also storing an instance of the (empty) functor class, but you shouldn't worry about it as that is a minor implementation detail.

 Thus, the operator+ hasn't performed any actual computation. To summarize, the operation *v* + *w* just returned an object of type [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions.") which did nothing else than just storing references to *v* and *w*.

 
 The assignment
================

  **PLEASE HELP US IMPROVING THIS SECTION.** This page reflects how Eigen worked until 3.2, but since Eigen 3.3 the assignment is more sophisticated as it involves an Assignment expression, and the creation of so called evaluator which are responsible for the evaluation of each kind of expressions. 
At this point, the expression *v* + *w* has finished evaluating, so, in the process of compiling the line of code 



```
u = v + w;

```

 we now enter the operator=.

 What operator= is being called here? The vector u is an object of class VectorXf, i.e. [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."). In [src/Core/Matrix.h](https://eigen.tuxfamily.org/dox/Matrix_8h_source.html), inside the definition of class [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."), we see this: 



```
template<typename OtherDerived>
inline Matrix& operator=(const MatrixBase<OtherDerived>& other)
{
  eigen_assert(m_storage.data()!=0 && "you cannot use operator= with a non initialized matrix (instead use set()");
  return Base::operator=(other.derived());
}

```

 Here, Base is a typedef for [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.")<[Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.")>. So, what is being called is the operator= of [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions."). Let's see its prototype in [src/Core/MatrixBase.h](https://eigen.tuxfamily.org/dox/MatrixBase_8h_source.html): 



```
template<typename OtherDerived>
Derived& operator=(const MatrixBase<OtherDerived>& other);

```

 Here, *Derived* is VectorXf (since u is a VectorXf) and *OtherDerived* is [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions."). More specifically, as explained in the previous section, *OtherDerived* is: 



```
CwiseBinaryOp<internal::scalar_sum_op<float>, VectorXf, VectorXf>

```

 So the full prototype of the operator= being called is: 



```
VectorXf& [MatrixBase<VectorXf>::operator=](classeigen_1_1matrixbase#a373bf62ad398162df5a71963ed7cbeff)(const MatrixBase<CwiseBinaryOp<internal::scalar_sum_op<float>, VectorXf, VectorXf> > & other);
```

 This operator= literally reads "copying a sum of two VectorXf's into another VectorXf".

 Let's now look at the implementation of this operator=. It resides in the file [src/Core/Assign.h](https://eigen.tuxfamily.org/dox/Assign_8h_source.html).

 What we can see there is: 



```
template<typename Derived>
template<typename OtherDerived>
inline Derived& [MatrixBase<Derived>](classeigen_1_1matrixbase#a373bf62ad398162df5a71963ed7cbeff)
 [::operator=](classeigen_1_1matrixbase#a373bf62ad398162df5a71963ed7cbeff)(const MatrixBase<OtherDerived>& other)
{
  return internal::assign_selector<Derived,OtherDerived>::run(derived(), other.derived());
}

```

OK so our next task is to understand internal::assign\_selector :)

 Here is its declaration (all that is still in the same file [src/Core/Assign.h](https://eigen.tuxfamily.org/dox/Assign_8h_source.html)) 



```
template<typename Derived, typename OtherDerived,
         bool EvalBeforeAssigning = int(OtherDerived::Flags) & [EvalBeforeAssigningBit](group__flags#ga0972b20dc004d13984e642b3bd12532e),
         bool NeedToTranspose = Derived::IsVectorAtCompileTime
                && OtherDerived::IsVectorAtCompileTime
                && int(Derived::RowsAtCompileTime) == int(OtherDerived::ColsAtCompileTime)
                && int(Derived::ColsAtCompileTime) == int(OtherDerived::RowsAtCompileTime)
                && int(Derived::SizeAtCompileTime) != 1>
struct internal::assign_selector;
```

So internal::assign\_selector takes 4 template parameters, but the 2 last ones are automatically determined by the 2 first ones.

 EvalBeforeAssigning is here to enforce the EvalBeforeAssigningBit. As explained [here](topiclazyevaluation), certain expressions have this flag which makes them automatically evaluate into temporaries before assigning them to another expression. This is the case of the [Product](classeigen_1_1product "Expression of the product of two arbitrary matrices or vectors.") expression, in order to avoid strange aliasing effects when doing "m = m \* m;" However, of course here our [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions.") expression doesn't have the EvalBeforeAssigningBit: we said since the beginning that we didn't want a temporary to be introduced here. So if you go to [src/Core/CwiseBinaryOp.h](https://eigen.tuxfamily.org/dox/CwiseBinaryOp_8h_source.html), you'll see that the Flags in internal::traits<[CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions.")> don't include the EvalBeforeAssigningBit. The Flags member of [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions.") is then imported from the internal::traits by the EIGEN\_GENERIC\_PUBLIC\_INTERFACE macro. Anyway, here the template parameter EvalBeforeAssigning has the value `false`.

 NeedToTranspose is here for the case where the user wants to copy a row-vector into a column-vector. We allow this as a special exception to the general rule that in assignments we require the dimesions to match. Anyway, here both the left-hand and right-hand sides are column vectors, in the sense that ColsAtCompileTime is equal to 1. So NeedToTranspose is `false` too.

 So, here we are in the partial specialization: 



```
internal::assign_selector<Derived, OtherDerived, false, false>

```

Here's how it is defined: 



```
template<typename Derived, typename OtherDerived>
struct internal::assign_selector<Derived,OtherDerived,false,false> {
  static Derived& run(Derived& dst, const OtherDerived& other) { return dst.lazyAssign(other.derived()); }
};

```

OK so now our next job is to understand how lazyAssign works :)

 
```
template<typename Derived>
template<typename OtherDerived>
inline Derived& [MatrixBase<Derived>](classeigen_1_1densebase#a6bc6c096e3bfc726f28315daecd21b3f)
 [::lazyAssign](classeigen_1_1densebase#a6bc6c096e3bfc726f28315daecd21b3f)(const MatrixBase<OtherDerived>& other)
{
  EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Derived,OtherDerived)
  eigen_assert(rows() == other.rows() && cols() == other.cols());
  internal::assign_impl<Derived, OtherDerived>::run(derived(),other.derived());
  return derived();
}
```

What do we see here? Some assertions, and then the only interesting line is: 



```
internal::assign_impl<Derived, OtherDerived>::run(derived(),other.derived());

```

OK so now we want to know what is inside internal::assign\_impl.

 Here is its declaration: 



```
template<typename Derived1, typename Derived2,
         int Vectorization = internal::assign_traits<Derived1, Derived2>::Vectorization,
         int Unrolling = internal::assign_traits<Derived1, Derived2>::Unrolling>
struct internal::assign_impl;

```

 Again, internal::assign\_selector takes 4 template parameters, but the 2 last ones are automatically determined by the 2 first ones.

 These two parameters *Vectorization* and *Unrolling* are determined by a helper class internal::assign\_traits. Its job is to determine which vectorization strategy to use (that is *Vectorization*) and which unrolling strategy to use (that is *Unrolling*).

 We'll not enter into the details of how these strategies are chosen (this is in the implementation of internal::assign\_traits at the top of the same file). Let's just say that here *Vectorization* has the value *LinearVectorization*, and *Unrolling* has the value *NoUnrolling* (the latter is obvious since our vectors have dynamic size so there's no way to unroll the loop at compile-time).

 So the partial specialization of internal::assign\_impl that we're looking at is: 



```
internal::assign_impl<Derived1, Derived2, LinearVectorization, NoUnrolling>

```

Here is how it's defined: 



```
template<typename Derived1, typename Derived2>
struct internal::assign_impl<Derived1, Derived2, LinearVectorization, NoUnrolling>
{
  static void run(Derived1 &dst, const Derived2 &src)
  {
    const int size = dst.size();
    const int packetSize = internal::packet_traits<typename Derived1::Scalar>::size;
    const int alignedStart = internal::assign_traits<Derived1,Derived2>::DstIsAligned ? 0
                           : internal::first_aligned(&dst.coeffRef(0), size);
    const int alignedEnd = alignedStart + ((size-alignedStart)/packetSize)*packetSize;
 
    for(int index = 0; index < alignedStart; index++)
      dst.copyCoeff(index, src);
 
    for(int index = alignedStart; index < alignedEnd; index += packetSize)
    {
      dst.template copyPacket<Derived2, Aligned, internal::assign_traits<Derived1,Derived2>::SrcAlignment>(index, src);
    }
 
    for(int index = alignedEnd; index < size; index++)
      dst.copyCoeff(index, src);
  }
};

```

Here's how it works. *LinearVectorization* means that the left-hand and right-hand side expression can be accessed linearly i.e. you can refer to their coefficients by one integer *index*, as opposed to having to refer to its coefficients by two integers *row*, *column*.

 As we said at the beginning, vectorization works with blocks of 4 floats. Here, *PacketSize* is 4.

 There are two potential problems that we need to deal with: 


* first, vectorization works much better if the packets are 128-bit-aligned. This is especially important for write access. So when writing to the coefficients of *dst*, we want to group these coefficients by packets of 4 such that each of these packets is 128-bit-aligned. In general, this requires to skip a few coefficients at the beginning of *dst*. This is the purpose of *alignedStart*. We then copy these first few coefficients one by one, not by packets. However, in our case, the *dst* expression is a VectorXf and remember that in the construction of the vectors we allocated aligned arrays. Thanks to *DstIsAligned*, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") remembers that without having to do any runtime check, so *alignedStart* is zero and this part is avoided altogether.
* second, the number of coefficients to copy is not in general a multiple of *packetSize*. Here, there are 50 coefficients to copy and *packetSize* is 4. So we'll have to copy the last 2 coefficients one by one, not by packets. Here, *alignedEnd* is 48.

 Now come the actual loops.

 First, the vectorized part: the 48 first coefficients out of 50 will be copied by packets of 4: 



```
for(int index = alignedStart; index < alignedEnd; index += packetSize)
{
  dst.template copyPacket<Derived2, Aligned, internal::assign_traits<Derived1,Derived2>::SrcAlignment>(index, src);
}

```

What is copyPacket? It is defined in src/Core/Coeffs.h: 



```
template<typename Derived>
template<typename OtherDerived, int StoreMode, int LoadMode>
inline void MatrixBase<Derived>::copyPacket(int index, const MatrixBase<OtherDerived>& other)
{
  eigen_internal_assert(index >= 0 && index < size());
  derived().template writePacket<StoreMode>(index,
    other.derived().template packet<LoadMode>(index));
}

```

OK, what are writePacket() and packet() here?

 First, writePacket() here is a method on the left-hand side VectorXf. So we go to [src/Core/Matrix.h](https://eigen.tuxfamily.org/dox/Matrix_8h_source.html) to look at its definition: 



```
template<int StoreMode>
inline void writePacket(int index, const PacketScalar& x)
{
  internal::pstoret<Scalar, PacketScalar, StoreMode>(m_storage.data() + index, x);
}

```

 Here, *StoreMode* is *[Aligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ae12d0f8f869c40c76128260af2242bc8)*, indicating that we are doing a 128-bit-aligned write access, *PacketScalar* is a type representing a "SSE packet of 4 floats" and internal::pstoret is a function writing such a packet in memory. Their definitions are architecture-specific, we find them in [src/Core/arch/SSE/PacketMath.h](https://eigen.tuxfamily.org/dox/SSE_2PacketMath_8h_source.html):

 The line in [src/Core/arch/SSE/PacketMath.h](https://eigen.tuxfamily.org/dox/SSE_2PacketMath_8h_source.html) that determines the PacketScalar type (via a typedef in [Matrix.h](https://eigen.tuxfamily.org/dox/Matrix_8h_source.html)) is: 



```
template<> struct internal::packet_traits<float>  { typedef __m128  type; enum {size=4}; };

```

 Here, \_\_m128 is a SSE-specific type. Notice that the enum *size* here is what was used to define *packetSize* above.

 And here is the implementation of internal::pstoret: 



```
template<> inline void internal::pstore(float*  to, const __m128&  from) { _mm_store_ps(to, from); }

```

 Here, \_\_mm\_store\_ps is a SSE-specific intrinsic function, representing a single SSE instruction. The difference between internal::pstore and internal::pstoret is that internal::pstoret is a dispatcher handling both the aligned and unaligned cases, you find its definition in [src/Core/GenericPacketMath.h](https://eigen.tuxfamily.org/dox/GenericPacketMath_8h_source.html): 



```
template<typename Scalar, typename Packet, int LoadMode>
inline void internal::pstoret(Scalar* to, const Packet& from)
{
  if(LoadMode == [Aligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ae12d0f8f869c40c76128260af2242bc8))
    internal::pstore(to, from);
  else
    internal::pstoreu(to, from);
}
```

OK, that explains how writePacket() works. Now let's look into the packet() call. Remember that we are analyzing this line of code inside copyPacket(): 



```
derived().template writePacket<StoreMode>(index,
    other.derived().template packet<LoadMode>(index));

```

Here, *other* is our sum expression *v* + *w*. The .derived() is just casting from [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") to the subclass which here is [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions."). So let's go to [src/Core/CwiseBinaryOp.h](https://eigen.tuxfamily.org/dox/CwiseBinaryOp_8h_source.html): 



```
class CwiseBinaryOp
{
  // ...
    template<int LoadMode>
    inline PacketScalar packet(int index) const
 {
      return m_functor.packetOp(m_lhs.template packet<LoadMode>(index), m_rhs.template packet<LoadMode>(index));
    }
};

```

 Here, *m\_lhs* is the vector *v*, and *m\_rhs* is the vector *w*. So the packet() function here is Matrix::packet(). The template parameter *LoadMode* is *[Aligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ae12d0f8f869c40c76128260af2242bc8)*. So we're looking at 



```
class Matrix
{
  // ...
    template<int LoadMode>
    inline PacketScalar packet(int index) const
 {
      return internal::ploadt<Scalar, LoadMode>(m_storage.data() + index);
    }
};

```

 We let you look up the definition of internal::ploadt in [GenericPacketMath.h](https://eigen.tuxfamily.org/dox/GenericPacketMath_8h_source.html) and the internal::pload in [src/Core/arch/SSE/PacketMath.h](https://eigen.tuxfamily.org/dox/SSE_2PacketMath_8h_source.html). It is very similar to the above for internal::pstore.

 Let's go back to CwiseBinaryOp::packet(). Once the packets from the vectors *v* and *w* have been returned, what does this function do? It calls m\_functor.packetOp() on them. What is m\_functor? Here we must remember what particular template specialization of [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions.") we're dealing with: 



```
CwiseBinaryOp<internal::scalar_sum_op<float>, VectorXf, VectorXf>

```

 So m\_functor is an object of the empty class internal::scalar\_sum\_op<float>. As we mentioned above, don't worry about why we constructed an object of this empty class at all – it's an implementation detail, the point is that some other functors need to store member data.

 Anyway, internal::scalar\_sum\_op is defined in src/Core/Functors.h: 



```
template<typename Scalar> struct internal::scalar_sum_op EIGEN_EMPTY_STRUCT {
  inline const Scalar operator() (const Scalar& a, const Scalar& b) const { return a + b; }
  template<typename PacketScalar>
  inline const PacketScalar packetOp(const PacketScalar& a, const PacketScalar& b) const
 { return internal::padd(a,b); }
};

```

 As you can see, all what packetOp() does is to call internal::padd on the two packets. Here is the definition of internal::padd from [src/Core/arch/SSE/PacketMath.h](https://eigen.tuxfamily.org/dox/SSE_2PacketMath_8h_source.html): 



```
template<> inline __m128  internal::padd(const __m128&  a, const __m128&  b) { return _mm_add_ps(a,b); }

```

 Here, \_mm\_add\_ps is a SSE-specific intrinsic function, representing a single SSE instruction.

 To summarize, the loop 



```
for(int index = alignedStart; index < alignedEnd; index += packetSize)
{
  dst.template copyPacket<Derived2, Aligned, internal::assign_traits<Derived1,Derived2>::SrcAlignment>(index, src);
}

```

 has been compiled to the following code: for *index* going from 0 to the 11 ( = 48/4 - 1), read the i-th packet (of 4 floats) from the vector v and the i-th packet from the vector w using two \_\_mm\_load\_ps SSE instructions, then add them together using a \_\_mm\_add\_ps instruction, then store the result using a \_\_mm\_store\_ps instruction.

 There remains the second loop handling the last few (here, the last 2) coefficients: 



```
for(int index = alignedEnd; index < size; index++)
  dst.copyCoeff(index, src);

```

 However, it works just like the one we just explained, it is just simpler because there is no SSE vectorization involved here. copyPacket() becomes copyCoeff(), packet() becomes coeff(), writePacket() becomes coeffRef(). If you followed us this far, you can probably understand this part by yourself.

 We see that all the C++ abstraction of [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") goes away during compilation and that we indeed are precisely controlling which assembly instructions we emit. Such is the beauty of C++! Since we have such precise control over the emitted assembly instructions, but such complex logic to choose the right instructions, we can say that [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") really behaves like an optimizing compiler. If you prefer, you could say that [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") behaves like a script for the compiler. In a sense, C++ template metaprogramming is scripting the compiler – and it's been shown that this scripting language is Turing-complete. See [Wikipedia](http://en.wikipedia.org/wiki/Template_metaprogramming). 

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TopicInsideEigenExample.html>

Eigen::BiCGSTAB
===============

  
### template<typename \_MatrixType, typename \_Preconditioner> class Eigen::BiCGSTAB< \_MatrixType, \_Preconditioner >

 A bi conjugate gradient stabilized solver for sparse square problems. 

 This class allows to solve for A.x = b sparse linear problems using a bi conjugate gradient stabilized algorithm. The vectors x and b can be either dense or sparse.

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the sparse matrix A, can be a dense or a sparse matrix.  |
| \_Preconditioner | the type of the preconditioner. Default is [DiagonalPreconditioner](classeigen_1_1diagonalpreconditioner "A preconditioner based on the digonal entries.") |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 The maximal number of iterations and tolerance value can be controlled via the [setMaxIterations()](classeigen_1_1iterativesolverbase#af83de7a7d31d9d4bd1fef6222b07335b) and [setTolerance()](classeigen_1_1iterativesolverbase#ac160a444af8998f93da9aa30e858470d) methods. The defaults are the size of the problem for the maximal number of iterations and NumTraits<Scalar>::epsilon() for the tolerance.

 The tolerance corresponds to the relative residual error: |Ax-b|/|b|

 **Performance:** when using sparse matrices, best performance is achied for a row-major sparse matrix format. Moreover, in this case multi-threading can be exploited if the user code is compiled with OpenMP enabled. See [Eigen and multi-threading](topicmultithreading) for details.

 This class can be used as the direct solver classes. Here is a typical usage example: 



```
  int n = 10000;
  VectorXd x(n), b(n);
  SparseMatrix<double> A(n,n);
  /\* ... fill A and b ... \*/ 
  BiCGSTAB<SparseMatrix<double> > solver;
  solver.compute(A);
  x = solver.solve(b);
  std::cout << "#iterations: " << solver.iterations() << std::endl;
  std::cout << "estimated error: " << solver.error()      << std::endl;
  /\* ... update b ... \*/
  x = solver.solve(b); // solve again

```

By default the iterations start with x=0 as an initial guess of the solution. One can control the start using the [solveWithGuess()](classeigen_1_1iterativesolverbase#adcc18d1ab283786dcbb5a3f63f4b4bd8) method.

 [BiCGSTAB](classeigen_1_1bicgstab "A bi conjugate gradient stabilized solver for sparse square problems.") can also be used in a matrix-free context, see the following [example](group__matrixfreesolverexample) .

 
See also
class [SimplicialCholesky](classeigen_1_1simplicialcholesky), [DiagonalPreconditioner](classeigen_1_1diagonalpreconditioner "A preconditioner based on the digonal entries."), [IdentityPreconditioner](classeigen_1_1identitypreconditioner "A naive preconditioner which approximates any matrix as the identity matrix.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
|  | [BiCGSTAB](classeigen_1_1bicgstab#ae1a0df6ef6e947256c3cb83ce7df7eda) () |
|  |
| template<typename MatrixDerived >  |
|  | [BiCGSTAB](classeigen_1_1bicgstab#a5842afd9566e254bc727de1fd7f46362) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| - Public Member Functions inherited from [Eigen::IterativeSolverBase< BiCGSTAB< \_MatrixType, \_Preconditioner > >](classeigen_1_1iterativesolverbase) |
| [BiCGSTAB](classeigen_1_1bicgstab)< \_MatrixType, \_Preconditioner > &  | [analyzePattern](classeigen_1_1iterativesolverbase#a3f684fb41019ca04d97ddc08a0d8be2e) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| [BiCGSTAB](classeigen_1_1bicgstab)< \_MatrixType, \_Preconditioner > &  | [compute](classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| RealScalar  | [error](classeigen_1_1iterativesolverbase#a117c241af3fb1141ad0916a3cf3157ec) () const |
|  |
| [BiCGSTAB](classeigen_1_1bicgstab)< \_MatrixType, \_Preconditioner > &  | [factorize](classeigen_1_1iterativesolverbase#a1374b141721629983cd8276b4b87fc58) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1iterativesolverbase#a0d6b459433a316b4f12d48e5c80d61fe) () const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [iterations](classeigen_1_1iterativesolverbase#ae778dd098bd5e6655625b20b1e9f15da) () const |
|  |
|  | [IterativeSolverBase](classeigen_1_1iterativesolverbase#a0922f2be45082690d7734aa6732fc493) () |
|  |
|  | [IterativeSolverBase](classeigen_1_1iterativesolverbase#a3c68fe3cd929ea1ff8a0d4cbcd65ebad) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [maxIterations](classeigen_1_1iterativesolverbase#a168a74c8dceb6233b220031fdd756ba0) () const |
|  |
| Preconditioner &  | [preconditioner](classeigen_1_1iterativesolverbase#a5e88f2a323a2900205cf807af94f8051) () |
|  |
| const Preconditioner &  | [preconditioner](classeigen_1_1iterativesolverbase#a709a056e17c49b5272e4971bc376cbe4) () const |
|  |
| [BiCGSTAB](classeigen_1_1bicgstab)< \_MatrixType, \_Preconditioner > &  | [setMaxIterations](classeigen_1_1iterativesolverbase#af83de7a7d31d9d4bd1fef6222b07335b) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) maxIters) |
|  |
| [BiCGSTAB](classeigen_1_1bicgstab)< \_MatrixType, \_Preconditioner > &  | [setTolerance](classeigen_1_1iterativesolverbase#ac160a444af8998f93da9aa30e858470d) (const RealScalar &[tolerance](classeigen_1_1iterativesolverbase#acb442c19b5858d6b9be813dd7d36cc62)) |
|  |
| const [SolveWithGuess](classeigen_1_1solvewithguess)< [BiCGSTAB](classeigen_1_1bicgstab)< \_MatrixType, \_Preconditioner >, Rhs, Guess >  | [solveWithGuess](classeigen_1_1iterativesolverbase#adcc18d1ab283786dcbb5a3f63f4b4bd8) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b, const Guess &x0) const |
|  |
| RealScalar  | [tolerance](classeigen_1_1iterativesolverbase#acb442c19b5858d6b9be813dd7d36cc62) () const |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< Derived >](classeigen_1_1sparsesolverbase) |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

  BiCGSTAB() [1/2]
----------------

    template<typename \_MatrixType , typename \_Preconditioner >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::BiCGSTAB](classeigen_1_1bicgstab)< \_MatrixType, \_Preconditioner >::[BiCGSTAB](classeigen_1_1bicgstab) | ( |  | ) |  |

 | inline |

 
 Default constructor. 

    BiCGSTAB() [2/2]
----------------

    template<typename \_MatrixType , typename \_Preconditioner >   template<typename MatrixDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::BiCGSTAB](classeigen_1_1bicgstab)< \_MatrixType, \_Preconditioner >::[BiCGSTAB](classeigen_1_1bicgstab) | ( | const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &  | *A* | ) |  |

 | inlineexplicit |

 
 Initialize the solver with matrix *A* for further `Ax=b` solving.

 This constructor is a shortcut for the default constructor followed by a call to [compute()](classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914).

 
Warning
this class stores a reference to the matrix A as well as some precomputed values that depend on it. Therefore, if *A* is changed this class becomes invalid. Call [compute()](classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914) to update it with the new matrix A, or modify a copy of A. 
   

---

The documentation for this class was generated from the following file:* [BiCGSTAB.h](https://eigen.tuxfamily.org/dox/BiCGSTAB_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1BiCGSTAB.html>

Eigen::Block
============

  
### template<typename XprType, int BlockRows, int BlockCols, bool InnerPanel> class Eigen::Block< XprType, BlockRows, BlockCols, InnerPanel >

 Expression of a fixed-size or dynamic-size block. 

 
Template Parameters
 

|  |  |
| --- | --- |
| XprType | the type of the expression in which we are taking a block  |
| BlockRows | the number of rows of the block we are taking at compile time (optional)  |
| BlockCols | the number of columns of the block we are taking at compile time (optional)  |
| InnerPanel | is true, if the block maps to a set of rows of a row major matrix or to set of columns of a column major matrix (optional). The parameter allows to determine at compile time whether aligned access is possible on the block expression. |

   This class represents an expression of either a fixed-size or dynamic-size block. It is the return type of DenseBase::block(Index,Index,Index,Index) and DenseBase::block<int,int>(Index,Index) and most of the time this is the only way it is used.

 However, if you want to directly maniputate block expressions, for instance if you want to write a function returning such an expression, you will need to use this class.

 Here is an example illustrating the dynamic case: 



```
#include <Eigen/Core>
#include <iostream>
using namespace [Eigen](namespaceeigen);
using namespace std;
 
template<typename Derived>
[Eigen::Block<Derived>](classeigen_1_1block)
topLeftCorner(MatrixBase<Derived>& m, int rows, int cols)
{
  return [Eigen::Block<Derived>](classeigen_1_1block)(m.derived(), 0, 0, rows, cols);
}
 
template<typename Derived>
const [Eigen::Block<const Derived>](classeigen_1_1block)
topLeftCorner(const MatrixBase<Derived>& m, int rows, int cols)
{
  return [Eigen::Block<const Derived>](classeigen_1_1block)(m.derived(), 0, 0, rows, cols);
}
 
int main(int, char**)
{
  Matrix4d m = [Matrix4d::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)();
  cout << topLeftCorner(4*m, 2, 3) << endl; // calls the const version
  topLeftCorner(m, 2, 3) *= 5;              // calls the non-const version
  cout << "Now the matrix m is:" << endl << m << endl;
  return 0;
}
```

 Output: 



```
4 0 0
0 4 0
Now the matrix m is:
5 0 0 0
0 5 0 0
0 0 1 0
0 0 0 1

```


Note
Even though this expression has dynamic size, in the case where *XprType* has fixed size, this expression inherits a fixed maximal size which means that evaluating it does not cause a dynamic memory allocation.
 Here is an example illustrating the fixed-size case: 



```
#include <Eigen/Core>
#include <iostream>
using namespace [Eigen](namespaceeigen);
using namespace std;
 
template<typename Derived>
[Eigen::Block<Derived, 2, 2>](classeigen_1_1block)
topLeft2x2Corner(MatrixBase<Derived>& m)
{
  return [Eigen::Block<Derived, 2, 2>](classeigen_1_1block)(m.derived(), 0, 0);
}
 
template<typename Derived>
const [Eigen::Block<const Derived, 2, 2>](classeigen_1_1block)
topLeft2x2Corner(const MatrixBase<Derived>& m)
{
  return [Eigen::Block<const Derived, 2, 2>](classeigen_1_1block)(m.derived(), 0, 0);
}
 
int main(int, char**)
{
  Matrix3d m = [Matrix3d::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)();
  cout << topLeft2x2Corner(4*m) << endl; // calls the const version
  topLeft2x2Corner(m) *= 2;              // calls the non-const version
  cout << "Now the matrix m is:" << endl << m << endl;
  return 0;
}

```

 Output: 



```
4 0
0 4
Now the matrix m is:
2 0 0
0 2 0
0 0 1

```


See also
DenseBase::block(Index,Index,Index,Index), DenseBase::block(Index,Index), class [VectorBlock](classeigen_1_1vectorblock "Expression of a fixed-size or dynamic-size sub-vector.") 
  Inherits Eigen::BlockImpl< XprType, BlockRows, BlockCols, InnerPanel, internal::traits< XprType >::StorageKind >.

 

|  |
| --- |
|  |
|  | [Block](classeigen_1_1block#aebf8889be487c3fd556ffc32ba97cb0a) (XprType &xpr, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) i) |
|  |
|  | [Block](classeigen_1_1block#a66685b5f860015fd2e752489213dc0a9) (XprType &xpr, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) startRow, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) startCol) |
|  |
|  | [Block](classeigen_1_1block#a7203a3c88122d60221c3730517fff607) (XprType &xpr, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) startRow, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) startCol, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) blockRows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) blockCols) |
|  |

  Block() [1/3]
-------------

    template<typename XprType , int BlockRows, int BlockCols, bool InnerPanel>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Block](classeigen_1_1block)< XprType, BlockRows, BlockCols, InnerPanel >::[Block](classeigen_1_1block) | ( | XprType &  | *xpr*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *i* |
|  | ) |  |  |

 | inline |

 
 Column or Row constructor 

    Block() [2/3]
-------------

    template<typename XprType , int BlockRows, int BlockCols, bool InnerPanel>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Block](classeigen_1_1block)< XprType, BlockRows, BlockCols, InnerPanel >::[Block](classeigen_1_1block) | ( | XprType &  | *xpr*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *startRow*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *startCol* |
|  | ) |  |  |

 | inline |

 
 Fixed-size constructor 

    Block() [3/3]
-------------

    template<typename XprType , int BlockRows, int BlockCols, bool InnerPanel>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Block](classeigen_1_1block)< XprType, BlockRows, BlockCols, InnerPanel >::[Block](classeigen_1_1block) | ( | XprType &  | *xpr*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *startRow*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *startCol*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *blockRows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *blockCols* |
|  | ) |  |  |

 | inline |

 
 Dynamic-size constructor 

   

---

The documentation for this class was generated from the following file:* [Block.h](https://eigen.tuxfamily.org/dox/Block_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Block.html>

Eigen::BlockImpl
================

  
### template<typename XprType, int BlockRows, int BlockCols, bool InnerPanel> class Eigen::BlockImpl< XprType, BlockRows, BlockCols, InnerPanel, Sparse >

 Generic implementation of sparse [Block](classeigen_1_1block "Expression of a fixed-size or dynamic-size block.") expression. Real-only. 

     ![Inheritance graph]       

|  |
| --- |
|  |
|  | [BlockImpl](classeigen_1_1blockimpl_3_01xprtype_00_01blockrows_00_01blockcols_00_01innerpanel_00_01sparse_01_4#aa724feeda73e4d5d2330c6dced2d18f9) (XprType &xpr, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) i) |
|  |
|  | [BlockImpl](classeigen_1_1blockimpl_3_01xprtype_00_01blockrows_00_01blockcols_00_01innerpanel_00_01sparse_01_4#a2fe461bd49f27e586b7d0e652e370644) (XprType &xpr, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) startRow, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) startCol, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) blockRows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) blockCols) |
|  |
| - Public Member Functions inherited from [Eigen::SparseMatrixBase< Block< XprType, BlockRows, BlockCols, InnerPanel > >](classeigen_1_1sparsematrixbase) |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1sparsematrixbase#aca7ce296424ef6e478ab0fb19547a7ee) () const |
|  |
| const internal::eval< [Block](classeigen_1_1block)< XprType, BlockRows, BlockCols, InnerPanel > >::type  | [eval](classeigen_1_1sparsematrixbase#a761bd872a06b59632fcff7b7807a77ce) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1sparsematrixbase#a180fcba1ccf3cdf3252a263bc1de7a1d) () const |
|  |
| bool  | [isVector](classeigen_1_1sparsematrixbase#a7eedffa867031f649fd0fb9cc23ce4be) () const |
|  |
| const [Product](classeigen_1_1product)< [Block](classeigen_1_1block)< XprType, BlockRows, BlockCols, InnerPanel >, OtherDerived, AliasFreeProduct >  | [operator\*](classeigen_1_1sparsematrixbase#a9d4d71b3f34389e6fc01f2b86e43f7a4) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &other) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1sparsematrixbase#ac86cc88a4cfef21db6b64ec0ab4c8f0a) () const |
|  |
| const [SparseView](classeigen_1_1sparseview)< [Block](classeigen_1_1block)< XprType, BlockRows, BlockCols, InnerPanel > >  | [pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d) (const Scalar &reference=Scalar(0), const RealScalar &epsilon=[NumTraits](structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1sparsematrixbase#a1944e9fa9ce7937bfc3a87b2cb94371f) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1sparsematrixbase#a124bc57921775eb9aa2dfd9727e23472) () const |
|  |
| SparseSymmetricPermutationProduct< [Block](classeigen_1_1block)< XprType, BlockRows, BlockCols, InnerPanel >, Upper|Lower >  | [twistedBy](classeigen_1_1sparsematrixbase#a51d4898bd6a57cc3ba543a39b102423e) (const [PermutationMatrix](classeigen_1_1permutationmatrix)< Dynamic, Dynamic, [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) > &perm) const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Block< XprType, BlockRows, BlockCols, InnerPanel > >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| [Block](classeigen_1_1block)< XprType, BlockRows, BlockCols, InnerPanel > &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const [Block](classeigen_1_1block)< XprType, BlockRows, BlockCols, InnerPanel > &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::SparseMatrixBase< Block< XprType, BlockRows, BlockCols, InnerPanel > >](classeigen_1_1sparsematrixbase) |
| typedef internal::traits< [Block](classeigen_1_1block)< XprType, BlockRows, BlockCols, InnerPanel > >::[StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) | [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) |
|  |
| typedef Scalar  | [value\_type](classeigen_1_1sparsematrixbase#ac254d3b61718ebc2136d27bac043dcb7) |
|  |
| - Public Types inherited from [Eigen::EigenBase< Block< XprType, BlockRows, BlockCols, InnerPanel > >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  BlockImpl() [1/2]
-----------------

    template<typename XprType , int BlockRows, int BlockCols, bool InnerPanel>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Eigen::BlockImpl< XprType, BlockRows, BlockCols, InnerPanel, [Sparse](structeigen_1_1sparse) >::BlockImpl  | ( | XprType &  | *xpr*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *i* |
|  | ) |  |  |

 | inline |

 
 Column or Row constructor 

    BlockImpl() [2/2]
-----------------

    template<typename XprType , int BlockRows, int BlockCols, bool InnerPanel>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Eigen::BlockImpl< XprType, BlockRows, BlockCols, InnerPanel, [Sparse](structeigen_1_1sparse) >::BlockImpl  | ( | XprType &  | *xpr*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *startRow*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *startCol*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *blockRows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *blockCols* |
|  | ) |  |  |

 | inline |

 
 Dynamic-size constructor 

   

---

The documentation for this class was generated from the following file:* [SparseBlock.h](https://eigen.tuxfamily.org/dox/SparseBlock_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1BlockImpl_3_01XprType_00_01BlockRows_00_01BlockCols_00_01InnerPanel_00_01Sparse_01_4.html>

Eigen::CholmodBase
==================

  
### template<typename \_MatrixType, int \_UpLo, typename Derived> class Eigen::CholmodBase< \_MatrixType, \_UpLo, Derived >

 The base class for the direct Cholesky factorization of Cholmod. 

 
See also
class [CholmodSupernodalLLT](classeigen_1_1cholmodsupernodalllt "A supernodal Cholesky (LLT) factorization and solver based on Cholmod."), class [CholmodSimplicialLDLT](classeigen_1_1cholmodsimplicialldlt "A simplicial direct Cholesky (LDLT) factorization and solver based on Cholmod."), class [CholmodSimplicialLLT](classeigen_1_1cholmodsimplicialllt "A simplicial direct Cholesky (LLT) factorization and solver based on Cholmod.") 
     ![Inheritance graph]      

|  |
| --- |
|  |
| void  | [analyzePattern](classeigen_1_1cholmodbase#a5ac967e9f4ccfc43ca9e610b89232c24) (const MatrixType &matrix) |
|  |
| cholmod\_common &  | [cholmod](classeigen_1_1cholmodbase#a6a85bf52d6aa480240a64f277d7f96c6) () |
|  |
| Derived &  | [compute](classeigen_1_1cholmodbase#abaf5be01b1e3035a4de0b19f5b63549e) (const MatrixType &matrix) |
|  |
| Scalar  | [determinant](classeigen_1_1cholmodbase#ab4ffb4a9735ad7e81a01d5789ce96547) () const |
|  |
| void  | [factorize](classeigen_1_1cholmodbase#a5bd9c9ec4d1c15f202a6c66b5e9ef37b) (const MatrixType &matrix) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1cholmodbase#ada4cc43c64767d186fcb8997440cc753) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1cholmodbase#ada4cc43c64767d186fcb8997440cc753) |
|  |
| Scalar  | [logDeterminant](classeigen_1_1cholmodbase#a597f7839a39604af18a8741a0d8c46bf) () const |
|  |
| Derived &  | [setShift](classeigen_1_1cholmodbase#a886fc102723ca7bde4ac7162dfd72f5d) (const RealScalar &offset) |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< Derived >](classeigen_1_1sparsesolverbase) |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

  analyzePattern()
----------------

    template<typename \_MatrixType , int \_UpLo, typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::CholmodBase](classeigen_1_1cholmodbase)< \_MatrixType, \_UpLo, Derived >::analyzePattern  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Performs a symbolic decomposition on the sparsity pattern of *matrix*.

 This function is particularly useful when solving for several problems having the same structure.

 
See also

[factorize()](classeigen_1_1cholmodbase#a5bd9c9ec4d1c15f202a6c66b5e9ef37b) 
    cholmod()
---------

    template<typename \_MatrixType , int \_UpLo, typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| cholmod\_common& [Eigen::CholmodBase](classeigen_1_1cholmodbase)< \_MatrixType, \_UpLo, Derived >::cholmod  | ( |  | ) |  |

 | inline |

 
 Returns a reference to the Cholmod's configuration structure to get a full control over the performed operations. See the Cholmod user guide for details. 

    compute()
---------

    template<typename \_MatrixType , int \_UpLo, typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::CholmodBase](classeigen_1_1cholmodbase)< \_MatrixType, \_UpLo, Derived >::compute  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Computes the sparse Cholesky decomposition of *matrix* 

    determinant()
-------------

    template<typename \_MatrixType , int \_UpLo, typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar [Eigen::CholmodBase](classeigen_1_1cholmodbase)< \_MatrixType, \_UpLo, Derived >::determinant  | ( |  | ) |  const |

 | inline |

 
 
Returns
the determinant of the underlying matrix from the current factorization 
    factorize()
-----------

    template<typename \_MatrixType , int \_UpLo, typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::CholmodBase](classeigen_1_1cholmodbase)< \_MatrixType, \_UpLo, Derived >::factorize  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Performs a numeric decomposition of *matrix* 

 The given matrix must have the same sparsity pattern as the matrix on which the symbolic decomposition has been performed.

 
See also

[analyzePattern()](classeigen_1_1cholmodbase#a5ac967e9f4ccfc43ca9e610b89232c24) 
    info()
------

    template<typename \_MatrixType , int \_UpLo, typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::CholmodBase](classeigen_1_1cholmodbase)< \_MatrixType, \_UpLo, Derived >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether previous computation was successful. 

 
Returns

`Success` if computation was successful, `NumericalIssue` if the matrix.appears to be negative. 
    logDeterminant()
----------------

    template<typename \_MatrixType , int \_UpLo, typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar [Eigen::CholmodBase](classeigen_1_1cholmodbase)< \_MatrixType, \_UpLo, Derived >::logDeterminant  | ( |  | ) |  const |

 | inline |

 
 
Returns
the log determinant of the underlying matrix from the current factorization 
    setShift()
----------

    template<typename \_MatrixType , int \_UpLo, typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::CholmodBase](classeigen_1_1cholmodbase)< \_MatrixType, \_UpLo, Derived >::setShift  | ( | const RealScalar &  | *offset* | ) |  |

 | inline |

 
 Sets the shift parameter that will be used to adjust the diagonal coefficients during the numerical factorization.

 During the numerical factorization, an offset term is added to the diagonal coefficients:  
 `d_ii` = *offset* + `d_ii` 

 The default is *offset=0*.

 
Returns
a reference to `*this`. 
   

---

The documentation for this class was generated from the following file:* [CholmodSupport.h](https://eigen.tuxfamily.org/dox/CholmodSupport_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1CholmodBase.html>

Eigen::COLAMDOrdering
=====================

  
### template<typename StorageIndex> class Eigen::COLAMDOrdering< StorageIndex >

 
Template Parameters
 

|  |  |
| --- | --- |
| StorageIndex | The type of indices of the matrix |

   Functor computing the *column* *approximate* *minimum* *degree* ordering The matrix should be in column-major and **compressed** format (see [SparseMatrix::makeCompressed()](classeigen_1_1sparsematrix#a5ff54ffc10296f9466dc81fa888733fd)). 

 


|  |
| --- |
|  |
| template<typename MatrixType >  |
| void  | [operator()](classeigen_1_1colamdordering#a708cb20191dcd79856d922f262405946) (const MatrixType &mat, [PermutationType](classeigen_1_1permutationmatrix) &perm) |
|  |

  operator()()
------------

    template<typename StorageIndex >   template<typename MatrixType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::COLAMDOrdering](classeigen_1_1colamdordering)< StorageIndex >::operator()  | ( | const MatrixType &  | *mat*,  |
|  |  | [PermutationType](classeigen_1_1permutationmatrix) &  | *perm* |
|  | ) |  |  |

 | inline |

 
 Compute the permutation vector *perm* form the sparse matrix *mat* 



Warning
The input sparse matrix *mat* must be in compressed mode (see [SparseMatrix::makeCompressed()](classeigen_1_1sparsematrix#a5ff54ffc10296f9466dc81fa888733fd)). 
   

---

The documentation for this class was generated from the following file:* [Ordering.h](https://eigen.tuxfamily.org/dox/Ordering_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1COLAMDOrdering.html>

Eigen::VectorwiseOp
===================

  
### template<typename ExpressionType, int Direction> class Eigen::VectorwiseOp< ExpressionType, Direction >

 Pseudo expression providing broadcasting and partial reduction operations. 

 
Template Parameters
 

|  |  |
| --- | --- |
| ExpressionType | the type of the object on which to do partial reductions  |
| Direction | indicates whether to operate on columns ([Vertical](group__enums#ggad49a7b3738e273eb00932271b36127f7ae2efac6e74ecab5e3b0b1561c5ddf83e)) or rows ([Horizontal](group__enums#ggad49a7b3738e273eb00932271b36127f7a961c62410157b64033839488f4d7f7e4)) |

   This class represents a pseudo expression with broadcasting and partial reduction features. It is the return type of [DenseBase::colwise()](classeigen_1_1densebase#a1c0e1b6067ec1de6cb8799da55aa7d30) and [DenseBase::rowwise()](classeigen_1_1densebase#a6daa3a3156ca0e0722bf78638e1c7f28) and most of the time this is the only way it is explicitly used.

 To understand the logic of rowwise/colwise expression, let's consider a generic case `A.colwise().foo()` where `foo` is any method of `[VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations.")`. This expression is equivalent to applying `foo()` to each column of `A` and then re-assemble the outputs in a matrix expression: 



```
[A.col(0).foo(), A.col(1).foo(), ..., A.col(A.cols()-1).foo()] 

```

Example: 



```
Matrix3d m = [Matrix3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the sum of each column:" << endl << m.colwise().sum() << endl;
cout << "Here is the maximum absolute value of each column:"
     << endl << m.cwiseAbs().colwise().maxCoeff() << endl;
```

 Output: 



```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Here is the sum of each column:
  1.04  0.815 -0.238
Here is the maximum absolute value of each column:
 0.68 0.823 0.536

```

The [begin()](classeigen_1_1vectorwiseop#abbf3325f535ac011ed61f14ed4330618) and [end()](classeigen_1_1vectorwiseop#a9d189042b8322e40772d41c63b9d3bb5) methods are obviously exceptions to the previous rule as they return STL-compatible begin/end iterators to the rows or columns of the nested expression. Typical use cases include for-range-loop and calls to STL algorithms:

 Example: 



```
Matrix3i m = [Matrix3i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the initial matrix m:" << endl << m << endl;
int i = -1;
for(auto c: m.colwise()) {
  c *= i;
  ++i;
}
cout << "Here is the matrix m after the for-range-loop:" << endl << m << endl;
auto cols = m.colwise();
auto it = std::find_if(cols.cbegin(), cols.cend(),
                       [](Matrix3i::ConstColXpr x) { return x.squaredNorm() == 0; });
cout << "The first empty column is: " << distance(cols.cbegin(),it) << endl;

```

 Output: 



```
Here is the initial matrix m:
 7  6 -3
-2  9  6
 6 -6 -5
Here is the matrix m after the for-range-loop:
-7  0 -3
 2  0  6
-6  0 -5
The first empty column is: 1

```

For a partial reduction on an empty input, some rules apply. For the sake of clarity, let's consider a vertical reduction:


* If the number of columns is zero, then a 1x0 row-major vector expression is returned.
* Otherwise, if the number of rows is zero, then
	+ a row vector of zeros is returned for sum-like reductions (sum, squaredNorm, norm, etc.)
	+ a row vector of ones is returned for a product reduction (e.g., `MatrixXd(n,0).colwise().[prod()](classeigen_1_1vectorwiseop#a01bcd17504f30b55b4910ddb75598f79)`)
	+ an assert is triggered for all other reductions (minCoeff,maxCoeff,redux(bin\_op))

 
See also

[DenseBase::colwise()](classeigen_1_1densebase#a1c0e1b6067ec1de6cb8799da55aa7d30), [DenseBase::rowwise()](classeigen_1_1densebase#a6daa3a3156ca0e0722bf78638e1c7f28), class [PartialReduxExpr](classeigen_1_1partialreduxexpr "Generic expression of a partially reduxed matrix.") 
 


|  |
| --- |
|  |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1vectorwiseop#a4907c654e5810edd98e4162093b19532) |
|  |




|  |
| --- |
|  |
| const [AllReturnType](classeigen_1_1partialreduxexpr) | [all](classeigen_1_1vectorwiseop#a9c2b4740bf190492bf231d8e244b25c1) () const |
|  |
| const [AnyReturnType](classeigen_1_1partialreduxexpr) | [any](classeigen_1_1vectorwiseop#a96210c9f83bd375f8ce862bd62ab70e6) () const |
|  |
| [iterator](classeigen_1_1vectorwiseop#a9fb8aaf24528efcdac1782aacf99b8dd) | [begin](classeigen_1_1vectorwiseop#abbf3325f535ac011ed61f14ed4330618) () |
|  |
| [const\_iterator](classeigen_1_1vectorwiseop#a595c33d2a82427a1159568b0b8438554) | [begin](classeigen_1_1vectorwiseop#aaf91f2a57a26e88e7131fcd9c194f93f) () const |
|  |
| const [BlueNormReturnType](classeigen_1_1partialreduxexpr) | [blueNorm](classeigen_1_1vectorwiseop#a4d2fbc5296470a94379cbcb33bb9c24d) () const |
|  |
| [const\_iterator](classeigen_1_1vectorwiseop#a595c33d2a82427a1159568b0b8438554) | [cbegin](classeigen_1_1vectorwiseop#a7b237a2b46479de5c905d2bcc54f34c4) () const |
|  |
| [const\_iterator](classeigen_1_1vectorwiseop#a595c33d2a82427a1159568b0b8438554) | [cend](classeigen_1_1vectorwiseop#a57859b88a32b8b393a427c4cab3581a7) () const |
|  |
| const [CountReturnType](classeigen_1_1partialreduxexpr) | [count](classeigen_1_1vectorwiseop#a5c6b797457895f11a7682b3a16f263bb) () const |
|  |
| const\_reverse\_iterator  | [crbegin](classeigen_1_1vectorwiseop#aec95725eed4adb5ccf65fbb6e907d12e) () const |
|  |
| const\_reverse\_iterator  | [crend](classeigen_1_1vectorwiseop#a23fa202916349d11e476f459543395ef) () const |
|  |
| template<typename OtherDerived >  |
| const CrossReturnType  | [cross](group__geometry__module#ga2fe1a2a012ce0ab0e8da6af134073039) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| [iterator](classeigen_1_1vectorwiseop#a9fb8aaf24528efcdac1782aacf99b8dd) | [end](classeigen_1_1vectorwiseop#a9d189042b8322e40772d41c63b9d3bb5) () |
|  |
| [const\_iterator](classeigen_1_1vectorwiseop#a595c33d2a82427a1159568b0b8438554) | [end](classeigen_1_1vectorwiseop#ad3b0dcb34bb4903ffa1ab3634188ecff) () const |
|  |
| const [HNormalizedReturnType](classeigen_1_1cwisebinaryop) | [hnormalized](group__geometry__module#ga1f220045efa302626c287088b63b6ba9) () const |
|  | column or row-wise homogeneous normalization [More...](group__geometry__module#ga1f220045efa302626c287088b63b6ba9) |
|  |
| [HomogeneousReturnType](classeigen_1_1homogeneous) | [homogeneous](group__geometry__module#gaf99305a3d7432318236df7b80022df37) () const |
|  |
| const [HypotNormReturnType](classeigen_1_1partialreduxexpr) | [hypotNorm](classeigen_1_1vectorwiseop#a00c44e033eec33586ae8093a6366da75) () const |
|  |
| template<int p>  |
| const LpNormReturnType< p >::Type  | [lpNorm](classeigen_1_1vectorwiseop#aa9c2cad38085e7f5f9bc2598eff249f1) () const |
|  |
| const [MaxCoeffReturnType](classeigen_1_1partialreduxexpr) | [maxCoeff](classeigen_1_1vectorwiseop#a6646b584db116c1661b5bb56750bd6f6) () const |
|  |
| const MeanReturnType  | [mean](classeigen_1_1vectorwiseop#aaf7d867f9e6b74a1bc7f108d646cfa85) () const |
|  |
| const [MinCoeffReturnType](classeigen_1_1partialreduxexpr) | [minCoeff](classeigen_1_1vectorwiseop#a7d7b8c03d180b126fde0ac212e2b0b76) () const |
|  |
| const [NormReturnType](classeigen_1_1cwiseunaryop) | [norm](classeigen_1_1vectorwiseop#af726d1dfd9a7a67b76e639db1a9f352e) () const |
|  |
| void  | [normalize](classeigen_1_1vectorwiseop#adb1084153780dc8d2c062fee97651a45) () |
|  |
| [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_quotient\_op< Scalar >, const ExpressionTypeNestedCleaned, const typename OppositeExtendedType< [NormReturnType](classeigen_1_1cwiseunaryop) >::Type >  | [normalized](classeigen_1_1vectorwiseop#aca6ac44a9bf819d5d64c2cb54bf38095) () const |
|  |
| template<typename OtherDerived >  |
| [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_product\_op< Scalar >, const ExpressionTypeNestedCleaned, const typename ExtendedType< OtherDerived >::Type >  | [operator\*](classeigen_1_1vectorwiseop#a25ca4c1e409897feca669dee811533c9) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) const |
|  |
| template<typename OtherDerived >  |
| ExpressionType &  | [operator\*=](classeigen_1_1vectorwiseop#acef518a77a8947c6726ba30d56dd67cb) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_sum\_op< Scalar, typename OtherDerived::Scalar >, const ExpressionTypeNestedCleaned, const typename ExtendedType< OtherDerived >::Type >  | [operator+](classeigen_1_1vectorwiseop#a713694459d81b76e4f2a78e4d169f8d6) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) const |
|  |
| template<typename OtherDerived >  |
| ExpressionType &  | [operator+=](classeigen_1_1vectorwiseop#a23ce2522d11c3362ca22252b2876812b) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_difference\_op< Scalar, typename OtherDerived::Scalar >, const ExpressionTypeNestedCleaned, const typename ExtendedType< OtherDerived >::Type >  | [operator-](classeigen_1_1vectorwiseop#a5e60616620df132d665b301bb9a304c4) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) const |
|  |
| template<typename OtherDerived >  |
| ExpressionType &  | [operator-=](classeigen_1_1vectorwiseop#a6bb3a7315617f86f0c28ac05816cf6e3) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_quotient\_op< Scalar >, const ExpressionTypeNestedCleaned, const typename ExtendedType< OtherDerived >::Type >  | [operator/](classeigen_1_1vectorwiseop#aa154a8407885a9ad51504180f6d7a163) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) const |
|  |
| template<typename OtherDerived >  |
| ExpressionType &  | [operator/=](classeigen_1_1vectorwiseop#a9efa0b81915c31535a929a46a79cab2b) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| ExpressionType &  | [operator=](classeigen_1_1vectorwiseop#a7999eb8f50bb19ade54f3212d3c79680) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| const [ProdReturnType](classeigen_1_1partialreduxexpr) | [prod](classeigen_1_1vectorwiseop#a01bcd17504f30b55b4910ddb75598f79) () const |
|  |
| reverse\_iterator  | [rbegin](classeigen_1_1vectorwiseop#a91a8087eb76e210b07192c81d362dd1e) () |
|  |
| const\_reverse\_iterator  | [rbegin](classeigen_1_1vectorwiseop#aa73e8a0230fcc049346057ef1a6efe02) () const |
|  |
| template<typename BinaryOp >  |
| const ReduxReturnType< BinaryOp >::Type  | [redux](classeigen_1_1vectorwiseop#ae92babb33ed5a91eb0c4de80a97eafca) (const BinaryOp &func=BinaryOp()) const |
|  |
| reverse\_iterator  | [rend](classeigen_1_1vectorwiseop#aa9592e93b704f7712e8f33631a2efe8f) () |
|  |
| const\_reverse\_iterator  | [rend](classeigen_1_1vectorwiseop#afeb3e3ceca37ae0a6e313f80743f767a) () const |
|  |
| const [ReplicateReturnType](classeigen_1_1replicate) | [replicate](classeigen_1_1vectorwiseop#a5f0c8dc9e9c4aeaa2057f15800f5c18c) ([Index](classeigen_1_1vectorwiseop#a4907c654e5810edd98e4162093b19532) factor) const |
|  |
| template<int Factor>  |
| const [Replicate](classeigen_1_1replicate)< ExpressionType, isVertical \*Factor+isHorizontal, isHorizontal \*Factor+isVertical >  | [replicate](classeigen_1_1vectorwiseop#a81bfb88fe6415c7bfd9bdf15ef608aaa) ([Index](classeigen_1_1vectorwiseop#a4907c654e5810edd98e4162093b19532) factor=Factor) const |
|  |
| [ReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1vectorwiseop#ab8caf5367e2bd636536c8a0e0c89fe15) () |
|  |
| const [ConstReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1vectorwiseop#aeb0428f561b5757e2c85e8d72022eec1) () const |
|  |
| void  | [reverseInPlace](classeigen_1_1vectorwiseop#ab9dd7c273eb2ba8defaab2d55156936b) () |
|  |
| const [SquaredNormReturnType](classeigen_1_1partialreduxexpr) | [squaredNorm](classeigen_1_1vectorwiseop#a01474cf971473a73c919f6a99323d4f5) () const |
|  |
| const [StableNormReturnType](classeigen_1_1partialreduxexpr) | [stableNorm](classeigen_1_1vectorwiseop#add48fd836be98ed280cac23518db0916) () const |
|  |
| const [SumReturnType](classeigen_1_1partialreduxexpr) | [sum](classeigen_1_1vectorwiseop#a7030fc687c24d687ed7cd70733ba611c) () const |
|  |




|  |
| --- |
|  |
| random\_access\_iterator\_type  | [const\_iterator](classeigen_1_1vectorwiseop#a595c33d2a82427a1159568b0b8438554) |
|  |
| random\_access\_iterator\_type  | [iterator](classeigen_1_1vectorwiseop#a9fb8aaf24528efcdac1782aacf99b8dd) |
|  |

  Index
-----

    template<typename ExpressionType , int Direction>  

|  |
| --- |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::[Index](classeigen_1_1vectorwiseop#a4907c654e5810edd98e4162093b19532) |

 
 
**[Deprecated:](deprecated#_deprecated000011)**
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3 
    all()
-----

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [AllReturnType](classeigen_1_1partialreduxexpr) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::all  | ( |  | ) |  const |

 | inline |

 
 
Returns
a row (or column) vector expression representing whether **all** coefficients of each respective column (or row) are `true`. This expression can be assigned to a vector with entries of type `bool`.
 
See also

[DenseBase::all()](classeigen_1_1densebase#ae42ab60296c120e9f45ce3b44e1761a4) 
    any()
-----

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [AnyReturnType](classeigen_1_1partialreduxexpr) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::any  | ( |  | ) |  const |

 | inline |

 
 
Returns
a row (or column) vector expression representing whether **at** **least** one coefficient of each respective column (or row) is `true`. This expression can be assigned to a vector with entries of type `bool`.
 
See also

[DenseBase::any()](classeigen_1_1densebase#abfbf4cb72dd577e62fbe035b1c53e695) 
    begin() [1/2]
-------------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [iterator](classeigen_1_1vectorwiseop#a9fb8aaf24528efcdac1782aacf99b8dd) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::begin  | ( |  | ) |  |

 | inline |

 
 returns an iterator to the first row (rowwise) or column (colwise) of the nested expression. 



See also

[end()](classeigen_1_1vectorwiseop#a9d189042b8322e40772d41c63b9d3bb5), [cbegin()](classeigen_1_1vectorwiseop#a7b237a2b46479de5c905d2bcc54f34c4) 
    begin() [2/2]
-------------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [const\_iterator](classeigen_1_1vectorwiseop#a595c33d2a82427a1159568b0b8438554) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::begin  | ( |  | ) |  const |

 | inline |

 
 const version of [begin()](classeigen_1_1vectorwiseop#abbf3325f535ac011ed61f14ed4330618) 

    blueNorm()
----------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [BlueNormReturnType](classeigen_1_1partialreduxexpr) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::blueNorm  | ( |  | ) |  const |

 | inline |

 
 
Returns
a row (or column) vector expression of the norm of each column (or row) of the referenced expression, using Blue's algorithm. This is a vector with real entries, even if the original matrix has complex entries.
 
See also
DenseBase::blueNorm() 
    cbegin()
--------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [const\_iterator](classeigen_1_1vectorwiseop#a595c33d2a82427a1159568b0b8438554) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::cbegin  | ( |  | ) |  const |

 | inline |

 
 const version of [begin()](classeigen_1_1vectorwiseop#abbf3325f535ac011ed61f14ed4330618) 

    cend()
------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [const\_iterator](classeigen_1_1vectorwiseop#a595c33d2a82427a1159568b0b8438554) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::cend  | ( |  | ) |  const |

 | inline |

 
 const version of [end()](classeigen_1_1vectorwiseop#a9d189042b8322e40772d41c63b9d3bb5) 

    count()
-------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [CountReturnType](classeigen_1_1partialreduxexpr) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::count  | ( |  | ) |  const |

 | inline |

 
 
Returns
a row (or column) vector expression representing the number of `true` coefficients of each respective column (or row). This expression can be assigned to a vector whose entries have the same type as is used to index entries of the original matrix; for dense matrices, this is `std::ptrdiff_t` .
 Example: 



```
Matrix3d m = [Matrix3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
Matrix<ptrdiff_t, 3, 1> res = (m.array() >= 0.5).rowwise().count();
cout << "Here is the count of elements larger or equal than 0.5 of each row:" << endl;
cout << res << endl;

```

 Output: 



```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Here is the count of elements larger or equal than 0.5 of each row:
2
2
1

```


See also

[DenseBase::count()](classeigen_1_1densebase#a229be090c665b9bf7d1fcdfd1ab6e0c1) 
    crbegin()
---------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const\_reverse\_iterator [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::crbegin  | ( |  | ) |  const |

 | inline |

 
 const version of [rbegin()](classeigen_1_1vectorwiseop#a91a8087eb76e210b07192c81d362dd1e) 

    crend()
-------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const\_reverse\_iterator [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::crend  | ( |  | ) |  const |

 | inline |

 
 const version of [rend()](classeigen_1_1vectorwiseop#aa9592e93b704f7712e8f33631a2efe8f) 

    end() [1/2]
-----------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [iterator](classeigen_1_1vectorwiseop#a9fb8aaf24528efcdac1782aacf99b8dd) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::end  | ( |  | ) |  |

 | inline |

 
 returns an iterator to the row (resp. column) following the last row (resp. column) of the nested expression 



See also

[begin()](classeigen_1_1vectorwiseop#abbf3325f535ac011ed61f14ed4330618), [cend()](classeigen_1_1vectorwiseop#a57859b88a32b8b393a427c4cab3581a7) 
    end() [2/2]
-----------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [const\_iterator](classeigen_1_1vectorwiseop#a595c33d2a82427a1159568b0b8438554) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::end  | ( |  | ) |  const |

 | inline |

 
 const version of [end()](classeigen_1_1vectorwiseop#a9d189042b8322e40772d41c63b9d3bb5) 

    hypotNorm()
-----------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [HypotNormReturnType](classeigen_1_1partialreduxexpr) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::hypotNorm  | ( |  | ) |  const |

 | inline |

 
 
Returns
a row (or column) vector expression of the norm of each column (or row) of the referenced expression, avoiding underflow and overflow using a concatenation of hypot() calls. This is a vector with real entries, even if the original matrix has complex entries.
 
See also
DenseBase::hypotNorm() 
    lpNorm()
--------

    template<typename ExpressionType , int Direction>   template<int p>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const LpNormReturnType<p>::Type [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::lpNorm  | ( |  | ) |  const |

 | inline |

 
 
Returns
a row (or column) vector expression of the norm of each column (or row) of the referenced expression. This is a vector with real entries, even if the original matrix has complex entries.
 Example: 



```
Matrix3d m = [Matrix3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the norm of each column:" << endl << m.colwise().norm() << endl;

```

 Output: 



```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Here is the norm of each column:
 0.91  1.18 0.771

```


See also
DenseBase::norm() 
    maxCoeff()
----------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [MaxCoeffReturnType](classeigen_1_1partialreduxexpr) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::maxCoeff  | ( |  | ) |  const |

 | inline |

 
 
Returns
a row (or column) vector expression of the largest coefficient of each column (or row) of the referenced expression.
 
Warning
the size along the reduction direction must be strictly positive, otherwise an assertion is triggered.  the result is undefined if `*this` contains NaN.
 Example: 



```
Matrix3d m = [Matrix3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the maximum of each column:" << endl << m.colwise().maxCoeff() << endl;

```

 Output: 



```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Here is the maximum of each column:
 0.68 0.823 0.536

```


See also

[DenseBase::maxCoeff()](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1) 
    mean()
------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MeanReturnType [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::mean  | ( |  | ) |  const |

 | inline |

 
 
Returns
a row (or column) vector expression of the mean of each column (or row) of the referenced expression.
 
See also

[DenseBase::mean()](classeigen_1_1densebase#a21ac6c0419a72ad7a88ea0bc189017d7) 
    minCoeff()
----------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [MinCoeffReturnType](classeigen_1_1partialreduxexpr) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::minCoeff  | ( |  | ) |  const |

 | inline |

 
 
Returns
a row (or column) vector expression of the smallest coefficient of each column (or row) of the referenced expression.
 
Warning
the size along the reduction direction must be strictly positive, otherwise an assertion is triggered.  the result is undefined if `*this` contains NaN.
 Example: 



```
Matrix3d m = [Matrix3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the minimum of each column:" << endl << m.colwise().minCoeff() << endl;

```

 Output: 



```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Here is the minimum of each column:
-0.211 -0.605 -0.444

```


See also

[DenseBase::minCoeff()](classeigen_1_1densebase#a0739f9c868c331031c7810e21838dcb2) 
    norm()
------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [NormReturnType](classeigen_1_1cwiseunaryop) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::norm  | ( |  | ) |  const |

 | inline |

 
 
Returns
a row (or column) vector expression of the norm of each column (or row) of the referenced expression. This is a vector with real entries, even if the original matrix has complex entries.
 Example: 



```
Matrix3d m = [Matrix3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the norm of each column:" << endl << m.colwise().norm() << endl;

```

 Output: 



```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Here is the norm of each column:
 0.91  1.18 0.771

```


See also
DenseBase::norm() 
    normalize()
-----------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::normalize  | ( |  | ) |  |

 | inline |

 
 Normalize in-place each row or columns of the referenced matrix. 



See also

[MatrixBase::normalize()](classeigen_1_1matrixbase#ad16303c47ba36f7a41ea264cb26bceb6), [normalized()](classeigen_1_1vectorwiseop#aca6ac44a9bf819d5d64c2cb54bf38095) 
    normalized()
------------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [CwiseBinaryOp](classeigen_1_1cwisebinaryop)<internal::scalar\_quotient\_op<Scalar>, const ExpressionTypeNestedCleaned, const typename OppositeExtendedType<[NormReturnType](classeigen_1_1cwiseunaryop)>::Type> [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::normalized  | ( |  | ) |  const |

 | inline |

 
 
Returns
an expression where each column (or row) of the referenced matrix are normalized. The referenced matrix is **not** modified. 
 
See also

[MatrixBase::normalized()](classeigen_1_1matrixbase#a5cf2fd4c57e59604fd4116158fd34308), [normalize()](classeigen_1_1vectorwiseop#adb1084153780dc8d2c062fee97651a45) 
    operator\*()
------------

    template<typename ExpressionType , int Direction>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [CwiseBinaryOp](classeigen_1_1cwisebinaryop)<internal::scalar\_product\_op<Scalar>, const ExpressionTypeNestedCleaned, const typename ExtendedType<OtherDerived>::Type> [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::operator\*  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 Returns the expression where each subvector is the product of the vector *other* by the corresponding subvector of `*this` 

    operator\*=()
-------------

    template<typename ExpressionType , int Direction>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| ExpressionType& [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::operator\*=  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Multiples each subvector of `*this` by the vector *other* 

    operator+()
-----------

    template<typename ExpressionType , int Direction>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [CwiseBinaryOp](classeigen_1_1cwisebinaryop)<internal::scalar\_sum\_op<Scalar,typename OtherDerived::Scalar>, const ExpressionTypeNestedCleaned, const typename ExtendedType<OtherDerived>::Type> [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::operator+  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 Returns the expression of the sum of the vector *other* to each subvector of `*this` 

    operator+=()
------------

    template<typename ExpressionType , int Direction>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| ExpressionType& [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::operator+=  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Adds the vector *other* to each subvector of `*this` 

    operator-()
-----------

    template<typename ExpressionType , int Direction>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [CwiseBinaryOp](classeigen_1_1cwisebinaryop)<internal::scalar\_difference\_op<Scalar,typename OtherDerived::Scalar>, const ExpressionTypeNestedCleaned, const typename ExtendedType<OtherDerived>::Type> [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::operator-  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 Returns the expression of the difference between each subvector of `*this` and the vector *other* 

    operator-=()
------------

    template<typename ExpressionType , int Direction>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| ExpressionType& [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::operator-=  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Substracts the vector *other* to each subvector of `*this` 

    operator/()
-----------

    template<typename ExpressionType , int Direction>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [CwiseBinaryOp](classeigen_1_1cwisebinaryop)<internal::scalar\_quotient\_op<Scalar>, const ExpressionTypeNestedCleaned, const typename ExtendedType<OtherDerived>::Type> [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::operator/  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 Returns the expression where each subvector is the quotient of the corresponding subvector of `*this` by the vector *other* 

    operator/=()
------------

    template<typename ExpressionType , int Direction>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| ExpressionType& [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::operator/=  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Divides each subvector of `*this` by the vector *other* 

    operator=()
-----------

    template<typename ExpressionType , int Direction>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| ExpressionType& [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::operator=  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Copies the vector *other* to each subvector of `*this` 

    prod()
------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [ProdReturnType](classeigen_1_1partialreduxexpr) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::prod  | ( |  | ) |  const |

 | inline |

 
 
Returns
a row (or column) vector expression of the product of each column (or row) of the referenced expression.
 Example: 



```
Matrix3d m = [Matrix3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the product of each row:" << endl << m.rowwise().prod() << endl;

```

 Output: 



```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Here is the product of each row:
 -0.134
-0.0933
  0.152

```


See also

[DenseBase::prod()](classeigen_1_1densebase#af119d9a4efe5a15cd83c1ccdf01b3a4f) 
    rbegin() [1/2]
--------------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| reverse\_iterator [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::rbegin  | ( |  | ) |  |

 | inline |

 
 returns a reverse iterator to the last row (rowwise) or column (colwise) of the nested expression. 



See also

[rend()](classeigen_1_1vectorwiseop#aa9592e93b704f7712e8f33631a2efe8f), [crbegin()](classeigen_1_1vectorwiseop#aec95725eed4adb5ccf65fbb6e907d12e) 
    rbegin() [2/2]
--------------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const\_reverse\_iterator [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::rbegin  | ( |  | ) |  const |

 | inline |

 
 const version of [rbegin()](classeigen_1_1vectorwiseop#a91a8087eb76e210b07192c81d362dd1e) 

    redux()
-------

    template<typename ExpressionType , int Direction>   template<typename BinaryOp >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const ReduxReturnType<BinaryOp>::Type [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::redux  | ( | const BinaryOp &  | *func* = `BinaryOp()` | ) |  const |

 | inline |

 
 
Returns
a row or column vector expression of `*this` reduxed by *func* 
 The template parameter *BinaryOp* is the type of the functor of the custom redux operator. Note that func must be an associative operator.

 
Warning
the size along the reduction direction must be strictly positive, otherwise an assertion is triggered.
 
See also
class [VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations."), [DenseBase::colwise()](classeigen_1_1densebase#a1c0e1b6067ec1de6cb8799da55aa7d30), [DenseBase::rowwise()](classeigen_1_1densebase#a6daa3a3156ca0e0722bf78638e1c7f28) 
    rend() [1/2]
------------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| reverse\_iterator [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::rend  | ( |  | ) |  |

 | inline |

 
 returns a reverse iterator to the row (resp. column) before the first row (resp. column) of the nested expression 



See also

[begin()](classeigen_1_1vectorwiseop#abbf3325f535ac011ed61f14ed4330618), [cend()](classeigen_1_1vectorwiseop#a57859b88a32b8b393a427c4cab3581a7) 
    rend() [2/2]
------------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const\_reverse\_iterator [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::rend  | ( |  | ) |  const |

 | inline |

 
 const version of [rend()](classeigen_1_1vectorwiseop#aa9592e93b704f7712e8f33631a2efe8f) 

    replicate() [1/2]
-----------------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::[ReplicateReturnType](classeigen_1_1replicate) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::replicate  | ( | [Index](classeigen_1_1vectorwiseop#a4907c654e5810edd98e4162093b19532) | *factor* | ) |  const |

 
 
Returns
an expression of the replication of each column (or row) of `*this` 
 Example: 



```
Vector3i v = [Vector3i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the vector v:" << endl << v << endl;
cout << "v.rowwise().replicate(5) = ..." << endl;
cout << v.rowwise().replicate(5) << endl;

```

 Output: 



```
Here is the vector v:
 7
-2
 6
v.rowwise().replicate(5) = ...
 7  7  7  7  7
-2 -2 -2 -2 -2
 6  6  6  6  6

```


See also

[VectorwiseOp::replicate()](classeigen_1_1vectorwiseop#a5f0c8dc9e9c4aeaa2057f15800f5c18c), [DenseBase::replicate()](classeigen_1_1densebase#a60dadfe80b813d808e91e4521c722a8e), class [Replicate](classeigen_1_1replicate "Expression of the multiple replication of a matrix or vector.") 
    replicate() [2/2]
-----------------

    template<typename ExpressionType , int Direction>   template<int Factor>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Replicate](classeigen_1_1replicate)<ExpressionType,isVertical\*Factor+isHorizontal,isHorizontal\*Factor+isVertical> [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::replicate  | ( | [Index](classeigen_1_1vectorwiseop#a4907c654e5810edd98e4162093b19532) | *factor* = `Factor` | ) |  const |

 | inline |

 
 
Returns
an expression of the replication of each column (or row) of `*this` 
 Example: 



```
MatrixXi m = [MatrixXi::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(2,3);
cout << "Here is the matrix m:" << endl << m << endl;
cout << "m.colwise().replicate<3>() = ..." << endl;
cout << m.colwise().replicate<3>() << endl;

```

 Output: 



```
Here is the matrix m:
 7  6  9
-2  6 -6
m.colwise().replicate<3>() = ...
 7  6  9
-2  6 -6
 7  6  9
-2  6 -6
 7  6  9
-2  6 -6

```


See also
VectorwiseOp::replicate(Index), [DenseBase::replicate()](classeigen_1_1densebase#a60dadfe80b813d808e91e4521c722a8e), class [Replicate](classeigen_1_1replicate "Expression of the multiple replication of a matrix or vector.") 
    reverse() [1/2]
---------------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ReverseReturnType](classeigen_1_1reverse) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::reverse  | ( |  | ) |  |

 | inline |

 
 
Returns
a writable matrix expression where each column (or row) are reversed.
 
See also

[reverse() const](classeigen_1_1vectorwiseop#aeb0428f561b5757e2c85e8d72022eec1)  
    reverse() [2/2]
---------------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [ConstReverseReturnType](classeigen_1_1reverse) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::reverse  | ( |  | ) |  const |

 | inline |

 
 
Returns
a matrix expression where each column (or row) are reversed.
 Example: 



```
MatrixXi m = [MatrixXi::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3,4);
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the rowwise reverse of m:" << endl << m.rowwise().reverse() << endl;
cout << "Here is the colwise reverse of m:" << endl << m.colwise().reverse() << endl;
 
cout << "Here is the coefficient (1,0) in the rowise reverse of m:" << endl
<< m.rowwise().reverse()(1,0) << endl;
cout << "Let us overwrite this coefficient with the value 4." << endl;
//m.colwise().reverse()(1,0) = 4;
cout << "Now the matrix m is:" << endl << m << endl;

```

 Output: 



```
Here is the matrix m:
 7  6 -3  1
-2  9  6  0
 6 -6 -5  3
Here is the rowwise reverse of m:
 1 -3  6  7
 0  6  9 -2
 3 -5 -6  6
Here is the colwise reverse of m:
 6 -6 -5  3
-2  9  6  0
 7  6 -3  1
Here is the coefficient (1,0) in the rowise reverse of m:
0
Let us overwrite this coefficient with the value 4.
Now the matrix m is:
 7  6 -3  1
-2  9  6  0
 6 -6 -5  3

```


See also

[DenseBase::reverse()](classeigen_1_1densebase#a38ea394036d8b096abf322469c80198f) 
    reverseInPlace()
----------------

    template<typename ExpressionType , int Direction>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| void [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::reverseInPlace |

 | inline |

 
 This is the "in place" version of [VectorwiseOp::reverse](classeigen_1_1vectorwiseop#aeb0428f561b5757e2c85e8d72022eec1): it reverses each column or row of `*this`.

 In most cases it is probably better to simply use the reversed expression of a matrix. However, when reversing the matrix data itself is really needed, then this "in-place" version is probably the right choice because it provides the following additional benefits:


* less error prone: doing the same operation with .[reverse()](classeigen_1_1vectorwiseop#ab8caf5367e2bd636536c8a0e0c89fe15) requires special care: 
```
m = m.reverse().eval(); 

```
* this API enables reverse operations without the need for a temporary

 
See also

[DenseBase::reverseInPlace()](classeigen_1_1densebase#adb8045155ea45f7961fc2a5170e1d921), [reverse()](classeigen_1_1vectorwiseop#ab8caf5367e2bd636536c8a0e0c89fe15) 
    squaredNorm()
-------------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [SquaredNormReturnType](classeigen_1_1partialreduxexpr) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::squaredNorm  | ( |  | ) |  const |

 | inline |

 
 
Returns
a row (or column) vector expression of the squared norm of each column (or row) of the referenced expression. This is a vector with real entries, even if the original matrix has complex entries.
 Example: 



```
Matrix3d m = [Matrix3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the square norm of each row:" << endl << m.rowwise().squaredNorm() << endl;

```

 Output: 



```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Here is the square norm of each row:
0.928
 1.01
0.884

```


See also
DenseBase::squaredNorm() 
    stableNorm()
------------

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [StableNormReturnType](classeigen_1_1partialreduxexpr) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::stableNorm  | ( |  | ) |  const |

 | inline |

 
 
Returns
a row (or column) vector expression of the norm of each column (or row) of the referenced expression, avoiding underflow and overflow. This is a vector with real entries, even if the original matrix has complex entries.
 
See also
DenseBase::stableNorm() 
    sum()
-----

    template<typename ExpressionType , int Direction>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [SumReturnType](classeigen_1_1partialreduxexpr) [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::sum  | ( |  | ) |  const |

 | inline |

 
 
Returns
a row (or column) vector expression of the sum of each column (or row) of the referenced expression.
 Example: 



```
Matrix3d m = [Matrix3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the sum of each row:" << endl << m.rowwise().sum() << endl;

```

 Output: 



```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Here is the sum of each row:
 0.948
  1.15
-0.483

```


See also

[DenseBase::sum()](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c) 
    const\_iterator
---------------

    template<typename ExpressionType , int Direction>  

|  |
| --- |
| random\_access\_iterator\_type [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::const\_iterator |

 
 This is the const version of iterator (aka read-only) 

    iterator
--------

    template<typename ExpressionType , int Direction>  

|  |
| --- |
| random\_access\_iterator\_type [Eigen::VectorwiseOp](classeigen_1_1vectorwiseop)< ExpressionType, Direction >::iterator |

 
 STL-like [RandomAccessIterator](https://en.cppreference.com/w/cpp/named_req/RandomAccessIterator) iterator type over the columns or rows as returned by the [begin()](classeigen_1_1vectorwiseop#abbf3325f535ac011ed61f14ed4330618) and [end()](classeigen_1_1vectorwiseop#a9d189042b8322e40772d41c63b9d3bb5) methods. 

   

---

The documentation for this class was generated from the following files:* [VectorwiseOp.h](https://eigen.tuxfamily.org/dox/VectorwiseOp_8h_source.html)
* [Replicate.h](https://eigen.tuxfamily.org/dox/Replicate_8h_source.html)
* [Reverse.h](https://eigen.tuxfamily.org/dox/Reverse_8h_source.html)
* [Homogeneous.h](https://eigen.tuxfamily.org/dox/Homogeneous_8h_source.html)
* [OrthoMethods.h](https://eigen.tuxfamily.org/dox/OrthoMethods_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1VectorwiseOp.html>

Eigen::CholmodDecomposition
===========================

  
### template<typename \_MatrixType, int \_UpLo = Lower> class Eigen::CholmodDecomposition< \_MatrixType, \_UpLo >

 A general Cholesky factorization and solver based on Cholmod. 

 This class allows to solve for A.X = B sparse linear problems via a LL^T or LDL^T Cholesky factorization using the Cholmod library. The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices X and B can be either dense or sparse.

 This variant permits to change the underlying Cholesky method at runtime. On the other hand, it does not provide access to the result of the factorization. The default is to let Cholmod automatically choose between a simplicial and supernodal factorization.

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<>  |
| \_UpLo | the triangular part that will be used for the computations. It can be Lower or Upper. Default is Lower. |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; compressed or non compressed.

 
Warning
Only double precision real and complex scalar types are supported by Cholmod.
 
See also

[Sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) 
     ![Inheritance graph]       

|  |
| --- |
|  |
| - Public Member Functions inherited from [Eigen::CholmodBase< \_MatrixType, Lower, CholmodDecomposition< \_MatrixType, Lower > >](classeigen_1_1cholmodbase) |
| void  | [analyzePattern](classeigen_1_1cholmodbase#a5ac967e9f4ccfc43ca9e610b89232c24) (const MatrixType &matrix) |
|  |
| cholmod\_common &  | [cholmod](classeigen_1_1cholmodbase#a6a85bf52d6aa480240a64f277d7f96c6) () |
|  |
| [CholmodDecomposition](classeigen_1_1cholmoddecomposition)< \_MatrixType, Lower > &  | [compute](classeigen_1_1cholmodbase#abaf5be01b1e3035a4de0b19f5b63549e) (const MatrixType &matrix) |
|  |
| Scalar  | [determinant](classeigen_1_1cholmodbase#ab4ffb4a9735ad7e81a01d5789ce96547) () const |
|  |
| void  | [factorize](classeigen_1_1cholmodbase#a5bd9c9ec4d1c15f202a6c66b5e9ef37b) (const MatrixType &matrix) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1cholmodbase#ada4cc43c64767d186fcb8997440cc753) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1cholmodbase#ada4cc43c64767d186fcb8997440cc753) |
|  |
| Scalar  | [logDeterminant](classeigen_1_1cholmodbase#a597f7839a39604af18a8741a0d8c46bf) () const |
|  |
| [CholmodDecomposition](classeigen_1_1cholmoddecomposition)< \_MatrixType, Lower > &  | [setShift](classeigen_1_1cholmodbase#a886fc102723ca7bde4ac7162dfd72f5d) (const RealScalar &offset) |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< Derived >](classeigen_1_1sparsesolverbase) |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

 

---

The documentation for this class was generated from the following file:* [CholmodSupport.h](https://eigen.tuxfamily.org/dox/CholmodSupport_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1CholmodDecomposition.html>

Eigen::CholmodSimplicialLDLT
============================

  
### template<typename \_MatrixType, int \_UpLo = Lower> class Eigen::CholmodSimplicialLDLT< \_MatrixType, \_UpLo >

 A simplicial direct Cholesky ([LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.")) factorization and solver based on Cholmod. 

 This class allows to solve for A.X = B sparse linear problems via a simplicial LDL^T Cholesky factorization using the Cholmod library. This simplicial variant is equivalent to [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s built-in [SimplicialLDLT](classeigen_1_1simplicialldlt "A direct sparse LDLT Cholesky factorizations without square root.") class. Therefore, it has little practical interest. The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices X and B can be either dense or sparse.

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<>  |
| \_UpLo | the triangular part that will be used for the computations. It can be Lower or Upper. Default is Lower. |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; compressed or non compressed.

 
Warning
Only double precision real and complex scalar types are supported by Cholmod.
 
See also

[Sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept), class [CholmodSupernodalLLT](classeigen_1_1cholmodsupernodalllt "A supernodal Cholesky (LLT) factorization and solver based on Cholmod."), class [SimplicialLDLT](classeigen_1_1simplicialldlt "A direct sparse LDLT Cholesky factorizations without square root.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
| - Public Member Functions inherited from [Eigen::CholmodBase< \_MatrixType, Lower, CholmodSimplicialLDLT< \_MatrixType, Lower > >](classeigen_1_1cholmodbase) |
| void  | [analyzePattern](classeigen_1_1cholmodbase#a5ac967e9f4ccfc43ca9e610b89232c24) (const MatrixType &matrix) |
|  |
| cholmod\_common &  | [cholmod](classeigen_1_1cholmodbase#a6a85bf52d6aa480240a64f277d7f96c6) () |
|  |
| [CholmodSimplicialLDLT](classeigen_1_1cholmodsimplicialldlt)< \_MatrixType, Lower > &  | [compute](classeigen_1_1cholmodbase#abaf5be01b1e3035a4de0b19f5b63549e) (const MatrixType &matrix) |
|  |
| Scalar  | [determinant](classeigen_1_1cholmodbase#ab4ffb4a9735ad7e81a01d5789ce96547) () const |
|  |
| void  | [factorize](classeigen_1_1cholmodbase#a5bd9c9ec4d1c15f202a6c66b5e9ef37b) (const MatrixType &matrix) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1cholmodbase#ada4cc43c64767d186fcb8997440cc753) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1cholmodbase#ada4cc43c64767d186fcb8997440cc753) |
|  |
| Scalar  | [logDeterminant](classeigen_1_1cholmodbase#a597f7839a39604af18a8741a0d8c46bf) () const |
|  |
| [CholmodSimplicialLDLT](classeigen_1_1cholmodsimplicialldlt)< \_MatrixType, Lower > &  | [setShift](classeigen_1_1cholmodbase#a886fc102723ca7bde4ac7162dfd72f5d) (const RealScalar &offset) |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< Derived >](classeigen_1_1sparsesolverbase) |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

 

---

The documentation for this class was generated from the following file:* [CholmodSupport.h](https://eigen.tuxfamily.org/dox/CholmodSupport_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1CholmodSimplicialLDLT.html>

Eigen::CholmodSimplicialLLT
===========================

  
### template<typename \_MatrixType, int \_UpLo = Lower> class Eigen::CholmodSimplicialLLT< \_MatrixType, \_UpLo >

 A simplicial direct Cholesky ([LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.")) factorization and solver based on Cholmod. 

 This class allows to solve for A.X = B sparse linear problems via a simplicial LL^T Cholesky factorization using the Cholmod library. This simplicial variant is equivalent to [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s built-in [SimplicialLLT](classeigen_1_1simplicialllt "A direct sparse LLT Cholesky factorizations.") class. Therefore, it has little practical interest. The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices X and B can be either dense or sparse.

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<>  |
| \_UpLo | the triangular part that will be used for the computations. It can be Lower or Upper. Default is Lower. |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; compressed or non compressed.

 
Warning
Only double precision real and complex scalar types are supported by Cholmod.
 
See also

[Sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept), class [CholmodSupernodalLLT](classeigen_1_1cholmodsupernodalllt "A supernodal Cholesky (LLT) factorization and solver based on Cholmod."), class [SimplicialLLT](classeigen_1_1simplicialllt "A direct sparse LLT Cholesky factorizations.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
| - Public Member Functions inherited from [Eigen::CholmodBase< \_MatrixType, Lower, CholmodSimplicialLLT< \_MatrixType, Lower > >](classeigen_1_1cholmodbase) |
| void  | [analyzePattern](classeigen_1_1cholmodbase#a5ac967e9f4ccfc43ca9e610b89232c24) (const MatrixType &matrix) |
|  |
| cholmod\_common &  | [cholmod](classeigen_1_1cholmodbase#a6a85bf52d6aa480240a64f277d7f96c6) () |
|  |
| [CholmodSimplicialLLT](classeigen_1_1cholmodsimplicialllt)< \_MatrixType, Lower > &  | [compute](classeigen_1_1cholmodbase#abaf5be01b1e3035a4de0b19f5b63549e) (const MatrixType &matrix) |
|  |
| Scalar  | [determinant](classeigen_1_1cholmodbase#ab4ffb4a9735ad7e81a01d5789ce96547) () const |
|  |
| void  | [factorize](classeigen_1_1cholmodbase#a5bd9c9ec4d1c15f202a6c66b5e9ef37b) (const MatrixType &matrix) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1cholmodbase#ada4cc43c64767d186fcb8997440cc753) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1cholmodbase#ada4cc43c64767d186fcb8997440cc753) |
|  |
| Scalar  | [logDeterminant](classeigen_1_1cholmodbase#a597f7839a39604af18a8741a0d8c46bf) () const |
|  |
| [CholmodSimplicialLLT](classeigen_1_1cholmodsimplicialllt)< \_MatrixType, Lower > &  | [setShift](classeigen_1_1cholmodbase#a886fc102723ca7bde4ac7162dfd72f5d) (const RealScalar &offset) |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< Derived >](classeigen_1_1sparsesolverbase) |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

 

---

The documentation for this class was generated from the following file:* [CholmodSupport.h](https://eigen.tuxfamily.org/dox/CholmodSupport_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1CholmodSimplicialLLT.html>

Eigen::CholmodSupernodalLLT
===========================

  
### template<typename \_MatrixType, int \_UpLo = Lower> class Eigen::CholmodSupernodalLLT< \_MatrixType, \_UpLo >

 A supernodal Cholesky ([LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.")) factorization and solver based on Cholmod. 

 This class allows to solve for A.X = B sparse linear problems via a supernodal LL^T Cholesky factorization using the Cholmod library. This supernodal variant performs best on dense enough problems, e.g., 3D FEM, or very high order 2D FEM. The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices X and B can be either dense or sparse.

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<>  |
| \_UpLo | the triangular part that will be used for the computations. It can be Lower or Upper. Default is Lower. |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; compressed or non compressed.

 
Warning
Only double precision real and complex scalar types are supported by Cholmod.
 
See also

[Sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) 
     ![Inheritance graph]       

|  |
| --- |
|  |
| - Public Member Functions inherited from [Eigen::CholmodBase< \_MatrixType, Lower, CholmodSupernodalLLT< \_MatrixType, Lower > >](classeigen_1_1cholmodbase) |
| void  | [analyzePattern](classeigen_1_1cholmodbase#a5ac967e9f4ccfc43ca9e610b89232c24) (const MatrixType &matrix) |
|  |
| cholmod\_common &  | [cholmod](classeigen_1_1cholmodbase#a6a85bf52d6aa480240a64f277d7f96c6) () |
|  |
| [CholmodSupernodalLLT](classeigen_1_1cholmodsupernodalllt)< \_MatrixType, Lower > &  | [compute](classeigen_1_1cholmodbase#abaf5be01b1e3035a4de0b19f5b63549e) (const MatrixType &matrix) |
|  |
| Scalar  | [determinant](classeigen_1_1cholmodbase#ab4ffb4a9735ad7e81a01d5789ce96547) () const |
|  |
| void  | [factorize](classeigen_1_1cholmodbase#a5bd9c9ec4d1c15f202a6c66b5e9ef37b) (const MatrixType &matrix) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1cholmodbase#ada4cc43c64767d186fcb8997440cc753) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1cholmodbase#ada4cc43c64767d186fcb8997440cc753) |
|  |
| Scalar  | [logDeterminant](classeigen_1_1cholmodbase#a597f7839a39604af18a8741a0d8c46bf) () const |
|  |
| [CholmodSupernodalLLT](classeigen_1_1cholmodsupernodalllt)< \_MatrixType, Lower > &  | [setShift](classeigen_1_1cholmodbase#a886fc102723ca7bde4ac7162dfd72f5d) (const RealScalar &offset) |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< Derived >](classeigen_1_1sparsesolverbase) |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

 

---

The documentation for this class was generated from the following file:* [CholmodSupport.h](https://eigen.tuxfamily.org/dox/CholmodSupport_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1CholmodSupernodalLLT.html>

Eigen::ConjugateGradient
========================

  
### template<typename \_MatrixType, int \_UpLo, typename \_Preconditioner> class Eigen::ConjugateGradient< \_MatrixType, \_UpLo, \_Preconditioner >

 A conjugate gradient solver for sparse (or dense) self-adjoint problems. 

 This class allows to solve for A.x = b linear problems using an iterative conjugate gradient algorithm. The matrix A must be selfadjoint. The matrix A and the vectors x and b can be either dense or sparse.

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix A, can be a dense or a sparse matrix.  |
| \_UpLo | the triangular part that will be used for the computations. It can be Lower, `Upper`, or `Lower|Upper` in which the full matrix entries will be considered. Default is `Lower`, best performance is `Lower|Upper`.  |
| \_Preconditioner | the type of the preconditioner. Default is [DiagonalPreconditioner](classeigen_1_1diagonalpreconditioner "A preconditioner based on the digonal entries.") |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 The maximal number of iterations and tolerance value can be controlled via the [setMaxIterations()](classeigen_1_1iterativesolverbase#af83de7a7d31d9d4bd1fef6222b07335b) and [setTolerance()](classeigen_1_1iterativesolverbase#ac160a444af8998f93da9aa30e858470d) methods. The defaults are the size of the problem for the maximal number of iterations and NumTraits<Scalar>::epsilon() for the tolerance.

 The tolerance corresponds to the relative residual error: |Ax-b|/|b|

 **Performance:** Even though the default value of `_UpLo` is `Lower`, significantly higher performance is achieved when using a complete matrix and **Lower|Upper** as the *\_UpLo* template parameter. Moreover, in this case multi-threading can be exploited if the user code is compiled with OpenMP enabled. See [Eigen and multi-threading](topicmultithreading) for details.

 This class can be used as the direct solver classes. Here is a typical usage example: 



```
int n = 10000;
VectorXd x(n), b(n);
SparseMatrix<double> A(n,n);
// fill A and b
ConjugateGradient<SparseMatrix<double>, [Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)|[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)> cg;
cg.compute(A);
x = cg.solve(b);
std::cout << "#iterations: " << cg.iterations() << std::endl;
std::cout << "estimated error: " << cg.error()      << std::endl;
// update b, and solve again
x = cg.solve(b);
```

By default the iterations start with x=0 as an initial guess of the solution. One can control the start using the [solveWithGuess()](classeigen_1_1iterativesolverbase#adcc18d1ab283786dcbb5a3f63f4b4bd8) method.

 [ConjugateGradient](classeigen_1_1conjugategradient "A conjugate gradient solver for sparse (or dense) self-adjoint problems.") can also be used in a matrix-free context, see the following [example](group__matrixfreesolverexample) .

 
See also
class [LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient "A conjugate gradient solver for sparse (or dense) least-square problems."), class [SimplicialCholesky](classeigen_1_1simplicialcholesky), [DiagonalPreconditioner](classeigen_1_1diagonalpreconditioner "A preconditioner based on the digonal entries."), [IdentityPreconditioner](classeigen_1_1identitypreconditioner "A naive preconditioner which approximates any matrix as the identity matrix.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
|  | [ConjugateGradient](classeigen_1_1conjugategradient#a92a9656ca9fa4da240194f89229255eb) () |
|  |
| template<typename MatrixDerived >  |
|  | [ConjugateGradient](classeigen_1_1conjugategradient#ac10f778fcd137eca1f6057c8ddd3d644) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| - Public Member Functions inherited from [Eigen::IterativeSolverBase< ConjugateGradient< \_MatrixType, \_UpLo, \_Preconditioner > >](classeigen_1_1iterativesolverbase) |
| [ConjugateGradient](classeigen_1_1conjugategradient)< \_MatrixType, \_UpLo, \_Preconditioner > &  | [analyzePattern](classeigen_1_1iterativesolverbase#a3f684fb41019ca04d97ddc08a0d8be2e) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| [ConjugateGradient](classeigen_1_1conjugategradient)< \_MatrixType, \_UpLo, \_Preconditioner > &  | [compute](classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| RealScalar  | [error](classeigen_1_1iterativesolverbase#a117c241af3fb1141ad0916a3cf3157ec) () const |
|  |
| [ConjugateGradient](classeigen_1_1conjugategradient)< \_MatrixType, \_UpLo, \_Preconditioner > &  | [factorize](classeigen_1_1iterativesolverbase#a1374b141721629983cd8276b4b87fc58) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1iterativesolverbase#a0d6b459433a316b4f12d48e5c80d61fe) () const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [iterations](classeigen_1_1iterativesolverbase#ae778dd098bd5e6655625b20b1e9f15da) () const |
|  |
|  | [IterativeSolverBase](classeigen_1_1iterativesolverbase#a0922f2be45082690d7734aa6732fc493) () |
|  |
|  | [IterativeSolverBase](classeigen_1_1iterativesolverbase#a3c68fe3cd929ea1ff8a0d4cbcd65ebad) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [maxIterations](classeigen_1_1iterativesolverbase#a168a74c8dceb6233b220031fdd756ba0) () const |
|  |
| Preconditioner &  | [preconditioner](classeigen_1_1iterativesolverbase#a5e88f2a323a2900205cf807af94f8051) () |
|  |
| const Preconditioner &  | [preconditioner](classeigen_1_1iterativesolverbase#a709a056e17c49b5272e4971bc376cbe4) () const |
|  |
| [ConjugateGradient](classeigen_1_1conjugategradient)< \_MatrixType, \_UpLo, \_Preconditioner > &  | [setMaxIterations](classeigen_1_1iterativesolverbase#af83de7a7d31d9d4bd1fef6222b07335b) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) maxIters) |
|  |
| [ConjugateGradient](classeigen_1_1conjugategradient)< \_MatrixType, \_UpLo, \_Preconditioner > &  | [setTolerance](classeigen_1_1iterativesolverbase#ac160a444af8998f93da9aa30e858470d) (const RealScalar &[tolerance](classeigen_1_1iterativesolverbase#acb442c19b5858d6b9be813dd7d36cc62)) |
|  |
| const [SolveWithGuess](classeigen_1_1solvewithguess)< [ConjugateGradient](classeigen_1_1conjugategradient)< \_MatrixType, \_UpLo, \_Preconditioner >, Rhs, Guess >  | [solveWithGuess](classeigen_1_1iterativesolverbase#adcc18d1ab283786dcbb5a3f63f4b4bd8) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b, const Guess &x0) const |
|  |
| RealScalar  | [tolerance](classeigen_1_1iterativesolverbase#acb442c19b5858d6b9be813dd7d36cc62) () const |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< Derived >](classeigen_1_1sparsesolverbase) |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

  ConjugateGradient() [1/2]
-------------------------

    template<typename \_MatrixType , int \_UpLo, typename \_Preconditioner >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::ConjugateGradient](classeigen_1_1conjugategradient)< \_MatrixType, \_UpLo, \_Preconditioner >::[ConjugateGradient](classeigen_1_1conjugategradient) | ( |  | ) |  |

 | inline |

 
 Default constructor. 

    ConjugateGradient() [2/2]
-------------------------

    template<typename \_MatrixType , int \_UpLo, typename \_Preconditioner >   template<typename MatrixDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::ConjugateGradient](classeigen_1_1conjugategradient)< \_MatrixType, \_UpLo, \_Preconditioner >::[ConjugateGradient](classeigen_1_1conjugategradient) | ( | const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &  | *A* | ) |  |

 | inlineexplicit |

 
 Initialize the solver with matrix *A* for further `Ax=b` solving.

 This constructor is a shortcut for the default constructor followed by a call to [compute()](classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914).

 
Warning
this class stores a reference to the matrix A as well as some precomputed values that depend on it. Therefore, if *A* is changed this class becomes invalid. Call [compute()](classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914) to update it with the new matrix A, or modify a copy of A. 
   

---

The documentation for this class was generated from the following file:* [ConjugateGradient.h](https://eigen.tuxfamily.org/dox/ConjugateGradient_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1ConjugateGradient.html>

Eigen::AlignedBox
=================

  
### template<typename \_Scalar, int \_AmbientDim> class Eigen::AlignedBox< \_Scalar, \_AmbientDim >

 An axis aligned box. 

 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the type of the scalar coefficients  |
| \_AmbientDim | the dimension of the ambient space, can be a compile time value or Dynamic. |

   This class represents an axis aligned box as a pair of the minimal and maximal corners. 



Warning
The result of most methods is undefined when applied to an empty box. You can check for empty boxes using [isEmpty()](classeigen_1_1alignedbox#a2d994551368f0d06876a31dccb26de59). 
 
See also

[Global aligned box typedefs](group__alignedboxtypedefs) 
 


|  |
| --- |
|  |
| enum  | [CornerType](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378) {  [Min](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378a600b5a58e77104ef7281dba6dcffb808) ,  [Max](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378a6c39e42a5db22f2ca934f5aedcb9985f) ,  [BottomLeft](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378a384d9fbe2c6b6b69a8ea7c5632a61f5c) ,  [BottomRight](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378a8eba0291472401f9a777cf571f1b8b8b) ,  [TopLeft](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378a6740871e968264dc5a55248c7f67fb9f) ,  [TopRight](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378af68213ceced0d7988b2b9200225dcae6) ,  [BottomLeftFloor](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378a66786d5e4ba263c9725c3476fc421281) ,  [BottomRightFloor](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378a5c7a2e5d12782ebf716aff9c1866f50f) ,  [TopLeftFloor](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378a352b1a4b80151a3d8d8b63cbd113e40b) ,  [TopRightFloor](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378a7cd9ba0b2da76e88e3e1b11796841383) ,  [BottomLeftCeil](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378a66446e8ccb4fe84bdcebc6d3c1e52a1b) ,  [BottomRightCeil](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378a96ff8acc760b61ae37f38b1f63a21306) ,  [TopLeftCeil](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378ab174a824f21db60fcbfe0ca1136ed6cf) ,  [TopRightCeil](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378a6eb2e279c813983a8bc89f62959be3bd)  } |
|  |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1alignedbox#a774ef355da13d6bee6a6e7244c15231a) |
|  |
|  |
|  |
|  |




|  |
| --- |
|  |
|  | [AlignedBox](classeigen_1_1alignedbox#a43aba4c646424355dd39864655a3386f) () |
|  |
| template<typename OtherScalarType >  |
|  | [AlignedBox](classeigen_1_1alignedbox#a05f7ca06a060c8d4d2e910870669538c) (const [AlignedBox](classeigen_1_1alignedbox)< OtherScalarType, AmbientDimAtCompileTime > &other) |
|  |
| template<typename Derived >  |
|  | [AlignedBox](classeigen_1_1alignedbox#a77f5058435889bf0dfe84bdbd158f10b) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &p) |
|  |
| template<typename OtherVectorType1 , typename OtherVectorType2 >  |
|  | [AlignedBox](classeigen_1_1alignedbox#abbda47b393f17094998da5cdcb73df28) (const OtherVectorType1 &\_min, const OtherVectorType2 &\_max) |
|  |
|  | [AlignedBox](classeigen_1_1alignedbox#ade9f3bc760956c19d9c087b3a9cd6389) ([Index](classeigen_1_1alignedbox#a774ef355da13d6bee6a6e7244c15231a) \_dim) |
|  |
| template<typename NewScalarType >  |
| internal::cast\_return\_type< [AlignedBox](classeigen_1_1alignedbox), [AlignedBox](classeigen_1_1alignedbox)< NewScalarType, AmbientDimAtCompileTime > >::type  | [cast](classeigen_1_1alignedbox#a5b867bc4a02f78d7feaf45eaaa6f5484) () const |
|  |
| [AlignedBox](classeigen_1_1alignedbox) &  | [clamp](classeigen_1_1alignedbox#a683b454f1571780e8ddfc5d781949b51) (const [AlignedBox](classeigen_1_1alignedbox) &b) |
|  |
| bool  | [contains](classeigen_1_1alignedbox#a013a78bb0e9ac3a27dc1e604435288fb) (const [AlignedBox](classeigen_1_1alignedbox) &b) const |
|  |
| template<typename Derived >  |
| bool  | [contains](classeigen_1_1alignedbox#a8bfd8127621e4a19032945744adf5041) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &p) const |
|  |
| [VectorType](classeigen_1_1matrix) | [corner](classeigen_1_1alignedbox#a09619d632dd6979e9d09738493221d55) ([CornerType](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378) corner) const |
|  |
| [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_difference\_op< Scalar, Scalar >, const [VectorType](classeigen_1_1matrix), const [VectorType](classeigen_1_1matrix) >  | [diagonal](classeigen_1_1alignedbox#a92fbafe85f1c941ed0b4c92711e8db56) () const |
|  |
| [Index](classeigen_1_1alignedbox#a774ef355da13d6bee6a6e7244c15231a) | [dim](classeigen_1_1alignedbox#a5301115f222e591b38cc1ebed36856e1) () const |
|  |
| const  | [EIGEN\_EXPR\_BINARYOP\_SCALAR\_RETURN\_TYPE](classeigen_1_1alignedbox#ab4950605c14c530c2d56c75f0e253d10) ([VectorTypeSum](classeigen_1_1cwisebinaryop), RealScalar, quotient) center() const |
|  |
| [AlignedBox](classeigen_1_1alignedbox) &  | [extend](classeigen_1_1alignedbox#a0ca284f3375f68b9e9aef558cd5bcd37) (const [AlignedBox](classeigen_1_1alignedbox) &b) |
|  |
| template<typename Derived >  |
| [AlignedBox](classeigen_1_1alignedbox) &  | [extend](classeigen_1_1alignedbox#ac252032292dcf60984191e4dd26f0955) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &p) |
|  |
| NonInteger  | [exteriorDistance](classeigen_1_1alignedbox#afb3b43bab1d84a95e7a515ca854cda70) (const [AlignedBox](classeigen_1_1alignedbox) &b) const |
|  |
| template<typename Derived >  |
| NonInteger  | [exteriorDistance](classeigen_1_1alignedbox#a3915f625f0e57029ea27ace34aff29b2) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &p) const |
|  |
| [AlignedBox](classeigen_1_1alignedbox) | [intersection](classeigen_1_1alignedbox#ad3d947d3e32b1521bb1ccd9eab4c46cb) (const [AlignedBox](classeigen_1_1alignedbox) &b) const |
|  |
| bool  | [intersects](classeigen_1_1alignedbox#a0bdea9a9410af7ad6f63ce71a2f59443) (const [AlignedBox](classeigen_1_1alignedbox) &b) const |
|  |
| bool  | [isApprox](classeigen_1_1alignedbox#ad785aecce6792bd88c3a4de35d782f18) (const [AlignedBox](classeigen_1_1alignedbox) &other, const RealScalar &prec=ScalarTraits::dummy\_precision()) const |
|  |
| bool  | [isEmpty](classeigen_1_1alignedbox#a2d994551368f0d06876a31dccb26de59) () const |
|  |
| bool  | [isNull](classeigen_1_1alignedbox#a37b401dd265c942c9ef2db1e2b1e56e5) () const |
|  |
| [VectorType](classeigen_1_1matrix) &()  | [max](classeigen_1_1alignedbox#a0e0a35eb40a9079468f447c1bab8a400) () |
|  |
| const [VectorType](classeigen_1_1matrix) &()  | [max](classeigen_1_1alignedbox#a987d516532b24fcadc34d2f501579c73) () const |
|  |
| [AlignedBox](classeigen_1_1alignedbox) | [merged](classeigen_1_1alignedbox#a59eb62d949598853fbc83836e8f2960c) (const [AlignedBox](classeigen_1_1alignedbox) &b) const |
|  |
| [VectorType](classeigen_1_1matrix) &()  | [min](classeigen_1_1alignedbox#adad123f7e84a2437806a791b96af04bd) () |
|  |
| const [VectorType](classeigen_1_1matrix) &()  | [min](classeigen_1_1alignedbox#af7fddcf06b60392f3f21b4d8e0f763a0) () const |
|  |
| [VectorType](classeigen_1_1matrix) | [sample](classeigen_1_1alignedbox#adff08c9965ec5348e38b25d9bb41e9de) () const |
|  |
| void  | [setEmpty](classeigen_1_1alignedbox#a16bc3e6779107a091f08e4cb7e36e793) () |
|  |
| void  | [setNull](classeigen_1_1alignedbox#a2399d72bf7dbd9f3589c69f32cbec306) () |
|  |
| const [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_difference\_op< Scalar, Scalar >, const [VectorType](classeigen_1_1matrix), const [VectorType](classeigen_1_1matrix) >  | [sizes](classeigen_1_1alignedbox#a4d0f2228231a351280a1b14b1915fe7b) () const |
|  |
| Scalar  | [squaredExteriorDistance](classeigen_1_1alignedbox#aa91643da79398e454618ad06b92ff531) (const [AlignedBox](classeigen_1_1alignedbox) &b) const |
|  |
| template<typename Derived >  |
| Scalar  | [squaredExteriorDistance](classeigen_1_1alignedbox#a845dd8a069c204d15f12aa2702dd9539) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &p) const |
|  |
| template<int Mode, int Options>  |
| void  | [transform](classeigen_1_1alignedbox#ab078178e1abfbd078b27ade489b93303) (const [Transform](classeigen_1_1transform)< Scalar, AmbientDimAtCompileTime, Mode, Options > &transform) |
|  |
| template<int Mode, int Options>  |
| void  | [transform](classeigen_1_1alignedbox#aa39225243d4aca173391c0bb24d89b46) (const typename [Transform](classeigen_1_1transform)< Scalar, AmbientDimAtCompileTime, Mode, Options >::TranslationType &translation) |
|  |
| template<int Mode, int Options>  |
| [AlignedBox](classeigen_1_1alignedbox) | [transformed](classeigen_1_1alignedbox#abe249d52c411b1c9a6771d4ee379b9bf) (const [Transform](classeigen_1_1transform)< Scalar, AmbientDimAtCompileTime, Mode, Options > &[transform](classeigen_1_1alignedbox#aa39225243d4aca173391c0bb24d89b46)) const |
|  |
| template<typename Derived >  |
| [AlignedBox](classeigen_1_1alignedbox) &  | [translate](classeigen_1_1alignedbox#a319e3e6338893db6986533d545a92046) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &a\_t) |
|  |
| template<typename Derived >  |
| [AlignedBox](classeigen_1_1alignedbox) | [translated](classeigen_1_1alignedbox#a3d7dad56b2c9b6e3dc360c078c639f47) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &a\_t) const |
|  |
| Scalar  | [volume](classeigen_1_1alignedbox#ae048c23dc498b5012a080737e5b1d1c3) () const |
|  |

  Index
-----

    template<typename \_Scalar , int \_AmbientDim>  

|  |
| --- |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::[Index](classeigen_1_1alignedbox#a774ef355da13d6bee6a6e7244c15231a) |

 
 
**[Deprecated:](deprecated#_deprecated000021)**
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3 
    CornerType
----------

    template<typename \_Scalar , int \_AmbientDim>  

|  |
| --- |
| enum [Eigen::AlignedBox::CornerType](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378) |

 
 Define constants to name the corners of a 1D, 2D or 3D axis aligned bounding box 

 

| Enumerator |
| --- |
| Min  | 1D names  |
| Max  | 1D names  |
| BottomLeft  | Identifier for 2D corner  |
| BottomRight  | Identifier for 2D corner  |
| TopLeft  | Identifier for 2D corner  |
| TopRight  | Identifier for 2D corner  |
| BottomLeftFloor  | Identifier for 3D corner  |
| BottomRightFloor  | Identifier for 3D corner  |
| TopLeftFloor  | Identifier for 3D corner  |
| TopRightFloor  | Identifier for 3D corner  |
| BottomLeftCeil  | Identifier for 3D corner  |
| BottomRightCeil  | Identifier for 3D corner  |
| TopLeftCeil  | Identifier for 3D corner  |
| TopRightCeil  | Identifier for 3D corner  |

    AlignedBox() [1/5]
------------------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::[AlignedBox](classeigen_1_1alignedbox) | ( |  | ) |  |

 | inline |

 
 Default constructor initializing a null box. 

    AlignedBox() [2/5]
------------------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::[AlignedBox](classeigen_1_1alignedbox) | ( | [Index](classeigen_1_1alignedbox#a774ef355da13d6bee6a6e7244c15231a) | *\_dim* | ) |  |

 | inlineexplicit |

 
 Constructs a null box with *\_dim* the dimension of the ambient space. 

    AlignedBox() [3/5]
------------------

    template<typename \_Scalar , int \_AmbientDim>   template<typename OtherVectorType1 , typename OtherVectorType2 >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::[AlignedBox](classeigen_1_1alignedbox) | ( | const OtherVectorType1 &  | *\_min*,  |
|  |  | const OtherVectorType2 &  | *\_max* |
|  | ) |  |  |

 | inline |

 
 Constructs a box with extremities *\_min* and *\_max*. 



Warning
If either component of *\_min* is larger than the same component of *\_max*, the constructed box is empty. 
    AlignedBox() [4/5]
------------------

    template<typename \_Scalar , int \_AmbientDim>   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::[AlignedBox](classeigen_1_1alignedbox) | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *p* | ) |  |

 | inlineexplicit |

 
 Constructs a box containing a single point *p*. 

    AlignedBox() [5/5]
------------------

    template<typename \_Scalar , int \_AmbientDim>   template<typename OtherScalarType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::[AlignedBox](classeigen_1_1alignedbox) | ( | const [AlignedBox](classeigen_1_1alignedbox)< OtherScalarType, AmbientDimAtCompileTime > &  | *other* | ) |  |

 | inlineexplicit |

 
 Copy constructor with scalar type conversion 

    cast()
------

    template<typename \_Scalar , int \_AmbientDim>   template<typename NewScalarType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::cast\_return\_type<[AlignedBox](classeigen_1_1alignedbox), [AlignedBox](classeigen_1_1alignedbox)<NewScalarType,AmbientDimAtCompileTime> >::type [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::cast  | ( |  | ) |  const |

 | inline |

 
 
Returns

`*this` with scalar type casted to *NewScalarType* 
 Note that if *NewScalarType* is equal to the current scalar type of `*this` then this function smartly returns a const reference to `*this`. 

    clamp()
-------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [AlignedBox](classeigen_1_1alignedbox)& [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::clamp  | ( | const [AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim > &  | *b* | ) |  |

 | inline |

 
 Clamps `*this` by the box *b* and returns a reference to `*this`. 



Note
If the boxes don't intersect, the resulting box is empty. 
 
See also

[intersection()](classeigen_1_1alignedbox#ad3d947d3e32b1521bb1ccd9eab4c46cb), [intersects()](classeigen_1_1alignedbox#a0bdea9a9410af7ad6f63ce71a2f59443) 
    contains() [1/2]
----------------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| bool [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::contains  | ( | const [AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim > &  | *b* | ) |  const |

 | inline |

 
 
Returns
true if the box *b* is entirely inside the box `*this`. 
    contains() [2/2]
----------------

    template<typename \_Scalar , int \_AmbientDim>   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| bool [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::contains  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *p* | ) |  const |

 | inline |

 
 
Returns
true if the point *p* is inside the box `*this`. 
    corner()
--------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [VectorType](classeigen_1_1matrix) [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::corner  | ( | [CornerType](classeigen_1_1alignedbox#ae4aa935b36004fffc49c7a3a85e2d378) | *corner* | ) |  const |

 | inline |

 
 
Returns
the vertex of the bounding box at the corner defined by the corner-id corner. It works only for a 1D, 2D or 3D bounding box. For 1D bounding boxes corners are named by 2 enum constants: BottomLeft and BottomRight. For 2D bounding boxes, corners are named by 4 enum constants: BottomLeft, BottomRight, TopLeft, TopRight. For 3D bounding boxes, the following names are added: BottomLeftCeil, BottomRightCeil, TopLeftCeil, TopRightCeil. 
    diagonal()
----------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_difference\_op<Scalar,Scalar>, const [VectorType](classeigen_1_1matrix), const [VectorType](classeigen_1_1matrix)> [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::diagonal  | ( |  | ) |  const |

 | inline |

 
 
Returns
an expression for the bounding box diagonal vector if the length of the diagonal is needed: [diagonal()](classeigen_1_1alignedbox#a92fbafe85f1c941ed0b4c92711e8db56).norm() will provide it. 
    dim()
-----

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](classeigen_1_1alignedbox#a774ef355da13d6bee6a6e7244c15231a) [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::dim  | ( |  | ) |  const |

 | inline |

 
 
Returns
the dimension in which the box holds 
    EIGEN\_EXPR\_BINARYOP\_SCALAR\_RETURN\_TYPE()
---------------------------------------------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::EIGEN\_EXPR\_BINARYOP\_SCALAR\_RETURN\_TYPE  | ( | [VectorTypeSum](classeigen_1_1cwisebinaryop) | ,  |
|  |  | RealScalar  | ,  |
|  |  | quotient  |  |
|  | ) |  |  const |

 | inline |

 
 
Returns
the center of the box 
    extend() [1/2]
--------------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [AlignedBox](classeigen_1_1alignedbox)& [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::extend  | ( | const [AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim > &  | *b* | ) |  |

 | inline |

 
 Extends `*this` such that it contains the box *b* and returns a reference to `*this`. 



See also

[merged](classeigen_1_1alignedbox#a59eb62d949598853fbc83836e8f2960c), [extend(const MatrixBase&)](classeigen_1_1alignedbox#ac252032292dcf60984191e4dd26f0955) 
    extend() [2/2]
--------------

    template<typename \_Scalar , int \_AmbientDim>   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [AlignedBox](classeigen_1_1alignedbox)& [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::extend  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *p* | ) |  |

 | inline |

 
 Extends `*this` such that it contains the point *p* and returns a reference to `*this`. 



See also

[extend(const AlignedBox&)](classeigen_1_1alignedbox#a0ca284f3375f68b9e9aef558cd5bcd37) 
    exteriorDistance() [1/2]
------------------------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| NonInteger [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::exteriorDistance  | ( | const [AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim > &  | *b* | ) |  const |

 | inline |

 
 
Returns
the distance between the boxes *b* and `*this`, and zero if the boxes intersect. 
 
See also
squaredExteriorDistance(const AlignedBox&), exteriorDistance(const MatrixBase&) 
    exteriorDistance() [2/2]
------------------------

    template<typename \_Scalar , int \_AmbientDim>   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| NonInteger [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::exteriorDistance  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *p* | ) |  const |

 | inline |

 
 
Returns
the distance between the point *p* and the box `*this`, and zero if *p* is inside the box. 
 
See also
squaredExteriorDistance(const MatrixBase&), exteriorDistance(const AlignedBox&) 
    intersection()
--------------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [AlignedBox](classeigen_1_1alignedbox) [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::intersection  | ( | const [AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim > &  | *b* | ) |  const |

 | inline |

 
 Returns an [AlignedBox](classeigen_1_1alignedbox "An axis aligned box.") that is the intersection of *b* and `*this` 



Note
If the boxes don't intersect, the resulting box is empty. 
 
See also

[intersects()](classeigen_1_1alignedbox#a0bdea9a9410af7ad6f63ce71a2f59443), [clamp](classeigen_1_1alignedbox#a683b454f1571780e8ddfc5d781949b51), [contains()](classeigen_1_1alignedbox#a8bfd8127621e4a19032945744adf5041)   
 
    intersects()
------------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| bool [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::intersects  | ( | const [AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim > &  | *b* | ) |  const |

 | inline |

 
 
Returns
true if the box *b* is intersecting the box `*this`. 
 
See also

[intersection](classeigen_1_1alignedbox#ad3d947d3e32b1521bb1ccd9eab4c46cb), [clamp](classeigen_1_1alignedbox#a683b454f1571780e8ddfc5d781949b51) 
    isApprox()
----------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::isApprox  | ( | const [AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim > &  | *other*,  |
|  |  | const RealScalar &  | *prec* = `ScalarTraits::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 
Returns

`true` if `*this` is approximately equal to *other*, within the precision determined by *prec*.
 
See also

[MatrixBase::isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) 
    isEmpty()
---------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::isEmpty  | ( |  | ) |  const |

 | inline |

 
 
Returns
true if the box is empty. 
 
See also

[setEmpty](classeigen_1_1alignedbox#a16bc3e6779107a091f08e4cb7e36e793) 
    isNull()
--------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::isNull  | ( |  | ) |  const |

 | inline |

 
 
**[Deprecated:](deprecated#_deprecated000022)**
use [isEmpty()](classeigen_1_1alignedbox#a2d994551368f0d06876a31dccb26de59) 
    max() [1/2]
-----------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [VectorType](classeigen_1_1matrix)&() [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::max  | ( |  | ) |  |

 | inline |

 
 
Returns
a non const reference to the maximal corner 
    max() [2/2]
-----------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [VectorType](classeigen_1_1matrix)&() [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::max  | ( |  | ) |  const |

 | inline |

 
 
Returns
the maximal corner 
    merged()
--------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [AlignedBox](classeigen_1_1alignedbox) [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::merged  | ( | const [AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim > &  | *b* | ) |  const |

 | inline |

 
 Returns an [AlignedBox](classeigen_1_1alignedbox "An axis aligned box.") that is the union of *b* and `*this`. 



Note
Merging with an empty box may result in a box bigger than `*this`. 
 
See also

[extend(const AlignedBox&)](classeigen_1_1alignedbox#a0ca284f3375f68b9e9aef558cd5bcd37) 
    min() [1/2]
-----------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [VectorType](classeigen_1_1matrix)&() [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::min  | ( |  | ) |  |

 | inline |

 
 
Returns
a non const reference to the minimal corner 
    min() [2/2]
-----------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [VectorType](classeigen_1_1matrix)&() [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::min  | ( |  | ) |  const |

 | inline |

 
 
Returns
the minimal corner 
    sample()
--------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [VectorType](classeigen_1_1matrix) [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::sample  | ( |  | ) |  const |

 | inline |

 
 
Returns
a random point inside the bounding box sampled with a uniform distribution 
    setEmpty()
----------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::setEmpty  | ( |  | ) |  |

 | inline |

 
 Makes `*this` an empty box. 



See also

[isEmpty](classeigen_1_1alignedbox#a2d994551368f0d06876a31dccb26de59) 
    setNull()
---------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::setNull  | ( |  | ) |  |

 | inline |

 
 
**[Deprecated:](deprecated#_deprecated000023)**
use [setEmpty()](classeigen_1_1alignedbox#a16bc3e6779107a091f08e4cb7e36e793) 
    sizes()
-------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_difference\_op<Scalar,Scalar>, const [VectorType](classeigen_1_1matrix), const [VectorType](classeigen_1_1matrix)> [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::sizes  | ( |  | ) |  const |

 | inline |

 
 
Returns
the lengths of the sides of the bounding box. Note that this function does not get the same result for integral or floating scalar types: see 
    squaredExteriorDistance() [1/2]
-------------------------------

    template<typename Scalar , int AmbientDim>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Scalar [Eigen::AlignedBox](classeigen_1_1alignedbox)< Scalar, AmbientDim >::squaredExteriorDistance  | ( | const [AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim > &  | *b* | ) |  const |

 | inline |

 
 
Returns
the squared distance between the boxes *b* and `*this`, and zero if the boxes intersect. 
 
See also
exteriorDistance(const AlignedBox&), squaredExteriorDistance(const MatrixBase&) 
    squaredExteriorDistance() [2/2]
-------------------------------

    template<typename Scalar , int AmbientDim>   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Scalar [Eigen::AlignedBox](classeigen_1_1alignedbox)< Scalar, AmbientDim >::squaredExteriorDistance  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *p* | ) |  const |

 | inline |

 
 
Returns
the squared distance between the point *p* and the box `*this`, and zero if *p* is inside the box. 
 
See also
exteriorDistance(const MatrixBase&), squaredExteriorDistance(const AlignedBox&) 
    transform() [1/2]
-----------------

    template<typename \_Scalar , int \_AmbientDim>   template<int Mode, int Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::transform  | ( | const [Transform](classeigen_1_1transform)< Scalar, AmbientDimAtCompileTime, Mode, Options > &  | *transform* | ) |  |

 | inline |

 
 Transforms this box by *transform* and recomputes it to still be an axis-aligned box.

 
Note
This method is provided under BSD license (see the top of this file). 
    transform() [2/2]
-----------------

    template<typename \_Scalar , int \_AmbientDim>   template<int Mode, int Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::transform  | ( | const typename [Transform](classeigen_1_1transform)< Scalar, AmbientDimAtCompileTime, Mode, Options >::TranslationType &  | *translation* | ) |  |

 | inline |

 
 Specialization of transform for pure translation. 

    transformed()
-------------

    template<typename \_Scalar , int \_AmbientDim>   template<int Mode, int Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [AlignedBox](classeigen_1_1alignedbox) [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::transformed  | ( | const [Transform](classeigen_1_1transform)< Scalar, AmbientDimAtCompileTime, Mode, Options > &  | *transform* | ) |  const |

 | inline |

 
 
Returns
a copy of `*this` transformed by *transform* and recomputed to still be an axis-aligned box. 
    translate()
-----------

    template<typename \_Scalar , int \_AmbientDim>   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [AlignedBox](classeigen_1_1alignedbox)& [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::translate  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *a\_t* | ) |  |

 | inline |

 
 Translate `*this` by the vector *t* and returns a reference to `*this`. 

    translated()
------------

    template<typename \_Scalar , int \_AmbientDim>   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [AlignedBox](classeigen_1_1alignedbox) [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::translated  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *a\_t* | ) |  const |

 | inline |

 
 
Returns
a copy of `*this` translated by the vector *t*. 
    volume()
--------

    template<typename \_Scalar , int \_AmbientDim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar [Eigen::AlignedBox](classeigen_1_1alignedbox)< \_Scalar, \_AmbientDim >::volume  | ( |  | ) |  const |

 | inline |

 
 
Returns
the volume of the bounding box 
   

---

The documentation for this class was generated from the following file:* [AlignedBox.h](https://eigen.tuxfamily.org/dox/AlignedBox_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1AlignedBox.html>

Eigen::ComplexSchur
===================

  
### template<typename \_MatrixType> class Eigen::ComplexSchur< \_MatrixType >

 Performs a complex Schur decomposition of a real or complex square matrix. 

 This is defined in the Eigenvalues module.



```
#include <Eigen/Eigenvalues> 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which we are computing the Schur decomposition; this is expected to be an instantiation of the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class template. |

   Given a real or complex square matrix A, this class computes the Schur decomposition: \( A = U T U^\*\) where U is a unitary complex matrix, and T is a complex upper triangular matrix. The diagonal of the matrix T corresponds to the eigenvalues of the matrix A.

 Call the function [compute()](classeigen_1_1complexschur#a3543d2c286563108cd9ace672bbb1c09 "Computes Schur decomposition of given matrix.") to compute the Schur decomposition of a given matrix. Alternatively, you can use the ComplexSchur(const MatrixType&, bool) constructor which computes the Schur decomposition at construction time. Once the decomposition is computed, you can use the [matrixU()](classeigen_1_1complexschur#afed8177cf9836f032d42bdb6c6bc6e01 "Returns the unitary matrix in the Schur decomposition.") and [matrixT()](classeigen_1_1complexschur#add3ab5ed83f7f2f06b79fa910a2d5684 "Returns the triangular matrix in the Schur decomposition.") functions to retrieve the matrices U and V in the decomposition.

 
Note
This code is inspired from Jampack
 
See also
class [RealSchur](classeigen_1_1realschur "Performs a real Schur decomposition of a square matrix."), class [EigenSolver](classeigen_1_1eigensolver "Computes eigenvalues and eigenvectors of general matrices."), class [ComplexEigenSolver](classeigen_1_1complexeigensolver "Computes eigenvalues and eigenvectors of general complex matrices.") 
 


|  |
| --- |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [ComplexScalar](classeigen_1_1complexschur#ae1a4713b53f821867fbad617e426832a), RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime >  | [ComplexMatrixType](classeigen_1_1complexschur#af61fe57877d51cfb50178f78534042f0) |
|  | Type for the matrices in the Schur decomposition. [More...](classeigen_1_1complexschur#af61fe57877d51cfb50178f78534042f0) |
|  |
| typedef std::complex< RealScalar >  | [ComplexScalar](classeigen_1_1complexschur#ae1a4713b53f821867fbad617e426832a) |
|  | Complex scalar type for `_MatrixType`. [More...](classeigen_1_1complexschur#ae1a4713b53f821867fbad617e426832a) |
|  |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1complexschur#a652104d13723a5b1db2937866a034557) |
|  |
|  typedef MatrixType::Scalar  | [Scalar](classeigen_1_1complexschur#a9a8ee9df37ee1f90d0e53103c58683c0) |
|  | Scalar type for matrices of type `_MatrixType`.  |
|  |




|  |
| --- |
|  |
| template<typename InputType >  |
|  | [ComplexSchur](classeigen_1_1complexschur#a9c92c6e4c33890d2d063c5c8dd22777d) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix, bool computeU=true) |
|  | Constructor; computes Schur decomposition of given matrix. [More...](classeigen_1_1complexschur#a9c92c6e4c33890d2d063c5c8dd22777d) |
|  |
|  | [ComplexSchur](classeigen_1_1complexschur#ad707d9978dc36b3b15e460c2a83f4093) ([Index](classeigen_1_1complexschur#a652104d13723a5b1db2937866a034557) size=RowsAtCompileTime==[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) ? 1 :RowsAtCompileTime) |
|  | Default constructor. [More...](classeigen_1_1complexschur#ad707d9978dc36b3b15e460c2a83f4093) |
|  |
| template<typename InputType >  |
| [ComplexSchur](classeigen_1_1complexschur) &  | [compute](classeigen_1_1complexschur#a3543d2c286563108cd9ace672bbb1c09) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix, bool computeU=true) |
|  | Computes Schur decomposition of given matrix. [More...](classeigen_1_1complexschur#a3543d2c286563108cd9ace672bbb1c09) |
|  |
| template<typename HessMatrixType , typename OrthMatrixType >  |
| [ComplexSchur](classeigen_1_1complexschur) &  | [computeFromHessenberg](classeigen_1_1complexschur#a05dfbf329047aba756a844f8fe2de314) (const HessMatrixType &matrixH, const OrthMatrixType &matrixQ, bool computeU=true) |
|  | Compute Schur decomposition from a given Hessenberg matrix. [More...](classeigen_1_1complexschur#a05dfbf329047aba756a844f8fe2de314) |
|  |
|  [Index](classeigen_1_1complexschur#a652104d13723a5b1db2937866a034557) | [getMaxIterations](classeigen_1_1complexschur#a2fc0b7bc409a49e7cdb7b6edcfff26eb) () |
|  | Returns the maximum number of iterations.  |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1complexschur#a8c5ee15fecfd126fc362c3f2fd28f51e) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1complexschur#a8c5ee15fecfd126fc362c3f2fd28f51e) |
|  |
| const [ComplexMatrixType](classeigen_1_1complexschur#af61fe57877d51cfb50178f78534042f0) &  | [matrixT](classeigen_1_1complexschur#add3ab5ed83f7f2f06b79fa910a2d5684) () const |
|  | Returns the triangular matrix in the Schur decomposition. [More...](classeigen_1_1complexschur#add3ab5ed83f7f2f06b79fa910a2d5684) |
|  |
| const [ComplexMatrixType](classeigen_1_1complexschur#af61fe57877d51cfb50178f78534042f0) &  | [matrixU](classeigen_1_1complexschur#afed8177cf9836f032d42bdb6c6bc6e01) () const |
|  | Returns the unitary matrix in the Schur decomposition. [More...](classeigen_1_1complexschur#afed8177cf9836f032d42bdb6c6bc6e01) |
|  |
| [ComplexSchur](classeigen_1_1complexschur) &  | [setMaxIterations](classeigen_1_1complexschur#a6ca227fbd5387f3a625351354b8eec44) ([Index](classeigen_1_1complexschur#a652104d13723a5b1db2937866a034557) maxIters) |
|  | Sets the maximum number of iterations allowed. [More...](classeigen_1_1complexschur#a6ca227fbd5387f3a625351354b8eec44) |
|  |




|  |
| --- |
|  |
| static const int  | [m\_maxIterationsPerRow](classeigen_1_1complexschur#ad37ef6058ce690a1fac4cc524b70cbf0) |
|  | Maximum number of iterations per row. [More...](classeigen_1_1complexschur#ad37ef6058ce690a1fac4cc524b70cbf0) |
|  |

  ComplexMatrixType
-----------------

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<[ComplexScalar](classeigen_1_1complexschur#ae1a4713b53f821867fbad617e426832a), RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime> [Eigen::ComplexSchur](classeigen_1_1complexschur)< \_MatrixType >::[ComplexMatrixType](classeigen_1_1complexschur#af61fe57877d51cfb50178f78534042f0) |

 
 Type for the matrices in the Schur decomposition. 

 This is a square matrix with entries of type [ComplexScalar](classeigen_1_1complexschur#ae1a4713b53f821867fbad617e426832a "Complex scalar type for _MatrixType."). The size is the same as the size of `_MatrixType`. 

    ComplexScalar
-------------

    template<typename \_MatrixType >  

|  |
| --- |
| typedef std::complex<RealScalar> [Eigen::ComplexSchur](classeigen_1_1complexschur)< \_MatrixType >::[ComplexScalar](classeigen_1_1complexschur#ae1a4713b53f821867fbad617e426832a) |

 
 Complex scalar type for `_MatrixType`. 

 This is `std::complex<Scalar>` if [Scalar](classeigen_1_1complexschur#a9a8ee9df37ee1f90d0e53103c58683c0 "Scalar type for matrices of type _MatrixType.") is real (e.g., `float` or `double`) and just `Scalar` if [Scalar](classeigen_1_1complexschur#a9a8ee9df37ee1f90d0e53103c58683c0 "Scalar type for matrices of type _MatrixType.") is complex. 

    Index
-----

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::ComplexSchur](classeigen_1_1complexschur)< \_MatrixType >::[Index](classeigen_1_1complexschur#a652104d13723a5b1db2937866a034557) |

 
 
**[Deprecated:](deprecated#_deprecated000013)**
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3 
    ComplexSchur() [1/2]
--------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::ComplexSchur](classeigen_1_1complexschur)< \_MatrixType >::[ComplexSchur](classeigen_1_1complexschur) | ( | [Index](classeigen_1_1complexschur#a652104d13723a5b1db2937866a034557) | *size* = `RowsAtCompileTime==[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) ? 1 : RowsAtCompileTime` | ) |  |

 | inlineexplicit |

 
 Default constructor. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | size | Positive integer, size of the matrix whose Schur decomposition will be computed. |

   The default constructor is useful in cases in which the user intends to perform decompositions via [compute()](classeigen_1_1complexschur#a3543d2c286563108cd9ace672bbb1c09 "Computes Schur decomposition of given matrix."). The `size` parameter is only used as a hint. It is not an error to give a wrong `size`, but it may impair performance.

 
See also

[compute()](classeigen_1_1complexschur#a3543d2c286563108cd9ace672bbb1c09 "Computes Schur decomposition of given matrix.") for an example. 
    ComplexSchur() [2/2]
--------------------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::ComplexSchur](classeigen_1_1complexschur)< \_MatrixType >::[ComplexSchur](classeigen_1_1complexschur) | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix*,  |
|  |  | bool  | *computeU* = `true` |
|  | ) |  |  |

 | inlineexplicit |

 
 Constructor; computes Schur decomposition of given matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matrix | Square matrix whose Schur decomposition is to be computed.  |
| [in] | computeU | If true, both T and U are computed; if false, only T is computed. |

   This constructor calls [compute()](classeigen_1_1complexschur#a3543d2c286563108cd9ace672bbb1c09 "Computes Schur decomposition of given matrix.") to compute the Schur decomposition.

 
See also

[matrixT()](classeigen_1_1complexschur#add3ab5ed83f7f2f06b79fa910a2d5684 "Returns the triangular matrix in the Schur decomposition.") and [matrixU()](classeigen_1_1complexschur#afed8177cf9836f032d42bdb6c6bc6e01 "Returns the unitary matrix in the Schur decomposition.") for examples. 
    compute()
---------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [ComplexSchur](classeigen_1_1complexschur)& [Eigen::ComplexSchur](classeigen_1_1complexschur)< \_MatrixType >::compute  | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix*,  |
|  |  | bool  | *computeU* = `true` |
|  | ) |  |  |

 
 Computes Schur decomposition of given matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matrix | Square matrix whose Schur decomposition is to be computed.  |
| [in] | computeU | If true, both T and U are computed; if false, only T is computed. |

   
Returns
Reference to `*this` 
 The Schur decomposition is computed by first reducing the matrix to Hessenberg form using the class [HessenbergDecomposition](classeigen_1_1hessenbergdecomposition "Reduces a square matrix to Hessenberg form by an orthogonal similarity transformation."). The Hessenberg matrix is then reduced to triangular form by performing QR iterations with a single shift. The cost of computing the Schur decomposition depends on the number of iterations; as a rough guide, it may be taken on the number of iterations; as a rough guide, it may be taken to be \(25n^3\) complex flops, or \(10n^3\) complex flops if *computeU* is false.

 Example: 



```
MatrixXcf A = [MatrixXcf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
ComplexSchur<MatrixXcf> schur(4);
schur.compute(A);
cout << "The matrix T in the decomposition of A is:" << endl << schur.matrixT() << endl;
schur.compute(A.inverse());
cout << "The matrix T in the decomposition of A^(-1) is:" << endl << schur.matrixT() << endl;
```

 Output: 



```
The matrix T in the decomposition of A is:
 (-0.691,-1.63)  (0.763,-0.144) (-0.104,-0.836) (-0.462,-0.378)
          (0,0)   (-0.758,1.22)  (-0.65,-0.772)  (-0.244,0.113)
          (0,0)           (0,0)   (0.137,0.505) (0.0687,-0.404)
          (0,0)           (0,0)           (0,0)   (1.52,-0.402)
The matrix T in the decomposition of A^(-1) is:
    (0.501,-1.84)    (-1.01,-0.984)       (0.636,1.3)    (-0.676,0.352)
            (0,0)   (-0.369,-0.593)     (0.0733,0.18) (-0.0658,-0.0263)
            (0,0)             (0,0)    (-0.222,0.521)    (-0.191,0.121)
            (0,0)             (0,0)             (0,0)     (0.614,0.162)

```


See also
compute(const MatrixType&, bool, Index) 
    computeFromHessenberg()
-----------------------

    template<typename \_MatrixType >   template<typename HessMatrixType , typename OrthMatrixType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [ComplexSchur](classeigen_1_1complexschur)& [Eigen::ComplexSchur](classeigen_1_1complexschur)< \_MatrixType >::computeFromHessenberg  | ( | const HessMatrixType &  | *matrixH*,  |
|  |  | const OrthMatrixType &  | *matrixQ*,  |
|  |  | bool  | *computeU* = `true` |
|  | ) |  |  |

 
 Compute Schur decomposition from a given Hessenberg matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matrixH | [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") in Hessenberg form H  |
| [in] | matrixQ | orthogonal matrix Q that transform a matrix A to H : A = Q H Q^T  |
|  | computeU | Computes the matriX U of the Schur vectors  |

   
Returns
Reference to `*this` 
 This routine assumes that the matrix is already reduced in Hessenberg form matrixH using either the class [HessenbergDecomposition](classeigen_1_1hessenbergdecomposition "Reduces a square matrix to Hessenberg form by an orthogonal similarity transformation.") or another mean. It computes the upper quasi-triangular matrix T of the Schur decomposition of H When computeU is true, this routine computes the matrix U such that A = U T U^T = (QZ) T (QZ)^T = Q H Q^T where A is the initial matrix

 NOTE Q is referenced if computeU is true; so, if the initial orthogonal matrix is not available, the user should give an identity matrix (Q.setIdentity())

 
See also
compute(const MatrixType&, bool) 
    info()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::ComplexSchur](classeigen_1_1complexschur)< \_MatrixType >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether previous computation was successful. 

 
Returns

`Success` if computation was successful, `NoConvergence` otherwise. 
    matrixT()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [ComplexMatrixType](classeigen_1_1complexschur#af61fe57877d51cfb50178f78534042f0)& [Eigen::ComplexSchur](classeigen_1_1complexschur)< \_MatrixType >::matrixT  | ( |  | ) |  const |

 | inline |

 
 Returns the triangular matrix in the Schur decomposition. 

 
Returns
A const reference to the matrix T.
 It is assumed that either the constructor ComplexSchur(const MatrixType& matrix, bool computeU) or the member function compute(const MatrixType& matrix, bool computeU) has been called before to compute the Schur decomposition of a matrix.

 Note that this function returns a plain square matrix. If you want to reference only the upper triangular part, use: 



```
schur.matrixT().triangularView<[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>() 
```

Example: 



```
MatrixXcf A = [MatrixXcf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
cout << "Here is a random 4x4 matrix, A:" << endl << A << endl << endl;
ComplexSchur<MatrixXcf> schurOfA(A, false); // false means do not compute U
cout << "The triangular matrix T is:" << endl << schurOfA.matrixT() << endl;

```

 Output: 



```
Here is a random 4x4 matrix, A:
  (-0.211,0.68)  (0.108,-0.444)   (0.435,0.271) (-0.198,-0.687)
  (0.597,0.566) (0.258,-0.0452)  (0.214,-0.717)  (-0.782,-0.74)
 (-0.605,0.823)  (0.0268,-0.27) (-0.514,-0.967)  (-0.563,0.998)
  (0.536,-0.33)   (0.832,0.904)  (0.608,-0.726)  (0.678,0.0259)

The triangular matrix T is:
 (-0.691,-1.63)  (0.763,-0.144) (-0.104,-0.836) (-0.462,-0.378)
          (0,0)   (-0.758,1.22)  (-0.65,-0.772)  (-0.244,0.113)
          (0,0)           (0,0)   (0.137,0.505) (0.0687,-0.404)
          (0,0)           (0,0)           (0,0)   (1.52,-0.402)

```
    matrixU()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [ComplexMatrixType](classeigen_1_1complexschur#af61fe57877d51cfb50178f78534042f0)& [Eigen::ComplexSchur](classeigen_1_1complexschur)< \_MatrixType >::matrixU  | ( |  | ) |  const |

 | inline |

 
 Returns the unitary matrix in the Schur decomposition. 

 
Returns
A const reference to the matrix U.
 It is assumed that either the constructor ComplexSchur(const MatrixType& matrix, bool computeU) or the member function compute(const MatrixType& matrix, bool computeU) has been called before to compute the Schur decomposition of a matrix, and that `computeU` was set to true (the default value).

 Example: 



```
MatrixXcf A = [MatrixXcf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
cout << "Here is a random 4x4 matrix, A:" << endl << A << endl << endl;
ComplexSchur<MatrixXcf> schurOfA(A);
cout << "The unitary matrix U is:" << endl << schurOfA.matrixU() << endl;

```

 Output: 



```
Here is a random 4x4 matrix, A:
  (-0.211,0.68)  (0.108,-0.444)   (0.435,0.271) (-0.198,-0.687)
  (0.597,0.566) (0.258,-0.0452)  (0.214,-0.717)  (-0.782,-0.74)
 (-0.605,0.823)  (0.0268,-0.27) (-0.514,-0.967)  (-0.563,0.998)
  (0.536,-0.33)   (0.832,0.904)  (0.608,-0.726)  (0.678,0.0259)

The unitary matrix U is:
 (-0.122,0.271)   (0.354,0.255)    (-0.7,0.321) (0.0909,-0.346)
   (0.247,0.23)  (0.435,-0.395)   (0.184,-0.38)  (0.492,-0.347)
(0.859,-0.0877)  (0.00469,0.21) (-0.256,0.0163)   (0.133,0.355)
 (-0.116,0.195) (-0.484,-0.432)  (-0.183,0.359)   (0.559,0.231)

```
    setMaxIterations()
------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [ComplexSchur](classeigen_1_1complexschur)& [Eigen::ComplexSchur](classeigen_1_1complexschur)< \_MatrixType >::setMaxIterations  | ( | [Index](classeigen_1_1complexschur#a652104d13723a5b1db2937866a034557) | *maxIters* | ) |  |

 | inline |

 
 Sets the maximum number of iterations allowed. 

 If not specified by the user, the maximum number of iterations is m\_maxIterationsPerRow times the size of the matrix. 

    m\_maxIterationsPerRow
----------------------

    template<typename \_MatrixType >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const int [Eigen::ComplexSchur](classeigen_1_1complexschur)< \_MatrixType >::m\_maxIterationsPerRow |

 | static |

 
 Maximum number of iterations per row. 

 If not otherwise specified, the maximum number of iterations is this number times the size of the matrix. It is currently set to 30. 

   

---

The documentation for this class was generated from the following file:* [ComplexSchur.h](https://eigen.tuxfamily.org/dox/ComplexSchur_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1ComplexSchur.html>

Eigen::CwiseBinaryOp
====================

  
### template<typename BinaryOp, typename LhsType, typename RhsType> class Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >

 Generic expression where a coefficient-wise binary operator is applied to two expressions. 

 
Template Parameters
 

|  |  |
| --- | --- |
| BinaryOp | template functor implementing the operator  |
| LhsType | the type of the left-hand side  |
| RhsType | the type of the right-hand side |

   This class represents an expression where a coefficient-wise binary operator is applied to two expressions. It is the return type of binary operators, by which we mean only those binary operators where both the left-hand side and the right-hand side are [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") expressions. For example, the return type of matrix1+matrix2 is a [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions.").

 Most of the time, this is the only way that it is used, so you typically don't have to name [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions.") types explicitly.

 
See also
MatrixBase::binaryExpr(const MatrixBase<OtherDerived> &,const CustomBinaryOp &) const, class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression."), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.") 
  Inherits Eigen::CwiseBinaryOpImpl< BinaryOp, LhsType, RhsType, internal::cwise\_promote\_storage\_type< internal::traits< LhsType >::StorageKind, internal::traits< RhsType >::StorageKind, BinaryOp >::ret >, and Eigen::internal::no\_assignment\_operator.

 

|  |
| --- |
|  |
| const BinaryOp &  | [functor](classeigen_1_1cwisebinaryop#adfb40100689f5e13be1786db5d7fecbf) () const |
|  |
| const \_LhsNested &  | [lhs](classeigen_1_1cwisebinaryop#a33b8ee8eda1d963591b80ec07525f918) () const |
|  |
| const \_RhsNested &  | [rhs](classeigen_1_1cwisebinaryop#ae508116a8a328c0ca01df38cb4819663) () const |
|  |

  functor()
---------

    template<typename BinaryOp , typename LhsType , typename RhsType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const BinaryOp& [Eigen::CwiseBinaryOp](classeigen_1_1cwisebinaryop)< BinaryOp, LhsType, RhsType >::functor  | ( |  | ) |  const |

 | inline |

 
 
Returns
the functor representing the binary operation 
    lhs()
-----

    template<typename BinaryOp , typename LhsType , typename RhsType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const \_LhsNested& [Eigen::CwiseBinaryOp](classeigen_1_1cwisebinaryop)< BinaryOp, LhsType, RhsType >::lhs  | ( |  | ) |  const |

 | inline |

 
 
Returns
the left hand side nested expression 
    rhs()
-----

    template<typename BinaryOp , typename LhsType , typename RhsType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const \_RhsNested& [Eigen::CwiseBinaryOp](classeigen_1_1cwisebinaryop)< BinaryOp, LhsType, RhsType >::rhs  | ( |  | ) |  const |

 | inline |

 
 
Returns
the right hand side nested expression 
   

---

The documentation for this class was generated from the following file:* [CwiseBinaryOp.h](https://eigen.tuxfamily.org/dox/CwiseBinaryOp_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1CwiseBinaryOp.html>

Eigen::CwiseNullaryOp
=====================

  
### template<typename NullaryOp, typename PlainObjectType> class Eigen::CwiseNullaryOp< NullaryOp, PlainObjectType >

 Generic expression of a matrix where all coefficients are defined by a functor. 

 
Template Parameters
 

|  |  |
| --- | --- |
| NullaryOp | template functor implementing the operator  |
| PlainObjectType | the underlying plain matrix/array type |

   This class represents an expression of a generic nullary operator. It is the return type of the Ones(), Zero(), Constant(), Identity() and Random() methods, and most of the time this is the only way it is used.

 However, if you want to write a function returning such an expression, you will need to use this class.

 The functor NullaryOp must expose one of the following method: 




|  |  |
| --- | --- |
| `operator()()` | if the procedural generation does not depend on the coefficient entries (e.g., random numbers)  |
| `operator()(Index i)` | if the procedural generation makes sense for vectors only and that it depends on the coefficient index `i` (e.g., linspace)  |
| `operator()(Index i,Index j)` | if the procedural generation depends on the matrix coordinates `i`, `j` (e.g., to generate a checkerboard with 0 and 1)  |

 It is also possible to expose the last two operators if the generation makes sense for matrices but can be optimized for vectors.

 See [DenseBase::NullaryExpr(Index,const CustomNullaryOp&)](classeigen_1_1densebase#a9752ee59976a4b4aad860ad1a9093e7f) for an example binding C++11 random number generators.

 A nullary expression can also be used to implement custom sophisticated matrix manipulations that cannot be covered by the existing set of natively supported matrix manipulations. See this [page](topiccustomizing_nullaryexpr) for some examples and additional explanations on the behavior of [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.").

 
See also
class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression."), class [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions."), [DenseBase::NullaryExpr](classeigen_1_1densebase#a3340c9b997f5b53a0131cf927f93b54c) 
  Inherits internal::dense\_xpr\_base::type, and Eigen::internal::no\_assignment\_operator.

 

|  |
| --- |
|  |
| const NullaryOp &  | [functor](classeigen_1_1cwisenullaryop#afef9c2479e357786e4c92da1aa625248) () const |
|  |

  functor()
---------

    template<typename NullaryOp , typename PlainObjectType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const NullaryOp& [Eigen::CwiseNullaryOp](classeigen_1_1cwisenullaryop)< NullaryOp, PlainObjectType >::functor  | ( |  | ) |  const |

 | inline |

 
 
Returns
the functor representing the nullary operation 
   

---

The documentation for this class was generated from the following file:* [CwiseNullaryOp.h](https://eigen.tuxfamily.org/dox/CwiseNullaryOp_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1CwiseNullaryOp.html>

Eigen::CwiseTernaryOp
=====================

  
### template<typename TernaryOp, typename Arg1Type, typename Arg2Type, typename Arg3Type> class Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >

 Generic expression where a coefficient-wise ternary operator is applied to two expressions. 

 
Template Parameters
 

|  |  |
| --- | --- |
| TernaryOp | template functor implementing the operator  |
| Arg1Type | the type of the first argument  |
| Arg2Type | the type of the second argument  |
| Arg3Type | the type of the third argument |

   This class represents an expression where a coefficient-wise ternary operator is applied to three expressions. It is the return type of ternary operators, by which we mean only those ternary operators where all three arguments are [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") expressions. For example, the return type of betainc(matrix1, matrix2, matrix3) is a [CwiseTernaryOp](classeigen_1_1cwiseternaryop "Generic expression where a coefficient-wise ternary operator is applied to two expressions.").

 Most of the time, this is the only way that it is used, so you typically don't have to name [CwiseTernaryOp](classeigen_1_1cwiseternaryop "Generic expression where a coefficient-wise ternary operator is applied to two expressions.") types explicitly.

 
See also
MatrixBase::ternaryExpr(const MatrixBase<Argument2> &, const MatrixBase<Argument3> &, const CustomTernaryOp &) const, class [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions."), class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression."), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.") 
  Inherits Eigen::CwiseTernaryOpImpl< TernaryOp, Arg1Type, Arg2Type, Arg3Type, internal::traits< Arg1Type >::StorageKind >, and Eigen::internal::no\_assignment\_operator.

 

|  |
| --- |
|  |
| const \_Arg1Nested &  | [arg1](classeigen_1_1cwiseternaryop#a776de41baf8921bcdba24ec2166f0a3e) () const |
|  |
| const \_Arg2Nested &  | [arg2](classeigen_1_1cwiseternaryop#afebd6d4ed4101bcbb34c36f99ff27fda) () const |
|  |
| const \_Arg3Nested &  | [arg3](classeigen_1_1cwiseternaryop#a07e6cc21d253ae0bd68913fb65aa8151) () const |
|  |
| const TernaryOp &  | [functor](classeigen_1_1cwiseternaryop#a9009f896ee1103c8f28a748e59f12b9a) () const |
|  |

  arg1()
------

    template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const \_Arg1Nested& [Eigen::CwiseTernaryOp](classeigen_1_1cwiseternaryop)< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::arg1  | ( |  | ) |  const |

 | inline |

 
 
Returns
the first argument nested expression 
    arg2()
------

    template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const \_Arg2Nested& [Eigen::CwiseTernaryOp](classeigen_1_1cwiseternaryop)< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::arg2  | ( |  | ) |  const |

 | inline |

 
 
Returns
the first argument nested expression 
    arg3()
------

    template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const \_Arg3Nested& [Eigen::CwiseTernaryOp](classeigen_1_1cwiseternaryop)< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::arg3  | ( |  | ) |  const |

 | inline |

 
 
Returns
the third argument nested expression 
    functor()
---------

    template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const TernaryOp& [Eigen::CwiseTernaryOp](classeigen_1_1cwiseternaryop)< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::functor  | ( |  | ) |  const |

 | inline |

 
 
Returns
the functor representing the ternary operation 
   

---

The documentation for this class was generated from the following file:* [CwiseTernaryOp.h](https://eigen.tuxfamily.org/dox/CwiseTernaryOp_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1CwiseTernaryOp.html>

Eigen::CwiseUnaryOp
===================

  
### template<typename UnaryOp, typename XprType> class Eigen::CwiseUnaryOp< UnaryOp, XprType >

 Generic expression where a coefficient-wise unary operator is applied to an expression. 

 
Template Parameters
 

|  |  |
| --- | --- |
| UnaryOp | template functor implementing the operator  |
| XprType | the type of the expression to which we are applying the unary operator |

   This class represents an expression where a unary operator is applied to an expression. It is the return type of all operations taking exactly 1 input expression, regardless of the presence of other inputs such as scalars. For example, the operator\* in the expression 3\*matrix is considered unary, because only the right-hand side is an expression, and its return type is a specialization of [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.").

 Most of the time, this is the only way that it is used, so you typically don't have to name [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.") types explicitly.

 
See also
MatrixBase::unaryExpr(const CustomUnaryOp &) const, class [CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions."), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor.") 
  Inherits Eigen::CwiseUnaryOpImpl< UnaryOp, XprType, internal::traits< XprType >::StorageKind >, and Eigen::internal::no\_assignment\_operator.

 

|  |
| --- |
|  |
| const UnaryOp &  | [functor](classeigen_1_1cwiseunaryop#aa70041dd94ec46f330cf19a06425d172) () const |
|  |
| internal::remove\_all< XprTypeNested >::type &  | [nestedExpression](classeigen_1_1cwiseunaryop#a073345b7e19f058c1890f8538e0cfd96) () |
|  |
| const internal::remove\_all< XprTypeNested >::type &  | [nestedExpression](classeigen_1_1cwiseunaryop#a89589b919998657056de6378dd7dedc3) () const |
|  |

  functor()
---------

    template<typename UnaryOp , typename XprType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const UnaryOp& [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< UnaryOp, XprType >::functor  | ( |  | ) |  const |

 | inline |

 
 
Returns
the functor representing the unary operation 
    nestedExpression() [1/2]
------------------------

    template<typename UnaryOp , typename XprType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::remove\_all<XprTypeNested>::type& [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< UnaryOp, XprType >::nestedExpression  | ( |  | ) |  |

 | inline |

 
 
Returns
the nested expression 
    nestedExpression() [2/2]
------------------------

    template<typename UnaryOp , typename XprType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const internal::remove\_all<XprTypeNested>::type& [Eigen::CwiseUnaryOp](classeigen_1_1cwiseunaryop)< UnaryOp, XprType >::nestedExpression  | ( |  | ) |  const |

 | inline |

 
 
Returns
the nested expression 
   

---

The documentation for this class was generated from the following file:* [CwiseUnaryOp.h](https://eigen.tuxfamily.org/dox/CwiseUnaryOp_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1CwiseUnaryOp.html>

Eigen::CwiseUnaryView
=====================

  
### template<typename ViewOp, typename MatrixType> class Eigen::CwiseUnaryView< ViewOp, MatrixType >

 Generic lvalue expression of a coefficient-wise unary operator of a matrix or a vector. 

 
Template Parameters
 

|  |  |
| --- | --- |
| ViewOp | template functor implementing the view  |
| MatrixType | the type of the matrix we are applying the unary operator |

   This class represents a lvalue expression of a generic unary view operator of a matrix or a vector. It is the return type of [real()](namespaceeigen#ac74dc920119b1eba45e9218d9f402afc) and [imag()](namespaceeigen#a04d60a3c8a266f63c08e03615c1985c9), and most of the time this is the only way it is used.

 
See also
MatrixBase::unaryViewExpr(const CustomUnaryOp &) const, class [CwiseUnaryOp](classeigen_1_1cwiseunaryop "Generic expression where a coefficient-wise unary operator is applied to an expression.") 
  Inherits Eigen::CwiseUnaryViewImpl< ViewOp, MatrixType, internal::traits< MatrixType >::StorageKind >.

 

|  |
| --- |
|  |
| const ViewOp &  | [functor](classeigen_1_1cwiseunaryview#af01271cdadcbcf195b5d3130ff2e1a48) () const |
|  |
| internal::remove\_reference< MatrixTypeNested >::type &  | [nestedExpression](classeigen_1_1cwiseunaryview#add6689b53e595e968e89592ea30b6800) () |
|  |
| const internal::remove\_all< MatrixTypeNested >::type &  | [nestedExpression](classeigen_1_1cwiseunaryview#a21d59e387e600b1d650cb002175760b4) () const |
|  |

  functor()
---------

    template<typename ViewOp , typename MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const ViewOp& [Eigen::CwiseUnaryView](classeigen_1_1cwiseunaryview)< ViewOp, MatrixType >::functor  | ( |  | ) |  const |

 | inline |

 
 
Returns
the functor representing unary operation 
    nestedExpression() [1/2]
------------------------

    template<typename ViewOp , typename MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::remove\_reference<MatrixTypeNested>::type& [Eigen::CwiseUnaryView](classeigen_1_1cwiseunaryview)< ViewOp, MatrixType >::nestedExpression  | ( |  | ) |  |

 | inline |

 
 
Returns
the nested expression 
    nestedExpression() [2/2]
------------------------

    template<typename ViewOp , typename MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const internal::remove\_all<MatrixTypeNested>::type& [Eigen::CwiseUnaryView](classeigen_1_1cwiseunaryview)< ViewOp, MatrixType >::nestedExpression  | ( |  | ) |  const |

 | inline |

 
 
Returns
the nested expression 
   

---

The documentation for this class was generated from the following file:* [CwiseUnaryView.h](https://eigen.tuxfamily.org/dox/CwiseUnaryView_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1CwiseUnaryView.html>

Eigen::Dense
============

  
The type used to identify a dense storage. 

 


---

The documentation for this struct was generated from the following file:* [Constants.h](https://eigen.tuxfamily.org/dox/Constants_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/structEigen_1_1Dense.html>

Eigen::Diagonal
===============

  
### template<typename MatrixType, int \_DiagIndex> class Eigen::Diagonal< MatrixType, \_DiagIndex >

 Expression of a diagonal/subdiagonal/superdiagonal in a matrix. 

 
Parameters
 

|  |  |
| --- | --- |
| MatrixType | the type of the object in which we are taking a sub/main/super diagonal  |
| DiagIndex | the index of the sub/super diagonal. The default is 0 and it means the main diagonal. A positive value means a superdiagonal, a negative value means a subdiagonal. You can also use DynamicIndex so the index can be set at runtime. |

   The matrix is not required to be square.

 This class represents an expression of the main diagonal, or any sub/super diagonal of a square matrix. It is the return type of [MatrixBase::diagonal()](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3) and [MatrixBase::diagonal(Index)](classeigen_1_1matrixbase#a8a13d4b8efbd7797ee8efd3dd988a7f7) and most of the time this is the only way it is used.

 
See also

[MatrixBase::diagonal()](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3), [MatrixBase::diagonal(Index)](classeigen_1_1matrixbase#a8a13d4b8efbd7797ee8efd3dd988a7f7) 
  Inherits internal::dense\_xpr\_base::type.

 

---

The documentation for this class was generated from the following file:* [Diagonal.h](https://eigen.tuxfamily.org/dox/Diagonal_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Diagonal.html>

Eigen::CompleteOrthogonalDecomposition
======================================

  
### template<typename \_MatrixType> class Eigen::CompleteOrthogonalDecomposition< \_MatrixType >

 Complete orthogonal decomposition (COD) of a matrix. 

 
Parameters
 

|  |  |
| --- | --- |
| MatrixType | the type of the matrix of which we are computing the COD. |

   This class performs a rank-revealing complete orthogonal decomposition of a matrix **A** into matrices **P**, **Q**, **T**, and **Z** such that 


 \[ \mathbf{A} \, \mathbf{P} = \mathbf{Q} \, \begin{bmatrix} \mathbf{T} & \mathbf{0} \\ \mathbf{0} & \mathbf{0} \end{bmatrix} \, \mathbf{Z} \] 

  by using Householder transformations. Here, **P** is a permutation matrix, **Q** and **Z** are unitary matrices and **T** an upper triangular matrix of size rank-by-rank. **A** may be rank deficient.

 This class supports the [inplace decomposition](group__inplacedecomposition)  mechanism.

 
See also

[MatrixBase::completeOrthogonalDecomposition()](classeigen_1_1matrixbase#ae90b6846f05bd30b8d52b66e427e3e09) 
     ![Inheritance graph]       

|  |
| --- |
|  |
| MatrixType::RealScalar  | [absDeterminant](classeigen_1_1completeorthogonaldecomposition#ac040c34ce3fb2b68d3f57adc0c29d526) () const |
|  |
| const [PermutationType](classeigen_1_1permutationmatrix) &  | [colsPermutation](classeigen_1_1completeorthogonaldecomposition#a601c67a4a0bbe9c7b25b885279db9ff2) () const |
|  |
|  | [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition#a7ba33814fd3fdc62f6179cdcd655c679) () |
|  | Default Constructor. [More...](classeigen_1_1completeorthogonaldecomposition#a7ba33814fd3fdc62f6179cdcd655c679) |
|  |
| template<typename InputType >  |
|  | [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition#afcfaf7a395f853247c23bb52b1ffb1cc) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  | Constructs a complete orthogonal decomposition from a given matrix. [More...](classeigen_1_1completeorthogonaldecomposition#afcfaf7a395f853247c23bb52b1ffb1cc) |
|  |
| template<typename InputType >  |
|  | [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition#a082295ba2aac35a8b8b9e2d46e1d7ce4) ([EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  | Constructs a complete orthogonal decomposition from a given matrix. [More...](classeigen_1_1completeorthogonaldecomposition#a082295ba2aac35a8b8b9e2d46e1d7ce4) |
|  |
|  | [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition#aa6c282dd7452ebe754024edb71bebd09) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  | Default Constructor with memory preallocation. [More...](classeigen_1_1completeorthogonaldecomposition#aa6c282dd7452ebe754024edb71bebd09) |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [dimensionOfKernel](classeigen_1_1completeorthogonaldecomposition#aca2b59560c4851b7d7701872990a3426) () const |
|  |
| const HCoeffsType &  | [hCoeffs](classeigen_1_1completeorthogonaldecomposition#ad25a868ecd499d6dda0119e4d3659504) () const |
|  |
| [HouseholderSequenceType](classeigen_1_1householdersequence) | [householderQ](classeigen_1_1completeorthogonaldecomposition#ac95b93ddad59c6e57d06fcd4737b27e1) (void) const |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1completeorthogonaldecomposition#a1f5c45f78848cfdbb96963cefbbb3274) () const |
|  | Reports whether the complete orthogonal decomposition was successful. [More...](classeigen_1_1completeorthogonaldecomposition#a1f5c45f78848cfdbb96963cefbbb3274) |
|  |
| bool  | [isInjective](classeigen_1_1completeorthogonaldecomposition#a2740067b81ec3e0ad20a2bea9a5a475f) () const |
|  |
| bool  | [isInvertible](classeigen_1_1completeorthogonaldecomposition#a7c4f24f868295349a3bb99e5f217b069) () const |
|  |
| bool  | [isSurjective](classeigen_1_1completeorthogonaldecomposition#a53dd287d3e1bbc548595d63880fd51bf) () const |
|  |
| MatrixType::RealScalar  | [logAbsDeterminant](classeigen_1_1completeorthogonaldecomposition#ad59d6dc78dab52a0038ac372b4a72c0d) () const |
|  |
| const MatrixType &  | [matrixQTZ](classeigen_1_1completeorthogonaldecomposition#ad89e2529fc1a8721239d9b6be9613a69) () const |
|  |
| const MatrixType &  | [matrixT](classeigen_1_1completeorthogonaldecomposition#a806213f5c96ff765265f47067229586d) () const |
|  |
| MatrixType  | [matrixZ](classeigen_1_1completeorthogonaldecomposition#a4cd178f13aefe5189d4beeb3eb1c5897) () const |
|  |
| RealScalar  | [maxPivot](classeigen_1_1completeorthogonaldecomposition#a5b712a58c13b7e5089be9228ec42f738) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonzeroPivots](classeigen_1_1completeorthogonaldecomposition#af9d7a5bdbc16a4a0bf7394ef0dd208da) () const |
|  |
| const [Inverse](classeigen_1_1inverse)< [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition) >  | [pseudoInverse](classeigen_1_1completeorthogonaldecomposition#a3c89639299720ce089435d26d6822d6f) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rank](classeigen_1_1completeorthogonaldecomposition#af348f64b26f8467a020062c22b748806) () const |
|  |
| [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition) &  | [setThreshold](classeigen_1_1completeorthogonaldecomposition#aa9c9f7cbde9d58ca5552381b70ad8d82) (const RealScalar &[threshold](classeigen_1_1completeorthogonaldecomposition#a3909f07268496c0f08f1b57331d91075)) |
|  |
| [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition) &  | [setThreshold](classeigen_1_1completeorthogonaldecomposition#a27c8da71874be7a64d6723bd0cae9f4f) (Default\_t) |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition), Rhs >  | [solve](classeigen_1_1completeorthogonaldecomposition#ab303e177cc7df17e435c79dca9ef5654) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| RealScalar  | [threshold](classeigen_1_1completeorthogonaldecomposition#a3909f07268496c0f08f1b57331d91075) () const |
|  |
| const HCoeffsType &  | [zCoeffs](classeigen_1_1completeorthogonaldecomposition#a0b28c24992d313d4b04d109dcc7e5220) () const |
|  |
| - Public Member Functions inherited from [Eigen::SolverBase< CompleteOrthogonalDecomposition< \_MatrixType > >](classeigen_1_1solverbase) |
| AdjointReturnType  | [adjoint](classeigen_1_1solverbase#a05a3686a89888681c8e0c2bcab6d1ce5) () const |
|  |
| [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType > &  | [derived](classeigen_1_1solverbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType > &  | [derived](classeigen_1_1solverbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| const [Solve](classeigen_1_1solve)< [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >, Rhs >  | [solve](classeigen_1_1solverbase#a7fd647d110487799205df6f99547879d) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
|  | [SolverBase](classeigen_1_1solverbase#a4d5e5baddfba3790ab1a5f247dcc4dc1) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1solverbase#a732e75b5132bb4db3775916927b0e86c) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| template<typename Rhs >  |
| void  | [applyZAdjointOnTheLeftInPlace](classeigen_1_1completeorthogonaldecomposition#a0a89641e0b4ea92c515405f2a31e6abe) (Rhs &rhs) const |
|  |
| template<bool Conjugate, typename Rhs >  |
| void  | [applyZOnTheLeftInPlace](classeigen_1_1completeorthogonaldecomposition#afedd1ee41b8490b70fd1fefdd21f8c80) (Rhs &rhs) const |
|  |
| void  | [computeInPlace](classeigen_1_1completeorthogonaldecomposition#adb0b963d7d8f96492904e8eda03efbf5) () |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  CompleteOrthogonalDecomposition() [1/4]
---------------------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::[CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition) | ( |  | ) |  |

 | inline |

 
 Default Constructor. 

 The default constructor is useful in cases in which the user intends to perform decompositions via `CompleteOrthogonalDecomposition::compute(const* MatrixType&)`. 

    CompleteOrthogonalDecomposition() [2/4]
---------------------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::[CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition) | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols* |
|  | ) |  |  |

 | inline |

 
 Default Constructor with memory preallocation. 

 Like the default constructor but with preallocation of the internal data according to the specified problem *size*. 



See also

[CompleteOrthogonalDecomposition()](classeigen_1_1completeorthogonaldecomposition#a7ba33814fd3fdc62f6179cdcd655c679 "Default Constructor.") 
    CompleteOrthogonalDecomposition() [3/4]
---------------------------------------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::[CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition) | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | inlineexplicit |

 
 Constructs a complete orthogonal decomposition from a given matrix. 

 This constructor computes the complete orthogonal decomposition of the matrix *matrix* by calling the method compute(). The default threshold for rank determination will be used. It is a short cut for:

 
```
CompleteOrthogonalDecomposition<MatrixType> cod(matrix.rows(),
                                                matrix.cols());
cod.setThreshold(Default);
cod.compute(matrix);

```


See also
compute() 
    CompleteOrthogonalDecomposition() [4/4]
---------------------------------------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::[CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition) | ( | [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | inlineexplicit |

 
 Constructs a complete orthogonal decomposition from a given matrix. 

 This overloaded constructor is provided for [inplace decomposition](group__inplacedecomposition)  when `MatrixType` is a [Eigen::Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.").

 
See also
CompleteOrthogonalDecomposition(const EigenBase&) 
    absDeterminant()
----------------

    template<typename MatrixType >  

|  |
| --- |
| MatrixType::RealScalar [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< MatrixType >::absDeterminant |

 
 
Returns
the absolute value of the determinant of the matrix of which \*this is the complete orthogonal decomposition. It has only linear complexity (that is, O(n) where n is the dimension of the square matrix) as the complete orthogonal decomposition has already been computed.
 
Note
This is only for square matrices.
 
Warning
a determinant can be very big or small, so for matrices of large enough dimension, there is a risk of overflow/underflow. One way to work around that is to use [logAbsDeterminant()](classeigen_1_1completeorthogonaldecomposition#ad59d6dc78dab52a0038ac372b4a72c0d) instead.
 
See also

[logAbsDeterminant()](classeigen_1_1completeorthogonaldecomposition#ad59d6dc78dab52a0038ac372b4a72c0d), [MatrixBase::determinant()](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) 
    applyZAdjointOnTheLeftInPlace()
-------------------------------

    template<typename MatrixType >   template<typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< MatrixType >::applyZAdjointOnTheLeftInPlace  | ( | Rhs &  | *rhs* | ) |  const |

 | protected |

 
 Overwrites **rhs** with \( \mathbf{Z}^\* \* \mathbf{rhs} \). 

    applyZOnTheLeftInPlace()
------------------------

    template<typename MatrixType >   template<bool Conjugate, typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< MatrixType >::applyZOnTheLeftInPlace  | ( | Rhs &  | *rhs* | ) |  const |

 | protected |

 
 Overwrites **rhs** with \( \mathbf{Z} \* \mathbf{rhs} \) or \( \mathbf{\overline Z} \* \mathbf{rhs} \) if `Conjugate` is set to `true`. 

    colsPermutation()
-----------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [PermutationType](classeigen_1_1permutationmatrix)& [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::colsPermutation  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const reference to the column permutation matrix 
    computeInPlace()
----------------

    template<typename MatrixType >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| void [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< MatrixType >::computeInPlace |

 | protected |

 
 Performs the complete orthogonal decomposition of the given matrix *matrix*. The result of the factorization is stored into `*this`, and a reference to `*this` is returned.

 
See also
class [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition "Complete orthogonal decomposition (COD) of a matrix."), CompleteOrthogonalDecomposition(const MatrixType&) 
    dimensionOfKernel()
-------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::dimensionOfKernel  | ( |  | ) |  const |

 | inline |

 
 
Returns
the dimension of the kernel of the matrix of which \*this is the complete orthogonal decomposition.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1completeorthogonaldecomposition#aa9c9f7cbde9d58ca5552381b70ad8d82). 
    hCoeffs()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const HCoeffsType& [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::hCoeffs  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const reference to the vector of Householder coefficients used to represent the factor `Q`.
 For advanced uses only. 

    householderQ()
--------------

    template<typename MatrixType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< MatrixType >::[HouseholderSequenceType](classeigen_1_1householdersequence) [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< MatrixType >::householderQ  | ( | void  |  | ) |  const |

 
 
Returns
the matrix Q as a sequence of householder transformations 
    info()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether the complete orthogonal decomposition was successful. 

 
Note
This function always returns `Success`. It is provided for compatibility with other factorization routines. 
 
Returns

`Success` 
    isInjective()
-------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::isInjective  | ( |  | ) |  const |

 | inline |

 
 
Returns
true if the matrix of which \*this is the decomposition represents an injective linear map, i.e. has trivial kernel; false otherwise.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1completeorthogonaldecomposition#aa9c9f7cbde9d58ca5552381b70ad8d82). 
    isInvertible()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::isInvertible  | ( |  | ) |  const |

 | inline |

 
 
Returns
true if the matrix of which \*this is the complete orthogonal decomposition is invertible.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1completeorthogonaldecomposition#aa9c9f7cbde9d58ca5552381b70ad8d82). 
    isSurjective()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::isSurjective  | ( |  | ) |  const |

 | inline |

 
 
Returns
true if the matrix of which \*this is the decomposition represents a surjective linear map; false otherwise.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1completeorthogonaldecomposition#aa9c9f7cbde9d58ca5552381b70ad8d82). 
    logAbsDeterminant()
-------------------

    template<typename MatrixType >  

|  |
| --- |
| MatrixType::RealScalar [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< MatrixType >::logAbsDeterminant |

 
 
Returns
the natural log of the absolute value of the determinant of the matrix of which \*this is the complete orthogonal decomposition. It has only linear complexity (that is, O(n) where n is the dimension of the square matrix) as the complete orthogonal decomposition has already been computed.
 
Note
This is only for square matrices.  This method is useful to work around the risk of overflow/underflow that's inherent to determinant computation.
 
See also

[absDeterminant()](classeigen_1_1completeorthogonaldecomposition#ac040c34ce3fb2b68d3f57adc0c29d526), [MatrixBase::determinant()](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) 
    matrixQTZ()
-----------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixType& [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::matrixQTZ  | ( |  | ) |  const |

 | inline |

 
 
Returns
a reference to the matrix where the complete orthogonal decomposition is stored 
    matrixT()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixType& [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::matrixT  | ( |  | ) |  const |

 | inline |

 
 
Returns
a reference to the matrix where the complete orthogonal decomposition is stored. 
 
Warning
The strict lower part and
```
cols() - [rank](classeigen_1_1completeorthogonaldecomposition#af348f64b26f8467a020062c22b748806)() 
```
 right columns of this matrix contains internal values. Only the upper triangular part should be referenced. To get it, use 
```
[matrixT](classeigen_1_1completeorthogonaldecomposition#a806213f5c96ff765265f47067229586d)().template triangularView<Upper>() 
```
 For rank-deficient matrices, use 
```
matrixR().topLeftCorner([rank](classeigen_1_1completeorthogonaldecomposition#af348f64b26f8467a020062c22b748806)(), [rank](classeigen_1_1completeorthogonaldecomposition#af348f64b26f8467a020062c22b748806)()).template triangularView<Upper>()

```
 
    matrixZ()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| MatrixType [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::matrixZ  | ( |  | ) |  const |

 | inline |

 
 
Returns
the matrix **Z**. 
    maxPivot()
----------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::maxPivot  | ( |  | ) |  const |

 | inline |

 
 
Returns
the absolute value of the biggest pivot, i.e. the biggest diagonal coefficient of R. 
    nonzeroPivots()
---------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::nonzeroPivots  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of nonzero pivots in the complete orthogonal decomposition. Here nonzero is meant in the exact sense, not in a fuzzy sense. So that notion isn't really intrinsically interesting, but it is still useful when implementing algorithms.
 
See also

[rank()](classeigen_1_1completeorthogonaldecomposition#af348f64b26f8467a020062c22b748806) 
    pseudoInverse()
---------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [Inverse](classeigen_1_1inverse)<[CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)> [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::pseudoInverse  | ( |  | ) |  const |

 | inline |

 
 
Returns
the pseudo-inverse of the matrix of which \*this is the complete orthogonal decomposition. 
 
Warning
: Do not compute `this->[pseudoInverse()](classeigen_1_1completeorthogonaldecomposition#a3c89639299720ce089435d26d6822d6f)*rhs` to solve a linear systems. It is more efficient and numerically stable to call `this->solve(rhs)`. 
    rank()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::rank  | ( |  | ) |  const |

 | inline |

 
 
Returns
the rank of the matrix of which \*this is the complete orthogonal decomposition.
 
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1completeorthogonaldecomposition#aa9c9f7cbde9d58ca5552381b70ad8d82). 
    setThreshold() [1/2]
--------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)& [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::setThreshold  | ( | const RealScalar &  | *threshold* | ) |  |

 | inline |

 
 Allows to prescribe a threshold to be used by certain methods, such as [rank()](classeigen_1_1completeorthogonaldecomposition#af348f64b26f8467a020062c22b748806), who need to determine when pivots are to be considered nonzero. Most be called before calling compute().

 When it needs to get the threshold value, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") calls [threshold()](classeigen_1_1completeorthogonaldecomposition#a3909f07268496c0f08f1b57331d91075). By default, this uses a formula to automatically determine a reasonable threshold. Once you have called the present method [setThreshold(const RealScalar&)](classeigen_1_1completeorthogonaldecomposition#aa9c9f7cbde9d58ca5552381b70ad8d82), your value is used instead.

 
Parameters
 

|  |  |
| --- | --- |
| threshold | The new value to use as the threshold. |

   A pivot will be considered nonzero if its absolute value is strictly greater than \( \vert pivot \vert \leqslant threshold \times \vert maxpivot \vert \) where maxpivot is the biggest pivot.

 If you want to come back to the default behavior, call [setThreshold(Default\_t)](classeigen_1_1completeorthogonaldecomposition#a27c8da71874be7a64d6723bd0cae9f4f) 

    setThreshold() [2/2]
--------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)& [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::setThreshold  | ( | Default\_t  |  | ) |  |

 | inline |

 
 Allows to come back to the default behavior, letting [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") use its default formula for determining the threshold.

 You should pass the special object Eigen::Default as parameter here. 



```
qr.setThreshold(Eigen::Default); 

```

See the documentation of [setThreshold(const RealScalar&)](classeigen_1_1completeorthogonaldecomposition#aa9c9f7cbde9d58ca5552381b70ad8d82). 

    solve()
-------

    template<typename \_MatrixType >   template<typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Solve](classeigen_1_1solve)<[CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition), Rhs> [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::solve  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &  | *b* | ) |  const |

 | inline |

 
 This method computes the minimum-norm solution X to a least squares problem 


 \[\mathrm{minimize} \|A X - B\|, \] 

  where **A** is the matrix of which `*this` is the complete orthogonal decomposition.

 
Parameters
 

|  |  |
| --- | --- |
| b | the right-hand sides of the problem to solve. |

   
Returns
a solution. 
    threshold()
-----------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::threshold  | ( |  | ) |  const |

 | inline |

 
 Returns the threshold that will be used by certain methods such as [rank()](classeigen_1_1completeorthogonaldecomposition#af348f64b26f8467a020062c22b748806).

 See the documentation of [setThreshold(const RealScalar&)](classeigen_1_1completeorthogonaldecomposition#aa9c9f7cbde9d58ca5552381b70ad8d82). 

    zCoeffs()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const HCoeffsType& [Eigen::CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< \_MatrixType >::zCoeffs  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const reference to the vector of Householder coefficients used to represent the factor `Z`.
 For advanced uses only. 

   

---

The documentation for this class was generated from the following file:* [CompleteOrthogonalDecomposition.h](https://eigen.tuxfamily.org/dox/CompleteOrthogonalDecomposition_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1CompleteOrthogonalDecomposition.html>

Eigen::PlainObjectBase
======================

  
### template<typename Derived> class Eigen::PlainObjectBase< Derived >

 Dense storage base class for matrices and arrays. 

 This class can be extended with the help of the plugin mechanism described on the page [Extending MatrixBase (and other classes)](topiccustomizing_plugins) by defining the preprocessor symbol `EIGEN_PLAINOBJECTBASE_PLUGIN`.

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | is the derived type, e.g., a [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") or [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") |

   
See also

[The class hierarchy](topicclasshierarchy) 
     ![Inheritance graph](https://eigen.tuxfamily.org/dox/classEigen_1_1PlainObjectBase__inherit__graph.png)                              

|  |
| --- |
|  |
| const Scalar &  | [coeff](classeigen_1_1plainobjectbase#ac99d445913f04acc50280ae99dffd9c3) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) index) const |
|  |
| const Scalar &  | [coeff](classeigen_1_1plainobjectbase#a954cd075bcd7babb429e3e4b9a418651) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rowId, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) colId) const |
|  |
| Scalar &  | [coeffRef](classeigen_1_1plainobjectbase#a72e84dc1bb573ad8ecc9109fbbc1b63b) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) index) |
|  |
| const Scalar &  | [coeffRef](classeigen_1_1plainobjectbase#a541526a4f452554785e78bc41287b348) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) index) const |
|  |
| Scalar &  | [coeffRef](classeigen_1_1plainobjectbase#a992d58b5453e441dcfc80f21c2bfd1d7) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rowId, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) colId) |
|  |
| const Scalar &  | [coeffRef](classeigen_1_1plainobjectbase#a038a419ccb6e2c55593b27f17626fd62) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rowId, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) colId) const |
|  |
| void  | [conservativeResize](classeigen_1_1plainobjectbase#a712c25be1652e5a64a00f28c8ed11462) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| void  | [conservativeResize](classeigen_1_1plainobjectbase#a8c9b27a1df4d180b9fb5755bebea2dbd) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, NoChange\_t) |
|  |
| void  | [conservativeResize](classeigen_1_1plainobjectbase#a78a42a7c0be768374781f67f40c9ab0d) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |
| void  | [conservativeResize](classeigen_1_1plainobjectbase#afc474a09ec9704629b795d7907fb6c37) (NoChange\_t, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| template<typename OtherDerived >  |
| void  | [conservativeResizeLike](classeigen_1_1plainobjectbase#a4ece7540eda6a1ae7d3730397ce72bec) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| Scalar \*  | [data](classeigen_1_1plainobjectbase#ad12a492bcadea9b65ccd9bc8404c01f1) () |
|  |
| const Scalar \*  | [data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116) () const |
|  |
| template<typename OtherDerived >  |
| Derived &  | [lazyAssign](classeigen_1_1plainobjectbase#a70fc6030f9ee72fbe0b3adade2a4a2bd) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator=](classeigen_1_1plainobjectbase#ad90648194e9fa6a0e1296ba1e4db8787) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  | Copies the generic expression *other* into \*this. [More...](classeigen_1_1plainobjectbase#ad90648194e9fa6a0e1296ba1e4db8787) |
|  |
| Derived &  | [operator=](classeigen_1_1plainobjectbase#afbf3af8d6195c9b1b2103c2dd1231247) (const [PlainObjectBase](classeigen_1_1plainobjectbase) &other) |
|  |
| void  | [resize](classeigen_1_1plainobjectbase#a9fd0703bd7bfe89d6dc80e2ce87c312a) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| void  | [resize](classeigen_1_1plainobjectbase#ae4bbe4c06c1feb1035573eee7f5c3623) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, NoChange\_t) |
|  |
| void  | [resize](classeigen_1_1plainobjectbase#a8bee1e51417bfa386dd54b37f6d9e2fe) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |
| void  | [resize](classeigen_1_1plainobjectbase#a0dd078df3ff8b3833723ce84ce519651) (NoChange\_t, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| template<typename OtherDerived >  |
| void  | [resizeLike](classeigen_1_1plainobjectbase#aabf64c98e5415ad39828a83cc5bdac40) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &\_other) |
|  |




|  |
| --- |
|  |
| template<typename OtherDerived >  |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#a73dca0493df0fe4f8e518e379a80cbdd) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#a8fa7e42fd02b266ac54d57cdc735e83d) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#a520234520136dffad88301a507da4fa5) (const [PlainObjectBase](classeigen_1_1plainobjectbase) &other) |
|  |
|  template<typename OtherDerived >  |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#a281044f167c388339c2d704e5d292fa5) (const ReturnByValue< OtherDerived > &other) |
|  | Copy constructor with in-place evaluation.  |
|  |
| template<typename... ArgTypes>  |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#a5b6ba62bc9d263390e81a77a44f23dd9) (const Scalar &a0, const Scalar &a1, const Scalar &a2, const Scalar &a3, const ArgTypes &... args) |
|  | Construct a row of column vector with fixed size from an arbitrary number of coefficients. [c++11] [More...](classeigen_1_1plainobjectbase#a5b6ba62bc9d263390e81a77a44f23dd9) |
|  |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#ab6cde095b242924b47479662b16d78b9) (const std::initializer\_list< std::initializer\_list< Scalar >> &list) |
|  | Constructs a [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") or [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") and initializes it by elements given by an initializer list of initializer lists [c++11]  |
|  |




|  |
| --- |
|  |
| These are convenience functions returning [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") objects. The [Map()](classeigen_1_1plainobjectbase#aaf9fcc07dc13f89cf71d4a4e2b220d24) static functions return unaligned [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") objects, while the AlignedMap() functions return aligned [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") objects and thus should be called only with 16-byte-aligned *data* pointers. Here is an example using strides: 

```
Matrix4i A;
A << 1,  2,  3,  4,
     5,  6,  7,  8,
     9, 10, 11, 12,
    13, 14, 15, 16;
 
std::cout << Matrix2i::Map(&A(1,1),Stride<8,2>()) << std::endl;

```

 Output: 

```
 6  8
14 16

```


See also
class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") 
 |
| Derived &  | [setConstant](classeigen_1_1plainobjectbase#aac6bc5261783ec3008a51c2654de73e8) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, const Scalar &val) |
|  |
| Derived &  | [setConstant](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols, const Scalar &val) |
|  |
| Derived &  | [setConstant](classeigen_1_1plainobjectbase#a56e04c9e00a84eeb26774842f4a0f6fd) (NoChange\_t, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols, const Scalar &val) |
|  |
| Derived &  | [setConstant](classeigen_1_1plainobjectbase#ae521bf911dfa2823c8056dc9c1776bcd) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, NoChange\_t, const Scalar &val) |
|  |
| Derived &  | [setZero](classeigen_1_1plainobjectbase#acc39eaf7ba22b725c86f1b9b8bb57c3c) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |
| Derived &  | [setZero](classeigen_1_1plainobjectbase#a73ab57abb640bf35e0dbf9dba225a1db) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| Derived &  | [setZero](classeigen_1_1plainobjectbase#af57b7361afefe60e2940802e7ef2ca54) (NoChange\_t, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| Derived &  | [setZero](classeigen_1_1plainobjectbase#aee6d32f2e6615645b5f1152f99bc8549) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, NoChange\_t) |
|  |
| Derived &  | [setOnes](classeigen_1_1plainobjectbase#a8700dc6d8e05436c0b34ae15ca9274a5) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |
| Derived &  | [setOnes](classeigen_1_1plainobjectbase#ad06b9d8ddac261a871c9ff550a925975) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| Derived &  | [setOnes](classeigen_1_1plainobjectbase#a3bd80eb3e6779ba362628b1cb62a665e) (NoChange\_t, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| Derived &  | [setOnes](classeigen_1_1plainobjectbase#ab04727b1a70e7d0b5ce9d004b3349075) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, NoChange\_t) |
|  |
| Derived &  | [setRandom](classeigen_1_1plainobjectbase#a5f0f6cc8039ed5ac026cd32ed5bbe6ea) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |
| Derived &  | [setRandom](classeigen_1_1plainobjectbase#a8921e8a7f9a5ea167231d29f8feb8700) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| Derived &  | [setRandom](classeigen_1_1plainobjectbase#a66a2a4ffc386ca72214d0ac3161fdc03) (NoChange\_t, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| Derived &  | [setRandom](classeigen_1_1plainobjectbase#ae705648096d7e74b32daa82dd297dc54) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, NoChange\_t) |
|  |
| template<typename OtherDerived >  |
| void  | [\_resize\_to\_match](classeigen_1_1plainobjectbase#a35c62d0feeb92a83704d518402cdbfdf) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [\_set](classeigen_1_1plainobjectbase#a09c4b519ee4c635144581e9fe03b6174) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  | Copies the value of the expression *other* into `*this` with automatic resizing. [More...](classeigen_1_1plainobjectbase#a09c4b519ee4c635144581e9fe03b6174) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [\_set\_noalias](classeigen_1_1plainobjectbase#af638f6f03edf4384b1ff1070485987b6) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename T0 , typename T1 >  |
| void  | [\_init2](classeigen_1_1plainobjectbase#a54a3d3aba10bf017b41f0dbd9342dea0) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols, typename internal::enable\_if< Base::SizeAtCompileTime!=2, T0 >::type \*=0) |
|  |
| template<typename T0 , typename T1 >  |
| void  | [\_init2](classeigen_1_1plainobjectbase#a2eaf38d7a71d5c0849a9dcb3396abe89) (const T0 &val0, const T1 &val1, typename internal::enable\_if< Base::SizeAtCompileTime==2, T0 >::type \*=0) |
|  |
| template<typename T0 , typename T1 >  |
| void  | [\_init2](classeigen_1_1plainobjectbase#ac9c37eb6466e33da2af0a2f5e673c764) (const [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) &val0, const [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) &val1, typename internal::enable\_if<(!internal::is\_same< [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde), Scalar >::value) &&(internal::is\_same< T0, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) >::value) &&(internal::is\_same< T1, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) >::value) &&Base::SizeAtCompileTime==2, T1 >::type \*=0) |
|  |
| template<typename T >  |
| void  | [\_init1](classeigen_1_1plainobjectbase#aeb0be79ed80a425cad223d47ccda07b8) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, typename internal::enable\_if<(Base::SizeAtCompileTime!=1||!internal::is\_convertible< T, Scalar >::value) &&((!internal::is\_same< typename internal::traits< Derived >::XprKind, [ArrayXpr](structeigen_1_1arrayxpr) >::value||Base::SizeAtCompileTime==[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2))), T >::type \*=0) |
|  |
| template<typename T >  |
| void  | [\_init1](classeigen_1_1plainobjectbase#a8295af1e8236ad2be1a1dc8023a49edf) (const Scalar &val0, typename internal::enable\_if< Base::SizeAtCompileTime==1 &&internal::is\_convertible< T, Scalar >::value, T >::type \*=0) |
|  |
| template<typename T >  |
| void  | [\_init1](classeigen_1_1plainobjectbase#ad5830b59e4c7b759c72afe0c2e28cced) (const [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) &val0, typename internal::enable\_if<(!internal::is\_same< [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde), Scalar >::value) &&(internal::is\_same< [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde), T >::value) &&Base::SizeAtCompileTime==1 &&internal::is\_convertible< T, Scalar >::value, T \* >::type \*=0) |
|  |
| template<typename T >  |
| void  | [\_init1](classeigen_1_1plainobjectbase#aa688fc09ad2cf7e22fc027618812aec3) (const Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)) |
|  |
| template<typename T , typename OtherDerived >  |
| void  | [\_init1](classeigen_1_1plainobjectbase#a6da7fb21280c9919478741e53116cd9c) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename T >  |
| void  | [\_init1](classeigen_1_1plainobjectbase#ab26db59f31522ed08b3ffed51dfd20f7) (const Derived &other) |
|  |
| template<typename T , typename OtherDerived >  |
| void  | [\_init1](classeigen_1_1plainobjectbase#a49cdb807ab54602a8f2fd51dcc0ace92) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| template<typename T , typename OtherDerived >  |
| void  | [\_init1](classeigen_1_1plainobjectbase#aad467f7b89f967fe3fdf7c8420ef5eb9) (const ReturnByValue< OtherDerived > &other) |
|  |
| template<typename T , typename OtherDerived , int ColsAtCompileTime>  |
| void  | [\_init1](classeigen_1_1plainobjectbase#a507e484ddddd9fb4e09de46c3b52e874) (const [RotationBase](classeigen_1_1rotationbase)< OtherDerived, ColsAtCompileTime > &r) |
|  |
| template<typename T >  |
| void  | [\_init1](classeigen_1_1plainobjectbase#a2cdf8906cbc61e655beae78baafbf4d6) (const Scalar &val0, typename internal::enable\_if< Base::SizeAtCompileTime!=[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) &&Base::SizeAtCompileTime!=1 &&internal::is\_convertible< T, Scalar >::value &&internal::is\_same< typename internal::traits< Derived >::XprKind, [ArrayXpr](structeigen_1_1arrayxpr) >::value, T >::type \*=0) |
|  |
| template<typename T >  |
| void  | [\_init1](classeigen_1_1plainobjectbase#a2f2ffa0c97bf3eb697743d91bfe45f00) (const [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) &val0, typename internal::enable\_if<(!internal::is\_same< [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde), Scalar >::value) &&(internal::is\_same< [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde), T >::value) &&Base::SizeAtCompileTime!=[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) &&Base::SizeAtCompileTime!=1 &&internal::is\_convertible< T, Scalar >::value &&internal::is\_same< typename internal::traits< Derived >::XprKind, [ArrayXpr](structeigen_1_1arrayxpr) >::value, T \* >::type \*=0) |
|  |
| static [ConstMapType](classeigen_1_1map) | [Map](classeigen_1_1plainobjectbase#aaf9fcc07dc13f89cf71d4a4e2b220d24) (const Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)) |
|  |
| static [MapType](classeigen_1_1map) | [Map](classeigen_1_1plainobjectbase#ab5392255cbc16c3d3d91b09088e027b4) (Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)) |
|  |
| static [ConstMapType](classeigen_1_1map) | [Map](classeigen_1_1plainobjectbase#abd3e2e293d1d8591a5e6772ecc4d2c4c) (const Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |
| static [MapType](classeigen_1_1map) | [Map](classeigen_1_1plainobjectbase#ab195765374a1d5dee35dff790346bd42) (Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |
| static [ConstMapType](classeigen_1_1map) | [Map](classeigen_1_1plainobjectbase#adffe779fdca149b5eba4dc542bf76b94) (const Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| static [MapType](classeigen_1_1map) | [Map](classeigen_1_1plainobjectbase#ad1815d868cb69ebba3d4e1c9e263d2af) (Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| static [ConstAlignedMapType](classeigen_1_1map) | [MapAligned](classeigen_1_1plainobjectbase#ae618ce2543ce8deef2a838864de2b610) (const Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)) |
|  |
| static [AlignedMapType](classeigen_1_1map) | [MapAligned](classeigen_1_1plainobjectbase#aa3281e4121e5e404f93ee9890c13e1dd) (Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)) |
|  |
| static [ConstAlignedMapType](classeigen_1_1map) | [MapAligned](classeigen_1_1plainobjectbase#a7314ec5e42ff5f3563cf3f77090d8318) (const Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |
| static [AlignedMapType](classeigen_1_1map) | [MapAligned](classeigen_1_1plainobjectbase#a62d868608b47d93e3e0c86339870bc43) (Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |
| static [ConstAlignedMapType](classeigen_1_1map) | [MapAligned](classeigen_1_1plainobjectbase#a8b161ab58c8370b97ac8131efb6964dc) (const Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| static [AlignedMapType](classeigen_1_1map) | [MapAligned](classeigen_1_1plainobjectbase#a98a4e03be918eb01bd7719d260debe1a) (Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| template<int Outer, int Inner>  |
| static StridedConstMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | [Map](classeigen_1_1plainobjectbase#a8ed320f4d926ab401117564cafc3e232) (const Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| template<int Outer, int Inner>  |
| static StridedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | [Map](classeigen_1_1plainobjectbase#a240ab54b8839d02bdd35e358a3d66b73) (Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| template<int Outer, int Inner>  |
| static StridedConstMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | [Map](classeigen_1_1plainobjectbase#aebf9df309b9b6f4e5cc0d495a423f749) (const Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| template<int Outer, int Inner>  |
| static StridedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | [Map](classeigen_1_1plainobjectbase#aaf22e2ddbebc397d1e6b17a95af8e7d4) (Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| template<int Outer, int Inner>  |
| static StridedConstMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | [Map](classeigen_1_1plainobjectbase#a1a3a8fd56500cda9a96189cd55472203) (const Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols, const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| template<int Outer, int Inner>  |
| static StridedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | [Map](classeigen_1_1plainobjectbase#ad41d75bfc07b50b2912f99212a7265ed) (Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols, const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| template<int Outer, int Inner>  |
| static StridedConstAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | [MapAligned](classeigen_1_1plainobjectbase#aadc343ac6294b26d8e2033a1c1400600) (const Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| template<int Outer, int Inner>  |
| static StridedAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | [MapAligned](classeigen_1_1plainobjectbase#abd8ce90b470cfa30cae08f9c673912c9) (Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| template<int Outer, int Inner>  |
| static StridedConstAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | [MapAligned](classeigen_1_1plainobjectbase#a91374e2e77a219a44d980cc14be3a961) (const Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| template<int Outer, int Inner>  |
| static StridedAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | [MapAligned](classeigen_1_1plainobjectbase#a2b1ce06138d53af1bb729ec1dab87e5a) (Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| template<int Outer, int Inner>  |
| static StridedConstAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | [MapAligned](classeigen_1_1plainobjectbase#a48fbb5cbf164540617c5ca3e05afe953) (const Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols, const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| template<int Outer, int Inner>  |
| static StridedAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | [MapAligned](classeigen_1_1plainobjectbase#af2ce47a0cde3943e528e00f2b191f7da) (Scalar \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols, const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |

  PlainObjectBase() [1/4]
-----------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::[PlainObjectBase](classeigen_1_1plainobjectbase) | ( | const [PlainObjectBase](classeigen_1_1plainobjectbase)< Derived > &  | *other* | ) |  |

 | inlineprotected |

 
 Copy constructor 

    PlainObjectBase() [2/4]
-----------------------

    template<typename Derived >   template<typename... ArgTypes>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::[PlainObjectBase](classeigen_1_1plainobjectbase) | ( | const Scalar &  | *a0*,  |
|  |  | const Scalar &  | *a1*,  |
|  |  | const Scalar &  | *a2*,  |
|  |  | const Scalar &  | *a3*,  |
|  |  | const ArgTypes &...  | *args* |
|  | ) |  |  |

 | inlineprotected |

 
 Construct a row of column vector with fixed size from an arbitrary number of coefficients. [c++11] 

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 This constructor is for 1D array or vectors with more than 4 coefficients. There exists C++98 analogue constructors for fixed-size array/vector having 1, 2, 3, or 4 coefficients.

 
Warning
To construct a column (resp. row) vector of fixed length, the number of values passed to this constructor must match the the fixed number of rows (resp. columns) of `*this`. 
    PlainObjectBase() [3/4]
-----------------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::[PlainObjectBase](classeigen_1_1plainobjectbase) | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  |

 | inlineprotected |

 
 
See also

[PlainObjectBase::operator=(const EigenBase<OtherDerived>&)](classeigen_1_1plainobjectbase#ad90648194e9fa6a0e1296ba1e4db8787 "Copies the generic expression other into *this.") 
    PlainObjectBase() [4/4]
-----------------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::[PlainObjectBase](classeigen_1_1plainobjectbase) | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *other* | ) |  |

 | inlineprotected |

 
 
See also

[PlainObjectBase::operator=(const EigenBase<OtherDerived>&)](classeigen_1_1plainobjectbase#ad90648194e9fa6a0e1296ba1e4db8787 "Copies the generic expression other into *this.") 
    \_init1() [1/11]
----------------

    template<typename Derived >   template<typename T , typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::\_init1  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  |

 | inlineprotected |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    \_init1() [2/11]
----------------

    template<typename Derived >   template<typename T >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::\_init1  | ( | const Derived &  | *other* | ) |  |

 | inlineprotected |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    \_init1() [3/11]
----------------

    template<typename Derived >   template<typename T , typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::\_init1  | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *other* | ) |  |

 | inlineprotected |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    \_init1() [4/11]
----------------

    template<typename Derived >   template<typename T >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::\_init1  | ( | const [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) &  | *val0*,  |
|  |  | typename internal::enable\_if<(!internal::is\_same< [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde), Scalar >::value) &&(internal::is\_same< [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde), T >::value) &&Base::SizeAtCompileTime!=[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) &&Base::SizeAtCompileTime!=1 &&internal::is\_convertible< T, Scalar >::value &&internal::is\_same< typename internal::traits< Derived >::XprKind, [ArrayXpr](structeigen_1_1arrayxpr) >::value, T \* >::type \*  |  = `0` |
|  | ) |  |  |

 | inlineprotected |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    \_init1() [5/11]
----------------

    template<typename Derived >   template<typename T >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::\_init1  | ( | const [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) &  | *val0*,  |
|  |  | typename internal::enable\_if<(!internal::is\_same< [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde), Scalar >::value) &&(internal::is\_same< [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde), T >::value) &&Base::SizeAtCompileTime==1 &&internal::is\_convertible< T, Scalar >::value, T \* >::type \*  |  = `0` |
|  | ) |  |  |

 | inlineprotected |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    \_init1() [6/11]
----------------

    template<typename Derived >   template<typename T , typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::\_init1  | ( | const ReturnByValue< OtherDerived > &  | *other* | ) |  |

 | inlineprotected |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    \_init1() [7/11]
----------------

    template<typename Derived >   template<typename T , typename OtherDerived , int ColsAtCompileTime>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::\_init1  | ( | const [RotationBase](classeigen_1_1rotationbase)< OtherDerived, ColsAtCompileTime > &  | *r* | ) |  |

 | inlineprotected |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    \_init1() [8/11]
----------------

    template<typename Derived >   template<typename T >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::\_init1  | ( | const Scalar &  | *val0*,  |
|  |  | typename internal::enable\_if< Base::SizeAtCompileTime!=[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) &&Base::SizeAtCompileTime!=1 &&internal::is\_convertible< T, Scalar >::value &&internal::is\_same< typename internal::traits< Derived >::XprKind, [ArrayXpr](structeigen_1_1arrayxpr) >::value, T >::type \*  |  = `0` |
|  | ) |  |  |

 | inlineprotected |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    \_init1() [9/11]
----------------

    template<typename Derived >   template<typename T >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::\_init1  | ( | const Scalar &  | *val0*,  |
|  |  | typename internal::enable\_if< Base::SizeAtCompileTime==1 &&internal::is\_convertible< T, Scalar >::value, T >::type \*  |  = `0` |
|  | ) |  |  |

 | inlineprotected |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    \_init1() [10/11]
-----------------

    template<typename Derived >   template<typename T >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::\_init1  | ( | const Scalar \*  | *data* | ) |  |

 | inlineprotected |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    \_init1() [11/11]
-----------------

    template<typename Derived >   template<typename T >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::\_init1  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size*,  |
|  |  | typename internal::enable\_if<(Base::SizeAtCompileTime!=1||!internal::is\_convertible< T, Scalar >::value) &&((!internal::is\_same< typename internal::traits< Derived >::XprKind, [ArrayXpr](structeigen_1_1arrayxpr) >::value||Base::SizeAtCompileTime==[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2))), T >::type \*  |  = `0` |
|  | ) |  |  |

 | inlineprotected |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    \_init2() [1/3]
---------------

    template<typename Derived >   template<typename T0 , typename T1 >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::\_init2  | ( | const [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) &  | *val0*,  |
|  |  | const [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) &  | *val1*,  |
|  |  | typename internal::enable\_if<(!internal::is\_same< [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde), Scalar >::value) &&(internal::is\_same< T0, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) >::value) &&(internal::is\_same< T1, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) >::value) &&Base::SizeAtCompileTime==2, T1 >::type \*  |  = `0` |
|  | ) |  |  |

 | inlineprotected |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    \_init2() [2/3]
---------------

    template<typename Derived >   template<typename T0 , typename T1 >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::\_init2  | ( | const T0 &  | *val0*,  |
|  |  | const T1 &  | *val1*,  |
|  |  | typename internal::enable\_if< Base::SizeAtCompileTime==2, T0 >::type \*  |  = `0` |
|  | ) |  |  |

 | inlineprotected |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    \_init2() [3/3]
---------------

    template<typename Derived >   template<typename T0 , typename T1 >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::\_init2  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols*,  |
|  |  | typename internal::enable\_if< Base::SizeAtCompileTime!=2, T0 >::type \*  |  = `0` |
|  | ) |  |  |

 | inlineprotected |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    \_resize\_to\_match()
---------------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::\_resize\_to\_match  | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *other* | ) |  |

 | inlineprotected |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    \_set()
-------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::\_set  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  |

 | inlineprotected |

 
 Copies the value of the expression *other* into `*this` with automatic resizing. 

 \*this might be resized to match the dimensions of *other*. If \*this was a null matrix (not already initialized), it will be initialized.

 Note that copying a row-vector into a vector (and conversely) is allowed. The resizing, if any, is then done in the appropriate way so that row-vectors remain row-vectors and vectors remain vectors.

 
See also
operator=(const MatrixBase<OtherDerived>&), [\_set\_noalias()](classeigen_1_1plainobjectbase#af638f6f03edf4384b1ff1070485987b6) 
    \_set\_noalias()
----------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::\_set\_noalias  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  |

 | inlineprotected |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    coeff() [1/2]
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const Scalar& [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::coeff  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *index* | ) |  const |

 | inline |

 
 This is an overloaded version of [DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.

 See [DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) for details. 

    coeff() [2/2]
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const Scalar& [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::coeff  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rowId*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *colId* |
|  | ) |  |  const |

 | inline |

 
 This is an overloaded version of [DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index,Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393) provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.

 See [DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) for details. 

    coeffRef() [1/4]
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Scalar& [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::coeffRef  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *index* | ) |  |

 | inline |

 
 This is an overloaded version of DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index) const provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.

 See DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index) const for details. 

    coeffRef() [2/4]
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const Scalar& [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::coeffRef  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *index* | ) |  const |

 | inline |

 
 This is the const version of [coeffRef(Index)](classeigen_1_1plainobjectbase#a72e84dc1bb573ad8ecc9109fbbc1b63b) which is thus synonym of coeff(Index). It is provided for convenience. 

    coeffRef() [3/4]
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Scalar& [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::coeffRef  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rowId*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *colId* |
|  | ) |  |  |

 | inline |

 
 This is an overloaded version of DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index,Index) const provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.

 See DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index,Index) const for details. 

    coeffRef() [4/4]
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const Scalar& [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::coeffRef  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rowId*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *colId* |
|  | ) |  |  const |

 | inline |

 
 This is the const version of [coeffRef(Index,Index)](classeigen_1_1plainobjectbase#a992d58b5453e441dcfc80f21c2bfd1d7) which is thus synonym of coeff(Index,Index). It is provided for convenience. 

    conservativeResize() [1/4]
--------------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::conservativeResize  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inline |

 
 Resizes the matrix to *rows* x *cols* while leaving old values untouched.

 The method is intended for matrices of dynamic size. If you only want to change the number of rows and/or of columns, you can use [conservativeResize(NoChange\_t, Index)](classeigen_1_1plainobjectbase#afc474a09ec9704629b795d7907fb6c37) or [conservativeResize(Index, NoChange\_t)](classeigen_1_1plainobjectbase#a8c9b27a1df4d180b9fb5755bebea2dbd).

 Matrices are resized relative to the top-left element. In case values need to be appended to the matrix they will be uninitialized. 

    conservativeResize() [2/4]
--------------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::conservativeResize  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | NoChange\_t  |  |
|  | ) |  |  |

 | inline |

 
 Resizes the matrix to *rows* x *cols* while leaving old values untouched.

 As opposed to [conservativeResize(Index rows, Index cols)](classeigen_1_1plainobjectbase#a712c25be1652e5a64a00f28c8ed11462), this version leaves the number of columns unchanged.

 In case the matrix is growing, new rows will be uninitialized. 

    conservativeResize() [3/4]
--------------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::conservativeResize  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size* | ) |  |

 | inline |

 
 Resizes the vector to *size* while retaining old values.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.. This method does not work for partially dynamic matrices when the static dimension is anything other than 1. For example it will not work with Matrix<double, 2, Dynamic>.

 When values are appended, they will be uninitialized. 

    conservativeResize() [4/4]
--------------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::conservativeResize  | ( | NoChange\_t  | ,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inline |

 
 Resizes the matrix to *rows* x *cols* while leaving old values untouched.

 As opposed to [conservativeResize(Index rows, Index cols)](classeigen_1_1plainobjectbase#a712c25be1652e5a64a00f28c8ed11462), this version leaves the number of rows unchanged.

 In case the matrix is growing, new columns will be uninitialized. 

    conservativeResizeLike()
------------------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::conservativeResizeLike  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Resizes the matrix to *rows* x *cols* of `other`, while leaving old values untouched.

 The method is intended for matrices of dynamic size. If you only want to change the number of rows and/or of columns, you can use [conservativeResize(NoChange\_t, Index)](classeigen_1_1plainobjectbase#afc474a09ec9704629b795d7907fb6c37) or [conservativeResize(Index, NoChange\_t)](classeigen_1_1plainobjectbase#a8c9b27a1df4d180b9fb5755bebea2dbd).

 Matrices are resized relative to the top-left element. In case values need to be appended to the matrix they will copied from `other`. 

    data() [1/2]
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar\* [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::data  | ( |  | ) |  |

 | inline |

 
 
Returns
a pointer to the data array of this matrix 
    data() [2/2]
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const Scalar\* [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::data  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const pointer to the data array of this matrix 
    lazyAssign()
------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::lazyAssign  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 
See also

[MatrixBase::lazyAssign()](classeigen_1_1densebase#a6bc6c096e3bfc726f28315daecd21b3f) 
    Map() [1/12]
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| static [ConstMapType](classeigen_1_1map) [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::[Map](classeigen_1_1map) | ( | const Scalar \*  | *data* | ) |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    Map() [2/12]
------------

    template<typename Derived >   template<int Outer, int Inner>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static StridedConstMapType<[Stride](classeigen_1_1stride)<Outer, Inner> >::type [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::[Map](classeigen_1_1map) | ( | const Scalar \*  | *data*,  |
|  |  | const [Stride](classeigen_1_1stride)< Outer, Inner > &  | *stride* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    Map() [3/12]
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static [ConstMapType](classeigen_1_1map) [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::[Map](classeigen_1_1map) | ( | const Scalar \*  | *data*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    Map() [4/12]
------------

    template<typename Derived >   template<int Outer, int Inner>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static StridedConstMapType<[Stride](classeigen_1_1stride)<Outer, Inner> >::type [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::[Map](classeigen_1_1map) | ( | const Scalar \*  | *data*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols*,  |
|  |  | const [Stride](classeigen_1_1stride)< Outer, Inner > &  | *stride* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    Map() [5/12]
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static [ConstMapType](classeigen_1_1map) [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::[Map](classeigen_1_1map) | ( | const Scalar \*  | *data*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    Map() [6/12]
------------

    template<typename Derived >   template<int Outer, int Inner>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static StridedConstMapType<[Stride](classeigen_1_1stride)<Outer, Inner> >::type [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::[Map](classeigen_1_1map) | ( | const Scalar \*  | *data*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size*,  |
|  |  | const [Stride](classeigen_1_1stride)< Outer, Inner > &  | *stride* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    Map() [7/12]
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| static [MapType](classeigen_1_1map) [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::[Map](classeigen_1_1map) | ( | Scalar \*  | *data* | ) |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    Map() [8/12]
------------

    template<typename Derived >   template<int Outer, int Inner>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static StridedMapType<[Stride](classeigen_1_1stride)<Outer, Inner> >::type [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::[Map](classeigen_1_1map) | ( | Scalar \*  | *data*,  |
|  |  | const [Stride](classeigen_1_1stride)< Outer, Inner > &  | *stride* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    Map() [9/12]
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static [MapType](classeigen_1_1map) [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::[Map](classeigen_1_1map) | ( | Scalar \*  | *data*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    Map() [10/12]
-------------

    template<typename Derived >   template<int Outer, int Inner>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static StridedMapType<[Stride](classeigen_1_1stride)<Outer, Inner> >::type [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::[Map](classeigen_1_1map) | ( | Scalar \*  | *data*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols*,  |
|  |  | const [Stride](classeigen_1_1stride)< Outer, Inner > &  | *stride* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    Map() [11/12]
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static [MapType](classeigen_1_1map) [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::[Map](classeigen_1_1map) | ( | Scalar \*  | *data*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    Map() [12/12]
-------------

    template<typename Derived >   template<int Outer, int Inner>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static StridedMapType<[Stride](classeigen_1_1stride)<Outer, Inner> >::type [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::[Map](classeigen_1_1map) | ( | Scalar \*  | *data*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size*,  |
|  |  | const [Stride](classeigen_1_1stride)< Outer, Inner > &  | *stride* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    MapAligned() [1/12]
-------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| static [ConstAlignedMapType](classeigen_1_1map) [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::MapAligned  | ( | const Scalar \*  | *data* | ) |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    MapAligned() [2/12]
-------------------

    template<typename Derived >   template<int Outer, int Inner>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static StridedConstAlignedMapType<[Stride](classeigen_1_1stride)<Outer, Inner> >::type [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::MapAligned  | ( | const Scalar \*  | *data*,  |
|  |  | const [Stride](classeigen_1_1stride)< Outer, Inner > &  | *stride* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    MapAligned() [3/12]
-------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static [ConstAlignedMapType](classeigen_1_1map) [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::MapAligned  | ( | const Scalar \*  | *data*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    MapAligned() [4/12]
-------------------

    template<typename Derived >   template<int Outer, int Inner>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static StridedConstAlignedMapType<[Stride](classeigen_1_1stride)<Outer, Inner> >::type [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::MapAligned  | ( | const Scalar \*  | *data*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols*,  |
|  |  | const [Stride](classeigen_1_1stride)< Outer, Inner > &  | *stride* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    MapAligned() [5/12]
-------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static [ConstAlignedMapType](classeigen_1_1map) [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::MapAligned  | ( | const Scalar \*  | *data*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    MapAligned() [6/12]
-------------------

    template<typename Derived >   template<int Outer, int Inner>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static StridedConstAlignedMapType<[Stride](classeigen_1_1stride)<Outer, Inner> >::type [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::MapAligned  | ( | const Scalar \*  | *data*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size*,  |
|  |  | const [Stride](classeigen_1_1stride)< Outer, Inner > &  | *stride* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    MapAligned() [7/12]
-------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| static [AlignedMapType](classeigen_1_1map) [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::MapAligned  | ( | Scalar \*  | *data* | ) |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    MapAligned() [8/12]
-------------------

    template<typename Derived >   template<int Outer, int Inner>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static StridedAlignedMapType<[Stride](classeigen_1_1stride)<Outer, Inner> >::type [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::MapAligned  | ( | Scalar \*  | *data*,  |
|  |  | const [Stride](classeigen_1_1stride)< Outer, Inner > &  | *stride* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    MapAligned() [9/12]
-------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static [AlignedMapType](classeigen_1_1map) [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::MapAligned  | ( | Scalar \*  | *data*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    MapAligned() [10/12]
--------------------

    template<typename Derived >   template<int Outer, int Inner>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static StridedAlignedMapType<[Stride](classeigen_1_1stride)<Outer, Inner> >::type [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::MapAligned  | ( | Scalar \*  | *data*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols*,  |
|  |  | const [Stride](classeigen_1_1stride)< Outer, Inner > &  | *stride* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    MapAligned() [11/12]
--------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static [AlignedMapType](classeigen_1_1map) [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::MapAligned  | ( | Scalar \*  | *data*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    MapAligned() [12/12]
--------------------

    template<typename Derived >   template<int Outer, int Inner>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static StridedAlignedMapType<[Stride](classeigen_1_1stride)<Outer, Inner> >::type [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::MapAligned  | ( | Scalar \*  | *data*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size*,  |
|  |  | const [Stride](classeigen_1_1stride)< Outer, Inner > &  | *stride* |
|  | ) |  |  |

 | inlinestatic |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    operator=() [1/2]
-----------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::operator=  | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Copies the generic expression *other* into \*this. 

 The expression must provide a (templated) evalTo(Derived& dst) const function which does the actual job. In practice, this allows any user to write its own special matrix without having to modify [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.")

 
Returns
a reference to \*this. 
    operator=() [2/2]
-----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::operator=  | ( | const [PlainObjectBase](classeigen_1_1plainobjectbase)< Derived > &  | *other* | ) |  |

 | inline |

 
 This is a special case of the templated operator=. Its purpose is to prevent a default operator= from hiding the templated operator=. 

    resize() [1/4]
--------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::resize  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inline |

 
 Resizes `*this` to a *rows* x *cols* matrix.

 This method is intended for dynamic-size matrices, although it is legal to call it on any matrix as long as fixed dimensions are left unchanged. If you only want to change the number of rows and/or of columns, you can use [resize(NoChange\_t, Index)](classeigen_1_1plainobjectbase#a0dd078df3ff8b3833723ce84ce519651), [resize(Index, NoChange\_t)](classeigen_1_1plainobjectbase#ae4bbe4c06c1feb1035573eee7f5c3623).

 If the current number of coefficients of `*this` exactly matches the product *rows* \* *cols*, then no memory allocation is performed and the current values are left unchanged. In all other cases, including shrinking, the data is reallocated and all previous values are lost.

 Example: 



```
MatrixXd m(2,3);
m << 1,2,3,4,5,6;
cout << "here's the 2x3 matrix m:" << endl << m << endl;
cout << "let's resize m to 3x2. This is a conservative resizing because 2\*3==3\*2." << endl;
m.resize(3,2);
cout << "here's the 3x2 matrix m:" << endl << m << endl;
cout << "now let's resize m to size 2x2. This is NOT a conservative resizing, so it becomes uninitialized:" << endl;
m.resize(2,2);
cout << m << endl;

```

 Output: 



```
here's the 2x3 matrix m:
1 2 3
4 5 6
let's resize m to 3x2. This is a conservative resizing because 2*3==3*2.
here's the 3x2 matrix m:
1 5
4 3
2 6
now let's resize m to size 2x2. This is NOT a conservative resizing, so it becomes uninitialized:
0 0
0 0

```


See also

[resize(Index)](classeigen_1_1plainobjectbase#a8bee1e51417bfa386dd54b37f6d9e2fe) for vectors, [resize(NoChange\_t, Index)](classeigen_1_1plainobjectbase#a0dd078df3ff8b3833723ce84ce519651), [resize(Index, NoChange\_t)](classeigen_1_1plainobjectbase#ae4bbe4c06c1feb1035573eee7f5c3623) 
    resize() [2/4]
--------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::resize  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | NoChange\_t  |  |
|  | ) |  |  |

 | inline |

 
 Resizes the matrix, changing only the number of rows. For the parameter of type NoChange\_t, just pass the special value `NoChange` as in the example below.

 Example: 



```
MatrixXd m(3,4);
m.resize(5, NoChange);
cout << "m: " << m.rows() << " rows, " << m.cols() << " cols" << endl;

```

 Output: 



```
m: 5 rows, 4 cols

```


See also

[resize(Index,Index)](classeigen_1_1plainobjectbase#a9fd0703bd7bfe89d6dc80e2ce87c312a) 
    resize() [3/4]
--------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::resize  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size* | ) |  |

 | inline |

 
 Resizes `*this` to a vector of length *size* 

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.. This method does not work for partially dynamic matrices when the static dimension is anything other than 1. For example it will not work with Matrix<double, 2, Dynamic>.

 Example: 



```
VectorXd v(10);
v.resize(3);
RowVector3d w;
w.resize(3); // this is legal, but has no effect
cout << "v: " << v.rows() << " rows, " << v.cols() << " cols" << endl;
cout << "w: " << w.rows() << " rows, " << w.cols() << " cols" << endl;

```

 Output: 



```
v: 3 rows, 1 cols
w: 1 rows, 3 cols

```


See also

[resize(Index,Index)](classeigen_1_1plainobjectbase#a9fd0703bd7bfe89d6dc80e2ce87c312a), [resize(NoChange\_t, Index)](classeigen_1_1plainobjectbase#a0dd078df3ff8b3833723ce84ce519651), [resize(Index, NoChange\_t)](classeigen_1_1plainobjectbase#ae4bbe4c06c1feb1035573eee7f5c3623) 
    resize() [4/4]
--------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::resize  | ( | NoChange\_t  | ,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inline |

 
 Resizes the matrix, changing only the number of columns. For the parameter of type NoChange\_t, just pass the special value `NoChange` as in the example below.

 Example: 



```
MatrixXd m(3,4);
m.resize(NoChange, 5);
cout << "m: " << m.rows() << " rows, " << m.cols() << " cols" << endl;

```

 Output: 



```
m: 3 rows, 5 cols

```


See also

[resize(Index,Index)](classeigen_1_1plainobjectbase#a9fd0703bd7bfe89d6dc80e2ce87c312a) 
    resizeLike()
------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::resizeLike  | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *\_other* | ) |  |

 | inline |

 
 Resizes `*this` to have the same dimensions as *other*. Takes care of doing all the checking that's needed.

 Note that copying a row-vector into a vector (and conversely) is allowed. The resizing, if any, is then done in the appropriate way so that row-vectors remain row-vectors and vectors remain vectors. 

    setConstant() [1/4]
-------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::setConstant  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols*,  |
|  |  | const Scalar &  | *val* |
|  | ) |  |  |

 | inline |

 
 Resizes to the given size, and sets all coefficients in this expression to the given value *val*.

 
Parameters
 

|  |  |
| --- | --- |
| rows | the new number of rows  |
| cols | the new number of columns  |
| val | the value to which all coefficients are set |

   Example: 



```
MatrixXf m;
m.setConstant(3, 3, 5);
cout << m << endl;

```

 Output: 



```
5 5 5
5 5 5
5 5 5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,const Scalar&)](classeigen_1_1plainobjectbase#aac6bc5261783ec3008a51c2654de73e8), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    setConstant() [2/4]
-------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::setConstant  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | NoChange\_t  | ,  |
|  |  | const Scalar &  | *val* |
|  | ) |  |  |

 | inline |

 
 Resizes to the given size, changing only the number of rows, and sets all coefficients in this expression to the given value *val*. For the parameter of type NoChange\_t, just pass the special value `NoChange`.

 
See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,const Scalar&)](classeigen_1_1plainobjectbase#aac6bc5261783ec3008a51c2654de73e8), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    setConstant() [3/4]
-------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::setConstant  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size*,  |
|  |  | const Scalar &  | *val* |
|  | ) |  |  |

 | inline |

 
 Resizes to the given *size*, and sets all coefficients in this expression to the given value *val*.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

```

 Output: 



```
5
5
5

```


See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,Index,const Scalar&)](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    setConstant() [4/4]
-------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::setConstant  | ( | NoChange\_t  | ,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols*,  |
|  |  | const Scalar &  | *val* |
|  | ) |  |  |

 | inline |

 
 Resizes to the given size, changing only the number of columns, and sets all coefficients in this expression to the given value *val*. For the parameter of type NoChange\_t, just pass the special value `NoChange`.

 
See also

[MatrixBase::setConstant(const Scalar&)](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [setConstant(Index,const Scalar&)](classeigen_1_1plainobjectbase#aac6bc5261783ec3008a51c2654de73e8), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Constant(const Scalar&)](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) 
    setOnes() [1/4]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::setOnes  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inline |

 
 Resizes to the given size, and sets all coefficients in this expression to one.

 
Parameters
 

|  |  |
| --- | --- |
| rows | the new number of rows  |
| cols | the new number of columns |

   Example: 



```
MatrixXf m;
m.setOnes(3, 3);
cout << m << endl;

```

 Output: 



```
1 1 1
1 1 1
1 1 1

```


See also

[MatrixBase::setOnes()](classeigen_1_1densebase#a250ef1b827e748f3f898fb2e55cb96e2), [setOnes(Index)](classeigen_1_1plainobjectbase#a8700dc6d8e05436c0b34ae15ca9274a5), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Ones()](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101) 
    setOnes() [2/4]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::setOnes  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | NoChange\_t  |  |
|  | ) |  |  |

 | inline |

 
 Resizes to the given size, changing only the number of rows, and sets all coefficients in this expression to one. For the parameter of type NoChange\_t, just pass the special value `NoChange`.

 
See also

[MatrixBase::setOnes()](classeigen_1_1densebase#a250ef1b827e748f3f898fb2e55cb96e2), [setOnes(Index)](classeigen_1_1plainobjectbase#a8700dc6d8e05436c0b34ae15ca9274a5), [setOnes(Index, Index)](classeigen_1_1plainobjectbase#ad06b9d8ddac261a871c9ff550a925975), [setOnes(NoChange\_t, Index)](classeigen_1_1plainobjectbase#a3bd80eb3e6779ba362628b1cb62a665e), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Ones()](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101) 
    setOnes() [3/4]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::setOnes  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *newSize* | ) |  |

 | inline |

 
 Resizes to the given *newSize*, and sets all coefficients in this expression to one.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setOnes(3);
cout << v << endl;

```

 Output: 



```
1
1
1

```


See also

[MatrixBase::setOnes()](classeigen_1_1densebase#a250ef1b827e748f3f898fb2e55cb96e2), [setOnes(Index,Index)](classeigen_1_1plainobjectbase#ad06b9d8ddac261a871c9ff550a925975), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Ones()](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101) 
    setOnes() [4/4]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::setOnes  | ( | NoChange\_t  | ,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inline |

 
 Resizes to the given size, changing only the number of columns, and sets all coefficients in this expression to one. For the parameter of type NoChange\_t, just pass the special value `NoChange`.

 
See also

[MatrixBase::setOnes()](classeigen_1_1densebase#a250ef1b827e748f3f898fb2e55cb96e2), [setOnes(Index)](classeigen_1_1plainobjectbase#a8700dc6d8e05436c0b34ae15ca9274a5), [setOnes(Index, Index)](classeigen_1_1plainobjectbase#ad06b9d8ddac261a871c9ff550a925975), [setOnes(Index, NoChange\_t)](classeigen_1_1plainobjectbase#ab04727b1a70e7d0b5ce9d004b3349075) class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Ones()](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101) 
    setRandom() [1/4]
-----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::setRandom  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inline |

 
 Resizes to the given size, and sets all coefficients in this expression to random values.

 Numbers are uniformly spread through their whole definition range for integer types, and in the [-1:1] range for floating point scalar types.

 
Warning
This function is not re-entrant.
 
Parameters
 

|  |  |
| --- | --- |
| rows | the new number of rows  |
| cols | the new number of columns |

   Example: 



```
MatrixXf m;
m.setRandom(3, 3);
cout << m << endl;

```

 Output: 



```
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444

```


See also

[DenseBase::setRandom()](classeigen_1_1densebase#ac476e5852129ba32beaa1a8a3d7ee0db), [setRandom(Index)](classeigen_1_1plainobjectbase#a5f0f6cc8039ed5ac026cd32ed5bbe6ea), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [DenseBase::Random()](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19) 
    setRandom() [2/4]
-----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::setRandom  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | NoChange\_t  |  |
|  | ) |  |  |

 | inline |

 
 Resizes to the given size, changing only the number of rows, and sets all coefficients in this expression to random values. For the parameter of type NoChange\_t, just pass the special value `NoChange`.

 Numbers are uniformly spread through their whole definition range for integer types, and in the [-1:1] range for floating point scalar types.

 
Warning
This function is not re-entrant.
 
See also

[DenseBase::setRandom()](classeigen_1_1densebase#ac476e5852129ba32beaa1a8a3d7ee0db), [setRandom(Index)](classeigen_1_1plainobjectbase#a5f0f6cc8039ed5ac026cd32ed5bbe6ea), [setRandom(NoChange\_t, Index)](classeigen_1_1plainobjectbase#a66a2a4ffc386ca72214d0ac3161fdc03), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [DenseBase::Random()](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19) 
    setRandom() [3/4]
-----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::setRandom  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *newSize* | ) |  |

 | inline |

 
 Resizes to the given *newSize*, and sets all coefficients in this expression to random values.

 Numbers are uniformly spread through their whole definition range for integer types, and in the [-1:1] range for floating point scalar types.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column. 



Warning
This function is not re-entrant.
 Example: 



```
VectorXf v;
v.setRandom(3);
cout << v << endl;

```

 Output: 



```
  0.68
-0.211
 0.566

```


See also

[DenseBase::setRandom()](classeigen_1_1densebase#ac476e5852129ba32beaa1a8a3d7ee0db), [setRandom(Index,Index)](classeigen_1_1plainobjectbase#a8921e8a7f9a5ea167231d29f8feb8700), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [DenseBase::Random()](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19) 
    setRandom() [4/4]
-----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::setRandom  | ( | NoChange\_t  | ,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inline |

 
 Resizes to the given size, changing only the number of columns, and sets all coefficients in this expression to random values. For the parameter of type NoChange\_t, just pass the special value `NoChange`.

 Numbers are uniformly spread through their whole definition range for integer types, and in the [-1:1] range for floating point scalar types.

 
Warning
This function is not re-entrant.
 
See also

[DenseBase::setRandom()](classeigen_1_1densebase#ac476e5852129ba32beaa1a8a3d7ee0db), [setRandom(Index)](classeigen_1_1plainobjectbase#a5f0f6cc8039ed5ac026cd32ed5bbe6ea), [setRandom(Index, NoChange\_t)](classeigen_1_1plainobjectbase#ae705648096d7e74b32daa82dd297dc54), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [DenseBase::Random()](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19) 
    setZero() [1/4]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::setZero  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inline |

 
 Resizes to the given size, and sets all coefficients in this expression to zero.

 
Parameters
 

|  |  |
| --- | --- |
| rows | the new number of rows  |
| cols | the new number of columns |

   Example: 



```
MatrixXf m;
m.setZero(3, 3);
cout << m << endl;

```

 Output: 



```
0 0 0
0 0 0
0 0 0

```


See also

[DenseBase::setZero()](classeigen_1_1densebase#af230a143de50695d2d1fae93db7e4dcb), [setZero(Index)](classeigen_1_1plainobjectbase#acc39eaf7ba22b725c86f1b9b8bb57c3c), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [DenseBase::Zero()](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) 
    setZero() [2/4]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::setZero  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | NoChange\_t  |  |
|  | ) |  |  |

 | inline |

 
 Resizes to the given size, changing only the number of rows, and sets all coefficients in this expression to zero. For the parameter of type NoChange\_t, just pass the special value `NoChange`.

 
See also

[DenseBase::setZero()](classeigen_1_1densebase#af230a143de50695d2d1fae93db7e4dcb), [setZero(Index)](classeigen_1_1plainobjectbase#acc39eaf7ba22b725c86f1b9b8bb57c3c), [setZero(Index, Index)](classeigen_1_1plainobjectbase#a73ab57abb640bf35e0dbf9dba225a1db), [setZero(NoChange\_t, Index)](classeigen_1_1plainobjectbase#af57b7361afefe60e2940802e7ef2ca54), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [DenseBase::Zero()](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) 
    setZero() [3/4]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::setZero  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *newSize* | ) |  |

 | inline |

 
 Resizes to the given *size*, and sets all coefficients in this expression to zero.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
VectorXf v;
v.setZero(3);
cout << v << endl;

```

 Output: 



```
0
0
0

```


See also

[DenseBase::setZero()](classeigen_1_1densebase#af230a143de50695d2d1fae93db7e4dcb), [setZero(Index,Index)](classeigen_1_1plainobjectbase#a73ab57abb640bf35e0dbf9dba225a1db), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [DenseBase::Zero()](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) 
    setZero() [4/4]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::setZero  | ( | NoChange\_t  | ,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inline |

 
 Resizes to the given size, changing only the number of columns, and sets all coefficients in this expression to zero. For the parameter of type NoChange\_t, just pass the special value `NoChange`.

 
See also

[DenseBase::setZero()](classeigen_1_1densebase#af230a143de50695d2d1fae93db7e4dcb), [setZero(Index)](classeigen_1_1plainobjectbase#acc39eaf7ba22b725c86f1b9b8bb57c3c), [setZero(Index, Index)](classeigen_1_1plainobjectbase#a73ab57abb640bf35e0dbf9dba225a1db), [setZero(Index, NoChange\_t)](classeigen_1_1plainobjectbase#aee6d32f2e6615645b5f1152f99bc8549), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [DenseBase::Zero()](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) 
   

---

The documentation for this class was generated from the following files:* [PlainObjectBase.h](https://eigen.tuxfamily.org/dox/PlainObjectBase_8h_source.html)
* [CwiseNullaryOp.h](https://eigen.tuxfamily.org/dox/CwiseNullaryOp_8h_source.html)
* [Random.h](https://eigen.tuxfamily.org/dox/Random_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1PlainObjectBase.html>

Eigen::Array
============

  
### template<typename \_Scalar, int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols> class Eigen::Array< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >

 General-purpose arrays with easy API for coefficient-wise operations. 

 The Array class is very similar to the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class. It provides general-purpose one- and two-dimensional arrays. The difference between the Array and the Matrix class is primarily in the API: the API for the Array class provides easy access to coefficient-wise operations, while the API for the Matrix class provides easy access to linear-algebra operations.

 See documentation of class [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") for detailed information on the template parameters storage layout.

 This class can be extended with the help of the plugin mechanism described on the page [Extending MatrixBase (and other classes)](topiccustomizing_plugins) by defining the preprocessor symbol `EIGEN_ARRAY_PLUGIN`.

 
See also

[The Array class and coefficient-wise operations](group__tutorialarrayclass), [The class hierarchy](topicclasshierarchy) 
     ![Inheritance graph]             

|  |
| --- |
|  |
|  | [Array](classeigen_1_1array#ad9f6f2c9890092e12fd3344aa6ffcbd1) () |
|  |
|  | [Array](classeigen_1_1array#aa1ef64a2517d538e03b71584369e14bb) (const [Array](classeigen_1_1array) &other) |
|  |
| template<typename OtherDerived >  |
|  | [Array](classeigen_1_1array#a295b8d13170c4512480bc74ef9de4299) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other, typename internal::enable\_if< internal::is\_convertible< typename OtherDerived::Scalar, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), PrivateType >::type=PrivateType()) |
|  |
| template<typename... ArgTypes>  |
|  | [Array](classeigen_1_1array#a3d375f13801bb5db4c3d8eaa5b05aa08) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &a0, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &a1, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &a2, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &a3, const ArgTypes &... args) |
|  |
|  | [Array](classeigen_1_1array#a3b781cdd2aa6fa9421047e6bc29d1bf6) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val0, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val1) |
|  |
|  | [Array](classeigen_1_1array#ae20df0e99b3a2bcf35f6cf83755a1f80) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val0, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val1, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val2) |
|  |
|  | [Array](classeigen_1_1array#a00db21a7dd3a6e4df632913204742466) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val0, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val1, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val2, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val3) |
|  |
|  | [Array](classeigen_1_1array#a60196d3a62e1d19746e011dd1cefdfc5) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
|  | [Array](classeigen_1_1array#a2c3f6165e88d157195d87c9bc44d9fc0) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)) |
|  | Constructs a fixed-sized array initialized with coefficients starting at *data*.  |
|  |
|  | [Array](classeigen_1_1array#aa8732ffb15d620d7091e10f963548390) (const std::initializer\_list< std::initializer\_list< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >> &list) |
|  | Constructs an array and initializes it from the coefficients given as initializer-lists grouped by row. [c++11] [More...](classeigen_1_1array#aa8732ffb15d620d7091e10f963548390) |
|  |
|  | [Array](classeigen_1_1array#a0b8a25eb8bde16732c95eaad8a8a8b85) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) dim) |
|  |
|  | [Array](classeigen_1_1array#a473a6a8fdd69a31312efaf6bdb3fc546) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeff](classeigen_1_1array#ac99d445913f04acc50280ae99dffd9c3) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeff](classeigen_1_1array#a954cd075bcd7babb429e3e4b9a418651) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rowId, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) colId) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeffRef](classeigen_1_1array#a72e84dc1bb573ad8ecc9109fbbc1b63b) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeffRef](classeigen_1_1array#a541526a4f452554785e78bc41287b348) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeffRef](classeigen_1_1array#a992d58b5453e441dcfc80f21c2bfd1d7) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rowId, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) colId) |
|  |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeffRef](classeigen_1_1array#a038a419ccb6e2c55593b27f17626fd62) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rowId, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) colId) const |
|  |
| [Array](classeigen_1_1array) &  | [operator=](classeigen_1_1array#a86cb29d966d548242de713c59e9c9582) (const [Array](classeigen_1_1array) &other) |
|  |
| template<typename OtherDerived >  |
| [Array](classeigen_1_1array) &  | [operator=](classeigen_1_1array#a4bda8f55edb3cb293c6ef3078362455b) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| [Array](classeigen_1_1array) &  | [operator=](classeigen_1_1array#a7f91aee7fcdc00e617525189144e94cd) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| [Array](classeigen_1_1array) &  | [operator=](classeigen_1_1array#ac32b3b262f92f135766a1b5cf4522b75) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| - Public Member Functions inherited from [Eigen::PlainObjectBase< Array< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > >](classeigen_1_1plainobjectbase) |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeff](classeigen_1_1plainobjectbase#ac99d445913f04acc50280ae99dffd9c3) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeff](classeigen_1_1plainobjectbase#a954cd075bcd7babb429e3e4b9a418651) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rowId, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) colId) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeffRef](classeigen_1_1plainobjectbase#a72e84dc1bb573ad8ecc9109fbbc1b63b) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeffRef](classeigen_1_1plainobjectbase#a541526a4f452554785e78bc41287b348) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeffRef](classeigen_1_1plainobjectbase#a992d58b5453e441dcfc80f21c2bfd1d7) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rowId, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) colId) |
|  |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | [coeffRef](classeigen_1_1plainobjectbase#a038a419ccb6e2c55593b27f17626fd62) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rowId, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) colId) const |
|  |
| void  | [conservativeResize](classeigen_1_1plainobjectbase#a712c25be1652e5a64a00f28c8ed11462) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| void  | [conservativeResize](classeigen_1_1plainobjectbase#a8c9b27a1df4d180b9fb5755bebea2dbd) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, NoChange\_t) |
|  |
| void  | [conservativeResize](classeigen_1_1plainobjectbase#a78a42a7c0be768374781f67f40c9ab0d) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| void  | [conservativeResize](classeigen_1_1plainobjectbase#afc474a09ec9704629b795d7907fb6c37) (NoChange\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| void  | [conservativeResizeLike](classeigen_1_1plainobjectbase#a4ece7540eda6a1ae7d3730397ce72bec) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*  | [data](classeigen_1_1plainobjectbase#ad12a492bcadea9b65ccd9bc8404c01f1) () |
|  |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*  | [data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116) () const |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [lazyAssign](classeigen_1_1plainobjectbase#a70fc6030f9ee72fbe0b3adade2a4a2bd) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [operator=](classeigen_1_1plainobjectbase#ad90648194e9fa6a0e1296ba1e4db8787) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  | Copies the generic expression *other* into \*this. [More...](classeigen_1_1plainobjectbase#ad90648194e9fa6a0e1296ba1e4db8787) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [operator=](classeigen_1_1plainobjectbase#afbf3af8d6195c9b1b2103c2dd1231247) (const [PlainObjectBase](classeigen_1_1plainobjectbase) &other) |
|  |
| void  | [resize](classeigen_1_1plainobjectbase#a9fd0703bd7bfe89d6dc80e2ce87c312a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| void  | [resize](classeigen_1_1plainobjectbase#ae4bbe4c06c1feb1035573eee7f5c3623) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, NoChange\_t) |
|  |
| void  | [resize](classeigen_1_1plainobjectbase#a8bee1e51417bfa386dd54b37f6d9e2fe) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| void  | [resize](classeigen_1_1plainobjectbase#a0dd078df3ff8b3833723ce84ce519651) (NoChange\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| void  | [resizeLike](classeigen_1_1plainobjectbase#aabf64c98e5415ad39828a83cc5bdac40) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &\_other) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setConstant](classeigen_1_1plainobjectbase#aac6bc5261783ec3008a51c2654de73e8) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setConstant](classeigen_1_1plainobjectbase#af9996d6a98f45e84a908dc9851c8332e) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setConstant](classeigen_1_1plainobjectbase#a56e04c9e00a84eeb26774842f4a0f6fd) (NoChange\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setConstant](classeigen_1_1plainobjectbase#ae521bf911dfa2823c8056dc9c1776bcd) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, NoChange\_t, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setZero](classeigen_1_1plainobjectbase#acc39eaf7ba22b725c86f1b9b8bb57c3c) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setZero](classeigen_1_1plainobjectbase#a73ab57abb640bf35e0dbf9dba225a1db) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setZero](classeigen_1_1plainobjectbase#af57b7361afefe60e2940802e7ef2ca54) (NoChange\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setZero](classeigen_1_1plainobjectbase#aee6d32f2e6615645b5f1152f99bc8549) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, NoChange\_t) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setOnes](classeigen_1_1plainobjectbase#a8700dc6d8e05436c0b34ae15ca9274a5) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setOnes](classeigen_1_1plainobjectbase#ad06b9d8ddac261a871c9ff550a925975) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setOnes](classeigen_1_1plainobjectbase#a3bd80eb3e6779ba362628b1cb62a665e) (NoChange\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setOnes](classeigen_1_1plainobjectbase#ab04727b1a70e7d0b5ce9d004b3349075) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, NoChange\_t) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setRandom](classeigen_1_1plainobjectbase#a5f0f6cc8039ed5ac026cd32ed5bbe6ea) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setRandom](classeigen_1_1plainobjectbase#a8921e8a7f9a5ea167231d29f8feb8700) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setRandom](classeigen_1_1plainobjectbase#a66a2a4ffc386ca72214d0ac3161fdc03) (NoChange\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [setRandom](classeigen_1_1plainobjectbase#ae705648096d7e74b32daa82dd297dc54) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, NoChange\_t) |
|  |
| - Public Member Functions inherited from [Eigen::ArrayBase< Derived >](classeigen_1_1arraybase) |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< Derived >  | [matrix](classeigen_1_1arraybase#af01e9ea8087e390af8af453bbe4c276c) () |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator\*=](classeigen_1_1arraybase#a6a5ff80e9d85106a1c9958219961c21d) (const [ArrayBase](classeigen_1_1arraybase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator+=](classeigen_1_1arraybase#a9cc9fdb4d0d6eb80a45107b86aacbfed) (const [ArrayBase](classeigen_1_1arraybase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator-=](classeigen_1_1arraybase#aac76a5e5e735b97f955189825cef7e2c) (const [ArrayBase](classeigen_1_1arraybase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator/=](classeigen_1_1arraybase#a1717e11dfe9341e9cfba13140cedddce) (const [ArrayBase](classeigen_1_1arraybase)< OtherDerived > &other) |
|  |
| Derived &  | [operator=](classeigen_1_1arraybase#a8587d8d893f5225a4511e9d76d9fe3cc) (const [ArrayBase](classeigen_1_1arraybase) &other) |
|  |
| Derived &  | [operator=](classeigen_1_1arraybase#a80cacb05b6881fba659efb2377e4fd22) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| - Public Member Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| bool  | [all](classeigen_1_1densebase#ae42ab60296c120e9f45ce3b44e1761a4) () const |
|  |
| bool  | [allFinite](classeigen_1_1densebase#af1e669fd3aaae50a4870dc1b8f3b8884) () const |
|  |
| bool  | [any](classeigen_1_1densebase#abfbf4cb72dd577e62fbe035b1c53e695) () const |
|  |
| [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) | [begin](classeigen_1_1densebase#a57591454af931f9dffa71c9da28d5641) () |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [begin](classeigen_1_1densebase#ad9368ce70b06167ec5fc19398d329f5e) () const |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [cbegin](classeigen_1_1densebase#ae9a3dfd9b826ba3103de0128576fb15b) () const |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [cend](classeigen_1_1densebase#aeb3b76f02986c2af2521d07164b5ffde) () const |
|  |
| [ColwiseReturnType](classeigen_1_1vectorwiseop) | [colwise](classeigen_1_1densebase#a1c0e1b6067ec1de6cb8799da55aa7d30) () |
|  |
| [ConstColwiseReturnType](classeigen_1_1vectorwiseop) | [colwise](classeigen_1_1densebase#a58837c81de446efbdb58da07b73a63c1) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [count](classeigen_1_1densebase#a229be090c665b9bf7d1fcdfd1ab6e0c1) () const |
|  |
| [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) | [end](classeigen_1_1densebase#ae71d079e16d91360d10066b316b48485) () |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [end](classeigen_1_1densebase#ab34773522e43bfb02e9cf652d7b5dd60) () const |
|  |
| EvalReturnType  | [eval](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b) () const |
|  |
| void  | [fill](classeigen_1_1densebase#a9be169c308801411aa24be93d30930bf) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| template<unsigned int Added, unsigned int Removed>  |
| EIGEN\_DEPRECATED const Derived &  | [flagged](classeigen_1_1densebase#a9b3f75f76ae40439be870258e80c7346) () const |
|  |
| const [WithFormat](classeigen_1_1withformat)< Derived >  | [format](classeigen_1_1densebase#ab231f1a6057f28d4244145e12c9fc0c7) (const [IOFormat](structeigen_1_1ioformat) &fmt) const |
|  |
| bool  | [hasNaN](classeigen_1_1densebase#ab13d158c900560d3e1b25d85d2d33dd6) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1densebase#a58ca41d9635a8ab3c5a268ef3f7f0d75) () const |
|  |
| template<typename OtherDerived >  |
| bool  | [isApprox](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isApproxToConstant](classeigen_1_1densebase#af9b150d48bc5e4366887ccb466e40c6b) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isConstant](classeigen_1_1densebase#a1ca84e4179b3e5081ed11d89bbd9e74f) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename OtherDerived >  |
| bool  | [isMuchSmallerThan](classeigen_1_1densebase#a3c4db0c6dd974fa88bbb58b2cf3d5664) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename Derived >  |
| bool  | [isMuchSmallerThan](classeigen_1_1densebase#adfca6ff4e473f68fbbeabbd03b7504a9) (const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real &other, const RealScalar &prec) const |
|  |
| bool  | [isOnes](classeigen_1_1densebase#aa56d6b4477cd3c92a9cf42f4b96e47c2) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isZero](classeigen_1_1densebase#af36014ec300f53a65083057ed4e89822) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename OtherDerived >  |
| EIGEN\_DEPRECATED Derived &  | [lazyAssign](classeigen_1_1densebase#a6bc6c096e3bfc726f28315daecd21b3f) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<int NaNPropagation>  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1) () const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#aced8ffda52ff061b6586ace2657ebf30) (IndexType \*index) const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#a3780b7a9cd184d0b4f3ea797eba9e2b3) (IndexType \*row, IndexType \*col) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [mean](classeigen_1_1densebase#a21ac6c0419a72ad7a88ea0bc189017d7) () const |
|  |
| template<int NaNPropagation>  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#a0739f9c868c331031c7810e21838dcb2) () const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#ac9265f4f91430b9cc75d63fb6865bb29) (IndexType \*index) const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#aa28152ba4a42b2d112e5fec5469ec4c1) (IndexType \*row, IndexType \*col) const |
|  |
| const [NestByValue](classeigen_1_1nestbyvalue)< Derived >  | [nestByValue](classeigen_1_1densebase#a3e2761e2b6da74dba1d17b40cc918bf7) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1densebase#acb8d5574eff335381e7441ade87700a0) () const |
|  |
| template<typename OtherDerived >  |
| [CommaInitializer](structeigen_1_1commainitializer)< Derived >  | [operator<<](classeigen_1_1densebase#a0f0e34696162b34762b2bf4bd948f90c) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| [CommaInitializer](structeigen_1_1commainitializer)< Derived >  | [operator<<](classeigen_1_1densebase#a0e575eb0ba6cc6bc5f347872abd8509d) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &s) |
|  |
| Derived &  | [operator=](classeigen_1_1densebase#a5281dadff89f46eef719b38e5d073a8f) (const [DenseBase](classeigen_1_1densebase) &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator=](classeigen_1_1densebase#ab66155169d20c035e80d521a8b918e97) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator=](classeigen_1_1densebase#a58915510693d64164e567bd762e1032f) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  | Copies the generic expression *other* into \*this. [More...](classeigen_1_1densebase#a58915510693d64164e567bd762e1032f) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1densebase#a03f71699bc26ca2ee4e42ec4538862d7) () const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [prod](classeigen_1_1densebase#af119d9a4efe5a15cd83c1ccdf01b3a4f) () const |
|  |
| template<typename Func >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [redux](classeigen_1_1densebase#a63ce1e4fab36bff43bbadcdd06a67724) (const Func &func) const |
|  |
| template<int RowFactor, int ColFactor>  |
| const [Replicate](classeigen_1_1replicate)< Derived, RowFactor, ColFactor >  | [replicate](classeigen_1_1densebase#a60dadfe80b813d808e91e4521c722a8e) () const |
|  |
| const [Replicate](classeigen_1_1replicate)< Derived, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) >  | [replicate](classeigen_1_1densebase#afae2d5e36f1158d1b1681dac3cdbd58e) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rowFactor, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) colFactor) const |
|  |
| void  | [resize](classeigen_1_1densebase#a2ec5bac4e1ab95808808ef50ccf4cb39) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) newSize) |
|  |
| void  | [resize](classeigen_1_1densebase#a25e2b4887b47b1f2346857d1931efa0f) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| [ReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1densebase#a38ea394036d8b096abf322469c80198f) () |
|  |
| [ConstReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1densebase#a9e2f3ac4019184abf95ca0e1a8d82866) () const |
|  |
| void  | [reverseInPlace](classeigen_1_1densebase#adb8045155ea45f7961fc2a5170e1d921) () |
|  |
| [RowwiseReturnType](classeigen_1_1vectorwiseop) | [rowwise](classeigen_1_1densebase#a6daa3a3156ca0e0722bf78638e1c7f28) () |
|  |
| [ConstRowwiseReturnType](classeigen_1_1vectorwiseop) | [rowwise](classeigen_1_1densebase#aa1cabd3404528fe8cec4bab43d74bffc) () const |
|  |
| template<typename ThenDerived , typename ElseDerived >  |
| const [Select](classeigen_1_1select)< Derived, ThenDerived, ElseDerived >  | [select](classeigen_1_1densebase#a65e78cfcbc9852e6923bebff4323ddca) (const [DenseBase](classeigen_1_1densebase)< ThenDerived > &thenMatrix, const [DenseBase](classeigen_1_1densebase)< ElseDerived > &elseMatrix) const |
|  |
| template<typename ThenDerived >  |
| const [Select](classeigen_1_1select)< Derived, ThenDerived, typename ThenDerived::ConstantReturnType >  | [select](classeigen_1_1densebase#a57ef09a843004095f84c198dd145641b) (const [DenseBase](classeigen_1_1densebase)< ThenDerived > &thenMatrix, const typename ThenDerived::Scalar &elseScalar) const |
|  |
| template<typename ElseDerived >  |
| const [Select](classeigen_1_1select)< Derived, typename ElseDerived::ConstantReturnType, ElseDerived >  | [select](classeigen_1_1densebase#a9e8e78c75887d4539071a0b7a61ca103) (const typename ElseDerived::Scalar &thenScalar, const [DenseBase](classeigen_1_1densebase)< ElseDerived > &elseMatrix) const |
|  |
| Derived &  | [setConstant](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| Derived &  | [setLinSpaced](classeigen_1_1densebase#aeb023532476d3f14c457367e0eb5f3f1) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#aeb023532476d3f14c457367e0eb5f3f1) |
|  |
| Derived &  | [setLinSpaced](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a) |
|  |
| Derived &  | [setOnes](classeigen_1_1densebase#a250ef1b827e748f3f898fb2e55cb96e2) () |
|  |
| Derived &  | [setRandom](classeigen_1_1densebase#ac476e5852129ba32beaa1a8a3d7ee0db) () |
|  |
| Derived &  | [setZero](classeigen_1_1densebase#af230a143de50695d2d1fae93db7e4dcb) () |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [sum](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c) () const |
|  |
| template<typename OtherDerived >  |
| void  | [swap](classeigen_1_1densebase#af9e7e4305fdb7781f2b2f05fa801f21e) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| void  | [swap](classeigen_1_1densebase#a44e25adc6da9cd1d79f4c5bd7c1819cb) ([PlainObjectBase](classeigen_1_1plainobjectbase)< OtherDerived > &other) |
|  |
| [TransposeReturnType](classeigen_1_1transpose) | [transpose](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1densebase#a38c0b074cf93fc194bf91141287cee3f) () const |
|  |
| void  | [transposeInPlace](classeigen_1_1densebase#ac501bd942994af7a95d95bee7a16ad2a) () |
|  |
| CoeffReturnType  | [value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0) () const |
|  |
| template<typename Visitor >  |
| void  | [visit](classeigen_1_1densebase#a4225b90fcc74f18dd479b401124b3841) (Visitor &func) const |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, DirectWriteAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [colStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#af1bac522aee4402639189f387592000b) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a4e94e17926e1cf597deb2928e779cef6) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#abb333f6f10467f6f8d7b59c213dea49e) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rowStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a63bc5874eb4e320e54eb079b43b49d22) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, WriteAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4) |
| Scalar &  | [coeffRef](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae66b7d18b2a85f3139b703126974c900) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| Scalar &  | [coeffRef](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#adc8286576b31e11f056057be666a0ec8) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| Scalar &  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a0171eee1d9e582d1ac7ec0f18f5f615a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| Scalar &  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae6ba07bad9e3026afe54806fdefe32bb) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| Scalar &  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#aa2040f14e60fed1a4a68ca7f042e1bbf) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| Scalar &  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af683e04b3926aaf4091581ca24ca09ad) () |
|  |
| Scalar &  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000) () |
|  |
| Scalar &  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afeaa80359bf0c1311f91cdd74a2042a8) () |
|  |
| Scalar &  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a858151a06b8c0ff407232d84e695dd73) () |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, ReadOnlyAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4) |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af9fadc22d12e48c82745dad534a1671a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ab3dbba4a15d0fe90185d2900e5ef0fd1) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| CoeffReturnType  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a496672306836589fa04a6ab33cb0cf2a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| CoeffReturnType  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a926f52a94f038db63c6b9103f98dcf0f) () const |
|  |
| CoeffReturnType  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a189c80109e76752b598d60dfcdab329e) () const |
|  |
| CoeffReturnType  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a0c6d6904a37805ce47a3238fbd735963) () const |
|  |
| CoeffReturnType  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a7c60c97282d4a0f8bca16ef75e231ddb) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| enum  | {  [RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab) ,  [ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441) ,  [SizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da25cb495affdbd796198462b8ef06be91) ,  [MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306) ,  [MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) ,  [MaxSizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da3a459062d39cb34452518f5f201161d2) ,  [IsVectorAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da1156955c8099c5072934b74c72654ed0) ,  [NumDimensions](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da4d4548a01ba37a6c2031a3c1f0a37d34) ,  [Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) ,  [IsRowMajor](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da406b6af91d61d348ba1c9764bdd66008) ,  **InnerSizeAtCompileTime** ,  **InnerStrideAtCompileTime** ,  **OuterStrideAtCompileTime**  } |
|  |
| typedef random\_access\_iterator\_type  | [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) |
|  |
| typedef random\_access\_iterator\_type  | [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) |
|  |
| typedef [Array](classeigen_1_1array)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits< Derived >::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits< Derived >::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), [AutoAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea)|(internal::traits< Derived >::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) &[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762) ? [RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f) :[ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62)), internal::traits< Derived >::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits< Derived >::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) >  | [PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits< Derived >::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits< Derived >::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), [AutoAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea)|(internal::traits< Derived >::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) &[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762) ? [RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f) :[ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62)), internal::traits< Derived >::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits< Derived >::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) >  | [PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e) |
|  |
| typedef internal::conditional< internal::is\_same< typename internal::traits< Derived >::XprKind, [MatrixXpr](structeigen_1_1matrixxpr) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), [PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e), [PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb) >::type  | [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) |
|  | The plain matrix or array type corresponding to this expression. [More...](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) |
|  |
| typedef internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) |
|  |
| typedef internal::traits< Derived >::[StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) | [StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) |
|  | The type used to store indices. [More...](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) |
|  |
| typedef [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [value\_type](classeigen_1_1densebase#a9276182dab8236c33f1e7abf491d504d) |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |
| - Static Public Member Functions inherited from [Eigen::PlainObjectBase< Array< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > >](classeigen_1_1plainobjectbase) |
| static [ConstMapType](classeigen_1_1map) | **Map** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)) |
|  |
| static [MapType](classeigen_1_1map) | **Map** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)) |
|  |
| static [ConstMapType](classeigen_1_1map) | **Map** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static [MapType](classeigen_1_1map) | **Map** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static [ConstMapType](classeigen_1_1map) | **Map** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| static [MapType](classeigen_1_1map) | **Map** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| static StridedConstMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **Map** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **Map** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedConstMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **Map** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **Map** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedConstMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **Map** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols, const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **Map** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols, const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static [ConstAlignedMapType](classeigen_1_1map) | **MapAligned** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)) |
|  |
| static [AlignedMapType](classeigen_1_1map) | **MapAligned** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)) |
|  |
| static [ConstAlignedMapType](classeigen_1_1map) | **MapAligned** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static [AlignedMapType](classeigen_1_1map) | **MapAligned** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static [ConstAlignedMapType](classeigen_1_1map) | **MapAligned** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| static [AlignedMapType](classeigen_1_1map) | **MapAligned** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| static StridedConstAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **MapAligned** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **MapAligned** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedConstAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **MapAligned** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **MapAligned** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedConstAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **MapAligned** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols, const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| static StridedAlignedMapType< [Stride](classeigen_1_1stride)< Outer, Inner > >::type  | **MapAligned** ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols, const [Stride](classeigen_1_1stride)< Outer, Inner > &stride) |
|  |
| - Static Public Member Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#a1fdd3189ae3a41d250593334d82210cf) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#ad8098aa5971139a5585e623dddbea860) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#ad8098aa5971139a5585e623dddbea860) |
|  |
| static const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) |
|  |
| static EIGEN\_DEPRECATED const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#ac8cfbd436a8c9fc50defee5946451176) (Sequential\_t, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| static EIGEN\_DEPRECATED const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d) (Sequential\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a5dc65501accd02c30f7c1840c2a30a41) (const CustomNullaryOp &func) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a3340c9b997f5b53a0131cf927f93b54c) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), const CustomNullaryOp &func) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a9752ee59976a4b4aad860ad1a9093e7f) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const CustomNullaryOp &func) |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101) () |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#a8b2a51018a73a766f5b91aef3487f013) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#ab710a58e4a80fbcb2594242372c8fe56) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19) () |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#ae97f8d9d08f969c733c8144be6225756) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#a7eb5f974a8f0b67eac7080db1da0e308) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) () |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#ae41a9b5050ed27d9e93c82c9c8622cd3) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#ac22f79b812fa564061042407f2ba8f5b) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| - Protected Member Functions inherited from [Eigen::PlainObjectBase< Array< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > >](classeigen_1_1plainobjectbase) |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#a73dca0493df0fe4f8e518e379a80cbdd) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#a8fa7e42fd02b266ac54d57cdc735e83d) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#a520234520136dffad88301a507da4fa5) (const [PlainObjectBase](classeigen_1_1plainobjectbase) &other) |
|  |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#a281044f167c388339c2d704e5d292fa5) (const ReturnByValue< OtherDerived > &other) |
|  | Copy constructor with in-place evaluation.  |
|  |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#a5b6ba62bc9d263390e81a77a44f23dd9) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &a0, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &a1, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &a2, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &a3, const ArgTypes &... args) |
|  | Construct a row of column vector with fixed size from an arbitrary number of coefficients. [c++11] [More...](classeigen_1_1plainobjectbase#a5b6ba62bc9d263390e81a77a44f23dd9) |
|  |
|  | [PlainObjectBase](classeigen_1_1plainobjectbase#ab6cde095b242924b47479662b16d78b9) (const std::initializer\_list< std::initializer\_list< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >> &list) |
|  | Constructs a Matrix or Array and initializes it by elements given by an initializer list of initializer lists [c++11]  |
|  |
| void  | **\_resize\_to\_match** (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | [\_set](classeigen_1_1plainobjectbase#a09c4b519ee4c635144581e9fe03b6174) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  | Copies the value of the expression *other* into `*this` with automatic resizing. [More...](classeigen_1_1plainobjectbase#a09c4b519ee4c635144581e9fe03b6174) |
|  |
| [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | **\_set\_noalias** (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| void  | **\_init2** ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols, typename internal::enable\_if< Base::SizeAtCompileTime!=2, T0 >::type \*=0) |
|  |
| void  | **\_init2** (const T0 &val0, const T1 &val1, typename internal::enable\_if< Base::SizeAtCompileTime==2, T0 >::type \*=0) |
|  |
| void  | **\_init2** (const [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) &val0, const [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) &val1, typename internal::enable\_if<(!internal::is\_same< [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02), [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) &&(internal::is\_same< T0, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) &&(internal::is\_same< T1, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) &&Base::SizeAtCompileTime==2, T1 >::type \*=0) |
|  |
| void  | **\_init1** ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), typename internal::enable\_if<(Base::SizeAtCompileTime!=1||!internal::is\_convertible< T, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) &&((!internal::is\_same< typename internal::traits< [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > >::XprKind, [ArrayXpr](structeigen_1_1arrayxpr) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)||Base::SizeAtCompileTime==Dynamic)), T >::type \*=0) |
|  |
| void  | **\_init1** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val0, typename internal::enable\_if< Base::SizeAtCompileTime==1 &&internal::is\_convertible< T, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), T >::type \*=0) |
|  |
| void  | **\_init1** (const [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) &val0, typename internal::enable\_if<(!internal::is\_same< [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02), [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) &&(internal::is\_same< [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02), T >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) &&Base::SizeAtCompileTime==1 &&internal::is\_convertible< T, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), T \* >::type \*=0) |
|  |
| void  | **\_init1** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)) |
|  |
| void  | **\_init1** (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| void  | **\_init1** (const [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &other) |
|  |
| void  | **\_init1** (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| void  | **\_init1** (const ReturnByValue< OtherDerived > &other) |
|  |
| void  | **\_init1** (const [RotationBase](classeigen_1_1rotationbase)< OtherDerived, [ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441) > &r) |
|  |
| void  | **\_init1** (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &val0, typename internal::enable\_if< Base::SizeAtCompileTime!=Dynamic &&Base::SizeAtCompileTime!=1 &&internal::is\_convertible< T, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0) &&internal::is\_same< typename internal::traits< [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > >::XprKind, [ArrayXpr](structeigen_1_1arrayxpr) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), T >::type \*=0) |
|  |
| void  | **\_init1** (const [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) &val0, typename internal::enable\_if<(!internal::is\_same< [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02), [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) &&(internal::is\_same< [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02), T >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) &&Base::SizeAtCompileTime!=Dynamic &&Base::SizeAtCompileTime!=1 &&internal::is\_convertible< T, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0) &&internal::is\_same< typename internal::traits< [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > >::XprKind, [ArrayXpr](structeigen_1_1arrayxpr) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), T \* >::type \*=0) |
|  |
| - Protected Member Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
|  | [DenseBase](classeigen_1_1densebase#aa284042d0e1b0ad9b6a00db7fd2d9f7f) () |
|  |
| - Related Functions inherited from [Eigen::ArrayBase< Derived >](classeigen_1_1arraybase) |
| template<typename Derived , typename ExponentDerived >  |
| const [Eigen::CwiseBinaryOp](classeigen_1_1cwisebinaryop)< Eigen::internal::scalar\_pow\_op< typename Derived::Scalar, typename ExponentDerived::Scalar >, const Derived, const ExponentDerived >  | [pow](classeigen_1_1arraybase#acb769e1ab1d809abb77c7ab98021ad81) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &[x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000), const [Eigen::ArrayBase](classeigen_1_1arraybase)< ExponentDerived > &exponents) |
|  |
| template<typename Derived , typename ScalarExponent >  |
| const [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_pow\_op< Derived::Scalar, ScalarExponent >, Derived, [Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd)< ScalarExponent > >  | [pow](classeigen_1_1arraybase#a5df3d99d47747b72d61f235c9fb925e3) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &[x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000), const ScalarExponent &exponent) |
|  |
| template<typename Scalar , typename Derived >  |
| const [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_pow\_op< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), Derived::Scalar >, [Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >, Derived >  | [pow](classeigen_1_1arraybase#acb7a6224d50620991d1fb9888b8be6e6) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000), const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &[x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000)) |
|  |
| - Related Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| template<typename Derived >  |
| std::ostream &  | [operator<<](classeigen_1_1densebase#a3806d3f42de165878dace160e6aba40a) (std::ostream &s, const [DenseBase](classeigen_1_1densebase)< Derived > &m) |
|  |

  Array() [1/11]
--------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Array](classeigen_1_1array) | ( |  | ) |  |

 | inline |

 
 Default constructor.

 For fixed-size matrices, does nothing.

 For dynamic-size matrices, creates an empty matrix of size 0. Does not allocate any array. Such a matrix is called a null matrix. This constructor is the unique way to create null matrices: resizing a matrix to 0 is not supported.

 
See also

[resize(Index,Index)](classeigen_1_1plainobjectbase#a9fd0703bd7bfe89d6dc80e2ce87c312a) 
    Array() [2/11]
--------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>   template<typename... ArgTypes>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Array](classeigen_1_1array) | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *a0*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *a1*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *a2*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *a3*,  |
|  |  | const ArgTypes &...  | *args* |
|  | ) |  |  |

 | inline |

 
  Example: 



```
Array<int, 1, 6> a(1, 2, 3, 4, 5, 6);
Array<int, 3, 1> b {1, 2, 3};
cout << a << "\n\n" << b << endl;

```

 Output: 



```
1 2 3 4 5 6

1
2
3

```


See also

[Array(const std::initializer\_list<std::initializer\_list<Scalar>>&)](classeigen_1_1array#aa8732ffb15d620d7091e10f963548390 "Constructs an array and initializes it from the coefficients given as initializer-lists grouped by ro...")   [Array(const Scalar&)](classeigen_1_1array#a60196d3a62e1d19746e011dd1cefdfc5), [Array(const Scalar&,const Scalar&)](classeigen_1_1array#a3b781cdd2aa6fa9421047e6bc29d1bf6) 
    Array() [3/11]
--------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Array](classeigen_1_1array) | ( | const std::initializer\_list< std::initializer\_list< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >> &  | *list* | ) |  |

 | inline |

 
 Constructs an array and initializes it from the coefficients given as initializer-lists grouped by row. [c++11] 

 In the general case, the constructor takes a list of rows, each row being represented as a list of coefficients:

 Example: 



```
ArrayXXi a {
  {1, 2, 3},
  {3, 4, 5}
};
cout << a << endl;

```

 Output: 



```
1 2 3
3 4 5

```

Each of the inner initializer lists must contain the exact same number of elements, otherwise an assertion is triggered.

 In the case of a compile-time column 1D array, implicit transposition from a single row is allowed. Therefore  `Array<int,Dynamic,1>{{1,2,3,4,5}}` is legal and the more verbose syntax `Array<int,Dynamic,1>{{1},{2},{3},{4},{5}}` can be avoided:

 Example: 



```
Array<int, Dynamic, 1> v {{1, 2, 3, 4, 5}};
cout << v << endl;

```

 Output: 



```
1
2
3
4
5

```

In the case of fixed-sized arrays, the initializer list sizes must exactly match the array sizes, and implicit transposition is allowed for compile-time 1D arrays only.

 
See also

[Array(const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args)](classeigen_1_1array#a3d375f13801bb5db4c3d8eaa5b05aa08) 
    Array() [4/11]
--------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Array](classeigen_1_1array) | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *dim* | ) |  |

 | inlineexplicit |

 
 Constructs a vector or row-vector with given dimension. This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Note that this is only useful for dynamic-size vectors. For fixed-size vectors, it is redundant to pass the dimension here, so it makes more sense to use the default constructor [Array()](classeigen_1_1array#ad9f6f2c9890092e12fd3344aa6ffcbd1) instead. 

    Array() [5/11]
--------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Array](classeigen_1_1array) | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *value* | ) |  |

 
 constructs an initialized 1x1 [Array](classeigen_1_1array "General-purpose arrays with easy API for coefficient-wise operations.") with the given coefficient 



See also
const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args 
    Array() [6/11]
--------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Array](classeigen_1_1array) | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols* |
|  | ) |  |  |

 
 constructs an uninitialized array with *rows* rows and *cols* columns.

 This is useful for dynamic-size arrays. For fixed-size arrays, it is redundant to pass these parameters, so one should use the default constructor [Array()](classeigen_1_1array#ad9f6f2c9890092e12fd3344aa6ffcbd1) instead. 

    Array() [7/11]
--------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Array](classeigen_1_1array) | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *val0*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *val1* |
|  | ) |  |  |

 
 constructs an initialized 2D vector with given coefficients 



See also

[Array(const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args)](classeigen_1_1array#a3d375f13801bb5db4c3d8eaa5b05aa08) 
    Array() [8/11]
--------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Array](classeigen_1_1array) | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *val0*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *val1*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *val2* |
|  | ) |  |  |

 | inline |

 
 constructs an initialized 3D vector with given coefficients 



See also

[Array(const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args)](classeigen_1_1array#a3d375f13801bb5db4c3d8eaa5b05aa08) 
    Array() [9/11]
--------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Array](classeigen_1_1array) | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *val0*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *val1*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *val2*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *val3* |
|  | ) |  |  |

 | inline |

 
 constructs an initialized 4D vector with given coefficients 



See also

[Array(const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args)](classeigen_1_1array#a3d375f13801bb5db4c3d8eaa5b05aa08) 
    Array() [10/11]
---------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Array](classeigen_1_1array) | ( | const [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | *other* | ) |  |

 | inline |

 
 Copy constructor 

    Array() [11/11]
---------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::[Array](classeigen_1_1array) | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *other*,  |
|  |  | typename internal::enable\_if< internal::is\_convertible< typename OtherDerived::Scalar, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), PrivateType >::type  |  = `PrivateType()` |
|  | ) |  |  |

 | inline |

 
 
See also
MatrixBase::operator=(const EigenBase<OtherDerived>&) 
    coeff() [1/2]
-------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)& [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::coeff |

 | inline |

 
 This is an overloaded version of [DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.

 See [DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) for details. 

    coeff() [2/2]
-------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)& [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::coeff |

 | inline |

 
 This is an overloaded version of [DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index,Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393) provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.

 See [DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) for details. 

    coeffRef() [1/4]
----------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)& [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::coeffRef |

 | inline |

 
 This is an overloaded version of DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index) const provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.

 See DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index) const for details. 

    coeffRef() [2/4]
----------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)& [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::coeffRef |

 | inline |

 
 This is the const version of [coeffRef(Index)](classeigen_1_1plainobjectbase#a72e84dc1bb573ad8ecc9109fbbc1b63b) which is thus synonym of coeff(Index). It is provided for convenience. 

    coeffRef() [3/4]
----------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)& [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::coeffRef |

 | inline |

 
 This is an overloaded version of DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index,Index) const provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.

 See DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index,Index) const for details. 

    coeffRef() [4/4]
----------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)& [Eigen::PlainObjectBase](classeigen_1_1plainobjectbase)< Derived >::coeffRef |

 | inline |

 
 This is the const version of [coeffRef(Index,Index)](classeigen_1_1plainobjectbase#a992d58b5453e441dcfc80f21c2bfd1d7) which is thus synonym of coeff(Index,Index). It is provided for convenience. 

    operator=() [1/4]
-----------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Array](classeigen_1_1array)& [Eigen::Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::operator=  | ( | const [Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols > &  | *other* | ) |  |

 | inline |

 
 This is a special case of the templated operator=. Its purpose is to prevent a default operator= from hiding the templated operator=. 

    operator=() [2/4]
-----------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Array](classeigen_1_1array)& [Eigen::Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::operator=  | ( | const [DenseBase](classeigen_1_1densebase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Copies the value of the expression *other* into `*this` with automatic resizing.

 \*this might be resized to match the dimensions of *other*. If \*this was a null matrix (not already initialized), it will be initialized.

 Note that copying a row-vector into a vector (and conversely) is allowed. The resizing, if any, is then done in the appropriate way so that row-vectors remain row-vectors and vectors remain vectors. 

    operator=() [3/4]
-----------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Array](classeigen_1_1array)& [Eigen::Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::operator=  | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 The usage of using [Base::operator=](classeigen_1_1plainobjectbase#afbf3af8d6195c9b1b2103c2dd1231247); fails on MSVC. Since the code below is working with GCC and MSVC, we skipped the usage of 'using'. This should be done only for operator=. 

    operator=() [4/4]
-----------------

    template<typename \_Scalar , int \_Rows, int \_Cols, int \_Options, int \_MaxRows, int \_MaxCols>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Array](classeigen_1_1array)& [Eigen::Array](classeigen_1_1array)< \_Scalar, \_Rows, \_Cols, \_Options, \_MaxRows, \_MaxCols >::operator=  | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *value* | ) |  |

 | inline |

 
 Set all the entries to *value*. 



See also

[DenseBase::setConstant()](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [DenseBase::fill()](classeigen_1_1densebase#a9be169c308801411aa24be93d30930bf) 
   

---

The documentation for this class was generated from the following file:* [Array.h](https://eigen.tuxfamily.org/dox/Array_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Array.html>

Eigen::DenseCoeffsBase
======================

  
### template<typename Derived> class Eigen::DenseCoeffsBase< Derived, ReadOnlyAccessors >

 Base class providing read-only coefficient access to matrices and arrays. 

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | Type of the derived class |

   
Note

[ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) Constant indicating read-only access
 This class defines the `operator()` `const` function and friends, which can be used to read specific entries of a matrix or array.

 
See also

[DenseCoeffsBase<Derived, WriteAccessors>](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4 "Base class providing read/write coefficient access to matrices and arrays."), [DenseCoeffsBase<Derived, DirectAccessors>](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4 "Base class providing direct read-only coefficient access to matrices and arrays."), [The class hierarchy](topicclasshierarchy) 
     ![Inheritance graph]                    

|  |
| --- |
|  |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af9fadc22d12e48c82745dad534a1671a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ab3dbba4a15d0fe90185d2900e5ef0fd1) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| CoeffReturnType  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a496672306836589fa04a6ab33cb0cf2a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| CoeffReturnType  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a926f52a94f038db63c6b9103f98dcf0f) () const |
|  |
| CoeffReturnType  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a189c80109e76752b598d60dfcdab329e) () const |
|  |
| CoeffReturnType  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a0c6d6904a37805ce47a3238fbd735963) () const |
|  |
| CoeffReturnType  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a7c60c97282d4a0f8bca16ef75e231ddb) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  coeff() [1/2]
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| CoeffReturnType Eigen::DenseCoeffsBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::coeff  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *index* | ) |  const |

 | inline |

 
 Short version: don't use this function, use [operator[](Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a496672306836589fa04a6ab33cb0cf2a)  instead.

 Long version: this function is similar to [operator[](Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a496672306836589fa04a6ab33cb0cf2a) , but without the assertion. Use this for limiting the performance cost of debugging code when doing repeated coefficient access. Only use this when it is guaranteed that the parameter *index* is in range.

 If EIGEN\_INTERNAL\_DEBUGGING is defined, an assertion will be made, making this function equivalent to [operator[](Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a496672306836589fa04a6ab33cb0cf2a) .

 
See also

[operator[](Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a496672306836589fa04a6ab33cb0cf2a), coeffRef(Index), [coeff(Index,Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393) 
    coeff() [2/2]
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| CoeffReturnType Eigen::DenseCoeffsBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::coeff  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *row*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *col* |
|  | ) |  |  const |

 | inline |

 
 Short version: don't use this function, use [operator()(Index,Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ab3dbba4a15d0fe90185d2900e5ef0fd1)  instead.

 Long version: this function is similar to [operator()(Index,Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ab3dbba4a15d0fe90185d2900e5ef0fd1) , but without the assertion. Use this for limiting the performance cost of debugging code when doing repeated coefficient access. Only use this when it is guaranteed that the parameters *row* and *col* are in range.

 If EIGEN\_INTERNAL\_DEBUGGING is defined, an assertion will be made, making this function equivalent to [operator()(Index,Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ab3dbba4a15d0fe90185d2900e5ef0fd1) .

 
See also

[operator()(Index,Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ab3dbba4a15d0fe90185d2900e5ef0fd1), coeffRef(Index,Index), [coeff(Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) 
    cols()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::cols  | ( | void  |  | ) |  |

 | inline |

 
 
Returns
the number of columns. 
 
See also

[rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), ColsAtCompileTime 
    derived() [1/2]
---------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| Derived& [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::derived |

 | inline |

 
 
Returns
a reference to the derived object 
    derived() [2/2]
---------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const Derived& [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::derived |

 | inline |

 
 
Returns
a const reference to the derived object 
    operator()() [1/2]
------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| CoeffReturnType Eigen::DenseCoeffsBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::operator()  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *index* | ) |  const |

 | inline |

 
 
Returns
the coefficient at given index.
 This is synonymous to [operator[](Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a496672306836589fa04a6ab33cb0cf2a).

 This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.

 
See also
operator[](Index), [operator()(Index,Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ab3dbba4a15d0fe90185d2900e5ef0fd1), [x() const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a189c80109e76752b598d60dfcdab329e), [y() const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a0c6d6904a37805ce47a3238fbd735963), [z() const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a7c60c97282d4a0f8bca16ef75e231ddb), [w() const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a926f52a94f038db63c6b9103f98dcf0f) 
    operator()() [2/2]
------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| CoeffReturnType Eigen::DenseCoeffsBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::operator()  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *row*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *col* |
|  | ) |  |  const |

 | inline |

 
 
Returns
the coefficient at given the given row and column.
 
See also
operator()(Index,Index), operator[](Index) 
    operator[]()
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| CoeffReturnType Eigen::DenseCoeffsBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::operator[]  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *index* | ) |  const |

 | inline |

 
 
Returns
the coefficient at given index.
 This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.

 
See also
operator[](Index), [operator()(Index,Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ab3dbba4a15d0fe90185d2900e5ef0fd1), [x() const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a189c80109e76752b598d60dfcdab329e), [y() const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a0c6d6904a37805ce47a3238fbd735963), [z() const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a7c60c97282d4a0f8bca16ef75e231ddb), [w() const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a926f52a94f038db63c6b9103f98dcf0f) 
    rows()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::rows  | ( | void  |  | ) |  |

 | inline |

 
 
Returns
the number of rows. 
 
See also

[cols()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), RowsAtCompileTime 
    size()
------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::size |

 | inline |

 
 
Returns
the number of coefficients, which is [rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2)\*cols(). 
 
See also

[rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [cols()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), SizeAtCompileTime. 
    w()
---

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| CoeffReturnType Eigen::DenseCoeffsBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::w  | ( |  | ) |  const |

 | inline |

 
 equivalent to operator[](3).   
 

    x()
---

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| CoeffReturnType Eigen::DenseCoeffsBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::x  | ( |  | ) |  const |

 | inline |

 
 equivalent to operator[](0).   
 

    y()
---

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| CoeffReturnType Eigen::DenseCoeffsBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::y  | ( |  | ) |  const |

 | inline |

 
 equivalent to operator[](1).   
 

    z()
---

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| CoeffReturnType Eigen::DenseCoeffsBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::z  | ( |  | ) |  const |

 | inline |

 
 equivalent to operator[](2).   
 

   

---

The documentation for this class was generated from the following file:* [DenseCoeffsBase.h](https://eigen.tuxfamily.org/dox/DenseCoeffsBase_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1DenseCoeffsBase_3_01Derived_00_01ReadOnlyAccessors_01_4.html>

Eigen::DiagonalPreconditioner
=============================

  
### template<typename \_Scalar> class Eigen::DiagonalPreconditioner< \_Scalar >

 A preconditioner based on the digonal entries. 

 This class allows to approximately solve for A.x = b problems assuming A is a diagonal matrix. In other words, this preconditioner neglects all off diagonal entries and, in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s language, solves for: 



```
A.diagonal().asDiagonal() . x = b

```


Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the type of the scalar. |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 This preconditioner is suitable for both selfadjoint and general problems. The diagonal entries are pre-inverted and stored into a dense vector.

 
Note
A variant that has yet to be implemented would attempt to preserve the norm of each column.
 
See also
class [LeastSquareDiagonalPreconditioner](classeigen_1_1leastsquarediagonalpreconditioner "Jacobi preconditioner for LeastSquaresConjugateGradient."), class [ConjugateGradient](classeigen_1_1conjugategradient "A conjugate gradient solver for sparse (or dense) self-adjoint problems.") 
     ![Inheritance graph]      

---

The documentation for this class was generated from the following file:* [BasicPreconditioners.h](https://eigen.tuxfamily.org/dox/BasicPreconditioners_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1DiagonalPreconditioner.html>

Eigen::DiagonalWrapper
======================

  
### template<typename \_DiagonalVectorType> class Eigen::DiagonalWrapper< \_DiagonalVectorType >

 Expression of a diagonal matrix. 

 
Parameters
 

|  |  |
| --- | --- |
| \_DiagonalVectorType | the type of the vector of diagonal coefficients |

   This class is an expression of a diagonal matrix, but not storing its own vector of diagonal coefficients, instead wrapping an existing vector expression. It is the return type of [MatrixBase::asDiagonal()](classeigen_1_1matrixbase#a14235b62c90f93fe910070b4743782d0) and most of the time this is the only way that it is used.

 
See also
class [DiagonalMatrix](classeigen_1_1diagonalmatrix "Represents a diagonal matrix with its storage."), class DiagonalBase, [MatrixBase::asDiagonal()](classeigen_1_1matrixbase#a14235b62c90f93fe910070b4743782d0) 
  Inherits DiagonalBase< DiagonalWrapper< \_DiagonalVectorType > >, and Eigen::internal::no\_assignment\_operator.

 

|  |
| --- |
|  |
| const DiagonalVectorType &  | [diagonal](classeigen_1_1diagonalwrapper#afd4146738d335e1ce99cffde198f1f31) () const |
|  |
|  | [DiagonalWrapper](classeigen_1_1diagonalwrapper#af71ac89792969bdd7f2661fa6d4159a0) (DiagonalVectorType &a\_diagonal) |
|  |

  DiagonalWrapper()
-----------------

    template<typename \_DiagonalVectorType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::DiagonalWrapper](classeigen_1_1diagonalwrapper)< \_DiagonalVectorType >::[DiagonalWrapper](classeigen_1_1diagonalwrapper) | ( | DiagonalVectorType &  | *a\_diagonal* | ) |  |

 | inlineexplicit |

 
 Constructor from expression of diagonal coefficients to wrap. 

    diagonal()
----------

    template<typename \_DiagonalVectorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const DiagonalVectorType& [Eigen::DiagonalWrapper](classeigen_1_1diagonalwrapper)< \_DiagonalVectorType >::diagonal  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const reference to the wrapped expression of diagonal coefficients. 
   

---

The documentation for this class was generated from the following file:* [DiagonalMatrix.h](https://eigen.tuxfamily.org/dox/DiagonalMatrix_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1DiagonalWrapper.html>

Eigen::ForceAlignedAccess
=========================

  
### template<typename ExpressionType> class Eigen::ForceAlignedAccess< ExpressionType >

 Enforce aligned packet loads and stores regardless of what is requested. 

 
Parameters
 

|  |  |
| --- | --- |
| ExpressionType | the type of the object of which we are forcing aligned packet access |

   This class is the return type of [MatrixBase::forceAlignedAccess()](classeigen_1_1matrixbase#afdaf810ac1708ca6d6ecdcfac1e06699) and most of the time this is the only way it is used.

 
See also

[MatrixBase::forceAlignedAccess()](classeigen_1_1matrixbase#afdaf810ac1708ca6d6ecdcfac1e06699) 
  Inherits internal::dense\_xpr\_base::type.

 

---

The documentation for this class was generated from the following file:* [ForceAlignedAccess.h](https://eigen.tuxfamily.org/dox/ForceAlignedAccess_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1ForceAlignedAccess.html>

Eigen::ArrayBase
================

  
### template<typename Derived> class Eigen::ArrayBase< Derived >

 Base class for all 1D and 2D array, and related expressions. 

 An array is similar to a dense vector or matrix. While matrices are mathematical objects with well defined linear algebra operators, an array is just a collection of scalar values arranged in a one or two dimensionnal fashion. As the main consequence, all operations applied to an array are performed coefficient wise. Furthermore, arrays support scalar math functions of the c++ standard library (e.g., std::sin(x)), and convenient constructors allowing to easily write generic code working for both scalar values and arrays.

 This class is the base that is inherited by all array expression types.

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | is the derived type, e.g., an array or an expression type. |

   This class can be extended with the help of the plugin mechanism described on the page [Extending MatrixBase (and other classes)](topiccustomizing_plugins) by defining the preprocessor symbol `EIGEN_ARRAYBASE_PLUGIN`.

 
See also
class [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions."), [The class hierarchy](topicclasshierarchy) 
     ![Inheritance graph]             

|  |
| --- |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< Derived >  | [matrix](classeigen_1_1arraybase#af01e9ea8087e390af8af453bbe4c276c) () |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator\*=](classeigen_1_1arraybase#a6a5ff80e9d85106a1c9958219961c21d) (const [ArrayBase](classeigen_1_1arraybase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator+=](classeigen_1_1arraybase#a9cc9fdb4d0d6eb80a45107b86aacbfed) (const [ArrayBase](classeigen_1_1arraybase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator-=](classeigen_1_1arraybase#aac76a5e5e735b97f955189825cef7e2c) (const [ArrayBase](classeigen_1_1arraybase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator/=](classeigen_1_1arraybase#a1717e11dfe9341e9cfba13140cedddce) (const [ArrayBase](classeigen_1_1arraybase)< OtherDerived > &other) |
|  |
| Derived &  | [operator=](classeigen_1_1arraybase#a8587d8d893f5225a4511e9d76d9fe3cc) (const [ArrayBase](classeigen_1_1arraybase) &other) |
|  |
| Derived &  | [operator=](classeigen_1_1arraybase#a80cacb05b6881fba659efb2377e4fd22) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| - Public Member Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| bool  | [all](classeigen_1_1densebase#ae42ab60296c120e9f45ce3b44e1761a4) () const |
|  |
| bool  | [allFinite](classeigen_1_1densebase#af1e669fd3aaae50a4870dc1b8f3b8884) () const |
|  |
| bool  | [any](classeigen_1_1densebase#abfbf4cb72dd577e62fbe035b1c53e695) () const |
|  |
| [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) | [begin](classeigen_1_1densebase#a57591454af931f9dffa71c9da28d5641) () |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [begin](classeigen_1_1densebase#ad9368ce70b06167ec5fc19398d329f5e) () const |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [cbegin](classeigen_1_1densebase#ae9a3dfd9b826ba3103de0128576fb15b) () const |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [cend](classeigen_1_1densebase#aeb3b76f02986c2af2521d07164b5ffde) () const |
|  |
| [ColwiseReturnType](classeigen_1_1vectorwiseop) | [colwise](classeigen_1_1densebase#a1c0e1b6067ec1de6cb8799da55aa7d30) () |
|  |
| [ConstColwiseReturnType](classeigen_1_1vectorwiseop) | [colwise](classeigen_1_1densebase#a58837c81de446efbdb58da07b73a63c1) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [count](classeigen_1_1densebase#a229be090c665b9bf7d1fcdfd1ab6e0c1) () const |
|  |
| [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) | [end](classeigen_1_1densebase#ae71d079e16d91360d10066b316b48485) () |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [end](classeigen_1_1densebase#ab34773522e43bfb02e9cf652d7b5dd60) () const |
|  |
| EvalReturnType  | [eval](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b) () const |
|  |
| void  | [fill](classeigen_1_1densebase#a9be169c308801411aa24be93d30930bf) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| template<unsigned int Added, unsigned int Removed>  |
| EIGEN\_DEPRECATED const Derived &  | [flagged](classeigen_1_1densebase#a9b3f75f76ae40439be870258e80c7346) () const |
|  |
| const [WithFormat](classeigen_1_1withformat)< Derived >  | [format](classeigen_1_1densebase#ab231f1a6057f28d4244145e12c9fc0c7) (const [IOFormat](structeigen_1_1ioformat) &fmt) const |
|  |
| bool  | [hasNaN](classeigen_1_1densebase#ab13d158c900560d3e1b25d85d2d33dd6) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1densebase#a58ca41d9635a8ab3c5a268ef3f7f0d75) () const |
|  |
| template<typename OtherDerived >  |
| bool  | [isApprox](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isApproxToConstant](classeigen_1_1densebase#af9b150d48bc5e4366887ccb466e40c6b) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isConstant](classeigen_1_1densebase#a1ca84e4179b3e5081ed11d89bbd9e74f) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename OtherDerived >  |
| bool  | [isMuchSmallerThan](classeigen_1_1densebase#a3c4db0c6dd974fa88bbb58b2cf3d5664) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename Derived >  |
| bool  | [isMuchSmallerThan](classeigen_1_1densebase#adfca6ff4e473f68fbbeabbd03b7504a9) (const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real &other, const RealScalar &prec) const |
|  |
| bool  | [isOnes](classeigen_1_1densebase#aa56d6b4477cd3c92a9cf42f4b96e47c2) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isZero](classeigen_1_1densebase#af36014ec300f53a65083057ed4e89822) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename OtherDerived >  |
| EIGEN\_DEPRECATED Derived &  | [lazyAssign](classeigen_1_1densebase#a6bc6c096e3bfc726f28315daecd21b3f) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<int NaNPropagation>  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1) () const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#aced8ffda52ff061b6586ace2657ebf30) (IndexType \*index) const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#a3780b7a9cd184d0b4f3ea797eba9e2b3) (IndexType \*row, IndexType \*col) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [mean](classeigen_1_1densebase#a21ac6c0419a72ad7a88ea0bc189017d7) () const |
|  |
| template<int NaNPropagation>  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#a0739f9c868c331031c7810e21838dcb2) () const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#ac9265f4f91430b9cc75d63fb6865bb29) (IndexType \*index) const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#aa28152ba4a42b2d112e5fec5469ec4c1) (IndexType \*row, IndexType \*col) const |
|  |
| const [NestByValue](classeigen_1_1nestbyvalue)< Derived >  | [nestByValue](classeigen_1_1densebase#a3e2761e2b6da74dba1d17b40cc918bf7) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1densebase#acb8d5574eff335381e7441ade87700a0) () const |
|  |
| template<typename OtherDerived >  |
| [CommaInitializer](structeigen_1_1commainitializer)< Derived >  | [operator<<](classeigen_1_1densebase#a0f0e34696162b34762b2bf4bd948f90c) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| [CommaInitializer](structeigen_1_1commainitializer)< Derived >  | [operator<<](classeigen_1_1densebase#a0e575eb0ba6cc6bc5f347872abd8509d) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &s) |
|  |
| Derived &  | [operator=](classeigen_1_1densebase#a5281dadff89f46eef719b38e5d073a8f) (const [DenseBase](classeigen_1_1densebase) &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator=](classeigen_1_1densebase#ab66155169d20c035e80d521a8b918e97) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator=](classeigen_1_1densebase#a58915510693d64164e567bd762e1032f) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  | Copies the generic expression *other* into \*this. [More...](classeigen_1_1densebase#a58915510693d64164e567bd762e1032f) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1densebase#a03f71699bc26ca2ee4e42ec4538862d7) () const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [prod](classeigen_1_1densebase#af119d9a4efe5a15cd83c1ccdf01b3a4f) () const |
|  |
| template<typename Func >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [redux](classeigen_1_1densebase#a63ce1e4fab36bff43bbadcdd06a67724) (const Func &func) const |
|  |
| template<int RowFactor, int ColFactor>  |
| const [Replicate](classeigen_1_1replicate)< Derived, RowFactor, ColFactor >  | [replicate](classeigen_1_1densebase#a60dadfe80b813d808e91e4521c722a8e) () const |
|  |
| const [Replicate](classeigen_1_1replicate)< Derived, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) >  | [replicate](classeigen_1_1densebase#afae2d5e36f1158d1b1681dac3cdbd58e) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rowFactor, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) colFactor) const |
|  |
| void  | [resize](classeigen_1_1densebase#a2ec5bac4e1ab95808808ef50ccf4cb39) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) newSize) |
|  |
| void  | [resize](classeigen_1_1densebase#a25e2b4887b47b1f2346857d1931efa0f) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| [ReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1densebase#a38ea394036d8b096abf322469c80198f) () |
|  |
| [ConstReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1densebase#a9e2f3ac4019184abf95ca0e1a8d82866) () const |
|  |
| void  | [reverseInPlace](classeigen_1_1densebase#adb8045155ea45f7961fc2a5170e1d921) () |
|  |
| [RowwiseReturnType](classeigen_1_1vectorwiseop) | [rowwise](classeigen_1_1densebase#a6daa3a3156ca0e0722bf78638e1c7f28) () |
|  |
| [ConstRowwiseReturnType](classeigen_1_1vectorwiseop) | [rowwise](classeigen_1_1densebase#aa1cabd3404528fe8cec4bab43d74bffc) () const |
|  |
| template<typename ThenDerived , typename ElseDerived >  |
| const [Select](classeigen_1_1select)< Derived, ThenDerived, ElseDerived >  | [select](classeigen_1_1densebase#a65e78cfcbc9852e6923bebff4323ddca) (const [DenseBase](classeigen_1_1densebase)< ThenDerived > &thenMatrix, const [DenseBase](classeigen_1_1densebase)< ElseDerived > &elseMatrix) const |
|  |
| template<typename ThenDerived >  |
| const [Select](classeigen_1_1select)< Derived, ThenDerived, typename ThenDerived::ConstantReturnType >  | [select](classeigen_1_1densebase#a57ef09a843004095f84c198dd145641b) (const [DenseBase](classeigen_1_1densebase)< ThenDerived > &thenMatrix, const typename ThenDerived::Scalar &elseScalar) const |
|  |
| template<typename ElseDerived >  |
| const [Select](classeigen_1_1select)< Derived, typename ElseDerived::ConstantReturnType, ElseDerived >  | [select](classeigen_1_1densebase#a9e8e78c75887d4539071a0b7a61ca103) (const typename ElseDerived::Scalar &thenScalar, const [DenseBase](classeigen_1_1densebase)< ElseDerived > &elseMatrix) const |
|  |
| Derived &  | [setConstant](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| Derived &  | [setLinSpaced](classeigen_1_1densebase#aeb023532476d3f14c457367e0eb5f3f1) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#aeb023532476d3f14c457367e0eb5f3f1) |
|  |
| Derived &  | [setLinSpaced](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a) |
|  |
| Derived &  | [setOnes](classeigen_1_1densebase#a250ef1b827e748f3f898fb2e55cb96e2) () |
|  |
| Derived &  | [setRandom](classeigen_1_1densebase#ac476e5852129ba32beaa1a8a3d7ee0db) () |
|  |
| Derived &  | [setZero](classeigen_1_1densebase#af230a143de50695d2d1fae93db7e4dcb) () |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [sum](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c) () const |
|  |
| template<typename OtherDerived >  |
| void  | [swap](classeigen_1_1densebase#af9e7e4305fdb7781f2b2f05fa801f21e) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| void  | [swap](classeigen_1_1densebase#a44e25adc6da9cd1d79f4c5bd7c1819cb) ([PlainObjectBase](classeigen_1_1plainobjectbase)< OtherDerived > &other) |
|  |
| [TransposeReturnType](classeigen_1_1transpose) | [transpose](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1densebase#a38c0b074cf93fc194bf91141287cee3f) () const |
|  |
| void  | [transposeInPlace](classeigen_1_1densebase#ac501bd942994af7a95d95bee7a16ad2a) () |
|  |
| CoeffReturnType  | [value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0) () const |
|  |
| template<typename Visitor >  |
| void  | [visit](classeigen_1_1densebase#a4225b90fcc74f18dd479b401124b3841) (Visitor &func) const |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, DirectWriteAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [colStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#af1bac522aee4402639189f387592000b) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a4e94e17926e1cf597deb2928e779cef6) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#abb333f6f10467f6f8d7b59c213dea49e) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rowStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a63bc5874eb4e320e54eb079b43b49d22) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, WriteAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4) |
| Scalar &  | [coeffRef](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae66b7d18b2a85f3139b703126974c900) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| Scalar &  | [coeffRef](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#adc8286576b31e11f056057be666a0ec8) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| Scalar &  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a0171eee1d9e582d1ac7ec0f18f5f615a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| Scalar &  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae6ba07bad9e3026afe54806fdefe32bb) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| Scalar &  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#aa2040f14e60fed1a4a68ca7f042e1bbf) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| Scalar &  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af683e04b3926aaf4091581ca24ca09ad) () |
|  |
| Scalar &  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000) () |
|  |
| Scalar &  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afeaa80359bf0c1311f91cdd74a2042a8) () |
|  |
| Scalar &  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a858151a06b8c0ff407232d84e695dd73) () |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, ReadOnlyAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4) |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af9fadc22d12e48c82745dad534a1671a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ab3dbba4a15d0fe90185d2900e5ef0fd1) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| CoeffReturnType  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a496672306836589fa04a6ab33cb0cf2a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| CoeffReturnType  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a926f52a94f038db63c6b9103f98dcf0f) () const |
|  |
| CoeffReturnType  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a189c80109e76752b598d60dfcdab329e) () const |
|  |
| CoeffReturnType  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a0c6d6904a37805ce47a3238fbd735963) () const |
|  |
| CoeffReturnType  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a7c60c97282d4a0f8bca16ef75e231ddb) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| (Note that these are not member functions.)  |
| template<typename Derived , typename ExponentDerived >  |
| const [Eigen::CwiseBinaryOp](classeigen_1_1cwisebinaryop)< Eigen::internal::scalar\_pow\_op< typename Derived::Scalar, typename ExponentDerived::Scalar >, const Derived, const ExponentDerived >  | [pow](classeigen_1_1arraybase#acb769e1ab1d809abb77c7ab98021ad81) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &[x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000), const [Eigen::ArrayBase](classeigen_1_1arraybase)< ExponentDerived > &exponents) |
|  |
| template<typename Derived , typename ScalarExponent >  |
| const [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_pow\_op< Derived::Scalar, ScalarExponent >, Derived, [Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd)< ScalarExponent > >  | [pow](classeigen_1_1arraybase#a5df3d99d47747b72d61f235c9fb925e3) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &[x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000), const ScalarExponent &exponent) |
|  |
| template<typename Scalar , typename Derived >  |
| const [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_pow\_op< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), Derived::Scalar >, [Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >, Derived >  | [pow](classeigen_1_1arraybase#acb7a6224d50620991d1fb9888b8be6e6) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000), const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &[x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000)) |
|  |
| - Related Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| template<typename Derived >  |
| std::ostream &  | [operator<<](classeigen_1_1densebase#a3806d3f42de165878dace160e6aba40a) (std::ostream &s, const [DenseBase](classeigen_1_1densebase)< Derived > &m) |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| enum  | {  [RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab) ,  [ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441) ,  [SizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da25cb495affdbd796198462b8ef06be91) ,  [MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306) ,  [MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) ,  [MaxSizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da3a459062d39cb34452518f5f201161d2) ,  [IsVectorAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da1156955c8099c5072934b74c72654ed0) ,  [NumDimensions](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da4d4548a01ba37a6c2031a3c1f0a37d34) ,  [Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) ,  [IsRowMajor](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da406b6af91d61d348ba1c9764bdd66008) ,  **InnerSizeAtCompileTime** ,  **InnerStrideAtCompileTime** ,  **OuterStrideAtCompileTime**  } |
|  |
| typedef random\_access\_iterator\_type  | [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) |
|  |
| typedef random\_access\_iterator\_type  | [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) |
|  |
| typedef [Array](classeigen_1_1array)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits< Derived >::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits< Derived >::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), [AutoAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea)|(internal::traits< Derived >::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) &[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762) ? [RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f) :[ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62)), internal::traits< Derived >::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits< Derived >::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) >  | [PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits< Derived >::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits< Derived >::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), [AutoAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea)|(internal::traits< Derived >::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) &[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762) ? [RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f) :[ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62)), internal::traits< Derived >::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits< Derived >::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) >  | [PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e) |
|  |
| typedef internal::conditional< internal::is\_same< typename internal::traits< Derived >::XprKind, [MatrixXpr](structeigen_1_1matrixxpr) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), [PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e), [PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb) >::type  | [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) |
|  | The plain matrix or array type corresponding to this expression. [More...](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) |
|  |
| typedef internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) |
|  |
| typedef internal::traits< Derived >::[StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) | [StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) |
|  | The type used to store indices. [More...](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) |
|  |
| typedef [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [value\_type](classeigen_1_1densebase#a9276182dab8236c33f1e7abf491d504d) |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |
| - Static Public Member Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#a1fdd3189ae3a41d250593334d82210cf) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#ad8098aa5971139a5585e623dddbea860) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#ad8098aa5971139a5585e623dddbea860) |
|  |
| static const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) |
|  |
| static EIGEN\_DEPRECATED const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#ac8cfbd436a8c9fc50defee5946451176) (Sequential\_t, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| static EIGEN\_DEPRECATED const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d) (Sequential\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a5dc65501accd02c30f7c1840c2a30a41) (const CustomNullaryOp &func) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a3340c9b997f5b53a0131cf927f93b54c) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), const CustomNullaryOp &func) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a9752ee59976a4b4aad860ad1a9093e7f) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const CustomNullaryOp &func) |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101) () |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#a8b2a51018a73a766f5b91aef3487f013) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#ab710a58e4a80fbcb2594242372c8fe56) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19) () |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#ae97f8d9d08f969c733c8144be6225756) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#a7eb5f974a8f0b67eac7080db1da0e308) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) () |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#ae41a9b5050ed27d9e93c82c9c8622cd3) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#ac22f79b812fa564061042407f2ba8f5b) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| - Protected Member Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
|  | [DenseBase](classeigen_1_1densebase#aa284042d0e1b0ad9b6a00db7fd2d9f7f) () |
|  |

  matrix()
--------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [MatrixWrapper](classeigen_1_1matrixwrapper)<Derived> [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived >::matrix  | ( |  | ) |  |

 | inline |

 
 
Returns
an [Matrix](classeigen_1_1matrixbase)  expression of this array 
 
See also

[MatrixBase::array()](classeigen_1_1matrixbase#a354c33eec32ceb4193d002f4d41c0497) 
    operator\*=()
-------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived >::operator\*=  | ( | const [ArrayBase](classeigen_1_1arraybase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 replaces `*this` by `*this` \* *other* coefficient wise.

 
Returns
a reference to `*this` 
    operator+=()
------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived >::operator+=  | ( | const [ArrayBase](classeigen_1_1arraybase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 replaces `*this` by `*this` + *other*.

 
Returns
a reference to `*this` 
    operator-=()
------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived >::operator-=  | ( | const [ArrayBase](classeigen_1_1arraybase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 replaces `*this` by `*this` - *other*.

 
Returns
a reference to `*this` 
    operator/=()
------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived >::operator/=  | ( | const [ArrayBase](classeigen_1_1arraybase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 replaces `*this` by `*this` / *other* coefficient wise.

 
Returns
a reference to `*this` 
    operator=() [1/2]
-----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived >::operator=  | ( | const [ArrayBase](classeigen_1_1arraybase)< Derived > &  | *other* | ) |  |

 | inline |

 
 Special case of the template operator=, in order to prevent the compiler from generating a default operator= (issue hit with g++ 4.1) 

    operator=() [2/2]
-----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived >::operator=  | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *value* | ) |  |

 | inline |

 
 Set all the entries to *value*. 



See also

[DenseBase::setConstant()](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559), [DenseBase::fill()](classeigen_1_1densebase#a9be169c308801411aa24be93d30930bf) 
    pow() [1/3]
-----------

    template<typename Derived , typename ExponentDerived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [Eigen::CwiseBinaryOp](classeigen_1_1cwisebinaryop)< Eigen::internal::scalar\_pow\_op< typename Derived::Scalar, typename ExponentDerived::Scalar >, const Derived, const ExponentDerived > pow  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x*,  |
|  |  | const [Eigen::ArrayBase](classeigen_1_1arraybase)< ExponentDerived > &  | *exponents* |
|  | ) |  |  |

 | related |

 
 
Returns
an expression of the coefficient-wise power of *x* to the given array of *exponents*.
 This function computes the coefficient-wise power.

 Example: 



```
Array<double,1,3> [x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000)(8,25,3),
                  e(1./3.,0.5,2.);
cout << "[" << [x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000) << "]^[" << e << "] = " << [x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000).pow(e) << endl; // using ArrayBase::pow
cout << "[" << [x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000) << "]^[" << e << "] = " << [pow](classeigen_1_1arraybase#a5df3d99d47747b72d61f235c9fb925e3)([x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000),e) << endl; // using Eigen::pow
```

 Output: 



```
[ 8 25  3]^[0.333   0.5     2] = 2 5 9
[ 8 25  3]^[0.333   0.5     2] = 2 5 9

```


See also

[ArrayBase::pow()](classeigen_1_1arraybase#a5df3d99d47747b72d61f235c9fb925e3) 
    pow() [2/3]
-----------

    template<typename Derived , typename ScalarExponent >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_pow\_op< Derived::Scalar, ScalarExponent >, Derived, [Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd)< ScalarExponent > > pow  | ( | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x*,  |
|  |  | const ScalarExponent &  | *exponent* |
|  | ) |  |  |

 | related |

 
 
Returns
an expression of the coefficient-wise power of *x* to the given constant *exponent*.
 
Template Parameters
 

|  |  |
| --- | --- |
| ScalarExponent | is the scalar type of *exponent*. It must be compatible with the scalar type of the given expression (`Derived::Scalar`). |

   
See also

[ArrayBase::pow()](classeigen_1_1arraybase#a5df3d99d47747b72d61f235c9fb925e3) 
    pow() [3/3]
-----------

    template<typename Scalar , typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_pow\_op< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), Derived::Scalar >, [Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >, Derived > pow  | ( | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *x*,  |
|  |  | const [Eigen::ArrayBase](classeigen_1_1arraybase)< Derived > &  | *x* |
|  | ) |  |  |

 | related |

 
 
Returns
an expression of the coefficient-wise power of the scalar *x* to the given array of *exponents*.
 This function computes the coefficient-wise power between a scalar and an array of exponents.

 
Template Parameters
 

|  |  |
| --- | --- |
| Scalar | is the scalar type of *x*. It must be compatible with the scalar type of the given array expression (`Derived::Scalar`). |

   Example: 



```
Array<double,1,3> e(2,-3,1./3.);
cout << "10^[" << e << "] = " << [pow](classeigen_1_1arraybase#a5df3d99d47747b72d61f235c9fb925e3)(10,e) << endl;

```

 Output: 



```
10^[    2    -3 0.333] =   100 0.001  2.15

```


See also

[ArrayBase::pow()](classeigen_1_1arraybase#a5df3d99d47747b72d61f235c9fb925e3) 
   

---

The documentation for this class was generated from the following files:* [ArrayBase.h](https://eigen.tuxfamily.org/dox/ArrayBase_8h_source.html)
* [GlobalFunctions.h](https://eigen.tuxfamily.org/dox/GlobalFunctions_8h_source.html)
* [SelfCwiseBinaryOp.h](https://eigen.tuxfamily.org/dox/SelfCwiseBinaryOp_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1ArrayBase.html>

Eigen::ArrayWrapper
===================

  
### template<typename ExpressionType> class Eigen::ArrayWrapper< ExpressionType >

 Expression of a mathematical vector or matrix as an array object. 

 This class is the return type of [MatrixBase::array()](classeigen_1_1matrixbase#a354c33eec32ceb4193d002f4d41c0497), and most of the time this is the only way it is use.

 
See also

[MatrixBase::array()](classeigen_1_1matrixbase#a354c33eec32ceb4193d002f4d41c0497), class [MatrixWrapper](classeigen_1_1matrixwrapper "Expression of an array as a mathematical vector or matrix.") 
     ![Inheritance graph]           

|  |
| --- |
|  |
| void  | [resize](classeigen_1_1arraywrapper#a1dff702690e4d5795b3d08c5c6c1d082) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) newSize) |
|  |
| void  | [resize](classeigen_1_1arraywrapper#a1c5e643b7dc161066754e0812d57c4f1) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| - Public Member Functions inherited from [Eigen::ArrayBase< ArrayWrapper< ExpressionType > >](classeigen_1_1arraybase) |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< [ArrayWrapper](classeigen_1_1arraywrapper)< ExpressionType > >  | [matrix](classeigen_1_1arraybase#af01e9ea8087e390af8af453bbe4c276c) () |
|  |
| [ArrayWrapper](classeigen_1_1arraywrapper)< ExpressionType > &  | [operator\*=](classeigen_1_1arraybase#a6a5ff80e9d85106a1c9958219961c21d) (const [ArrayBase](classeigen_1_1arraybase)< OtherDerived > &other) |
|  |
| [ArrayWrapper](classeigen_1_1arraywrapper)< ExpressionType > &  | [operator+=](classeigen_1_1arraybase#a9cc9fdb4d0d6eb80a45107b86aacbfed) (const [ArrayBase](classeigen_1_1arraybase)< OtherDerived > &other) |
|  |
| [ArrayWrapper](classeigen_1_1arraywrapper)< ExpressionType > &  | [operator-=](classeigen_1_1arraybase#aac76a5e5e735b97f955189825cef7e2c) (const [ArrayBase](classeigen_1_1arraybase)< OtherDerived > &other) |
|  |
| [ArrayWrapper](classeigen_1_1arraywrapper)< ExpressionType > &  | [operator/=](classeigen_1_1arraybase#a1717e11dfe9341e9cfba13140cedddce) (const [ArrayBase](classeigen_1_1arraybase)< OtherDerived > &other) |
|  |
| [ArrayWrapper](classeigen_1_1arraywrapper)< ExpressionType > &  | [operator=](classeigen_1_1arraybase#a8587d8d893f5225a4511e9d76d9fe3cc) (const [ArrayBase](classeigen_1_1arraybase) &other) |
|  |
| [ArrayWrapper](classeigen_1_1arraywrapper)< ExpressionType > &  | [operator=](classeigen_1_1arraybase#a80cacb05b6881fba659efb2377e4fd22) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| - Public Member Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| bool  | [all](classeigen_1_1densebase#ae42ab60296c120e9f45ce3b44e1761a4) () const |
|  |
| bool  | [allFinite](classeigen_1_1densebase#af1e669fd3aaae50a4870dc1b8f3b8884) () const |
|  |
| bool  | [any](classeigen_1_1densebase#abfbf4cb72dd577e62fbe035b1c53e695) () const |
|  |
| [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) | [begin](classeigen_1_1densebase#a57591454af931f9dffa71c9da28d5641) () |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [begin](classeigen_1_1densebase#ad9368ce70b06167ec5fc19398d329f5e) () const |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [cbegin](classeigen_1_1densebase#ae9a3dfd9b826ba3103de0128576fb15b) () const |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [cend](classeigen_1_1densebase#aeb3b76f02986c2af2521d07164b5ffde) () const |
|  |
| [ColwiseReturnType](classeigen_1_1vectorwiseop) | [colwise](classeigen_1_1densebase#a1c0e1b6067ec1de6cb8799da55aa7d30) () |
|  |
| [ConstColwiseReturnType](classeigen_1_1vectorwiseop) | [colwise](classeigen_1_1densebase#a58837c81de446efbdb58da07b73a63c1) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [count](classeigen_1_1densebase#a229be090c665b9bf7d1fcdfd1ab6e0c1) () const |
|  |
| [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) | [end](classeigen_1_1densebase#ae71d079e16d91360d10066b316b48485) () |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [end](classeigen_1_1densebase#ab34773522e43bfb02e9cf652d7b5dd60) () const |
|  |
| EvalReturnType  | [eval](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b) () const |
|  |
| void  | [fill](classeigen_1_1densebase#a9be169c308801411aa24be93d30930bf) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| template<unsigned int Added, unsigned int Removed>  |
| EIGEN\_DEPRECATED const Derived &  | [flagged](classeigen_1_1densebase#a9b3f75f76ae40439be870258e80c7346) () const |
|  |
| const [WithFormat](classeigen_1_1withformat)< Derived >  | [format](classeigen_1_1densebase#ab231f1a6057f28d4244145e12c9fc0c7) (const [IOFormat](structeigen_1_1ioformat) &fmt) const |
|  |
| bool  | [hasNaN](classeigen_1_1densebase#ab13d158c900560d3e1b25d85d2d33dd6) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1densebase#a58ca41d9635a8ab3c5a268ef3f7f0d75) () const |
|  |
| template<typename OtherDerived >  |
| bool  | [isApprox](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isApproxToConstant](classeigen_1_1densebase#af9b150d48bc5e4366887ccb466e40c6b) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isConstant](classeigen_1_1densebase#a1ca84e4179b3e5081ed11d89bbd9e74f) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename OtherDerived >  |
| bool  | [isMuchSmallerThan](classeigen_1_1densebase#a3c4db0c6dd974fa88bbb58b2cf3d5664) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename Derived >  |
| bool  | [isMuchSmallerThan](classeigen_1_1densebase#adfca6ff4e473f68fbbeabbd03b7504a9) (const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real &other, const RealScalar &prec) const |
|  |
| bool  | [isOnes](classeigen_1_1densebase#aa56d6b4477cd3c92a9cf42f4b96e47c2) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isZero](classeigen_1_1densebase#af36014ec300f53a65083057ed4e89822) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename OtherDerived >  |
| EIGEN\_DEPRECATED Derived &  | [lazyAssign](classeigen_1_1densebase#a6bc6c096e3bfc726f28315daecd21b3f) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<int NaNPropagation>  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1) () const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#aced8ffda52ff061b6586ace2657ebf30) (IndexType \*index) const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#a3780b7a9cd184d0b4f3ea797eba9e2b3) (IndexType \*row, IndexType \*col) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [mean](classeigen_1_1densebase#a21ac6c0419a72ad7a88ea0bc189017d7) () const |
|  |
| template<int NaNPropagation>  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#a0739f9c868c331031c7810e21838dcb2) () const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#ac9265f4f91430b9cc75d63fb6865bb29) (IndexType \*index) const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#aa28152ba4a42b2d112e5fec5469ec4c1) (IndexType \*row, IndexType \*col) const |
|  |
| const [NestByValue](classeigen_1_1nestbyvalue)< Derived >  | [nestByValue](classeigen_1_1densebase#a3e2761e2b6da74dba1d17b40cc918bf7) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1densebase#acb8d5574eff335381e7441ade87700a0) () const |
|  |
| template<typename OtherDerived >  |
| [CommaInitializer](structeigen_1_1commainitializer)< Derived >  | [operator<<](classeigen_1_1densebase#a0f0e34696162b34762b2bf4bd948f90c) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| [CommaInitializer](structeigen_1_1commainitializer)< Derived >  | [operator<<](classeigen_1_1densebase#a0e575eb0ba6cc6bc5f347872abd8509d) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &s) |
|  |
| Derived &  | [operator=](classeigen_1_1densebase#a5281dadff89f46eef719b38e5d073a8f) (const [DenseBase](classeigen_1_1densebase) &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator=](classeigen_1_1densebase#ab66155169d20c035e80d521a8b918e97) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator=](classeigen_1_1densebase#a58915510693d64164e567bd762e1032f) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  | Copies the generic expression *other* into \*this. [More...](classeigen_1_1densebase#a58915510693d64164e567bd762e1032f) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1densebase#a03f71699bc26ca2ee4e42ec4538862d7) () const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [prod](classeigen_1_1densebase#af119d9a4efe5a15cd83c1ccdf01b3a4f) () const |
|  |
| template<typename Func >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [redux](classeigen_1_1densebase#a63ce1e4fab36bff43bbadcdd06a67724) (const Func &func) const |
|  |
| template<int RowFactor, int ColFactor>  |
| const [Replicate](classeigen_1_1replicate)< Derived, RowFactor, ColFactor >  | [replicate](classeigen_1_1densebase#a60dadfe80b813d808e91e4521c722a8e) () const |
|  |
| const [Replicate](classeigen_1_1replicate)< Derived, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) >  | [replicate](classeigen_1_1densebase#afae2d5e36f1158d1b1681dac3cdbd58e) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rowFactor, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) colFactor) const |
|  |
| void  | [resize](classeigen_1_1densebase#a2ec5bac4e1ab95808808ef50ccf4cb39) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) newSize) |
|  |
| void  | [resize](classeigen_1_1densebase#a25e2b4887b47b1f2346857d1931efa0f) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| [ReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1densebase#a38ea394036d8b096abf322469c80198f) () |
|  |
| [ConstReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1densebase#a9e2f3ac4019184abf95ca0e1a8d82866) () const |
|  |
| void  | [reverseInPlace](classeigen_1_1densebase#adb8045155ea45f7961fc2a5170e1d921) () |
|  |
| [RowwiseReturnType](classeigen_1_1vectorwiseop) | [rowwise](classeigen_1_1densebase#a6daa3a3156ca0e0722bf78638e1c7f28) () |
|  |
| [ConstRowwiseReturnType](classeigen_1_1vectorwiseop) | [rowwise](classeigen_1_1densebase#aa1cabd3404528fe8cec4bab43d74bffc) () const |
|  |
| template<typename ThenDerived , typename ElseDerived >  |
| const [Select](classeigen_1_1select)< Derived, ThenDerived, ElseDerived >  | [select](classeigen_1_1densebase#a65e78cfcbc9852e6923bebff4323ddca) (const [DenseBase](classeigen_1_1densebase)< ThenDerived > &thenMatrix, const [DenseBase](classeigen_1_1densebase)< ElseDerived > &elseMatrix) const |
|  |
| template<typename ThenDerived >  |
| const [Select](classeigen_1_1select)< Derived, ThenDerived, typename ThenDerived::ConstantReturnType >  | [select](classeigen_1_1densebase#a57ef09a843004095f84c198dd145641b) (const [DenseBase](classeigen_1_1densebase)< ThenDerived > &thenMatrix, const typename ThenDerived::Scalar &elseScalar) const |
|  |
| template<typename ElseDerived >  |
| const [Select](classeigen_1_1select)< Derived, typename ElseDerived::ConstantReturnType, ElseDerived >  | [select](classeigen_1_1densebase#a9e8e78c75887d4539071a0b7a61ca103) (const typename ElseDerived::Scalar &thenScalar, const [DenseBase](classeigen_1_1densebase)< ElseDerived > &elseMatrix) const |
|  |
| Derived &  | [setConstant](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| Derived &  | [setLinSpaced](classeigen_1_1densebase#aeb023532476d3f14c457367e0eb5f3f1) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#aeb023532476d3f14c457367e0eb5f3f1) |
|  |
| Derived &  | [setLinSpaced](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a) |
|  |
| Derived &  | [setOnes](classeigen_1_1densebase#a250ef1b827e748f3f898fb2e55cb96e2) () |
|  |
| Derived &  | [setRandom](classeigen_1_1densebase#ac476e5852129ba32beaa1a8a3d7ee0db) () |
|  |
| Derived &  | [setZero](classeigen_1_1densebase#af230a143de50695d2d1fae93db7e4dcb) () |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [sum](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c) () const |
|  |
| template<typename OtherDerived >  |
| void  | [swap](classeigen_1_1densebase#af9e7e4305fdb7781f2b2f05fa801f21e) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| void  | [swap](classeigen_1_1densebase#a44e25adc6da9cd1d79f4c5bd7c1819cb) ([PlainObjectBase](classeigen_1_1plainobjectbase)< OtherDerived > &other) |
|  |
| [TransposeReturnType](classeigen_1_1transpose) | [transpose](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1densebase#a38c0b074cf93fc194bf91141287cee3f) () const |
|  |
| void  | [transposeInPlace](classeigen_1_1densebase#ac501bd942994af7a95d95bee7a16ad2a) () |
|  |
| CoeffReturnType  | [value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0) () const |
|  |
| template<typename Visitor >  |
| void  | [visit](classeigen_1_1densebase#a4225b90fcc74f18dd479b401124b3841) (Visitor &func) const |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, DirectWriteAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [colStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#af1bac522aee4402639189f387592000b) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a4e94e17926e1cf597deb2928e779cef6) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#abb333f6f10467f6f8d7b59c213dea49e) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rowStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a63bc5874eb4e320e54eb079b43b49d22) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, WriteAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4) |
| Scalar &  | [coeffRef](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae66b7d18b2a85f3139b703126974c900) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| Scalar &  | [coeffRef](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#adc8286576b31e11f056057be666a0ec8) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| Scalar &  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a0171eee1d9e582d1ac7ec0f18f5f615a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| Scalar &  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae6ba07bad9e3026afe54806fdefe32bb) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| Scalar &  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#aa2040f14e60fed1a4a68ca7f042e1bbf) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| Scalar &  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af683e04b3926aaf4091581ca24ca09ad) () |
|  |
| Scalar &  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000) () |
|  |
| Scalar &  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afeaa80359bf0c1311f91cdd74a2042a8) () |
|  |
| Scalar &  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a858151a06b8c0ff407232d84e695dd73) () |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, ReadOnlyAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4) |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af9fadc22d12e48c82745dad534a1671a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ab3dbba4a15d0fe90185d2900e5ef0fd1) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| CoeffReturnType  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a496672306836589fa04a6ab33cb0cf2a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| CoeffReturnType  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a926f52a94f038db63c6b9103f98dcf0f) () const |
|  |
| CoeffReturnType  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a189c80109e76752b598d60dfcdab329e) () const |
|  |
| CoeffReturnType  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a0c6d6904a37805ce47a3238fbd735963) () const |
|  |
| CoeffReturnType  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a7c60c97282d4a0f8bca16ef75e231ddb) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| enum  | {  [RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab) ,  [ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441) ,  [SizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da25cb495affdbd796198462b8ef06be91) ,  [MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306) ,  [MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) ,  [MaxSizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da3a459062d39cb34452518f5f201161d2) ,  [IsVectorAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da1156955c8099c5072934b74c72654ed0) ,  [NumDimensions](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da4d4548a01ba37a6c2031a3c1f0a37d34) ,  [Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) ,  [IsRowMajor](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da406b6af91d61d348ba1c9764bdd66008) ,  **InnerSizeAtCompileTime** ,  **InnerStrideAtCompileTime** ,  **OuterStrideAtCompileTime**  } |
|  |
| typedef random\_access\_iterator\_type  | [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) |
|  |
| typedef random\_access\_iterator\_type  | [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) |
|  |
| typedef [Array](classeigen_1_1array)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits< Derived >::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits< Derived >::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), [AutoAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea)|(internal::traits< Derived >::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) &[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762) ? [RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f) :[ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62)), internal::traits< Derived >::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits< Derived >::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) >  | [PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits< Derived >::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits< Derived >::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), [AutoAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea)|(internal::traits< Derived >::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) &[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762) ? [RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f) :[ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62)), internal::traits< Derived >::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits< Derived >::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) >  | [PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e) |
|  |
| typedef internal::conditional< internal::is\_same< typename internal::traits< Derived >::XprKind, [MatrixXpr](structeigen_1_1matrixxpr) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), [PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e), [PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb) >::type  | [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) |
|  | The plain matrix or array type corresponding to this expression. [More...](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) |
|  |
| typedef internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) |
|  |
| typedef internal::traits< Derived >::[StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) | [StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) |
|  | The type used to store indices. [More...](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) |
|  |
| typedef [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [value\_type](classeigen_1_1densebase#a9276182dab8236c33f1e7abf491d504d) |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |
| - Static Public Member Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#a1fdd3189ae3a41d250593334d82210cf) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#ad8098aa5971139a5585e623dddbea860) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#ad8098aa5971139a5585e623dddbea860) |
|  |
| static const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) |
|  |
| static EIGEN\_DEPRECATED const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#ac8cfbd436a8c9fc50defee5946451176) (Sequential\_t, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| static EIGEN\_DEPRECATED const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d) (Sequential\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a5dc65501accd02c30f7c1840c2a30a41) (const CustomNullaryOp &func) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a3340c9b997f5b53a0131cf927f93b54c) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), const CustomNullaryOp &func) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a9752ee59976a4b4aad860ad1a9093e7f) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const CustomNullaryOp &func) |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101) () |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#a8b2a51018a73a766f5b91aef3487f013) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#ab710a58e4a80fbcb2594242372c8fe56) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19) () |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#ae97f8d9d08f969c733c8144be6225756) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#a7eb5f974a8f0b67eac7080db1da0e308) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) () |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#ae41a9b5050ed27d9e93c82c9c8622cd3) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#ac22f79b812fa564061042407f2ba8f5b) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| - Protected Member Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
|  | [DenseBase](classeigen_1_1densebase#aa284042d0e1b0ad9b6a00db7fd2d9f7f) () |
|  |
| - Related Functions inherited from [Eigen::ArrayBase< ArrayWrapper< ExpressionType > >](classeigen_1_1arraybase) |
| const [Eigen::CwiseBinaryOp](classeigen_1_1cwisebinaryop)< Eigen::internal::scalar\_pow\_op< typename Derived::Scalar, typename ExponentDerived::Scalar >, const [ArrayWrapper](classeigen_1_1arraywrapper)< ExpressionType >, const ExponentDerived >  | [pow](classeigen_1_1arraybase#acb769e1ab1d809abb77c7ab98021ad81) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< [ArrayWrapper](classeigen_1_1arraywrapper)< ExpressionType > > &[x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000), const [Eigen::ArrayBase](classeigen_1_1arraybase)< ExponentDerived > &exponents) |
|  |
| const [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_pow\_op< Derived::Scalar, ScalarExponent >, [ArrayWrapper](classeigen_1_1arraywrapper)< ExpressionType >, [Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd)< ScalarExponent > >  | [pow](classeigen_1_1arraybase#a5df3d99d47747b72d61f235c9fb925e3) (const [Eigen::ArrayBase](classeigen_1_1arraybase)< [ArrayWrapper](classeigen_1_1arraywrapper)< ExpressionType > > &[x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000), const ScalarExponent &exponent) |
|  |
| const [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_pow\_op< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), Derived::Scalar >, [Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >, [ArrayWrapper](classeigen_1_1arraywrapper)< ExpressionType > >  | [pow](classeigen_1_1arraybase#acb7a6224d50620991d1fb9888b8be6e6) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000), const [Eigen::ArrayBase](classeigen_1_1arraybase)< [ArrayWrapper](classeigen_1_1arraywrapper)< ExpressionType > > &[x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000)) |
|  |
| - Related Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| template<typename Derived >  |
| std::ostream &  | [operator<<](classeigen_1_1densebase#a3806d3f42de165878dace160e6aba40a) (std::ostream &s, const [DenseBase](classeigen_1_1densebase)< Derived > &m) |
|  |

  resize() [1/2]
--------------

    template<typename ExpressionType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::ArrayWrapper](classeigen_1_1arraywrapper)< ExpressionType >::resize  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *newSize* | ) |  |

 | inline |

 
 Forwards the resizing request to the nested expression 



See also

[DenseBase::resize(Index)](classeigen_1_1densebase#a2ec5bac4e1ab95808808ef50ccf4cb39)   
 
    resize() [2/2]
--------------

    template<typename ExpressionType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::ArrayWrapper](classeigen_1_1arraywrapper)< ExpressionType >::resize  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols* |
|  | ) |  |  |

 | inline |

 
 Forwards the resizing request to the nested expression 



See also

[DenseBase::resize(Index,Index)](classeigen_1_1densebase#a25e2b4887b47b1f2346857d1931efa0f) 
   

---

The documentation for this class was generated from the following file:* [ArrayWrapper.h](https://eigen.tuxfamily.org/dox/ArrayWrapper_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1ArrayWrapper.html>

Eigen::DenseCoeffsBase
======================

  
### template<typename Derived> class Eigen::DenseCoeffsBase< Derived, DirectAccessors >

 Base class providing direct read-only coefficient access to matrices and arrays. 

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | Type of the derived class |

   
Note

[DirectAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5da50108ad00095928de06228470ceab09e) Constant indicating direct access
 This class defines functions to work with strides which can be used to access entries directly. This class inherits [DenseCoeffsBase<Derived, ReadOnlyAccessors>](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4 "Base class providing read-only coefficient access to matrices and arrays.") which defines functions to access entries read-only using `operator()` .

 
See also

[The class hierarchy](topicclasshierarchy) 
     ![Inheritance graph]       

|  |
| --- |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [colStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4#af8b144e79782a441448d59e00834f31a) () const |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4#a8b17f1bcdb474072e079bb1a7926ef7f) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4#ad88c60c4a2356be2c436f3264dd20b55) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rowStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4#a95a043ca237afe8ccb18c6900091b170) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, ReadOnlyAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4) |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af9fadc22d12e48c82745dad534a1671a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ab3dbba4a15d0fe90185d2900e5ef0fd1) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| CoeffReturnType  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a496672306836589fa04a6ab33cb0cf2a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| CoeffReturnType  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a926f52a94f038db63c6b9103f98dcf0f) () const |
|  |
| CoeffReturnType  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a189c80109e76752b598d60dfcdab329e) () const |
|  |
| CoeffReturnType  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a0c6d6904a37805ce47a3238fbd735963) () const |
|  |
| CoeffReturnType  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a7c60c97282d4a0f8bca16ef75e231ddb) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  cols()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::cols  | ( | void  |  | ) |  |

 | inline |

 
 
Returns
the number of columns. 
 
See also

[rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), ColsAtCompileTime 
    colStride()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) Eigen::DenseCoeffsBase< Derived, [DirectAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5da50108ad00095928de06228470ceab09e) >::colStride  | ( |  | ) |  const |

 | inline |

 
 
Returns
the pointer increment between two consecutive columns.
 
See also
innerStride(), outerStride(), rowStride() 
    derived() [1/2]
---------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| Derived& [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::derived |

 | inline |

 
 
Returns
a reference to the derived object 
    derived() [2/2]
---------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const Derived& [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::derived |

 | inline |

 
 
Returns
a const reference to the derived object 
    innerStride()
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) Eigen::DenseCoeffsBase< Derived, [DirectAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5da50108ad00095928de06228470ceab09e) >::innerStride  | ( |  | ) |  const |

 | inline |

 
 
Returns
the pointer increment between two consecutive elements within a slice in the inner direction.
 
See also
outerStride(), rowStride(), colStride() 
    outerStride()
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) Eigen::DenseCoeffsBase< Derived, [DirectAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5da50108ad00095928de06228470ceab09e) >::outerStride  | ( |  | ) |  const |

 | inline |

 
 
Returns
the pointer increment between two consecutive inner slices (for example, between two consecutive columns in a column-major matrix).
 
See also
innerStride(), rowStride(), colStride() 
    rows()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::rows  | ( | void  |  | ) |  |

 | inline |

 
 
Returns
the number of rows. 
 
See also

[cols()](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), RowsAtCompileTime 
    rowStride()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) Eigen::DenseCoeffsBase< Derived, [DirectAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5da50108ad00095928de06228470ceab09e) >::rowStride  | ( |  | ) |  const |

 | inline |

 
 
Returns
the pointer increment between two consecutive rows.
 
See also
innerStride(), outerStride(), colStride() 
    size()
------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::size |

 | inline |

 
 
Returns
the number of coefficients, which is [rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2)\*cols(). 
 
See also

[rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [cols()](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), SizeAtCompileTime. 
   

---

The documentation for this class was generated from the following file:* [DenseCoeffsBase.h](https://eigen.tuxfamily.org/dox/DenseCoeffsBase_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1DenseCoeffsBase_3_01Derived_00_01DirectAccessors_01_4.html>

Eigen::DiagonalMatrix
=====================

  
### template<typename \_Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime> class Eigen::DiagonalMatrix< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >

 Represents a diagonal matrix with its storage. 

 
Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the type of coefficients  |
| SizeAtCompileTime | the dimension of the matrix, or Dynamic  |
| MaxSizeAtCompileTime | the dimension of the matrix, or Dynamic. This parameter is optional and defaults to SizeAtCompileTime. Most of the time, you do not need to specify it. |

   
See also
class [DiagonalWrapper](classeigen_1_1diagonalwrapper "Expression of a diagonal matrix.") 
  Inherits DiagonalBase< DiagonalMatrix< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >.

 

|  |
| --- |
|  |
| DiagonalVectorType &  | [diagonal](classeigen_1_1diagonalmatrix#a49c751bd59187979e1406b18e3b16049) () |
|  |
| const DiagonalVectorType &  | [diagonal](classeigen_1_1diagonalmatrix#a71b770614009e5af4b63d5f8005af2a5) () const |
|  |
|  | [DiagonalMatrix](classeigen_1_1diagonalmatrix#a07deda6348ef81a6a07577c40e5a8687) () |
|  |
| template<typename OtherDerived >  |
|  | [DiagonalMatrix](classeigen_1_1diagonalmatrix#a41b3d77b1ce65062a9ab53073083bac8) (const DiagonalBase< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
|  | [DiagonalMatrix](classeigen_1_1diagonalmatrix#a09701a17fa9ead2145174b4f4db6ab67) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) |
|  |
| template<typename... ArgTypes>  |
|  | [DiagonalMatrix](classeigen_1_1diagonalmatrix#a7733cedccd7422367a5face3a80cf825) (const Scalar &a0, const Scalar &a1, const Scalar &a2, const ArgTypes &... args) |
|  | Construct a diagonal matrix with fixed size from an arbitrary number of coefficients. [c++11] [More...](classeigen_1_1diagonalmatrix#a7733cedccd7422367a5face3a80cf825) |
|  |
|  | [DiagonalMatrix](classeigen_1_1diagonalmatrix#a8d674e5eaa4c378d5a3f96a9007ca349) (const Scalar &x, const Scalar &y) |
|  |
|  | [DiagonalMatrix](classeigen_1_1diagonalmatrix#a09d6cb930dff5e147ce22e08f2bb74b5) (const Scalar &x, const Scalar &y, const Scalar &z) |
|  |
|  | [DiagonalMatrix](classeigen_1_1diagonalmatrix#ac02390a9988bc1e7e54e133ba68bacee) (const std::initializer\_list< std::initializer\_list< Scalar >> &list) |
|  | Constructs a [DiagonalMatrix](classeigen_1_1diagonalmatrix "Represents a diagonal matrix with its storage.") and initializes it by elements given by an initializer list of initializer lists [c++11]  |
|  |
|  | [DiagonalMatrix](classeigen_1_1diagonalmatrix#ab069e106761d66fe1c2c494e7daf2244) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) dim) |
|  |
| template<typename OtherDerived >  |
| [DiagonalMatrix](classeigen_1_1diagonalmatrix) &  | [operator=](classeigen_1_1diagonalmatrix#a5d362adc0550baabcff2095c92c5045d) (const DiagonalBase< OtherDerived > &other) |
|  |
| void  | [resize](classeigen_1_1diagonalmatrix#af04e2fd5733eda42f0d82bb6b7405b42) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |
| void  | [setIdentity](classeigen_1_1diagonalmatrix#a58fabb4849fa44233c21f088ac33aa06) () |
|  |
| void  | [setIdentity](classeigen_1_1diagonalmatrix#a0b2d7eb480c889693fb31fbdb02d9c09) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |
| void  | [setZero](classeigen_1_1diagonalmatrix#ad4d81f0bf2bdb022d1910a89a6f8c819) () |
|  |
| void  | [setZero](classeigen_1_1diagonalmatrix#a293457cb23a0a2c95c44a1c6101ef218) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |

  DiagonalMatrix() [1/7]
----------------------

    template<typename \_Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::DiagonalMatrix](classeigen_1_1diagonalmatrix)< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::[DiagonalMatrix](classeigen_1_1diagonalmatrix) | ( |  | ) |  |

 | inline |

 
 Default constructor without initialization 

    DiagonalMatrix() [2/7]
----------------------

    template<typename \_Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::DiagonalMatrix](classeigen_1_1diagonalmatrix)< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::[DiagonalMatrix](classeigen_1_1diagonalmatrix) | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *dim* | ) |  |

 | inlineexplicit |

 
 Constructs a diagonal matrix with given dimension   
 

    DiagonalMatrix() [3/7]
----------------------

    template<typename \_Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::DiagonalMatrix](classeigen_1_1diagonalmatrix)< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::[DiagonalMatrix](classeigen_1_1diagonalmatrix) | ( | const Scalar &  | *x*,  |
|  |  | const Scalar &  | *y* |
|  | ) |  |  |

 | inline |

 
 2D constructor. 

    DiagonalMatrix() [4/7]
----------------------

    template<typename \_Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::DiagonalMatrix](classeigen_1_1diagonalmatrix)< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::[DiagonalMatrix](classeigen_1_1diagonalmatrix) | ( | const Scalar &  | *x*,  |
|  |  | const Scalar &  | *y*,  |
|  |  | const Scalar &  | *z* |
|  | ) |  |  |

 | inline |

 
 3D constructor. 

    DiagonalMatrix() [5/7]
----------------------

    template<typename \_Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>   template<typename... ArgTypes>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::DiagonalMatrix](classeigen_1_1diagonalmatrix)< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::[DiagonalMatrix](classeigen_1_1diagonalmatrix) | ( | const Scalar &  | *a0*,  |
|  |  | const Scalar &  | *a1*,  |
|  |  | const Scalar &  | *a2*,  |
|  |  | const ArgTypes &...  | *args* |
|  | ) |  |  |

 | inline |

 
 Construct a diagonal matrix with fixed size from an arbitrary number of coefficients. [c++11] 

 There exists C++98 anologue constructors for fixed-size diagonal matrices having 2 or 3 coefficients.

 
Warning
To construct a diagonal matrix of fixed size, the number of values passed to this constructor must match the fixed dimension of `*this`.
 
See also

[DiagonalMatrix(const Scalar&, const Scalar&)](classeigen_1_1diagonalmatrix#a8d674e5eaa4c378d5a3f96a9007ca349)   [DiagonalMatrix(const Scalar&, const Scalar&, const Scalar&)](classeigen_1_1diagonalmatrix#a09d6cb930dff5e147ce22e08f2bb74b5) 
    DiagonalMatrix() [6/7]
----------------------

    template<typename \_Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::DiagonalMatrix](classeigen_1_1diagonalmatrix)< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::[DiagonalMatrix](classeigen_1_1diagonalmatrix) | ( | const DiagonalBase< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Copy constructor. 

    DiagonalMatrix() [7/7]
----------------------

    template<typename \_Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::DiagonalMatrix](classeigen_1_1diagonalmatrix)< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::[DiagonalMatrix](classeigen_1_1diagonalmatrix) | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  |

 | inlineexplicit |

 
 generic constructor from expression of the diagonal coefficients 

    diagonal() [1/2]
----------------

    template<typename \_Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| DiagonalVectorType& [Eigen::DiagonalMatrix](classeigen_1_1diagonalmatrix)< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::diagonal  | ( |  | ) |  |

 | inline |

 
 
Returns
a reference to the stored vector of diagonal coefficients. 
    diagonal() [2/2]
----------------

    template<typename \_Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const DiagonalVectorType& [Eigen::DiagonalMatrix](classeigen_1_1diagonalmatrix)< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::diagonal  | ( |  | ) |  const |

 | inline |

 
 const version of [diagonal()](classeigen_1_1diagonalmatrix#a49c751bd59187979e1406b18e3b16049). 

    operator=()
-----------

    template<typename \_Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [DiagonalMatrix](classeigen_1_1diagonalmatrix)& [Eigen::DiagonalMatrix](classeigen_1_1diagonalmatrix)< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::operator=  | ( | const DiagonalBase< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Copy operator. 

    resize()
--------

    template<typename \_Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::DiagonalMatrix](classeigen_1_1diagonalmatrix)< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::resize  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size* | ) |  |

 | inline |

 
 Resizes to given size. 

    setIdentity() [1/2]
-------------------

    template<typename \_Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::DiagonalMatrix](classeigen_1_1diagonalmatrix)< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setIdentity  | ( |  | ) |  |

 | inline |

 
 Sets this matrix to be the identity matrix of the current size. 

    setIdentity() [2/2]
-------------------

    template<typename \_Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::DiagonalMatrix](classeigen_1_1diagonalmatrix)< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setIdentity  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size* | ) |  |

 | inline |

 
 Sets this matrix to be the identity matrix of the given size. 

    setZero() [1/2]
---------------

    template<typename \_Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::DiagonalMatrix](classeigen_1_1diagonalmatrix)< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setZero  | ( |  | ) |  |

 | inline |

 
 Sets all coefficients to zero. 

    setZero() [2/2]
---------------

    template<typename \_Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::DiagonalMatrix](classeigen_1_1diagonalmatrix)< \_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setZero  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size* | ) |  |

 | inline |

 
 Resizes and sets all coefficients to zero. 

   

---

The documentation for this class was generated from the following file:* [DiagonalMatrix.h](https://eigen.tuxfamily.org/dox/DiagonalMatrix_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1DiagonalMatrix.html>

Eigen::IdentityPreconditioner
=============================

  
A naive preconditioner which approximates any matrix as the identity matrix. 

 This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 
See also
class [DiagonalPreconditioner](classeigen_1_1diagonalpreconditioner "A preconditioner based on the digonal entries.") 
 


---

The documentation for this class was generated from the following file:* [BasicPreconditioners.h](https://eigen.tuxfamily.org/dox/BasicPreconditioners_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1IdentityPreconditioner.html>

Eigen::DenseCoeffsBase
======================

  
### template<typename Derived> class Eigen::DenseCoeffsBase< Derived, DirectWriteAccessors >

 Base class providing direct read/write coefficient access to matrices and arrays. 

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | Type of the derived class |

   
Note

[DirectWriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dacbe59d09ba2fdf8eac127bff1a1f0234) Constant indicating direct access
 This class defines functions to work with strides which can be used to access entries directly. This class inherits [DenseCoeffsBase<Derived, WriteAccessors>](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4 "Base class providing read/write coefficient access to matrices and arrays.") which defines functions to access entries read/write using `operator()`.

 
See also

[The class hierarchy](topicclasshierarchy) 
     ![Inheritance graph]                   

|  |
| --- |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [colStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#af1bac522aee4402639189f387592000b) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a4e94e17926e1cf597deb2928e779cef6) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#abb333f6f10467f6f8d7b59c213dea49e) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rowStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a63bc5874eb4e320e54eb079b43b49d22) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, WriteAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4) |
| Scalar &  | [coeffRef](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae66b7d18b2a85f3139b703126974c900) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| Scalar &  | [coeffRef](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#adc8286576b31e11f056057be666a0ec8) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| Scalar &  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a0171eee1d9e582d1ac7ec0f18f5f615a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| Scalar &  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae6ba07bad9e3026afe54806fdefe32bb) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| Scalar &  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#aa2040f14e60fed1a4a68ca7f042e1bbf) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| Scalar &  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af683e04b3926aaf4091581ca24ca09ad) () |
|  |
| Scalar &  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000) () |
|  |
| Scalar &  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afeaa80359bf0c1311f91cdd74a2042a8) () |
|  |
| Scalar &  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a858151a06b8c0ff407232d84e695dd73) () |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, ReadOnlyAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4) |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af9fadc22d12e48c82745dad534a1671a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ab3dbba4a15d0fe90185d2900e5ef0fd1) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| CoeffReturnType  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a496672306836589fa04a6ab33cb0cf2a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| CoeffReturnType  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a926f52a94f038db63c6b9103f98dcf0f) () const |
|  |
| CoeffReturnType  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a189c80109e76752b598d60dfcdab329e) () const |
|  |
| CoeffReturnType  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a0c6d6904a37805ce47a3238fbd735963) () const |
|  |
| CoeffReturnType  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a7c60c97282d4a0f8bca16ef75e231ddb) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  cols()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::cols  | ( | void  |  | ) |  |

 | inline |

 
 
Returns
the number of columns. 
 
See also

[rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), ColsAtCompileTime 
    colStride()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) Eigen::DenseCoeffsBase< Derived, [DirectWriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dacbe59d09ba2fdf8eac127bff1a1f0234) >::colStride  | ( |  | ) |  const |

 | inline |

 
 
Returns
the pointer increment between two consecutive columns.
 
See also
innerStride(), outerStride(), rowStride() 
    derived() [1/2]
---------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| Derived& [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::derived |

 | inline |

 
 
Returns
a reference to the derived object 
    derived() [2/2]
---------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const Derived& [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::derived |

 | inline |

 
 
Returns
a const reference to the derived object 
    innerStride()
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) Eigen::DenseCoeffsBase< Derived, [DirectWriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dacbe59d09ba2fdf8eac127bff1a1f0234) >::innerStride  | ( |  | ) |  const |

 | inline |

 
 
Returns
the pointer increment between two consecutive elements within a slice in the inner direction.
 
See also
outerStride(), rowStride(), colStride() 
    outerStride()
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) Eigen::DenseCoeffsBase< Derived, [DirectWriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dacbe59d09ba2fdf8eac127bff1a1f0234) >::outerStride  | ( |  | ) |  const |

 | inline |

 
 
Returns
the pointer increment between two consecutive inner slices (for example, between two consecutive columns in a column-major matrix).
 
See also
innerStride(), rowStride(), colStride() 
    rows()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::rows  | ( | void  |  | ) |  |

 | inline |

 
 
Returns
the number of rows. 
 
See also

[cols()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), RowsAtCompileTime 
    rowStride()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) Eigen::DenseCoeffsBase< Derived, [DirectWriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dacbe59d09ba2fdf8eac127bff1a1f0234) >::rowStride  | ( |  | ) |  const |

 | inline |

 
 
Returns
the pointer increment between two consecutive rows.
 
See also
innerStride(), outerStride(), colStride() 
    size()
------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::size |

 | inline |

 
 
Returns
the number of coefficients, which is [rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2)\*cols(). 
 
See also

[rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [cols()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), SizeAtCompileTime. 
   

---

The documentation for this class was generated from the following file:* [DenseCoeffsBase.h](https://eigen.tuxfamily.org/dox/DenseCoeffsBase_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1DenseCoeffsBase_3_01Derived_00_01DirectWriteAccessors_01_4.html>

Eigen::DenseCoeffsBase
======================

  
### template<typename Derived> class Eigen::DenseCoeffsBase< Derived, WriteAccessors >

 Base class providing read/write coefficient access to matrices and arrays. 

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | Type of the derived class |

   
Note

[WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) Constant indicating read/write access
 This class defines the non-const `operator()` function and friends, which can be used to write specific entries of a matrix or array. This class inherits [DenseCoeffsBase<Derived, ReadOnlyAccessors>](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4 "Base class providing read-only coefficient access to matrices and arrays.") which defines the const variant for reading specific entries.

 
See also

[DenseCoeffsBase<Derived, DirectAccessors>](classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4 "Base class providing direct read-only coefficient access to matrices and arrays."), [The class hierarchy](topicclasshierarchy) 
     ![Inheritance graph]                   

|  |
| --- |
|  |
| Scalar &  | [coeffRef](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae66b7d18b2a85f3139b703126974c900) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| Scalar &  | [coeffRef](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#adc8286576b31e11f056057be666a0ec8) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| Scalar &  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a0171eee1d9e582d1ac7ec0f18f5f615a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| Scalar &  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae6ba07bad9e3026afe54806fdefe32bb) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| Scalar &  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#aa2040f14e60fed1a4a68ca7f042e1bbf) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| Scalar &  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af683e04b3926aaf4091581ca24ca09ad) () |
|  |
| Scalar &  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000) () |
|  |
| Scalar &  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afeaa80359bf0c1311f91cdd74a2042a8) () |
|  |
| Scalar &  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a858151a06b8c0ff407232d84e695dd73) () |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, ReadOnlyAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4) |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af9fadc22d12e48c82745dad534a1671a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ab3dbba4a15d0fe90185d2900e5ef0fd1) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| CoeffReturnType  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a496672306836589fa04a6ab33cb0cf2a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| CoeffReturnType  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a926f52a94f038db63c6b9103f98dcf0f) () const |
|  |
| CoeffReturnType  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a189c80109e76752b598d60dfcdab329e) () const |
|  |
| CoeffReturnType  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a0c6d6904a37805ce47a3238fbd735963) () const |
|  |
| CoeffReturnType  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a7c60c97282d4a0f8bca16ef75e231ddb) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  coeffRef() [1/2]
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Scalar& Eigen::DenseCoeffsBase< Derived, [WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) >::coeffRef  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *index* | ) |  |

 | inline |

 
 Short version: don't use this function, use [operator[](Index)](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#aa2040f14e60fed1a4a68ca7f042e1bbf) instead.

 Long version: this function is similar to [operator[](Index)](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#aa2040f14e60fed1a4a68ca7f042e1bbf), but without the assertion. Use this for limiting the performance cost of debugging code when doing repeated coefficient access. Only use this when it is guaranteed that the parameters *row* and *col* are in range.

 If EIGEN\_INTERNAL\_DEBUGGING is defined, an assertion will be made, making this function equivalent to [operator[](Index)](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#aa2040f14e60fed1a4a68ca7f042e1bbf).

 
See also

[operator[](Index)](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#aa2040f14e60fed1a4a68ca7f042e1bbf), [coeff(Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda), [coeffRef(Index,Index)](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#adc8286576b31e11f056057be666a0ec8) 
    coeffRef() [2/2]
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Scalar& Eigen::DenseCoeffsBase< Derived, [WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) >::coeffRef  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *row*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *col* |
|  | ) |  |  |

 | inline |

 
 Short version: don't use this function, use [operator()(Index,Index)](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae6ba07bad9e3026afe54806fdefe32bb) instead.

 Long version: this function is similar to [operator()(Index,Index)](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae6ba07bad9e3026afe54806fdefe32bb), but without the assertion. Use this for limiting the performance cost of debugging code when doing repeated coefficient access. Only use this when it is guaranteed that the parameters *row* and *col* are in range.

 If EIGEN\_INTERNAL\_DEBUGGING is defined, an assertion will be made, making this function equivalent to [operator()(Index,Index)](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae6ba07bad9e3026afe54806fdefe32bb).

 
See also

[operator()(Index,Index)](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae6ba07bad9e3026afe54806fdefe32bb), [coeff(Index, Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393), [coeffRef(Index)](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae66b7d18b2a85f3139b703126974c900) 
    cols()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::cols  | ( | void  |  | ) |  |

 | inline |

 
 
Returns
the number of columns. 
 
See also

[rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), ColsAtCompileTime 
    derived() [1/2]
---------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| Derived& [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::derived |

 | inline |

 
 
Returns
a reference to the derived object 
    derived() [2/2]
---------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const Derived& [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::derived |

 | inline |

 
 
Returns
a const reference to the derived object 
    operator()() [1/2]
------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Scalar& Eigen::DenseCoeffsBase< Derived, [WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) >::operator()  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *index* | ) |  |

 | inline |

 
 
Returns
a reference to the coefficient at given index.
 This is synonymous to [operator[](Index)](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#aa2040f14e60fed1a4a68ca7f042e1bbf).

 This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.

 
See also

[operator[](Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a496672306836589fa04a6ab33cb0cf2a), [operator()(Index,Index)](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae6ba07bad9e3026afe54806fdefe32bb), [x()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000), [y()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afeaa80359bf0c1311f91cdd74a2042a8), [z()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a858151a06b8c0ff407232d84e695dd73), [w()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af683e04b3926aaf4091581ca24ca09ad) 
    operator()() [2/2]
------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Scalar& Eigen::DenseCoeffsBase< Derived, [WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) >::operator()  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *row*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *col* |
|  | ) |  |  |

 | inline |

 
 
Returns
a reference to the coefficient at given the given row and column.
 
See also

[operator[](Index)](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#aa2040f14e60fed1a4a68ca7f042e1bbf) 
    operator[]()
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Scalar& Eigen::DenseCoeffsBase< Derived, [WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) >::operator[]  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *index* | ) |  |

 | inline |

 
 
Returns
a reference to the coefficient at given index.
 This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.

 
See also

[operator[](Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a496672306836589fa04a6ab33cb0cf2a), [operator()(Index,Index)](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae6ba07bad9e3026afe54806fdefe32bb), [x()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000), [y()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afeaa80359bf0c1311f91cdd74a2042a8), [z()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a858151a06b8c0ff407232d84e695dd73), [w()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af683e04b3926aaf4091581ca24ca09ad) 
    rows()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::rows  | ( | void  |  | ) |  |

 | inline |

 
 
Returns
the number of rows. 
 
See also

[cols()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), RowsAtCompileTime 
    size()
------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::size |

 | inline |

 
 
Returns
the number of coefficients, which is [rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2)\*cols(). 
 
See also

[rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [cols()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), SizeAtCompileTime. 
    w()
---

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar& Eigen::DenseCoeffsBase< Derived, [WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) >::w  | ( |  | ) |  |

 | inline |

 
 equivalent to operator[](3).   
 

    x()
---

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar& Eigen::DenseCoeffsBase< Derived, [WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) >::x  | ( |  | ) |  |

 | inline |

 
 equivalent to operator[](0).   
 

    y()
---

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar& Eigen::DenseCoeffsBase< Derived, [WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) >::y  | ( |  | ) |  |

 | inline |

 
 equivalent to operator[](1).   
 

    z()
---

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar& Eigen::DenseCoeffsBase< Derived, [WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) >::z  | ( |  | ) |  |

 | inline |

 
 equivalent to operator[](2).   
 

   

---

The documentation for this class was generated from the following file:* [DenseCoeffsBase.h](https://eigen.tuxfamily.org/dox/DenseCoeffsBase_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1DenseCoeffsBase_3_01Derived_00_01WriteAccessors_01_4.html>

Eigen::HessenbergDecomposition
==============================

  
### template<typename \_MatrixType> class Eigen::HessenbergDecomposition< \_MatrixType >

 Reduces a square matrix to Hessenberg form by an orthogonal similarity transformation. 

 This is defined in the Eigenvalues module.



```
#include <Eigen/Eigenvalues> 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which we are computing the Hessenberg decomposition |

   This class performs an Hessenberg decomposition of a matrix \( A \). In the real case, the Hessenberg decomposition consists of an orthogonal matrix \( Q \) and a Hessenberg matrix \( H \) such that \( A = Q H Q^T \). An orthogonal matrix is a matrix whose inverse equals its transpose ( \( Q^{-1} = Q^T \)). A Hessenberg matrix has zeros below the subdiagonal, so it is almost upper triangular. The Hessenberg decomposition of a complex matrix is \( A = Q H Q^\* \) with \( Q \) unitary (that is, \( Q^{-1} = Q^\* \)).

 Call the function [compute()](classeigen_1_1hessenbergdecomposition#a239a6fd42c57aab3c0b048c47fde3004 "Computes Hessenberg decomposition of given matrix.") to compute the Hessenberg decomposition of a given matrix. Alternatively, you can use the HessenbergDecomposition(const MatrixType&) constructor which computes the Hessenberg decomposition at construction time. Once the decomposition is computed, you can use the [matrixH()](classeigen_1_1hessenbergdecomposition#a8e781d2e22a2304647bcf0ae913cc8ea "Constructs the Hessenberg matrix H in the decomposition.") and [matrixQ()](classeigen_1_1hessenbergdecomposition#a346441e4902a58d43d698ac3da6ff791 "Reconstructs the orthogonal matrix Q in the decomposition.") functions to construct the matrices H and Q in the decomposition.

 The documentation for [matrixH()](classeigen_1_1hessenbergdecomposition#a8e781d2e22a2304647bcf0ae913cc8ea "Constructs the Hessenberg matrix H in the decomposition.") contains an example of the typical use of this class.

 
See also
class [ComplexSchur](classeigen_1_1complexschur "Performs a complex Schur decomposition of a real or complex square matrix."), class [Tridiagonalization](classeigen_1_1tridiagonalization "Tridiagonal decomposition of a selfadjoint matrix."), [QR Module](group__qr__module) 
 


|  |
| --- |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1hessenbergdecomposition#a9420c36226cae7d92da8308a3f97ac2f), SizeMinusOne, 1, Options &~[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f), MaxSizeMinusOne, 1 >  | [CoeffVectorType](classeigen_1_1hessenbergdecomposition#a567f99f3770365777b67bf9832b6fac1) |
|  | Type for vector of Householder coefficients. [More...](classeigen_1_1hessenbergdecomposition#a567f99f3770365777b67bf9832b6fac1) |
|  |
|  typedef [HouseholderSequence](classeigen_1_1householdersequence)< [MatrixType](classeigen_1_1hessenbergdecomposition#a93a611350a7db9d1da18f2c828ecea9f), typename internal::remove\_all< typename CoeffVectorType::ConjugateReturnType >::type >  | [HouseholderSequenceType](classeigen_1_1hessenbergdecomposition#a7c1188cd5d8f550c8941df75a50a7d08) |
|  | Return type of [matrixQ()](classeigen_1_1hessenbergdecomposition#a346441e4902a58d43d698ac3da6ff791 "Reconstructs the orthogonal matrix Q in the decomposition.")  |
|  |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1hessenbergdecomposition#a8e287ac222f53e2c8ce82faa43e95ac6) |
|  |
|  typedef \_MatrixType  | [MatrixType](classeigen_1_1hessenbergdecomposition#a93a611350a7db9d1da18f2c828ecea9f) |
|  | Synonym for the template parameter `_MatrixType`.  |
|  |
|  typedef MatrixType::Scalar  | [Scalar](classeigen_1_1hessenbergdecomposition#a9420c36226cae7d92da8308a3f97ac2f) |
|  | Scalar type for matrices of type [MatrixType](classeigen_1_1hessenbergdecomposition#a93a611350a7db9d1da18f2c828ecea9f "Synonym for the template parameter _MatrixType.").  |
|  |




|  |
| --- |
|  |
| template<typename InputType >  |
| [HessenbergDecomposition](classeigen_1_1hessenbergdecomposition) &  | [compute](classeigen_1_1hessenbergdecomposition#a239a6fd42c57aab3c0b048c47fde3004) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  | Computes Hessenberg decomposition of given matrix. [More...](classeigen_1_1hessenbergdecomposition#a239a6fd42c57aab3c0b048c47fde3004) |
|  |
| template<typename InputType >  |
|  | [HessenbergDecomposition](classeigen_1_1hessenbergdecomposition#acd22602a3e3e5a02f79990ba1e445dc9) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  | Constructor; computes Hessenberg decomposition of given matrix. [More...](classeigen_1_1hessenbergdecomposition#acd22602a3e3e5a02f79990ba1e445dc9) |
|  |
|  | [HessenbergDecomposition](classeigen_1_1hessenbergdecomposition#aee1724cb6418ede1a8b9045036a5a319) ([Index](classeigen_1_1hessenbergdecomposition#a8e287ac222f53e2c8ce82faa43e95ac6) size=Size==[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) ? 2 :Size) |
|  | Default constructor; the decomposition will be computed later. [More...](classeigen_1_1hessenbergdecomposition#aee1724cb6418ede1a8b9045036a5a319) |
|  |
| const [CoeffVectorType](classeigen_1_1hessenbergdecomposition#a567f99f3770365777b67bf9832b6fac1) &  | [householderCoefficients](classeigen_1_1hessenbergdecomposition#a65fa81ce79d956baa59a30a6d82f8a84) () const |
|  | Returns the Householder coefficients. [More...](classeigen_1_1hessenbergdecomposition#a65fa81ce79d956baa59a30a6d82f8a84) |
|  |
| MatrixHReturnType  | [matrixH](classeigen_1_1hessenbergdecomposition#a8e781d2e22a2304647bcf0ae913cc8ea) () const |
|  | Constructs the Hessenberg matrix H in the decomposition. [More...](classeigen_1_1hessenbergdecomposition#a8e781d2e22a2304647bcf0ae913cc8ea) |
|  |
| [HouseholderSequenceType](classeigen_1_1hessenbergdecomposition#a7c1188cd5d8f550c8941df75a50a7d08) | [matrixQ](classeigen_1_1hessenbergdecomposition#a346441e4902a58d43d698ac3da6ff791) () const |
|  | Reconstructs the orthogonal matrix Q in the decomposition. [More...](classeigen_1_1hessenbergdecomposition#a346441e4902a58d43d698ac3da6ff791) |
|  |
| const [MatrixType](classeigen_1_1hessenbergdecomposition#a93a611350a7db9d1da18f2c828ecea9f) &  | [packedMatrix](classeigen_1_1hessenbergdecomposition#a1f72b7612fd4edc5a6f31005e433e1dd) () const |
|  | Returns the internal representation of the decomposition. [More...](classeigen_1_1hessenbergdecomposition#a1f72b7612fd4edc5a6f31005e433e1dd) |
|  |

  CoeffVectorType
---------------

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<[Scalar](classeigen_1_1hessenbergdecomposition#a9420c36226cae7d92da8308a3f97ac2f), SizeMinusOne, 1, Options & ~[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f), MaxSizeMinusOne, 1> [Eigen::HessenbergDecomposition](classeigen_1_1hessenbergdecomposition)< \_MatrixType >::[CoeffVectorType](classeigen_1_1hessenbergdecomposition#a567f99f3770365777b67bf9832b6fac1) |

 
 Type for vector of Householder coefficients. 

 This is column vector with entries of type [Scalar](classeigen_1_1hessenbergdecomposition#a9420c36226cae7d92da8308a3f97ac2f "Scalar type for matrices of type MatrixType."). The length of the vector is one less than the size of [MatrixType](classeigen_1_1hessenbergdecomposition#a93a611350a7db9d1da18f2c828ecea9f "Synonym for the template parameter _MatrixType."), if it is a fixed-side type. 

    Index
-----

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::HessenbergDecomposition](classeigen_1_1hessenbergdecomposition)< \_MatrixType >::[Index](classeigen_1_1hessenbergdecomposition#a8e287ac222f53e2c8ce82faa43e95ac6) |

 
 
**[Deprecated:](deprecated#_deprecated000016)**
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3 
    HessenbergDecomposition() [1/2]
-------------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::HessenbergDecomposition](classeigen_1_1hessenbergdecomposition)< \_MatrixType >::[HessenbergDecomposition](classeigen_1_1hessenbergdecomposition) | ( | [Index](classeigen_1_1hessenbergdecomposition#a8e287ac222f53e2c8ce82faa43e95ac6) | *size* = `Size==[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) ? 2 : Size` | ) |  |

 | inlineexplicit |

 
 Default constructor; the decomposition will be computed later. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | size | The size of the matrix whose Hessenberg decomposition will be computed. |

   The default constructor is useful in cases in which the user intends to perform decompositions via [compute()](classeigen_1_1hessenbergdecomposition#a239a6fd42c57aab3c0b048c47fde3004 "Computes Hessenberg decomposition of given matrix."). The `size` parameter is only used as a hint. It is not an error to give a wrong `size`, but it may impair performance.

 
See also

[compute()](classeigen_1_1hessenbergdecomposition#a239a6fd42c57aab3c0b048c47fde3004 "Computes Hessenberg decomposition of given matrix.") for an example. 
    HessenbergDecomposition() [2/2]
-------------------------------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::HessenbergDecomposition](classeigen_1_1hessenbergdecomposition)< \_MatrixType >::[HessenbergDecomposition](classeigen_1_1hessenbergdecomposition) | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | inlineexplicit |

 
 Constructor; computes Hessenberg decomposition of given matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matrix | Square matrix whose Hessenberg decomposition is to be computed. |

   This constructor calls [compute()](classeigen_1_1hessenbergdecomposition#a239a6fd42c57aab3c0b048c47fde3004 "Computes Hessenberg decomposition of given matrix.") to compute the Hessenberg decomposition.

 
See also

[matrixH()](classeigen_1_1hessenbergdecomposition#a8e781d2e22a2304647bcf0ae913cc8ea "Constructs the Hessenberg matrix H in the decomposition.") for an example. 
    compute()
---------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [HessenbergDecomposition](classeigen_1_1hessenbergdecomposition)& [Eigen::HessenbergDecomposition](classeigen_1_1hessenbergdecomposition)< \_MatrixType >::compute  | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | inline |

 
 Computes Hessenberg decomposition of given matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matrix | Square matrix whose Hessenberg decomposition is to be computed.  |

   
Returns
Reference to `*this` 
 The Hessenberg decomposition is computed by bringing the columns of the matrix successively in the required form using Householder reflections (see, e.g., Algorithm 7.4.2 in Golub & Van Loan, *Matrix Computations*). The cost is \( 10n^3/3 \) flops, where \( n \) denotes the size of the given matrix.

 This method reuses of the allocated data in the [HessenbergDecomposition](classeigen_1_1hessenbergdecomposition "Reduces a square matrix to Hessenberg form by an orthogonal similarity transformation.") object.

 Example: 



```
MatrixXcf A = [MatrixXcf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
HessenbergDecomposition<MatrixXcf> hd(4);
hd.compute(A);
cout << "The matrix H in the decomposition of A is:" << endl << hd.matrixH() << endl;
hd.compute(2*A); // re-use hd to compute and store decomposition of 2A
cout << "The matrix H in the decomposition of 2A is:" << endl << hd.matrixH() << endl;
```

 Output: 



```
The matrix H in the decomposition of A is:
    (-0.211,0.68)     (0.346,0.216)  (-0.688,0.00979)    (0.0451,0.584)
        (-1.45,0) (-0.0574,-0.0123)    (-0.196,0.385)     (0.395,0.389)
            (0,0)          (1.68,0)   (-0.397,-0.552)    (0.156,-0.241)
            (0,0)             (0,0)          (1.56,0)    (0.876,-0.423)
The matrix H in the decomposition of 2A is:
   (-0.422,1.36)    (0.691,0.431)   (-1.38,0.0196)    (0.0902,1.17)
       (-2.91,0) (-0.115,-0.0246)    (-0.392,0.77)    (0.791,0.777)
           (0,0)         (3.36,0)    (-0.795,-1.1)   (0.311,-0.482)
           (0,0)            (0,0)         (3.12,0)    (1.75,-0.846)

```
    householderCoefficients()
-------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [CoeffVectorType](classeigen_1_1hessenbergdecomposition#a567f99f3770365777b67bf9832b6fac1)& [Eigen::HessenbergDecomposition](classeigen_1_1hessenbergdecomposition)< \_MatrixType >::householderCoefficients  | ( |  | ) |  const |

 | inline |

 
 Returns the Householder coefficients. 

 
Returns
a const reference to the vector of Householder coefficients
 
Precondition
Either the constructor HessenbergDecomposition(const MatrixType&) or the member function compute(const MatrixType&) has been called before to compute the Hessenberg decomposition of a matrix.
 The Householder coefficients allow the reconstruction of the matrix \( Q \) in the Hessenberg decomposition from the packed data.

 
See also

[packedMatrix()](classeigen_1_1hessenbergdecomposition#a1f72b7612fd4edc5a6f31005e433e1dd "Returns the internal representation of the decomposition."), [Householder module](group__householder__module) 
    matrixH()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| MatrixHReturnType [Eigen::HessenbergDecomposition](classeigen_1_1hessenbergdecomposition)< \_MatrixType >::matrixH  | ( |  | ) |  const |

 | inline |

 
 Constructs the Hessenberg matrix H in the decomposition. 

 
Returns
expression object representing the matrix H
 
Precondition
Either the constructor HessenbergDecomposition(const MatrixType&) or the member function compute(const MatrixType&) has been called before to compute the Hessenberg decomposition of a matrix.
 The object returned by this function constructs the Hessenberg matrix H when it is assigned to a matrix or otherwise evaluated. The matrix H is constructed from the packed matrix as returned by [packedMatrix()](classeigen_1_1hessenbergdecomposition#a1f72b7612fd4edc5a6f31005e433e1dd "Returns the internal representation of the decomposition."): The upper part (including the subdiagonal) of the packed matrix contains the matrix H. It may sometimes be better to directly use the packed matrix instead of constructing the matrix H.

 Example: 



```
Matrix4f A = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
cout << "Here is a random 4x4 matrix:" << endl << A << endl;
HessenbergDecomposition<MatrixXf> hessOfA(A);
MatrixXf H = hessOfA.matrixH();
cout << "The Hessenberg matrix H is:" << endl << H << endl;
MatrixXf Q = hessOfA.matrixQ();
cout << "The orthogonal matrix Q is:" << endl << Q << endl;
cout << "Q H Q^T is:" << endl << Q * H * Q.transpose() << endl;

```

 Output: 



```
Here is a random 4x4 matrix:
   0.68   0.823  -0.444   -0.27
 -0.211  -0.605   0.108  0.0268
  0.566   -0.33 -0.0452   0.904
  0.597   0.536   0.258   0.832
The Hessenberg matrix H is:
   0.68  -0.691  -0.645   0.235
  0.849   0.836  -0.419   0.794
      0  -0.469  -0.547 -0.0731
      0       0  -0.559  -0.107
The orthogonal matrix Q is:
      1       0       0       0
      0  -0.249  -0.958   0.144
      0   0.667  -0.277  -0.692
      0   0.703 -0.0761   0.707
Q H Q^T is:
   0.68   0.823  -0.444   -0.27
 -0.211  -0.605   0.108  0.0268
  0.566   -0.33 -0.0452   0.904
  0.597   0.536   0.258   0.832

```


See also

[matrixQ()](classeigen_1_1hessenbergdecomposition#a346441e4902a58d43d698ac3da6ff791 "Reconstructs the orthogonal matrix Q in the decomposition."), [packedMatrix()](classeigen_1_1hessenbergdecomposition#a1f72b7612fd4edc5a6f31005e433e1dd "Returns the internal representation of the decomposition.") 
    matrixQ()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [HouseholderSequenceType](classeigen_1_1hessenbergdecomposition#a7c1188cd5d8f550c8941df75a50a7d08) [Eigen::HessenbergDecomposition](classeigen_1_1hessenbergdecomposition)< \_MatrixType >::matrixQ  | ( |  | ) |  const |

 | inline |

 
 Reconstructs the orthogonal matrix Q in the decomposition. 

 
Returns
object representing the matrix Q
 
Precondition
Either the constructor HessenbergDecomposition(const MatrixType&) or the member function compute(const MatrixType&) has been called before to compute the Hessenberg decomposition of a matrix.
 This function returns a light-weight object of template class [HouseholderSequence](classeigen_1_1householdersequence "Sequence of Householder reflections acting on subspaces with decreasing size."). You can either apply it directly to a matrix or you can convert it to a matrix of type [MatrixType](classeigen_1_1hessenbergdecomposition#a93a611350a7db9d1da18f2c828ecea9f "Synonym for the template parameter _MatrixType.").

 
See also

[matrixH()](classeigen_1_1hessenbergdecomposition#a8e781d2e22a2304647bcf0ae913cc8ea "Constructs the Hessenberg matrix H in the decomposition.") for an example, class [HouseholderSequence](classeigen_1_1householdersequence "Sequence of Householder reflections acting on subspaces with decreasing size.") 
    packedMatrix()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [MatrixType](classeigen_1_1hessenbergdecomposition#a93a611350a7db9d1da18f2c828ecea9f)& [Eigen::HessenbergDecomposition](classeigen_1_1hessenbergdecomposition)< \_MatrixType >::packedMatrix  | ( |  | ) |  const |

 | inline |

 
 Returns the internal representation of the decomposition. 

 
Returns
a const reference to a matrix with the internal representation of the decomposition.
 
Precondition
Either the constructor HessenbergDecomposition(const MatrixType&) or the member function compute(const MatrixType&) has been called before to compute the Hessenberg decomposition of a matrix.
 The returned matrix contains the following information:


* the upper part and lower sub-diagonal represent the Hessenberg matrix H
* the rest of the lower part contains the Householder vectors that, combined with Householder coefficients returned by [householderCoefficients()](classeigen_1_1hessenbergdecomposition#a65fa81ce79d956baa59a30a6d82f8a84 "Returns the Householder coefficients."), allows to reconstruct the matrix Q as \( Q = H\_{N-1} \ldots H\_1 H\_0 \). Here, the matrices \( H\_i \) are the Householder transformations \( H\_i = (I - h\_i v\_i v\_i^T) \) where \( h\_i \) is the \( i \)th Householder coefficient and \( v\_i \) is the Householder vector defined by \( v\_i = [ 0, \ldots, 0, 1, M(i+2,i), \ldots, M(N-1,i) ]^T \) with M the matrix returned by this function.

 See LAPACK for further details on this packed storage.

 Example: 



```
Matrix4d A = [Matrix4d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
cout << "Here is a random 4x4 matrix:" << endl << A << endl;
HessenbergDecomposition<Matrix4d> hessOfA(A);
Matrix4d pm = hessOfA.packedMatrix();
cout << "The packed matrix M is:" << endl << pm << endl;
cout << "The upper Hessenberg part corresponds to the matrix H, which is:" 
     << endl << hessOfA.matrixH() << endl;
Vector3d hc = hessOfA.householderCoefficients();
cout << "The vector of Householder coefficients is:" << endl << hc << endl;

```

 Output: 



```
Here is a random 4x4 matrix:
   0.68   0.823  -0.444   -0.27
 -0.211  -0.605   0.108  0.0268
  0.566   -0.33 -0.0452   0.904
  0.597   0.536   0.258   0.832
The packed matrix M is:
   0.68  -0.691  -0.645   0.235
  0.849   0.836  -0.419   0.794
 -0.534  -0.469  -0.547 -0.0731
 -0.563   0.344  -0.559  -0.107
The upper Hessenberg part corresponds to the matrix H, which is:
   0.68  -0.691  -0.645   0.235
  0.849   0.836  -0.419   0.794
      0  -0.469  -0.547 -0.0731
      0       0  -0.559  -0.107
The vector of Householder coefficients is:
1.25
1.79
   0

```


See also

[householderCoefficients()](classeigen_1_1hessenbergdecomposition#a65fa81ce79d956baa59a30a6d82f8a84 "Returns the Householder coefficients.") 
   

---

The documentation for this class was generated from the following file:* [HessenbergDecomposition.h](https://eigen.tuxfamily.org/dox/HessenbergDecomposition_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1HessenbergDecomposition.html>

Eigen::HouseholderSequence
==========================

  
### template<typename VectorsType, typename CoeffsType, int Side> class Eigen::HouseholderSequence< VectorsType, CoeffsType, Side >

 Sequence of Householder reflections acting on subspaces with decreasing size. 

 This is defined in the Householder module.



```
#include <Eigen/Householder> 

```


Template Parameters
 

|  |  |
| --- | --- |
| VectorsType | type of matrix containing the Householder vectors  |
| CoeffsType | type of vector containing the Householder coefficients  |
| Side | either OnTheLeft (the default) or OnTheRight |

   This class represents a product sequence of Householder reflections where the first Householder reflection acts on the whole space, the second Householder reflection leaves the one-dimensional subspace spanned by the first unit vector invariant, the third Householder reflection leaves the two-dimensional subspace spanned by the first two unit vectors invariant, and so on up to the last reflection which leaves all but one dimensions invariant and acts only on the last dimension. Such sequences of Householder reflections are used in several algorithms to zero out certain parts of a matrix. Indeed, the methods [HessenbergDecomposition::matrixQ()](classeigen_1_1hessenbergdecomposition#a346441e4902a58d43d698ac3da6ff791 "Reconstructs the orthogonal matrix Q in the decomposition."), [Tridiagonalization::matrixQ()](classeigen_1_1tridiagonalization#a000f7392eda930576ffd2af1fae54af2 "Returns the unitary matrix Q in the decomposition."), [HouseholderQR::householderQ()](classeigen_1_1householderqr#affd506c10ef2d25f56e7b1f9f25ff885), and [ColPivHouseholderQR::householderQ()](classeigen_1_1colpivhouseholderqr#a28ab9d8916ca609c5469c4c192fbfa28) all return a HouseholderSequence.

 More precisely, the class HouseholderSequence represents an \( n \times n \) matrix \( H \) of the form \( H = \prod\_{i=0}^{n-1} H\_i \) where the i-th Householder reflection is \( H\_i = I - h\_i v\_i v\_i^\* \). The i-th Householder coefficient \( h\_i \) is a scalar and the i-th Householder vector \( v\_i \) is a vector of the form 


 \[ v\_i = [\underbrace{0, \ldots, 0}\_{i-1\mbox{ zeros}}, 1, \underbrace{\*, \ldots,\*}\_{n-i\mbox{ arbitrary entries}} ]. \] 

  The last \( n-i \) entries of \( v\_i \) are called the essential part of the Householder vector.

 Typical usages are listed below, where H is a [HouseholderSequence](classeigen_1_1householdersequence "Sequence of Householder reflections acting on subspaces with decreasing size."): 



```
A.applyOnTheRight(H);             // A = A \* H
A.applyOnTheLeft(H);              // A = H \* A
A.applyOnTheRight(H.adjoint());   // A = A \* H^\*
A.applyOnTheLeft(H.adjoint());    // A = H^\* \* A
MatrixXd Q = H;                   // conversion to a dense matrix

```

 In addition to the adjoint, you can also apply the inverse (=adjoint), the transpose, and the conjugate operators.

 See the documentation for [HouseholderSequence(const VectorsType&, const CoeffsType&)](classeigen_1_1householdersequence#af6aeede87ed8dac452f4fa8b4f45c3f2 "Constructor.") for an example.

 
See also

[MatrixBase::applyOnTheLeft()](classeigen_1_1matrixbase#a3a08ad41e81d8ad4a37b5d5c7490e765), [MatrixBase::applyOnTheRight()](classeigen_1_1matrixbase#a45d91752925d2757fc8058a293b15462) 
     ![Inheritance graph]      

|  |
| --- |
|  |
|  [AdjointReturnType](classeigen_1_1householdersequence) | [adjoint](classeigen_1_1householdersequence#af3967dc6ea7a3671224a4b4a9776a329) () const |
|  | Adjoint (conjugate transpose) of the Householder sequence.  |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1householdersequence#a35475457c973a66539417b61449cbf5a) () const EIGEN\_NOEXCEPT |
|  | Number of columns of transformation viewed as a matrix. [More...](classeigen_1_1householdersequence#a35475457c973a66539417b61449cbf5a) |
|  |
|  [ConjugateReturnType](classeigen_1_1householdersequence) | [conjugate](classeigen_1_1householdersequence#ac71fa85a4f177b0aeb1026752aea5590) () const |
|  | Complex conjugate of the Householder sequence.  |
|  |
| template<bool Cond>  |
| internal::conditional< Cond, [ConjugateReturnType](classeigen_1_1householdersequence), [ConstHouseholderSequence](classeigen_1_1householdersequence) >::type  | [conjugateIf](classeigen_1_1householdersequence#afe117fafd579da0371861bec910599a3) () const |
|  |
| const [EssentialVectorType](classeigen_1_1block) | [essentialVector](classeigen_1_1householdersequence#ac91cf37b0cbea9e504c89e021fd289ba) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) k) const |
|  | Essential part of a Householder vector. [More...](classeigen_1_1householdersequence#ac91cf37b0cbea9e504c89e021fd289ba) |
|  |
|  | [HouseholderSequence](classeigen_1_1householdersequence#aa4b1b93fff4d5c79342974d9d2a9eec8) (const [HouseholderSequence](classeigen_1_1householdersequence) &other) |
|  | Copy constructor.  |
|  |
|  | [HouseholderSequence](classeigen_1_1householdersequence#af6aeede87ed8dac452f4fa8b4f45c3f2) (const VectorsType &v, const CoeffsType &h) |
|  | Constructor. [More...](classeigen_1_1householdersequence#af6aeede87ed8dac452f4fa8b4f45c3f2) |
|  |
|  [AdjointReturnType](classeigen_1_1householdersequence) | [inverse](classeigen_1_1householdersequence#a02014cb7359500d5bd51b6f8ee4d34fc) () const |
|  | [Inverse](classeigen_1_1inverse "Expression of the inverse of another expression.") of the Householder sequence (equals the adjoint).  |
|  |
|  [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [length](classeigen_1_1householdersequence#ac62fad812f3893f237378fe70e55bf66) () const |
|  | Returns the length of the Householder sequence.  |
|  |
| template<typename OtherDerived >  |
| internal::matrix\_type\_times\_scalar\_type< Scalar, OtherDerived >::Type  | [operator\*](classeigen_1_1householdersequence#ac57e5a22f1646e04a4f8b4cba3825928) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  | Computes the product of a Householder sequence with a matrix. [More...](classeigen_1_1householdersequence#ac57e5a22f1646e04a4f8b4cba3825928) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1householdersequence#ac0bef8081be2c21062c1ae015bd1c1c0) () const EIGEN\_NOEXCEPT |
|  | Number of rows of transformation viewed as a matrix. [More...](classeigen_1_1householdersequence#ac0bef8081be2c21062c1ae015bd1c1c0) |
|  |
| [HouseholderSequence](classeigen_1_1householdersequence) &  | [setLength](classeigen_1_1householdersequence#a30cc06d5b2ca4b7dcf5fcd53313d25fc) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [length](classeigen_1_1householdersequence#ac62fad812f3893f237378fe70e55bf66)) |
|  | Sets the length of the Householder sequence. [More...](classeigen_1_1householdersequence#a30cc06d5b2ca4b7dcf5fcd53313d25fc) |
|  |
| [HouseholderSequence](classeigen_1_1householdersequence) &  | [setShift](classeigen_1_1householdersequence#a2d8d996ce1085fd977850988735739f0) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [shift](classeigen_1_1householdersequence#a34482bfad5563fd8a8a4264db76ac917)) |
|  | Sets the shift of the Householder sequence. [More...](classeigen_1_1householdersequence#a2d8d996ce1085fd977850988735739f0) |
|  |
|  [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [shift](classeigen_1_1householdersequence#a34482bfad5563fd8a8a4264db76ac917) () const |
|  | Returns the shift of the Householder sequence.  |
|  |
|  [TransposeReturnType](classeigen_1_1householdersequence) | [transpose](classeigen_1_1householdersequence#ae0959abb2cfa16c9df2e5782e721811c) () const |
|  | Transpose of the Householder sequence.  |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< HouseholderSequence< VectorsType, CoeffsType, Side > >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| [HouseholderSequence](classeigen_1_1householdersequence)< VectorsType, CoeffsType, Side > &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const [HouseholderSequence](classeigen_1_1householdersequence)< VectorsType, CoeffsType, Side > &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< HouseholderSequence< VectorsType, CoeffsType, Side > >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  HouseholderSequence()
---------------------

    template<typename VectorsType , typename CoeffsType , int Side>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::HouseholderSequence](classeigen_1_1householdersequence)< VectorsType, CoeffsType, Side >::[HouseholderSequence](classeigen_1_1householdersequence) | ( | const VectorsType &  | *v*,  |
|  |  | const CoeffsType &  | *h* |
|  | ) |  |  |

 | inline |

 
 Constructor. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | v | Matrix containing the essential parts of the Householder vectors  |
| [in] | h | Vector containing the Householder coefficients |

   Constructs the Householder sequence with coefficients given by `h` and vectors given by `v`. The i-th Householder coefficient \( h\_i \) is given by `h(i)` and the essential part of the i-th Householder vector \( v\_i \) is given by `v(k,i)` with `k` > `i` (the subdiagonal part of the i-th column). If `v` has fewer columns than rows, then the Householder sequence contains as many Householder reflections as there are columns.

 
Note
The HouseholderSequence object stores `v` and `h` by reference.
 Example: 



```
Matrix3d v = [Matrix3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "The matrix v is:" << endl;
cout << v << endl;
 
Vector3d v0(1, v(1,0), v(2,0));
cout << "The first Householder vector is: v\_0 = " << v0.transpose() << endl;
Vector3d v1(0, 1, v(2,1));
cout << "The second Householder vector is: v\_1 = " << v1.transpose()  << endl;
Vector3d v2(0, 0, 1);
cout << "The third Householder vector is: v\_2 = " << v2.transpose() << endl;
 
Vector3d h = [Vector3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "The Householder coefficients are: h = " << h.transpose() << endl;
 
Matrix3d H0 = [Matrix3d::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)() - h(0) * v0 * v0.adjoint();
cout << "The first Householder reflection is represented by H\_0 = " << endl;
cout << H0 << endl;
Matrix3d H1 = [Matrix3d::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)() - h(1) * v1 * v1.adjoint();
cout << "The second Householder reflection is represented by H\_1 = " << endl;
cout << H1 << endl;
Matrix3d H2 = [Matrix3d::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)() - h(2) * v2 * v2.adjoint();
cout << "The third Householder reflection is represented by H\_2 = " << endl;
cout << H2 << endl;
cout << "Their product is H\_0 H\_1 H\_2 = " << endl;
cout << H0 * H1 * H2 << endl;
 
HouseholderSequence<Matrix3d, Vector3d> hhSeq(v, h);
Matrix3d hhSeqAsMatrix(hhSeq);
cout << "If we construct a HouseholderSequence from v and h" << endl;
cout << "and convert it to a matrix, we get:" << endl;
cout << hhSeqAsMatrix << endl;
```

 Output: 



```
The matrix v is:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
The first Householder vector is: v_0 =      1 -0.211  0.566
The second Householder vector is: v_1 =      0      1 -0.605
The third Householder vector is: v_2 = 0 0 1
The Householder coefficients are: h =   0.108 -0.0452   0.258
The first Householder reflection is represented by H_0 = 
  0.892  0.0228 -0.0611
 0.0228   0.995  0.0129
-0.0611  0.0129   0.965
The second Householder reflection is represented by H_1 = 
      1       0       0
      0    1.05 -0.0273
      0 -0.0273    1.02
The third Householder reflection is represented by H_2 = 
    1     0     0
    0     1     0
    0     0 0.742
Their product is H_0 H_1 H_2 = 
  0.892  0.0255 -0.0466
 0.0228    1.04 -0.0105
-0.0611 -0.0129   0.728
If we construct a HouseholderSequence from v and h
and convert it to a matrix, we get:
  0.892  0.0255 -0.0466
 0.0228    1.04 -0.0105
-0.0611 -0.0129   0.728

```


See also

[setLength()](classeigen_1_1householdersequence#a30cc06d5b2ca4b7dcf5fcd53313d25fc "Sets the length of the Householder sequence."), [setShift()](classeigen_1_1householdersequence#a2d8d996ce1085fd977850988735739f0 "Sets the shift of the Householder sequence.") 
    cols()
------

    template<typename VectorsType , typename CoeffsType , int Side>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::HouseholderSequence](classeigen_1_1householdersequence)< VectorsType, CoeffsType, Side >::cols  | ( | void  |  | ) |  const |

 | inline |

 
 Number of columns of transformation viewed as a matrix. 

 
Returns
Number of columns
 This equals the dimension of the space that the transformation acts on. 

    conjugateIf()
-------------

    template<typename VectorsType , typename CoeffsType , int Side>   template<bool Cond>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::conditional<Cond,[ConjugateReturnType](classeigen_1_1householdersequence),[ConstHouseholderSequence](classeigen_1_1householdersequence)>::type [Eigen::HouseholderSequence](classeigen_1_1householdersequence)< VectorsType, CoeffsType, Side >::conjugateIf  | ( |  | ) |  const |

 | inline |

 
 
Returns
an expression of the complex conjugate of `*this` if Cond==true, returns `*this` otherwise. 
    essentialVector()
-----------------

    template<typename VectorsType , typename CoeffsType , int Side>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [EssentialVectorType](classeigen_1_1block) [Eigen::HouseholderSequence](classeigen_1_1householdersequence)< VectorsType, CoeffsType, Side >::essentialVector  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *k* | ) |  const |

 | inline |

 
 Essential part of a Householder vector. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | k | Index of Householder reflection  |

   
Returns
Vector containing non-trivial entries of k-th Householder vector
 This function returns the essential part of the Householder vector \( v\_i \). This is a vector of length \( n-i \) containing the last \( n-i \) entries of the vector 


 \[ v\_i = [\underbrace{0, \ldots, 0}\_{i-1\mbox{ zeros}}, 1, \underbrace{\*, \ldots,\*}\_{n-i\mbox{ arbitrary entries}} ]. \] 

  The index \( i \) equals `k` + [shift()](classeigen_1_1householdersequence#a34482bfad5563fd8a8a4264db76ac917 "Returns the shift of the Householder sequence."), corresponding to the k-th column of the matrix `v` passed to the constructor.

 
See also

[setShift()](classeigen_1_1householdersequence#a2d8d996ce1085fd977850988735739f0 "Sets the shift of the Householder sequence."), [shift()](classeigen_1_1householdersequence#a34482bfad5563fd8a8a4264db76ac917 "Returns the shift of the Householder sequence.") 
    operator\*()
------------

    template<typename VectorsType , typename CoeffsType , int Side>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| internal::matrix\_type\_times\_scalar\_type<Scalar, OtherDerived>::Type [Eigen::HouseholderSequence](classeigen_1_1householdersequence)< VectorsType, CoeffsType, Side >::operator\*  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 Computes the product of a Householder sequence with a matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | other | Matrix being multiplied.  |

   
Returns
Expression object representing the product.
 This function computes \( HM \) where \( H \) is the Householder sequence represented by `*this` and \( M \) is the matrix `other`. 

    rows()
------

    template<typename VectorsType , typename CoeffsType , int Side>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::HouseholderSequence](classeigen_1_1householdersequence)< VectorsType, CoeffsType, Side >::rows  | ( | void  |  | ) |  const |

 | inline |

 
 Number of rows of transformation viewed as a matrix. 

 
Returns
Number of rows
 This equals the dimension of the space that the transformation acts on. 

    setLength()
-----------

    template<typename VectorsType , typename CoeffsType , int Side>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [HouseholderSequence](classeigen_1_1householdersequence)& [Eigen::HouseholderSequence](classeigen_1_1householdersequence)< VectorsType, CoeffsType, Side >::setLength  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *length* | ) |  |

 | inline |

 
 Sets the length of the Householder sequence. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | length | New value for the length. |

   By default, the length \( n \) of the Householder sequence \( H = H\_0 H\_1 \ldots H\_{n-1} \) is set to the number of columns of the matrix `v` passed to the constructor, or the number of rows if that is smaller. After this function is called, the length equals `length`.

 
See also

[length()](classeigen_1_1householdersequence#ac62fad812f3893f237378fe70e55bf66 "Returns the length of the Householder sequence.") 
    setShift()
----------

    template<typename VectorsType , typename CoeffsType , int Side>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [HouseholderSequence](classeigen_1_1householdersequence)& [Eigen::HouseholderSequence](classeigen_1_1householdersequence)< VectorsType, CoeffsType, Side >::setShift  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *shift* | ) |  |

 | inline |

 
 Sets the shift of the Householder sequence. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | shift | New value for the shift. |

   By default, a HouseholderSequence object represents \( H = H\_0 H\_1 \ldots H\_{n-1} \) and the i-th column of the matrix `v` passed to the constructor corresponds to the i-th Householder reflection. After this function is called, the object represents \( H = H\_{\mathrm{shift}} H\_{\mathrm{shift}+1} \ldots H\_{n-1} \) and the i-th column of `v` corresponds to the (shift+i)-th Householder reflection.

 
See also

[shift()](classeigen_1_1householdersequence#a34482bfad5563fd8a8a4264db76ac917 "Returns the shift of the Householder sequence.") 
   

---

The documentation for this class was generated from the following file:* [HouseholderSequence.h](https://eigen.tuxfamily.org/dox/HouseholderSequence_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1HouseholderSequence.html>

Eigen::InnerStride
==================

  
### template<int Value> class Eigen::InnerStride< Value >

 Convenience specialization of [Stride](classeigen_1_1stride "Holds strides information for Map.") to specify only an inner stride See class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") for some examples. 

     ![Inheritance graph]      

|  |
| --- |
|  |
| - Public Types inherited from [Eigen::Stride< 0, Value >](classeigen_1_1stride) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) |
|  |
| - Public Member Functions inherited from [Eigen::Stride< 0, Value >](classeigen_1_1stride) |
| EIGEN\_CONSTEXPR [Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) | [inner](classeigen_1_1stride#ab827ee701f5ccbd8f9bdeb32497df572) () const |
|  |
| EIGEN\_CONSTEXPR [Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) | [outer](classeigen_1_1stride#a010ffe25388932a6c83c6d9d95b95442) () const |
|  |
|  | [Stride](classeigen_1_1stride#ae3f37b08ff44d2afe971c0894c2f44a5) () |
|  |
|  | [Stride](classeigen_1_1stride#aa9bb1a33da8c785d9cc4ad5d799b9253) (const [Stride](classeigen_1_1stride) &other) |
|  |
|  | [Stride](classeigen_1_1stride#a81e299d9d2f8bbfc6d240705dabe5833) ([Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) outerStride, [Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) innerStride) |
|  |

 

---

The documentation for this class was generated from the following file:* [Stride.h](https://eigen.tuxfamily.org/dox/Stride_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1InnerStride.html>

Eigen::GeneralizedEigenSolver
=============================

  
### template<typename \_MatrixType> class Eigen::GeneralizedEigenSolver< \_MatrixType >

 Computes the generalized eigenvalues and eigenvectors of a pair of general matrices. 

 This is defined in the Eigenvalues module.



```
#include <Eigen/Eigenvalues> 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrices of which we are computing the eigen-decomposition; this is expected to be an instantiation of the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class template. Currently, only real matrices are supported. |

   The generalized eigenvalues and eigenvectors of a matrix pair \( A \) and \( B \) are scalars \( \lambda \) and vectors \( v \) such that \( Av = \lambda Bv \). If \( D \) is a diagonal matrix with the eigenvalues on the diagonal, and \( V \) is a matrix with the eigenvectors as its columns, then \( A V = B V D \). The matrix \( V \) is almost always invertible, in which case we have \( A = B V D V^{-1} \). This is called the generalized eigen-decomposition.

 The generalized eigenvalues and eigenvectors of a matrix pair may be complex, even when the matrices are real. Moreover, the generalized eigenvalue might be infinite if the matrix B is singular. To workaround this difficulty, the eigenvalues are provided as a pair of complex \( \alpha \) and real \( \beta \) such that: \( \lambda\_i = \alpha\_i / \beta\_i \). If \( \beta\_i \) is (nearly) zero, then one can consider the well defined left eigenvalue \( \mu = \beta\_i / \alpha\_i\) such that: \( \mu\_i A v\_i = B v\_i \), or even \( \mu\_i u\_i^T A = u\_i^T B \) where \( u\_i \) is called the left eigenvector.

 Call the function [compute()](classeigen_1_1generalizedeigensolver#a275910b47dfe5f40211dcb59cfd68f3c "Computes generalized eigendecomposition of given matrix.") to compute the generalized eigenvalues and eigenvectors of a given matrix pair. Alternatively, you can use the [GeneralizedEigenSolver(const MatrixType&, const MatrixType&, bool)](classeigen_1_1generalizedeigensolver#a2a3528cbf75f66d3a60af9dc7b12ff65 "Constructor; computes the generalized eigendecomposition of given matrix pair.") constructor which computes the eigenvalues and eigenvectors at construction time. Once the eigenvalue and eigenvectors are computed, they can be retrieved with the [eigenvalues()](classeigen_1_1generalizedeigensolver#a62f01cd78271efd5e39bcb24e0fe1a58 "Returns an expression of the computed generalized eigenvalues.") and eigenvectors() functions.

 Here is an usage example of this class: Example: 



```
GeneralizedEigenSolver<MatrixXf> ges;
MatrixXf A = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
MatrixXf B = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
ges.compute(A, B);
cout << "The (complex) numerators of the generalzied eigenvalues are: " << ges.alphas().transpose() << endl;
cout << "The (real) denominatore of the generalzied eigenvalues are: " << ges.betas().transpose() << endl;
cout << "The (complex) generalzied eigenvalues are (alphas./beta): " << ges.eigenvalues().transpose() << endl;
```

 Output: 



```
The (complex) numerators of the generalzied eigenvalues are:  (-0.126,0.569) (-0.126,-0.569)      (-0.398,0)       (-1.12,0)
The (real) denominatore of the generalzied eigenvalues are: -1.56 -1.56 -1.25 0.746
The (complex) generalzied eigenvalues are (alphas./beta): (0.081,-0.365)  (0.081,0.365)     (0.318,-0)       (-1.5,0)

```


See also

[MatrixBase::eigenvalues()](classeigen_1_1matrixbase#a30430fa3d5b4e74d312fd4f502ac984d "Computes the eigenvalues of a matrix."), class [ComplexEigenSolver](classeigen_1_1complexeigensolver "Computes eigenvalues and eigenvectors of general complex matrices."), class [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver "Computes eigenvalues and eigenvectors of selfadjoint matrices.") 
 


|  |
| --- |
|  |
| typedef std::complex< RealScalar >  | [ComplexScalar](classeigen_1_1generalizedeigensolver#abdec07af91db1345bb4c74066e3d0ea7) |
|  | Complex scalar type for [MatrixType](classeigen_1_1generalizedeigensolver#a56f4b9823bb9a267de3aaf48428cd247 "Synonym for the template parameter _MatrixType."). [More...](classeigen_1_1generalizedeigensolver#abdec07af91db1345bb4c74066e3d0ea7) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [ComplexScalar](classeigen_1_1generalizedeigensolver#abdec07af91db1345bb4c74066e3d0ea7), ColsAtCompileTime, 1, Options &~[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f), MaxColsAtCompileTime, 1 >  | [ComplexVectorType](classeigen_1_1generalizedeigensolver#acfd144329aca76882069da2fc5d53ef5) |
|  | Type for vector of complex scalar values eigenvalues as returned by [alphas()](classeigen_1_1generalizedeigensolver#a82b1bc41267f46e5c5899d5b084a73bb). [More...](classeigen_1_1generalizedeigensolver#acfd144329aca76882069da2fc5d53ef5) |
|  |
|  typedef [CwiseBinaryOp](classeigen_1_1cwisebinaryop)< internal::scalar\_quotient\_op< [ComplexScalar](classeigen_1_1generalizedeigensolver#abdec07af91db1345bb4c74066e3d0ea7), [Scalar](classeigen_1_1generalizedeigensolver#afb318d0b097ff8dd5a7410d31317ca47) >, [ComplexVectorType](classeigen_1_1generalizedeigensolver#acfd144329aca76882069da2fc5d53ef5), [VectorType](classeigen_1_1generalizedeigensolver#a5aa3d1390c2b0d455c1c9b8b3101b119) >  | [EigenvalueType](classeigen_1_1generalizedeigensolver#ad59af178acc401f1bc4e330ef80f286d) |
|  | Expression type for the eigenvalues as returned by [eigenvalues()](classeigen_1_1generalizedeigensolver#a62f01cd78271efd5e39bcb24e0fe1a58 "Returns an expression of the computed generalized eigenvalues.").  |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [ComplexScalar](classeigen_1_1generalizedeigensolver#abdec07af91db1345bb4c74066e3d0ea7), RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime >  | [EigenvectorsType](classeigen_1_1generalizedeigensolver#afffec018dbb2d87b4c09b6acecbb79cd) |
|  | Type for matrix of eigenvectors as returned by eigenvectors(). [More...](classeigen_1_1generalizedeigensolver#afffec018dbb2d87b4c09b6acecbb79cd) |
|  |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1generalizedeigensolver#a46a0ff3841059479ec314e56a5645302) |
|  |
|  typedef \_MatrixType  | [MatrixType](classeigen_1_1generalizedeigensolver#a56f4b9823bb9a267de3aaf48428cd247) |
|  | Synonym for the template parameter `_MatrixType`.  |
|  |
|  typedef MatrixType::Scalar  | [Scalar](classeigen_1_1generalizedeigensolver#afb318d0b097ff8dd5a7410d31317ca47) |
|  | Scalar type for matrices of type [MatrixType](classeigen_1_1generalizedeigensolver#a56f4b9823bb9a267de3aaf48428cd247 "Synonym for the template parameter _MatrixType.").  |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1generalizedeigensolver#afb318d0b097ff8dd5a7410d31317ca47), ColsAtCompileTime, 1, Options &~[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f), MaxColsAtCompileTime, 1 >  | [VectorType](classeigen_1_1generalizedeigensolver#a5aa3d1390c2b0d455c1c9b8b3101b119) |
|  | Type for vector of real scalar values eigenvalues as returned by [betas()](classeigen_1_1generalizedeigensolver#abeaa6f56cee367b83fd09d428462ca0c). [More...](classeigen_1_1generalizedeigensolver#a5aa3d1390c2b0d455c1c9b8b3101b119) |
|  |




|  |
| --- |
|  |
| [ComplexVectorType](classeigen_1_1generalizedeigensolver#acfd144329aca76882069da2fc5d53ef5) | [alphas](classeigen_1_1generalizedeigensolver#a82b1bc41267f46e5c5899d5b084a73bb) () const |
|  |
| [VectorType](classeigen_1_1generalizedeigensolver#a5aa3d1390c2b0d455c1c9b8b3101b119) | [betas](classeigen_1_1generalizedeigensolver#abeaa6f56cee367b83fd09d428462ca0c) () const |
|  |
| [GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver) &  | [compute](classeigen_1_1generalizedeigensolver#a275910b47dfe5f40211dcb59cfd68f3c) (const [MatrixType](classeigen_1_1generalizedeigensolver#a56f4b9823bb9a267de3aaf48428cd247) &A, const [MatrixType](classeigen_1_1generalizedeigensolver#a56f4b9823bb9a267de3aaf48428cd247) &B, bool computeEigenvectors=true) |
|  | Computes generalized eigendecomposition of given matrix. [More...](classeigen_1_1generalizedeigensolver#a275910b47dfe5f40211dcb59cfd68f3c) |
|  |
| [EigenvalueType](classeigen_1_1generalizedeigensolver#ad59af178acc401f1bc4e330ef80f286d) | [eigenvalues](classeigen_1_1generalizedeigensolver#a62f01cd78271efd5e39bcb24e0fe1a58) () const |
|  | Returns an expression of the computed generalized eigenvalues. [More...](classeigen_1_1generalizedeigensolver#a62f01cd78271efd5e39bcb24e0fe1a58) |
|  |
|  | [GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver#ae745f39da43f9df192cc2875d82b4cf1) () |
|  | Default constructor. [More...](classeigen_1_1generalizedeigensolver#ae745f39da43f9df192cc2875d82b4cf1) |
|  |
|  | [GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver#a2a3528cbf75f66d3a60af9dc7b12ff65) (const [MatrixType](classeigen_1_1generalizedeigensolver#a56f4b9823bb9a267de3aaf48428cd247) &A, const [MatrixType](classeigen_1_1generalizedeigensolver#a56f4b9823bb9a267de3aaf48428cd247) &B, bool computeEigenvectors=true) |
|  | Constructor; computes the generalized eigendecomposition of given matrix pair. [More...](classeigen_1_1generalizedeigensolver#a2a3528cbf75f66d3a60af9dc7b12ff65) |
|  |
|  | [GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver#aab6423ded30275cd4cdd31758c278694) ([Index](classeigen_1_1generalizedeigensolver#a46a0ff3841059479ec314e56a5645302) size) |
|  | Default constructor with memory preallocation. [More...](classeigen_1_1generalizedeigensolver#aab6423ded30275cd4cdd31758c278694) |
|  |
| [GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver) &  | [setMaxIterations](classeigen_1_1generalizedeigensolver#a2a6f96bd042068cfc0eafba839b424bd) ([Index](classeigen_1_1generalizedeigensolver#a46a0ff3841059479ec314e56a5645302) maxIters) |
|  |

  ComplexScalar
-------------

    template<typename \_MatrixType >  

|  |
| --- |
| typedef std::complex<RealScalar> [Eigen::GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver)< \_MatrixType >::[ComplexScalar](classeigen_1_1generalizedeigensolver#abdec07af91db1345bb4c74066e3d0ea7) |

 
 Complex scalar type for [MatrixType](classeigen_1_1generalizedeigensolver#a56f4b9823bb9a267de3aaf48428cd247 "Synonym for the template parameter _MatrixType."). 

 This is `std::complex<Scalar>` if [Scalar](classeigen_1_1generalizedeigensolver#afb318d0b097ff8dd5a7410d31317ca47 "Scalar type for matrices of type MatrixType.") is real (e.g., `float` or `double`) and just `Scalar` if [Scalar](classeigen_1_1generalizedeigensolver#afb318d0b097ff8dd5a7410d31317ca47 "Scalar type for matrices of type MatrixType.") is complex. 

    ComplexVectorType
-----------------

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<[ComplexScalar](classeigen_1_1generalizedeigensolver#abdec07af91db1345bb4c74066e3d0ea7), ColsAtCompileTime, 1, Options & ~[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f), MaxColsAtCompileTime, 1> [Eigen::GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver)< \_MatrixType >::[ComplexVectorType](classeigen_1_1generalizedeigensolver#acfd144329aca76882069da2fc5d53ef5) |

 
 Type for vector of complex scalar values eigenvalues as returned by [alphas()](classeigen_1_1generalizedeigensolver#a82b1bc41267f46e5c5899d5b084a73bb). 

 This is a column vector with entries of type [ComplexScalar](classeigen_1_1generalizedeigensolver#abdec07af91db1345bb4c74066e3d0ea7 "Complex scalar type for MatrixType."). The length of the vector is the size of [MatrixType](classeigen_1_1generalizedeigensolver#a56f4b9823bb9a267de3aaf48428cd247 "Synonym for the template parameter _MatrixType."). 

    EigenvectorsType
----------------

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<[ComplexScalar](classeigen_1_1generalizedeigensolver#abdec07af91db1345bb4c74066e3d0ea7), RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime> [Eigen::GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver)< \_MatrixType >::[EigenvectorsType](classeigen_1_1generalizedeigensolver#afffec018dbb2d87b4c09b6acecbb79cd) |

 
 Type for matrix of eigenvectors as returned by eigenvectors(). 

 This is a square matrix with entries of type [ComplexScalar](classeigen_1_1generalizedeigensolver#abdec07af91db1345bb4c74066e3d0ea7 "Complex scalar type for MatrixType."). The size is the same as the size of [MatrixType](classeigen_1_1generalizedeigensolver#a56f4b9823bb9a267de3aaf48428cd247 "Synonym for the template parameter _MatrixType."). 

    Index
-----

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver)< \_MatrixType >::[Index](classeigen_1_1generalizedeigensolver#a46a0ff3841059479ec314e56a5645302) |

 
 
**[Deprecated:](deprecated#_deprecated000015)**
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3 
    VectorType
----------

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<[Scalar](classeigen_1_1generalizedeigensolver#afb318d0b097ff8dd5a7410d31317ca47), ColsAtCompileTime, 1, Options & ~[RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f), MaxColsAtCompileTime, 1> [Eigen::GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver)< \_MatrixType >::[VectorType](classeigen_1_1generalizedeigensolver#a5aa3d1390c2b0d455c1c9b8b3101b119) |

 
 Type for vector of real scalar values eigenvalues as returned by [betas()](classeigen_1_1generalizedeigensolver#abeaa6f56cee367b83fd09d428462ca0c). 

 This is a column vector with entries of type [Scalar](classeigen_1_1generalizedeigensolver#afb318d0b097ff8dd5a7410d31317ca47 "Scalar type for matrices of type MatrixType."). The length of the vector is the size of [MatrixType](classeigen_1_1generalizedeigensolver#a56f4b9823bb9a267de3aaf48428cd247 "Synonym for the template parameter _MatrixType."). 

    GeneralizedEigenSolver() [1/3]
------------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver)< \_MatrixType >::[GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver) | ( |  | ) |  |

 | inline |

 
 Default constructor. 

 The default constructor is useful in cases in which the user intends to perform decompositions via EigenSolver::compute(const MatrixType&, bool).

 
See also

[compute()](classeigen_1_1generalizedeigensolver#a275910b47dfe5f40211dcb59cfd68f3c "Computes generalized eigendecomposition of given matrix.") for an example. 
    GeneralizedEigenSolver() [2/3]
------------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver)< \_MatrixType >::[GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver) | ( | [Index](classeigen_1_1generalizedeigensolver#a46a0ff3841059479ec314e56a5645302) | *size* | ) |  |

 | inlineexplicit |

 
 Default constructor with memory preallocation. 

 Like the default constructor but with preallocation of the internal data according to the specified problem *size*. 



See also

[GeneralizedEigenSolver()](classeigen_1_1generalizedeigensolver#ae745f39da43f9df192cc2875d82b4cf1 "Default constructor.") 
    GeneralizedEigenSolver() [3/3]
------------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver)< \_MatrixType >::[GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver) | ( | const [MatrixType](classeigen_1_1generalizedeigensolver#a56f4b9823bb9a267de3aaf48428cd247) &  | *A*,  |
|  |  | const [MatrixType](classeigen_1_1generalizedeigensolver#a56f4b9823bb9a267de3aaf48428cd247) &  | *B*,  |
|  |  | bool  | *computeEigenvectors* = `true` |
|  | ) |  |  |

 | inline |

 
 Constructor; computes the generalized eigendecomposition of given matrix pair. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | A | Square matrix whose eigendecomposition is to be computed.  |
| [in] | B | Square matrix whose eigendecomposition is to be computed.  |
| [in] | computeEigenvectors | If true, both the eigenvectors and the eigenvalues are computed; if false, only the eigenvalues are computed. |

   This constructor calls [compute()](classeigen_1_1generalizedeigensolver#a275910b47dfe5f40211dcb59cfd68f3c "Computes generalized eigendecomposition of given matrix.") to compute the generalized eigenvalues and eigenvectors.

 
See also

[compute()](classeigen_1_1generalizedeigensolver#a275910b47dfe5f40211dcb59cfd68f3c "Computes generalized eigendecomposition of given matrix.") 
    alphas()
--------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComplexVectorType](classeigen_1_1generalizedeigensolver#acfd144329aca76882069da2fc5d53ef5) [Eigen::GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver)< \_MatrixType >::alphas  | ( |  | ) |  const |

 | inline |

 
 
Returns
A const reference to the vectors containing the alpha values
 This vector permits to reconstruct the j-th eigenvalues as alphas(i)/betas(j).

 
See also

[betas()](classeigen_1_1generalizedeigensolver#abeaa6f56cee367b83fd09d428462ca0c), [eigenvalues()](classeigen_1_1generalizedeigensolver#a62f01cd78271efd5e39bcb24e0fe1a58 "Returns an expression of the computed generalized eigenvalues.") 
    betas()
-------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [VectorType](classeigen_1_1generalizedeigensolver#a5aa3d1390c2b0d455c1c9b8b3101b119) [Eigen::GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver)< \_MatrixType >::betas  | ( |  | ) |  const |

 | inline |

 
 
Returns
A const reference to the vectors containing the beta values
 This vector permits to reconstruct the j-th eigenvalues as alphas(i)/betas(j).

 
See also

[alphas()](classeigen_1_1generalizedeigensolver#a82b1bc41267f46e5c5899d5b084a73bb), [eigenvalues()](classeigen_1_1generalizedeigensolver#a62f01cd78271efd5e39bcb24e0fe1a58 "Returns an expression of the computed generalized eigenvalues.") 
    compute()
---------

    template<typename MatrixType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver)< [MatrixType](classeigen_1_1generalizedeigensolver#a56f4b9823bb9a267de3aaf48428cd247) > & [Eigen::GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver)< [MatrixType](classeigen_1_1generalizedeigensolver#a56f4b9823bb9a267de3aaf48428cd247) >::compute  | ( | const [MatrixType](classeigen_1_1generalizedeigensolver#a56f4b9823bb9a267de3aaf48428cd247) &  | *A*,  |
|  |  | const [MatrixType](classeigen_1_1generalizedeigensolver#a56f4b9823bb9a267de3aaf48428cd247) &  | *B*,  |
|  |  | bool  | *computeEigenvectors* = `true` |
|  | ) |  |  |

 
 Computes generalized eigendecomposition of given matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | A | Square matrix whose eigendecomposition is to be computed.  |
| [in] | B | Square matrix whose eigendecomposition is to be computed.  |
| [in] | computeEigenvectors | If true, both the eigenvectors and the eigenvalues are computed; if false, only the eigenvalues are computed.  |

   
Returns
Reference to `*this` 
 This function computes the eigenvalues of the real matrix `matrix`. The [eigenvalues()](classeigen_1_1generalizedeigensolver#a62f01cd78271efd5e39bcb24e0fe1a58 "Returns an expression of the computed generalized eigenvalues.") function can be used to retrieve them. If `computeEigenvectors` is true, then the eigenvectors are also computed and can be retrieved by calling eigenvectors().

 The matrix is first reduced to real generalized Schur form using the [RealQZ](classeigen_1_1realqz "Performs a real QZ decomposition of a pair of square matrices.") class. The generalized Schur decomposition is then used to compute the eigenvalues and eigenvectors.

 The cost of the computation is dominated by the cost of the generalized Schur decomposition.

 This method reuses of the allocated data in the [GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver "Computes the generalized eigenvalues and eigenvectors of a pair of general matrices.") object. 

    eigenvalues()
-------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [EigenvalueType](classeigen_1_1generalizedeigensolver#ad59af178acc401f1bc4e330ef80f286d) [Eigen::GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver)< \_MatrixType >::eigenvalues  | ( |  | ) |  const |

 | inline |

 
 Returns an expression of the computed generalized eigenvalues. 

 
Returns
An expression of the column vector containing the eigenvalues.
 It is a shortcut for



```
this->[alphas](classeigen_1_1generalizedeigensolver#a82b1bc41267f46e5c5899d5b084a73bb)().cwiseQuotient(this->[betas](classeigen_1_1generalizedeigensolver#abeaa6f56cee367b83fd09d428462ca0c)()); 
```

 Not that betas might contain zeros. It is therefore not recommended to use this function, but rather directly deal with the alphas and betas vectors.

 
Precondition
Either the constructor [GeneralizedEigenSolver(const MatrixType&,const MatrixType&,bool)](classeigen_1_1generalizedeigensolver#a2a3528cbf75f66d3a60af9dc7b12ff65 "Constructor; computes the generalized eigendecomposition of given matrix pair.") or the member function [compute(const MatrixType&,const MatrixType&,bool)](classeigen_1_1generalizedeigensolver#a275910b47dfe5f40211dcb59cfd68f3c "Computes generalized eigendecomposition of given matrix.") has been called before.
 The eigenvalues are repeated according to their algebraic multiplicity, so there are as many eigenvalues as rows in the matrix. The eigenvalues are not sorted in any particular order.

 
See also

[alphas()](classeigen_1_1generalizedeigensolver#a82b1bc41267f46e5c5899d5b084a73bb), [betas()](classeigen_1_1generalizedeigensolver#abeaa6f56cee367b83fd09d428462ca0c), eigenvectors() 
    setMaxIterations()
------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver)& [Eigen::GeneralizedEigenSolver](classeigen_1_1generalizedeigensolver)< \_MatrixType >::setMaxIterations  | ( | [Index](classeigen_1_1generalizedeigensolver#a46a0ff3841059479ec314e56a5645302) | *maxIters* | ) |  |

 | inline |

 
 Sets the maximal number of iterations allowed. 

   

---

The documentation for this class was generated from the following file:* [GeneralizedEigenSolver.h](https://eigen.tuxfamily.org/dox/GeneralizedEigenSolver_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1GeneralizedEigenSolver.html>

Eigen::GeneralizedSelfAdjointEigenSolver
========================================

  
### template<typename \_MatrixType> class Eigen::GeneralizedSelfAdjointEigenSolver< \_MatrixType >

 Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem. 

 This is defined in the Eigenvalues module.



```
#include <Eigen/Eigenvalues> 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which we are computing the eigendecomposition; this is expected to be an instantiation of the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class template. |

   This class solves the generalized eigenvalue problem \( Av = \lambda Bv \). In this case, the matrix \( A \) should be selfadjoint and the matrix \( B \) should be positive definite.

 Only the **lower** **triangular** **part** of the input matrix is referenced.

 Call the function [compute()](classeigen_1_1generalizedselfadjointeigensolver#a724764fe196612b752042692156ed023 "Computes generalized eigendecomposition of given matrix pencil.") to compute the eigenvalues and eigenvectors of a given matrix. Alternatively, you can use the [GeneralizedSelfAdjointEigenSolver(const MatrixType&, const MatrixType&, int)](classeigen_1_1generalizedselfadjointeigensolver#addc0409c9cb1a5ac9cbbd00efe68908e "Constructor; computes generalized eigendecomposition of given matrix pencil.") constructor which computes the eigenvalues and eigenvectors at construction time. Once the eigenvalue and eigenvectors are computed, they can be retrieved with the [eigenvalues()](classeigen_1_1selfadjointeigensolver#a3df8721abcc71132f7f02bf9dfe78e41 "Returns the eigenvalues of given matrix.") and [eigenvectors()](classeigen_1_1selfadjointeigensolver#a229c4c26d87c5d2663cd3cc8a4c68266 "Returns the eigenvectors of given matrix.") functions.

 The documentation for [GeneralizedSelfAdjointEigenSolver(const MatrixType&, const MatrixType&, int)](classeigen_1_1generalizedselfadjointeigensolver#addc0409c9cb1a5ac9cbbd00efe68908e "Constructor; computes generalized eigendecomposition of given matrix pencil.") contains an example of the typical use of this class.

 
See also
class [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver "Computes eigenvalues and eigenvectors of selfadjoint matrices."), class [EigenSolver](classeigen_1_1eigensolver "Computes eigenvalues and eigenvectors of general matrices."), class [ComplexEigenSolver](classeigen_1_1complexeigensolver "Computes eigenvalues and eigenvectors of general complex matrices.") 
     ![Inheritance graph]      

|  |
| --- |
|  |
| [GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver) &  | [compute](classeigen_1_1generalizedselfadjointeigensolver#a724764fe196612b752042692156ed023) (const MatrixType &matA, const MatrixType &matB, int options=[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)|[Ax\_lBx](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a5eb11a88a4bd445f58f1b24598d3848f)) |
|  | Computes generalized eigendecomposition of given matrix pencil. [More...](classeigen_1_1generalizedselfadjointeigensolver#a724764fe196612b752042692156ed023) |
|  |
|  | [GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver#a501effdbf722c0609ea05ff3fd4cc721) () |
|  | Default constructor for fixed-size matrices. [More...](classeigen_1_1generalizedselfadjointeigensolver#a501effdbf722c0609ea05ff3fd4cc721) |
|  |
|  | [GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver#addc0409c9cb1a5ac9cbbd00efe68908e) (const MatrixType &matA, const MatrixType &matB, int options=[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)|[Ax\_lBx](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a5eb11a88a4bd445f58f1b24598d3848f)) |
|  | Constructor; computes generalized eigendecomposition of given matrix pencil. [More...](classeigen_1_1generalizedselfadjointeigensolver#addc0409c9cb1a5ac9cbbd00efe68908e) |
|  |
|  | [GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver#aac849f01a8c6148c645acd10bd3a9b0e) ([Index](classeigen_1_1selfadjointeigensolver#a8a59ab7734b6eae2754fd78bc7c3a360) size) |
|  | Constructor, pre-allocates memory for dynamic-size matrices. [More...](classeigen_1_1generalizedselfadjointeigensolver#aac849f01a8c6148c645acd10bd3a9b0e) |
|  |
| - Public Member Functions inherited from [Eigen::SelfAdjointEigenSolver< \_MatrixType >](classeigen_1_1selfadjointeigensolver) |
| template<typename InputType >  |
| [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver) &  | [compute](classeigen_1_1selfadjointeigensolver#adf397f6bce9f93c4b0139a47e261fc24) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix, int options=[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)) |
|  | Computes eigendecomposition of given matrix. [More...](classeigen_1_1selfadjointeigensolver#adf397f6bce9f93c4b0139a47e261fc24) |
|  |
| [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver) &  | [computeDirect](classeigen_1_1selfadjointeigensolver#afe520161701f5f585bcc4cedb8657bd1) (const MatrixType &matrix, int options=[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)) |
|  | Computes eigendecomposition of given matrix using a closed-form algorithm. [More...](classeigen_1_1selfadjointeigensolver#afe520161701f5f585bcc4cedb8657bd1) |
|  |
| [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver) &  | [computeFromTridiagonal](classeigen_1_1selfadjointeigensolver#a297893df7098c43278d385e4d4e23fe4) (const [RealVectorType](classeigen_1_1selfadjointeigensolver#acd090d5fdfc3cc017a13b6d8daa92287) &diag, const [SubDiagonalType](classeigen_1_1matrix) &subdiag, int options=[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)) |
|  | Computes the eigen decomposition from a tridiagonal symmetric matrix. [More...](classeigen_1_1selfadjointeigensolver#a297893df7098c43278d385e4d4e23fe4) |
|  |
| const [RealVectorType](classeigen_1_1selfadjointeigensolver#acd090d5fdfc3cc017a13b6d8daa92287) &  | [eigenvalues](classeigen_1_1selfadjointeigensolver#a3df8721abcc71132f7f02bf9dfe78e41) () const |
|  | Returns the eigenvalues of given matrix. [More...](classeigen_1_1selfadjointeigensolver#a3df8721abcc71132f7f02bf9dfe78e41) |
|  |
| const [EigenvectorsType](classeigen_1_1matrix) &  | [eigenvectors](classeigen_1_1selfadjointeigensolver#a229c4c26d87c5d2663cd3cc8a4c68266) () const |
|  | Returns the eigenvectors of given matrix. [More...](classeigen_1_1selfadjointeigensolver#a229c4c26d87c5d2663cd3cc8a4c68266) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1selfadjointeigensolver#a31e8a509231e57e684c53799693607ae) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1selfadjointeigensolver#a31e8a509231e57e684c53799693607ae) |
|  |
| MatrixType  | [operatorInverseSqrt](classeigen_1_1selfadjointeigensolver#ae4b13fe4ce22faf74e50d346fc51a66e) () const |
|  | Computes the inverse square root of the matrix. [More...](classeigen_1_1selfadjointeigensolver#ae4b13fe4ce22faf74e50d346fc51a66e) |
|  |
| MatrixType  | [operatorSqrt](classeigen_1_1selfadjointeigensolver#aeeedb2ae618f21a4eb59465746c1cee5) () const |
|  | Computes the positive-definite square root of the matrix. [More...](classeigen_1_1selfadjointeigensolver#aeeedb2ae618f21a4eb59465746c1cee5) |
|  |
|  | [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver#a8f3dde67faa971dd97e8141617762326) () |
|  | Default constructor for fixed-size matrices. [More...](classeigen_1_1selfadjointeigensolver#a8f3dde67faa971dd97e8141617762326) |
|  |
| template<typename InputType >  |
|  | [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver#a7d8cba55cce60cb3931148208cc5bd0e) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix, int options=[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)) |
|  | Constructor; computes eigendecomposition of given matrix. [More...](classeigen_1_1selfadjointeigensolver#a7d8cba55cce60cb3931148208cc5bd0e) |
|  |
|  | [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver#a825919ee41153a19910c72d1bff31c8e) ([Index](classeigen_1_1selfadjointeigensolver#a8a59ab7734b6eae2754fd78bc7c3a360) size) |
|  | Constructor, pre-allocates memory for dynamic-size matrices. [More...](classeigen_1_1selfadjointeigensolver#a825919ee41153a19910c72d1bff31c8e) |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::SelfAdjointEigenSolver< \_MatrixType >](classeigen_1_1selfadjointeigensolver) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1selfadjointeigensolver#a8a59ab7734b6eae2754fd78bc7c3a360) |
|  |
| typedef [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1selfadjointeigensolver#a0bfcedf4245b6846007ca4f01e4feb1f) >::Real  | [RealScalar](classeigen_1_1selfadjointeigensolver#a5dae5f422a3c71060e6bd31332bf64fd) |
|  | Real scalar type for `_MatrixType`. [More...](classeigen_1_1selfadjointeigensolver#a5dae5f422a3c71060e6bd31332bf64fd) |
|  |
| typedef internal::plain\_col\_type< MatrixType, [RealScalar](classeigen_1_1selfadjointeigensolver#a5dae5f422a3c71060e6bd31332bf64fd) >::type  | [RealVectorType](classeigen_1_1selfadjointeigensolver#acd090d5fdfc3cc017a13b6d8daa92287) |
|  | Type for vector of eigenvalues as returned by [eigenvalues()](classeigen_1_1selfadjointeigensolver#a3df8721abcc71132f7f02bf9dfe78e41 "Returns the eigenvalues of given matrix."). [More...](classeigen_1_1selfadjointeigensolver#acd090d5fdfc3cc017a13b6d8daa92287) |
|  |
|  typedef MatrixType::Scalar  | [Scalar](classeigen_1_1selfadjointeigensolver#a0bfcedf4245b6846007ca4f01e4feb1f) |
|  | Scalar type for matrices of type `_MatrixType`.  |
|  |
| - Static Public Attributes inherited from [Eigen::SelfAdjointEigenSolver< \_MatrixType >](classeigen_1_1selfadjointeigensolver) |
| static const int  | [m\_maxIterations](classeigen_1_1selfadjointeigensolver#a9ba10b83f095b18dbea345db7304acfa) |
|  | Maximum number of iterations. [More...](classeigen_1_1selfadjointeigensolver#a9ba10b83f095b18dbea345db7304acfa) |
|  |

  GeneralizedSelfAdjointEigenSolver() [1/3]
-----------------------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver)< \_MatrixType >::[GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver) | ( |  | ) |  |

 | inline |

 
 Default constructor for fixed-size matrices. 

 The default constructor is useful in cases in which the user intends to perform decompositions via [compute()](classeigen_1_1generalizedselfadjointeigensolver#a724764fe196612b752042692156ed023 "Computes generalized eigendecomposition of given matrix pencil."). This constructor can only be used if `_MatrixType` is a fixed-size matrix; use [GeneralizedSelfAdjointEigenSolver(Index)](classeigen_1_1generalizedselfadjointeigensolver#aac849f01a8c6148c645acd10bd3a9b0e "Constructor, pre-allocates memory for dynamic-size matrices.") for dynamic-size matrices. 

    GeneralizedSelfAdjointEigenSolver() [2/3]
-----------------------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver)< \_MatrixType >::[GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver) | ( | [Index](classeigen_1_1selfadjointeigensolver#a8a59ab7734b6eae2754fd78bc7c3a360) | *size* | ) |  |

 | inlineexplicit |

 
 Constructor, pre-allocates memory for dynamic-size matrices. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | size | Positive integer, size of the matrix whose eigenvalues and eigenvectors will be computed. |

   This constructor is useful for dynamic-size matrices, when the user intends to perform decompositions via [compute()](classeigen_1_1generalizedselfadjointeigensolver#a724764fe196612b752042692156ed023 "Computes generalized eigendecomposition of given matrix pencil."). The `size` parameter is only used as a hint. It is not an error to give a wrong `size`, but it may impair performance.

 
See also

[compute()](classeigen_1_1generalizedselfadjointeigensolver#a724764fe196612b752042692156ed023 "Computes generalized eigendecomposition of given matrix pencil.") for an example 
    GeneralizedSelfAdjointEigenSolver() [3/3]
-----------------------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver)< \_MatrixType >::[GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver) | ( | const MatrixType &  | *matA*,  |
|  |  | const MatrixType &  | *matB*,  |
|  |  | int  | *options* = `[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)|[Ax\_lBx](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a5eb11a88a4bd445f58f1b24598d3848f)` |
|  | ) |  |  |

 | inline |

 
 Constructor; computes generalized eigendecomposition of given matrix pencil. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matA | Selfadjoint matrix in matrix pencil. Only the lower triangular part of the matrix is referenced.  |
| [in] | matB | Positive-definite matrix in matrix pencil. Only the lower triangular part of the matrix is referenced.  |
| [in] | options | A or-ed set of flags {[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4),[EigenvaluesOnly](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9afd06633f270207c373875fd7ca03e906)} | {[Ax\_lBx](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a5eb11a88a4bd445f58f1b24598d3848f),[ABx\_lx](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a9a7d9813cec527e299a36b749b0f7e1e),[BAx\_lx](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a9870817d373c41ba0dc7f6b5ab0895b8)}. Default is [ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)|[Ax\_lBx](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a5eb11a88a4bd445f58f1b24598d3848f). |

   This constructor calls [compute(const MatrixType&, const MatrixType&, int)](classeigen_1_1generalizedselfadjointeigensolver#a724764fe196612b752042692156ed023 "Computes generalized eigendecomposition of given matrix pencil.") to compute the eigenvalues and (if requested) the eigenvectors of the generalized eigenproblem \( Ax = \lambda B x \) with *matA* the selfadjoint matrix \( A \) and *matB* the positive definite matrix \( B \). Each eigenvector \( x \) satisfies the property \( x^\* B x = 1 \). The eigenvectors are computed if *options* contains ComputeEigenvectors.

 In addition, the two following variants can be solved via `options:` 


* `ABx_lx:` \( ABx = \lambda x \)
* `BAx_lx:` \( BAx = \lambda x \)

 Example: 



```
MatrixXd X = [MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(5,5);
MatrixXd A = X + X.transpose();
cout << "Here is a random symmetric matrix, A:" << endl << A << endl;
X = [MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(5,5);
MatrixXd B = X * X.transpose();
cout << "and a random postive-definite matrix, B:" << endl << B << endl << endl;
 
GeneralizedSelfAdjointEigenSolver<MatrixXd> es(A,B);
cout << "The eigenvalues of the pencil (A,B) are:" << endl << es.eigenvalues() << endl;
cout << "The matrix of eigenvectors, V, is:" << endl << es.eigenvectors() << endl << endl;
 
double lambda = es.eigenvalues()[0];
cout << "Consider the first eigenvalue, lambda = " << lambda << endl;
VectorXd v = es.eigenvectors().col(0);
cout << "If v is the corresponding eigenvector, then A \* v = " << endl << A * v << endl;
cout << "... and lambda \* B \* v = " << endl << lambda * B * v << endl << endl;
```

 Output: 



```
Here is a random symmetric matrix, A:
  1.36 -0.816  0.521   1.43 -0.144
-0.816 -0.659  0.794 -0.173 -0.406
 0.521  0.794 -0.541  0.461  0.179
  1.43 -0.173  0.461  -1.43  0.822
-0.144 -0.406  0.179  0.822  -1.37
and a random postive-definite matrix, B:
  0.132  0.0109 -0.0512  0.0674  -0.143
 0.0109    1.68    1.13   -1.12   0.916
-0.0512    1.13     2.3   -2.14    1.86
 0.0674   -1.12   -2.14    2.69   -2.01
 -0.143   0.916    1.86   -2.01    1.68

The eigenvalues of the pencil (A,B) are:
  -227
  -3.9
-0.837
 0.101
  54.2
The matrix of eigenvectors, V, is:
   14.2   -1.03  0.0766 -0.0273   -8.36
 0.0546  -0.115   0.729   0.478   0.374
  -9.23   0.624 -0.0165   0.499    3.01
   7.88     1.3   0.225   0.109   -3.85
   20.8   0.805  -0.567 -0.0828   -8.73

Consider the first eigenvalue, lambda = -227
If v is the corresponding eigenvector, then A * v = 
 22.8
-28.8
 19.8
 21.9
-25.9
... and lambda * B * v = 
 22.8
-28.8
 19.8
 21.9
-25.9


```


See also

[compute(const MatrixType&, const MatrixType&, int)](classeigen_1_1generalizedselfadjointeigensolver#a724764fe196612b752042692156ed023 "Computes generalized eigendecomposition of given matrix pencil.") 
    compute()
---------

    template<typename MatrixType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver)< MatrixType > & [Eigen::GeneralizedSelfAdjointEigenSolver](classeigen_1_1generalizedselfadjointeigensolver)< MatrixType >::compute  | ( | const MatrixType &  | *matA*,  |
|  |  | const MatrixType &  | *matB*,  |
|  |  | int  | *options* = `[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)|[Ax\_lBx](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a5eb11a88a4bd445f58f1b24598d3848f)` |
|  | ) |  |  |

 
 Computes generalized eigendecomposition of given matrix pencil. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matA | Selfadjoint matrix in matrix pencil. Only the lower triangular part of the matrix is referenced.  |
| [in] | matB | Positive-definite matrix in matrix pencil. Only the lower triangular part of the matrix is referenced.  |
| [in] | options | A or-ed set of flags {[ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4),[EigenvaluesOnly](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9afd06633f270207c373875fd7ca03e906)} | {[Ax\_lBx](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a5eb11a88a4bd445f58f1b24598d3848f),[ABx\_lx](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a9a7d9813cec527e299a36b749b0f7e1e),[BAx\_lx](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a9870817d373c41ba0dc7f6b5ab0895b8)}. Default is [ComputeEigenvectors](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4)|[Ax\_lBx](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a5eb11a88a4bd445f58f1b24598d3848f). |

   
Returns
Reference to `*this` 
 According to `options`, this function computes eigenvalues and (if requested) the eigenvectors of one of the following three generalized eigenproblems:


* `Ax_lBx:` \( Ax = \lambda B x \)
* `ABx_lx:` \( ABx = \lambda x \)
* `BAx_lx:` \( BAx = \lambda x \) with *matA* the selfadjoint matrix \( A \) and *matB* the positive definite matrix \( B \). In addition, each eigenvector \( x \) satisfies the property \( x^\* B x = 1 \).

 The [eigenvalues()](classeigen_1_1selfadjointeigensolver#a3df8721abcc71132f7f02bf9dfe78e41 "Returns the eigenvalues of given matrix.") function can be used to retrieve the eigenvalues. If `options` contains ComputeEigenvectors, then the eigenvectors are also computed and can be retrieved by calling [eigenvectors()](classeigen_1_1selfadjointeigensolver#a229c4c26d87c5d2663cd3cc8a4c68266 "Returns the eigenvectors of given matrix.").

 The implementation uses [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") to compute the Cholesky decomposition \( B = LL^\* \) and computes the classical eigendecomposition of the selfadjoint matrix \( L^{-1} A (L^\*)^{-1} \) if `options` contains Ax\_lBx and of \( L^{\*} A L \) otherwise. This solves the generalized eigenproblem, because any solution of the generalized eigenproblem \( Ax = \lambda B x \) corresponds to a solution \( L^{-1} A (L^\*)^{-1} (L^\* x) = \lambda (L^\* x) \) of the eigenproblem for \( L^{-1} A (L^\*)^{-1} \). Similar statements can be made for the two other variants.

 Example: 



```
MatrixXd X = [MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(5,5);
MatrixXd A = X * X.transpose();
X = [MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(5,5);
MatrixXd B = X * X.transpose();
 
GeneralizedSelfAdjointEigenSolver<MatrixXd> es(A,B,[EigenvaluesOnly](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9afd06633f270207c373875fd7ca03e906));
cout << "The eigenvalues of the pencil (A,B) are:" << endl << es.eigenvalues() << endl;
es.compute(B,A,false);
cout << "The eigenvalues of the pencil (B,A) are:" << endl << es.eigenvalues() << endl;
```

 Output: 



```
The eigenvalues of the pencil (A,B) are:
  0.0289
   0.299
    2.11
    8.64
2.08e+03
The eigenvalues of the pencil (B,A) are:
0.000481
   0.116
   0.473
    3.34
    34.6

```


See also

[GeneralizedSelfAdjointEigenSolver(const MatrixType&, const MatrixType&, int)](classeigen_1_1generalizedselfadjointeigensolver#addc0409c9cb1a5ac9cbbd00efe68908e "Constructor; computes generalized eigendecomposition of given matrix pencil.") 
   

---

The documentation for this class was generated from the following file:* [GeneralizedSelfAdjointEigenSolver.h](https://eigen.tuxfamily.org/dox/GeneralizedSelfAdjointEigenSolver_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1GeneralizedSelfAdjointEigenSolver.html>

Eigen::Hyperplane
=================

  
### template<typename \_Scalar, int \_AmbientDim, int \_Options> class Eigen::Hyperplane< \_Scalar, \_AmbientDim, \_Options >

 A hyperplane. 

 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```

A hyperplane is an affine subspace of dimension n-1 in a space of dimension n. For example, a hyperplane in a plane is a line; a hyperplane in 3-space is a plane.

 
Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the scalar type, i.e., the type of the coefficients  |
| \_AmbientDim | the dimension of the ambient space, can be a compile time value or Dynamic. Notice that the dimension of the hyperplane is \_AmbientDim-1. |

   This class represents an hyperplane as the zero set of the implicit equation \( n \cdot x + d = 0 \) where \( n \) is a unit normal vector of the plane (linear part) and \( d \) is the distance (offset) to the origin. 

 


|  |
| --- |
|  |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1hyperplane#a58d2307d16128a0026021374e9e10465) |
|  |




|  |
| --- |
|  |
| Scalar  | [absDistance](classeigen_1_1hyperplane#a28eabcf0c7607a5091743abac91a8fc8) (const [VectorType](classeigen_1_1matrix) &p) const |
|  |
| template<typename NewScalarType >  |
| internal::cast\_return\_type< [Hyperplane](classeigen_1_1hyperplane), [Hyperplane](classeigen_1_1hyperplane)< NewScalarType, AmbientDimAtCompileTime, Options > >::type  | [cast](classeigen_1_1hyperplane#acfeb7c6af0d9cedb04a4a4268948f015) () const |
|  |
| [Coefficients](classeigen_1_1matrix) &  | [coeffs](classeigen_1_1hyperplane#ab484a0fbbb43e22812b6211d878cddd4) () |
|  |
| const [Coefficients](classeigen_1_1matrix) &  | [coeffs](classeigen_1_1hyperplane#a4a051414928ebb5803036b69aad597ca) () const |
|  |
| [Index](classeigen_1_1hyperplane#a58d2307d16128a0026021374e9e10465) | [dim](classeigen_1_1hyperplane#a23de6500e87586f5ca9904fe5315b51d) () const |
|  |
|  | [Hyperplane](classeigen_1_1hyperplane#aa19ee87ada63fa6576bf61517424b1b3) () |
|  |
| template<typename OtherScalarType , int OtherOptions>  |
|  | [Hyperplane](classeigen_1_1hyperplane#ae03c337cae9fd43396f92b9e97e600b1) (const [Hyperplane](classeigen_1_1hyperplane)< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &other) |
|  |
|  | [Hyperplane](classeigen_1_1hyperplane#ad05d941675fd03b46dd1029f2f0c95ea) (const [ParametrizedLine](classeigen_1_1parametrizedline)< Scalar, AmbientDimAtCompileTime > &parametrized) |
|  |
|  | [Hyperplane](classeigen_1_1hyperplane#a76a1ed93c5f7e3a9aba4f029809d6ebc) (const [VectorType](classeigen_1_1matrix) &n, const Scalar &d) |
|  |
|  | [Hyperplane](classeigen_1_1hyperplane#a0f9ca82a2cf12753da3a007e128631f8) (const [VectorType](classeigen_1_1matrix) &n, const [VectorType](classeigen_1_1matrix) &e) |
|  |
|  | [Hyperplane](classeigen_1_1hyperplane#a75aebf8b553ea33a193ea94583a7f830) ([Index](classeigen_1_1hyperplane#a58d2307d16128a0026021374e9e10465) \_dim) |
|  |
| [VectorType](classeigen_1_1matrix) | [intersection](classeigen_1_1hyperplane#a308d9231ca5a0ebffde94fb13fd9916a) (const [Hyperplane](classeigen_1_1hyperplane) &other) const |
|  |
| template<int OtherOptions>  |
| bool  | [isApprox](classeigen_1_1hyperplane#ad5f22e31d700adf1144eecda45075494) (const [Hyperplane](classeigen_1_1hyperplane)< Scalar, AmbientDimAtCompileTime, OtherOptions > &other, const typename [NumTraits](structeigen_1_1numtraits)< Scalar >::Real &prec=[NumTraits](structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| [NormalReturnType](classeigen_1_1block) | [normal](classeigen_1_1hyperplane#a567f2d13d5c9835f2884c329185e4c63) () |
|  |
| [ConstNormalReturnType](classeigen_1_1block) | [normal](classeigen_1_1hyperplane#abe6786725d6aae2e6ef6981395aeac46) () const |
|  |
| void  | [normalize](classeigen_1_1hyperplane#ae090309b1a932e07a983ff7dd84a3120) (void) |
|  |
| Scalar &  | [offset](classeigen_1_1hyperplane#a4a9fae414234e9513194b69a878a4225) () |
|  |
| const Scalar &  | [offset](classeigen_1_1hyperplane#a7451d5993c7b87e2ff358e0aa3a06175) () const |
|  |
| [VectorType](classeigen_1_1matrix) | [projection](classeigen_1_1hyperplane#a855dec52efed47121fc5cd47fdf808f7) (const [VectorType](classeigen_1_1matrix) &p) const |
|  |
| Scalar  | [signedDistance](classeigen_1_1hyperplane#abe362349d10c5852b007958c5e1152eb) (const [VectorType](classeigen_1_1matrix) &p) const |
|  |
| template<typename XprType >  |
| [Hyperplane](classeigen_1_1hyperplane) &  | [transform](classeigen_1_1hyperplane#ae89b4a512bfb4acbf6192b37c89d1552) (const [MatrixBase](classeigen_1_1matrixbase)< XprType > &mat, [TransformTraits](group__enums#gaee59a86102f150923b0cac6d4ff05107) traits=[Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb)) |
|  |
| template<int TrOptions>  |
| [Hyperplane](classeigen_1_1hyperplane) &  | [transform](classeigen_1_1hyperplane#ae07794d268e45fd513a17c49b9a6ec81) (const [Transform](classeigen_1_1transform)< Scalar, AmbientDimAtCompileTime, [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb), TrOptions > &t, [TransformTraits](group__enums#gaee59a86102f150923b0cac6d4ff05107) traits=[Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb)) |
|  |




|  |
| --- |
|  |
| static [Hyperplane](classeigen_1_1hyperplane) | [Through](classeigen_1_1hyperplane#a7ae0bb22aa49175b46ed58010b8d5221) (const [VectorType](classeigen_1_1matrix) &p0, const [VectorType](classeigen_1_1matrix) &p1) |
|  |
| static [Hyperplane](classeigen_1_1hyperplane) | [Through](classeigen_1_1hyperplane#a23f225bb36b10ce116ca97d2ca7aa345) (const [VectorType](classeigen_1_1matrix) &p0, const [VectorType](classeigen_1_1matrix) &p1, const [VectorType](classeigen_1_1matrix) &p2) |
|  |

  Index
-----

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |
| --- |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::[Index](classeigen_1_1hyperplane#a58d2307d16128a0026021374e9e10465) |

 
 
**[Deprecated:](deprecated#_deprecated000024)**
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3 
    Hyperplane() [1/6]
------------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::[Hyperplane](classeigen_1_1hyperplane) | ( |  | ) |  |

 | inline |

 
 Default constructor without initialization 

    Hyperplane() [2/6]
------------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::[Hyperplane](classeigen_1_1hyperplane) | ( | [Index](classeigen_1_1hyperplane#a58d2307d16128a0026021374e9e10465) | *\_dim* | ) |  |

 | inlineexplicit |

 
 Constructs a dynamic-size hyperplane with *\_dim* the dimension of the ambient space 

    Hyperplane() [3/6]
------------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::[Hyperplane](classeigen_1_1hyperplane) | ( | const [VectorType](classeigen_1_1matrix) &  | *n*,  |
|  |  | const [VectorType](classeigen_1_1matrix) &  | *e* |
|  | ) |  |  |

 | inline |

 
 Construct a plane from its normal *n* and a point *e* onto the plane. 



Warning
the vector normal is assumed to be normalized. 
    Hyperplane() [4/6]
------------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::[Hyperplane](classeigen_1_1hyperplane) | ( | const [VectorType](classeigen_1_1matrix) &  | *n*,  |
|  |  | const Scalar &  | *d* |
|  | ) |  |  |

 | inline |

 
 Constructs a plane from its normal *n* and distance to the origin *d* such that the algebraic equation of the plane is \( n \cdot x + d = 0 \). 



Warning
the vector normal is assumed to be normalized. 
    Hyperplane() [5/6]
------------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::[Hyperplane](classeigen_1_1hyperplane) | ( | const [ParametrizedLine](classeigen_1_1parametrizedline)< Scalar, AmbientDimAtCompileTime > &  | *parametrized* | ) |  |

 | inlineexplicit |

 
 Constructs a hyperplane passing through the parametrized line *parametrized*. If the dimension of the ambient space is greater than 2, then there isn't uniqueness, so an arbitrary choice is made. 

    Hyperplane() [6/6]
------------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>   template<typename OtherScalarType , int OtherOptions>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::[Hyperplane](classeigen_1_1hyperplane) | ( | const [Hyperplane](classeigen_1_1hyperplane)< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &  | *other* | ) |  |

 | inlineexplicit |

 
 Copy constructor with scalar type conversion 

    absDistance()
-------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Scalar [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::absDistance  | ( | const [VectorType](classeigen_1_1matrix) &  | *p* | ) |  const |

 | inline |

 
 
Returns
the absolute distance between the plane `*this` and a point *p*. 
 
See also

[signedDistance()](classeigen_1_1hyperplane#abe362349d10c5852b007958c5e1152eb) 
    cast()
------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>   template<typename NewScalarType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::cast\_return\_type<[Hyperplane](classeigen_1_1hyperplane), [Hyperplane](classeigen_1_1hyperplane)<NewScalarType,AmbientDimAtCompileTime,Options> >::type [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::cast  | ( |  | ) |  const |

 | inline |

 
 
Returns

`*this` with scalar type casted to *NewScalarType* 
 Note that if *NewScalarType* is equal to the current scalar type of `*this` then this function smartly returns a const reference to `*this`. 

    coeffs() [1/2]
--------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Coefficients](classeigen_1_1matrix)& [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::coeffs  | ( |  | ) |  |

 | inline |

 
 
Returns
a non-constant reference to the coefficients c\_i of the plane equation: \( c\_0\*x\_0 + ... + c\_{d-1}\*x\_{d-1} + c\_d = 0 \) 
    coeffs() [2/2]
--------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [Coefficients](classeigen_1_1matrix)& [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::coeffs  | ( |  | ) |  const |

 | inline |

 
 
Returns
a constant reference to the coefficients c\_i of the plane equation: \( c\_0\*x\_0 + ... + c\_{d-1}\*x\_{d-1} + c\_d = 0 \) 
    dim()
-----

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](classeigen_1_1hyperplane#a58d2307d16128a0026021374e9e10465) [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::dim  | ( |  | ) |  const |

 | inline |

 
 
Returns
the dimension in which the plane holds 
    intersection()
--------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [VectorType](classeigen_1_1matrix) [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::intersection  | ( | const [Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options > &  | *other* | ) |  const |

 | inline |

 
 
Returns
the intersection of \*this with *other*.
 
Warning
The ambient space must be a plane, i.e. have dimension 2, so that `*this` and *other* are lines.
 
Note
If *other* is approximately parallel to \*this, this method will return any point on \*this. 
    isApprox()
----------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>   template<int OtherOptions>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::isApprox  | ( | const [Hyperplane](classeigen_1_1hyperplane)< Scalar, AmbientDimAtCompileTime, OtherOptions > &  | *other*,  |
|  |  | const typename [NumTraits](structeigen_1_1numtraits)< Scalar >::Real &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<Scalar>::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 
Returns

`true` if `*this` is approximately equal to *other*, within the precision determined by *prec*.
 
See also

[MatrixBase::isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) 
    normal() [1/2]
--------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [NormalReturnType](classeigen_1_1block) [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::normal  | ( |  | ) |  |

 | inline |

 
 
Returns
a non-constant reference to the unit normal vector of the plane, which corresponds to the linear part of the implicit equation. 
    normal() [2/2]
--------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ConstNormalReturnType](classeigen_1_1block) [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::normal  | ( |  | ) |  const |

 | inline |

 
 
Returns
a constant reference to the unit normal vector of the plane, which corresponds to the linear part of the implicit equation. 
    normalize()
-----------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::normalize  | ( | void  |  | ) |  |

 | inline |

 
 normalizes `*this` 

    offset() [1/2]
--------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar& [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::offset  | ( |  | ) |  |

 | inline |

 
 
Returns
a non-constant reference to the distance to the origin, which is also the constant part of the implicit equation 
    offset() [2/2]
--------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const Scalar& [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::offset  | ( |  | ) |  const |

 | inline |

 
 
Returns
the distance to the origin, which is also the "constant term" of the implicit equation 
 
Warning
the vector normal is assumed to be normalized. 
    projection()
------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [VectorType](classeigen_1_1matrix) [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::projection  | ( | const [VectorType](classeigen_1_1matrix) &  | *p* | ) |  const |

 | inline |

 
 
Returns
the projection of a point *p* onto the plane `*this`. 
    signedDistance()
----------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Scalar [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::signedDistance  | ( | const [VectorType](classeigen_1_1matrix) &  | *p* | ) |  const |

 | inline |

 
 
Returns
the signed distance between the plane `*this` and a point *p*. 
 
See also

[absDistance()](classeigen_1_1hyperplane#a28eabcf0c7607a5091743abac91a8fc8) 
    Through() [1/2]
---------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static [Hyperplane](classeigen_1_1hyperplane) [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::Through  | ( | const [VectorType](classeigen_1_1matrix) &  | *p0*,  |
|  |  | const [VectorType](classeigen_1_1matrix) &  | *p1* |
|  | ) |  |  |

 | inlinestatic |

 
 Constructs a hyperplane passing through the two points. If the dimension of the ambient space is greater than 2, then there isn't uniqueness, so an arbitrary choice is made. 

    Through() [2/2]
---------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static [Hyperplane](classeigen_1_1hyperplane) [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::Through  | ( | const [VectorType](classeigen_1_1matrix) &  | *p0*,  |
|  |  | const [VectorType](classeigen_1_1matrix) &  | *p1*,  |
|  |  | const [VectorType](classeigen_1_1matrix) &  | *p2* |
|  | ) |  |  |

 | inlinestatic |

 
 Constructs a hyperplane passing through the three points. The dimension of the ambient space is required to be exactly 3. 

    transform() [1/2]
-----------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>   template<typename XprType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Hyperplane](classeigen_1_1hyperplane)& [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::transform  | ( | const [MatrixBase](classeigen_1_1matrixbase)< XprType > &  | *mat*,  |
|  |  | [TransformTraits](group__enums#gaee59a86102f150923b0cac6d4ff05107) | *traits* = `[Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb)` |
|  | ) |  |  |

 | inline |

 
 Applies the transformation matrix *mat* to `*this` and returns a reference to `*this`.

 
Parameters
 

|  |  |
| --- | --- |
| mat | the Dim x Dim transformation matrix  |
| traits | specifies whether the matrix *mat* represents an [Isometry](group__enums#ggaee59a86102f150923b0cac6d4ff05107a84413028615d2d718bafd2dfb93dafef) or a more generic [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb) transformation. The default is [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb).  |

      transform() [2/2]
-----------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>   template<int TrOptions>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Hyperplane](classeigen_1_1hyperplane)& [Eigen::Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, \_Options >::transform  | ( | const [Transform](classeigen_1_1transform)< Scalar, AmbientDimAtCompileTime, [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb), TrOptions > &  | *t*,  |
|  |  | [TransformTraits](group__enums#gaee59a86102f150923b0cac6d4ff05107) | *traits* = `[Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb)` |
|  | ) |  |  |

 | inline |

 
 Applies the transformation *t* to `*this` and returns a reference to `*this`.

 
Parameters
 

|  |  |
| --- | --- |
| t | the transformation of dimension Dim  |
| traits | specifies whether the transformation *t* represents an [Isometry](group__enums#ggaee59a86102f150923b0cac6d4ff05107a84413028615d2d718bafd2dfb93dafef) or a more generic [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb) transformation. The default is [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb). Other kind of transformations are not supported.  |

     

---

The documentation for this class was generated from the following file:* [Hyperplane.h](https://eigen.tuxfamily.org/dox/Hyperplane_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Hyperplane.html>

Eigen::IncompleteLUT
====================

  
### template<typename \_Scalar, typename \_StorageIndex = int> class Eigen::IncompleteLUT< \_Scalar, \_StorageIndex >

 Incomplete LU factorization with dual-threshold strategy. 

 This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 During the numerical factorization, two dropping rules are used : 1) any element whose magnitude is less than some tolerance is dropped. This tolerance is obtained by multiplying the input tolerance `droptol` by the average magnitude of all the original elements in the current row. 2) After the elimination of the row, only the `fill` largest elements in the L part and the `fill` largest elements in the U part are kept (in addition to the diagonal element ). Note that `fill` is computed from the input parameter `fillfactor` which is used the ratio to control the fill\_in relatively to the initial number of nonzero elements.

 The two extreme cases are when `droptol=0` (to keep all the `fill*2` largest elements) and when `fill=n/2` with `droptol` being different to zero.

 References : Yousef Saad, ILUT: A dual threshold incomplete LU factorization, Numerical Linear Algebra with Applications, 1(4), pp 387-402, 1994.

 NOTE : The following implementation is derived from the ILUT implementation in the SPARSKIT package, Copyright (C) 2005, the Regents of the University of Minnesota released under the terms of the GNU LGPL: <http://www-users.cs.umn.edu/~saad/software/SPARSKIT/README> However, Yousef Saad gave us permission to relicense his ILUT code to MPL2. See the [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") mailing list archive, thread: ILUT, date: July 8, 2012: <http://listengine.tuxfamily.org/lists.tuxfamily.org/eigen/2012/07/msg00064.html> alternatively, on GMANE: <http://comments.gmane.org/gmane.comp.lib.eigen/3302> 

     ![Inheritance graph]      

|  |
| --- |
|  |
| struct  | [keep\_diag](structeigen_1_1incompletelut_1_1keep__diag) |
|  |




|  |
| --- |
|  |
| template<typename MatrixType >  |
| [IncompleteLUT](classeigen_1_1incompletelut) &  | [compute](classeigen_1_1incompletelut#a488e37ab51d8ed37a297eeca521f1817) (const MatrixType &amat) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1incompletelut#a941c7d34f15d7bc287e780636be0ee2b) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1incompletelut#a941c7d34f15d7bc287e780636be0ee2b) |
|  |
| void  | [setDroptol](classeigen_1_1incompletelut#a9628c5a595e9e984c72d1f8e671a6925) (const RealScalar &droptol) |
|  |
| void  | [setFillfactor](classeigen_1_1incompletelut#a327767d12b55ff8a023f12a030051e17) (int fillfactor) |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< IncompleteLUT< \_Scalar, int > >](classeigen_1_1sparsesolverbase) |
| const [Solve](classeigen_1_1solve)< [IncompleteLUT](classeigen_1_1incompletelut)< \_Scalar, int >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| const [Solve](classeigen_1_1solve)< [IncompleteLUT](classeigen_1_1incompletelut)< \_Scalar, int >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

  compute()
---------

    template<typename \_Scalar , typename \_StorageIndex = int>   template<typename MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [IncompleteLUT](classeigen_1_1incompletelut)& [Eigen::IncompleteLUT](classeigen_1_1incompletelut)< \_Scalar, \_StorageIndex >::compute  | ( | const MatrixType &  | *amat* | ) |  |

 | inline |

 
 Compute an incomplete LU factorization with dual threshold on the matrix mat No pivoting is done in this version 

    info()
------

    template<typename \_Scalar , typename \_StorageIndex = int>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::IncompleteLUT](classeigen_1_1incompletelut)< \_Scalar, \_StorageIndex >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether previous computation was successful. 

 
Returns

`Success` if computation was successful, `NumericalIssue` if the matrix.appears to be negative. 
    setDroptol()
------------

    template<typename Scalar , typename StorageIndex >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::IncompleteLUT](classeigen_1_1incompletelut)< Scalar, StorageIndex >::setDroptol  | ( | const RealScalar &  | *droptol* | ) |  |

 
 Set control parameter droptol 



Parameters
 

|  |  |
| --- | --- |
| droptol | Drop any element whose magnitude is less than this tolerance  |

      setFillfactor()
---------------

    template<typename Scalar , typename StorageIndex >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::IncompleteLUT](classeigen_1_1incompletelut)< Scalar, StorageIndex >::setFillfactor  | ( | int  | *fillfactor* | ) |  |

 
 Set control parameter fillfactor 



Parameters
 

|  |  |
| --- | --- |
| fillfactor | This is used to compute the number `fill_in` of largest elements to keep on each row.  |

     

---

The documentation for this class was generated from the following file:* [IncompleteLUT.h](https://eigen.tuxfamily.org/dox/IncompleteLUT_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1IncompleteLUT.html>

Eigen::IndexedView
==================

  
### template<typename XprType, typename RowIndices, typename ColIndices> class Eigen::IndexedView< XprType, RowIndices, ColIndices >

 Expression of a non-sequential sub-matrix defined by arbitrary sequences of row and column indices. 

 
Template Parameters
 

|  |  |
| --- | --- |
| XprType | the type of the expression in which we are taking the intersections of sub-rows and sub-columns  |
| RowIndices | the type of the object defining the sequence of row indices  |
| ColIndices | the type of the object defining the sequence of column indices |

   This class represents an expression of a sub-matrix (or sub-vector) defined as the intersection of sub-sets of rows and columns, that are themself defined by generic sequences of row indices \( \{r\_0,r\_1,..r\_{m-1}\} \) and column indices \( \{c\_0,c\_1,..c\_{n-1} \}\). Let \( A \) be the nested matrix, then the resulting matrix \( B \) has `m` rows and `n` columns, and its entries are given by: \( B(i,j) = A(r\_i,c\_j) \).

 The `RowIndices` and `ColIndices` types must be compatible with the following API: 



```
<integral type> operator[]([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde)) const;
[Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size() const;
```

Typical supported types thus include:


* std::vector<int>
* std::valarray<int>
* std::array<int>
* Plain C arrays: int[N]
* Eigen::ArrayXi
* decltype(ArrayXi::LinSpaced(...))
* Any view/expressions of the previous types
* [Eigen::ArithmeticSequence](classeigen_1_1arithmeticsequence)
* Eigen::internal::AllRange (helper for [Eigen::all](group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14))
* Eigen::internal::SingleRange (helper for single index)
* etc.

 In typical usages of Eigen, this class should never be used directly. It is the return type of DenseBase::operator()(const RowIndices&, const ColIndices&).

 
See also
class [Block](classeigen_1_1block "Expression of a fixed-size or dynamic-size block.") 
  Inherits Eigen::IndexedViewImpl< XprType, RowIndices, ColIndices, internal::traits< XprType >::StorageKind >.

 

|  |
| --- |
|  |
| const ColIndices &  | [colIndices](classeigen_1_1indexedview#ae4abc26fe04506a02d49e704e112f5bf) () const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [cols](classeigen_1_1indexedview#a6d5f355dd721df6d39482a04e5ffd44d) () const |
|  |
| internal::remove\_reference< XprType >::type &  | [nestedExpression](classeigen_1_1indexedview#ae6ada15bd2ae4302c097409fc91592b1) () |
|  |
| const internal::remove\_all< XprType >::type &  | [nestedExpression](classeigen_1_1indexedview#a2b2aa602ef1947b4752115605d106534) () const |
|  |
| const RowIndices &  | [rowIndices](classeigen_1_1indexedview#af038f6d19de286c0b959f3c1b8daa20d) () const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [rows](classeigen_1_1indexedview#ae0d840059e7753d58f3de53da7d04ce0) () const |
|  |

  colIndices()
------------

    template<typename XprType , typename RowIndices , typename ColIndices >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const ColIndices& [Eigen::IndexedView](classeigen_1_1indexedview)< XprType, RowIndices, ColIndices >::colIndices  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const reference to the object storing/generating the column indices 
    cols()
------

    template<typename XprType , typename RowIndices , typename ColIndices >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::IndexedView](classeigen_1_1indexedview)< XprType, RowIndices, ColIndices >::cols  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
number of columns 
    nestedExpression() [1/2]
------------------------

    template<typename XprType , typename RowIndices , typename ColIndices >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::remove\_reference<XprType>::type& [Eigen::IndexedView](classeigen_1_1indexedview)< XprType, RowIndices, ColIndices >::nestedExpression  | ( |  | ) |  |

 | inline |

 
 
Returns
the nested expression 
    nestedExpression() [2/2]
------------------------

    template<typename XprType , typename RowIndices , typename ColIndices >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const internal::remove\_all<XprType>::type& [Eigen::IndexedView](classeigen_1_1indexedview)< XprType, RowIndices, ColIndices >::nestedExpression  | ( |  | ) |  const |

 | inline |

 
 
Returns
the nested expression 
    rowIndices()
------------

    template<typename XprType , typename RowIndices , typename ColIndices >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const RowIndices& [Eigen::IndexedView](classeigen_1_1indexedview)< XprType, RowIndices, ColIndices >::rowIndices  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const reference to the object storing/generating the row indices 
    rows()
------

    template<typename XprType , typename RowIndices , typename ColIndices >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::IndexedView](classeigen_1_1indexedview)< XprType, RowIndices, ColIndices >::rows  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
number of rows 
   

---

The documentation for this class was generated from the following file:* [IndexedView.h](https://eigen.tuxfamily.org/dox/IndexedView_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1IndexedView.html>

Eigen::Stride
=============

  
### template<int \_OuterStrideAtCompileTime, int \_InnerStrideAtCompileTime> class Eigen::Stride< \_OuterStrideAtCompileTime, \_InnerStrideAtCompileTime >

 Holds strides information for [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data."). 

 This class holds the strides information for mapping arrays with strides with class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.").

 It holds two values: the inner stride and the outer stride.

 The inner stride is the pointer increment between two consecutive entries within a given row of a row-major matrix or within a given column of a column-major matrix.

 The outer stride is the pointer increment between two consecutive rows of a row-major matrix or between two consecutive columns of a column-major matrix.

 These two values can be passed either at compile-time as template parameters, or at runtime as arguments to the constructor.

 Indeed, this class takes two template parameters: 



Template Parameters
 

|  |  |
| --- | --- |
| \_OuterStrideAtCompileTime | the outer stride, or Dynamic if you want to specify it at runtime.  |
| \_InnerStrideAtCompileTime | the inner stride, or Dynamic if you want to specify it at runtime. |

   Here is an example: 



```
int array[24];
for(int i = 0; i < 24; ++i) array[i] = i;
cout << Map<MatrixXi, 0, Stride<Dynamic,2> >
         (array, 3, 3, Stride<Dynamic,2>(8, 2))
     << endl;

```

 Output: 



```
 0  8 16
 2 10 18
 4 12 20

```

Both strides can be negative, however, a negative stride of -1 cannot be specified at compiletime because of the ambiguity with Dynamic which is defined to -1 (historically, negative strides were not allowed).

 
See also
class [InnerStride](classeigen_1_1innerstride "Convenience specialization of Stride to specify only an inner stride See class Map for some examples."), class [OuterStride](classeigen_1_1outerstride "Convenience specialization of Stride to specify only an outer stride See class Map for some examples."), [Storage orders](group__topicstorageorders) 
 


|  |
| --- |
|  |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) |
|  |




|  |
| --- |
|  |
| EIGEN\_CONSTEXPR [Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) | [inner](classeigen_1_1stride#ab827ee701f5ccbd8f9bdeb32497df572) () const |
|  |
| EIGEN\_CONSTEXPR [Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) | [outer](classeigen_1_1stride#a010ffe25388932a6c83c6d9d95b95442) () const |
|  |
|  | [Stride](classeigen_1_1stride#ae3f37b08ff44d2afe971c0894c2f44a5) () |
|  |
|  | [Stride](classeigen_1_1stride#aa9bb1a33da8c785d9cc4ad5d799b9253) (const [Stride](classeigen_1_1stride) &other) |
|  |
|  | [Stride](classeigen_1_1stride#a81e299d9d2f8bbfc6d240705dabe5833) ([Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) outerStride, [Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) innerStride) |
|  |

  Index
-----

    template<int \_OuterStrideAtCompileTime, int \_InnerStrideAtCompileTime>  

|  |
| --- |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::Stride](classeigen_1_1stride)< \_OuterStrideAtCompileTime, \_InnerStrideAtCompileTime >::[Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) |

 
 
**[Deprecated:](deprecated#_deprecated000005)**
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3 
    Stride() [1/3]
--------------

    template<int \_OuterStrideAtCompileTime, int \_InnerStrideAtCompileTime>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::Stride](classeigen_1_1stride)< \_OuterStrideAtCompileTime, \_InnerStrideAtCompileTime >::[Stride](classeigen_1_1stride) | ( |  | ) |  |

 | inline |

 
 Default constructor, for use when strides are fixed at compile time 

    Stride() [2/3]
--------------

    template<int \_OuterStrideAtCompileTime, int \_InnerStrideAtCompileTime>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Stride](classeigen_1_1stride)< \_OuterStrideAtCompileTime, \_InnerStrideAtCompileTime >::[Stride](classeigen_1_1stride) | ( | [Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) | *outerStride*,  |
|  |  | [Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) | *innerStride* |
|  | ) |  |  |

 | inline |

 
 Constructor allowing to pass the strides at runtime 

    Stride() [3/3]
--------------

    template<int \_OuterStrideAtCompileTime, int \_InnerStrideAtCompileTime>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Stride](classeigen_1_1stride)< \_OuterStrideAtCompileTime, \_InnerStrideAtCompileTime >::[Stride](classeigen_1_1stride) | ( | const [Stride](classeigen_1_1stride)< \_OuterStrideAtCompileTime, \_InnerStrideAtCompileTime > &  | *other* | ) |  |

 | inline |

 
 Copy constructor 

    inner()
-------

    template<int \_OuterStrideAtCompileTime, int \_InnerStrideAtCompileTime>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) [Eigen::Stride](classeigen_1_1stride)< \_OuterStrideAtCompileTime, \_InnerStrideAtCompileTime >::inner  | ( |  | ) |  const |

 | inline |

 
 
Returns
the inner stride 
    outer()
-------

    template<int \_OuterStrideAtCompileTime, int \_InnerStrideAtCompileTime>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) [Eigen::Stride](classeigen_1_1stride)< \_OuterStrideAtCompileTime, \_InnerStrideAtCompileTime >::outer  | ( |  | ) |  const |

 | inline |

 
 
Returns
the outer stride 
   

---

The documentation for this class was generated from the following file:* [Stride.h](https://eigen.tuxfamily.org/dox/Stride_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Stride.html>

Eigen::Map
==========

  
### template<typename PlainObjectType, int MapOptions, typename StrideType> class Eigen::Map< PlainObjectType, MapOptions, StrideType >

 A matrix or vector expression mapping an existing array of data. 

 
Template Parameters
 

|  |  |
| --- | --- |
| PlainObjectType | the equivalent matrix type of the mapped data  |
| MapOptions | specifies the pointer alignment in bytes. It can be: `[Aligned128](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a60057da2408e499b5656244d0b26cc20)`, `[Aligned64](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a2639cfa1e8faac751556bc0009fe95a4)`, `[Aligned32](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a8a380b1cd0c3e5a6cceac06f8235157a)`, `[Aligned16](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ad0b140cd97bc74365b51843d28379655)`, `[Aligned8](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a9d99d7a9ff1da5c949bec22733bfba14)` or `[Unaligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a4e19dd09d5ff42295ba1d72d12a46686)`. The default is `[Unaligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a4e19dd09d5ff42295ba1d72d12a46686)`.  |
| StrideType | optionally specifies strides. By default, [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") assumes the memory layout of an ordinary, contiguous array. This can be overridden by specifying strides. The type passed here must be a specialization of the [Stride](classeigen_1_1stride "Holds strides information for Map.") template, see examples below. |

   This class represents a matrix or vector expression mapping an existing array of data. It can be used to let [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") interface without any overhead with non-Eigen data structures, such as plain C arrays or structures from other libraries. By default, it assumes that the data is laid out contiguously in memory. You can however override this by explicitly specifying inner and outer strides.

 Here's an example of simply mapping a contiguous array as a [column-major](group__topicstorageorders) matrix: 



```
int array[9];
for(int i = 0; i < 9; ++i) array[i] = i;
cout << Map<Matrix3i>(array) << endl;

```

 Output: 



```
0 3 6
1 4 7
2 5 8

```

If you need to map non-contiguous arrays, you can do so by specifying strides:

 Here's an example of mapping an array as a vector, specifying an inner stride, that is, the pointer increment between two consecutive coefficients. Here, we're specifying the inner stride as a compile-time fixed value. 



```
int array[12];
for(int i = 0; i < 12; ++i) array[i] = i;
cout << Map<VectorXi, 0, InnerStride<2> >
         (array, 6) // the inner stride has already been passed as template parameter
     << endl;

```

 Output: 



```
 0
 2
 4
 6
 8
10

```

Here's an example of mapping an array while specifying an outer stride. Here, since we're mapping as a column-major matrix, 'outer stride' means the pointer increment between two consecutive columns. Here, we're specifying the outer stride as a runtime parameter. Note that here `OuterStride<>` is a short version of `OuterStride<Dynamic>` because the default template parameter of [OuterStride](classeigen_1_1outerstride "Convenience specialization of Stride to specify only an outer stride See class Map for some examples.") is `Dynamic` 



```
int array[12];
for(int i = 0; i < 12; ++i) array[i] = i;
cout << Map<MatrixXi, 0, OuterStride<> >(array, 3, 3, OuterStride<>(4)) << endl;

```

 Output: 



```
 0  4  8
 1  5  9
 2  6 10

```

For more details and for an example of specifying both an inner and an outer stride, see class [Stride](classeigen_1_1stride "Holds strides information for Map.").

 **Tip:** to change the array of data mapped by a [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") object, you can use the C++ placement new syntax:

 Example: 



```
int data[] = {1,2,3,4,5,6,7,8,9};
Map<RowVectorXi> v(data,4);
cout << "The mapped vector v is: " << v << "\n";
new (&v) Map<RowVectorXi>(data+4,5);
cout << "Now v is: " << v << "\n";

```

 Output: 



```
The mapped vector v is: 1 2 3 4
Now v is: 5 6 7 8 9

```

This class is the return type of [PlainObjectBase::Map()](classeigen_1_1plainobjectbase#aaf9fcc07dc13f89cf71d4a4e2b220d24) but can also be used directly.

 
See also

[PlainObjectBase::Map()](classeigen_1_1plainobjectbase#aaf9fcc07dc13f89cf71d4a4e2b220d24), [Storage orders](group__topicstorageorders) 
     ![Inheritance graph]      

|  |
| --- |
|  |
|  | [Map](classeigen_1_1map#a43b3e84aba2ff1a241dbc3d177fb2e22) (PointerArgType dataPtr, const StrideType &stride=StrideType()) |
|  |
|  | [Map](classeigen_1_1map#a3f621386d55a373f53082ac62579897e) (PointerArgType dataPtr, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols, const StrideType &stride=StrideType()) |
|  |
|  | [Map](classeigen_1_1map#a52069afac76e3f609a6865106dc10254) (PointerArgType dataPtr, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, const StrideType &stride=StrideType()) |
|  |

  Map() [1/3]
-----------

    template<typename PlainObjectType , int MapOptions, typename StrideType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Map](classeigen_1_1map)< PlainObjectType, MapOptions, StrideType >::[Map](classeigen_1_1map) | ( | PointerArgType  | *dataPtr*,  |
|  |  | const StrideType &  | *stride* = `StrideType()` |
|  | ) |  |  |

 | inlineexplicit |

 
 Constructor in the fixed-size case.

 
Parameters
 

|  |  |
| --- | --- |
| dataPtr | pointer to the array to map  |
| stride | optional [Stride](classeigen_1_1stride "Holds strides information for Map.") object, passing the strides.  |

      Map() [2/3]
-----------

    template<typename PlainObjectType , int MapOptions, typename StrideType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Map](classeigen_1_1map)< PlainObjectType, MapOptions, StrideType >::[Map](classeigen_1_1map) | ( | PointerArgType  | *dataPtr*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size*,  |
|  |  | const StrideType &  | *stride* = `StrideType()` |
|  | ) |  |  |

 | inline |

 
 Constructor in the dynamic-size vector case.

 
Parameters
 

|  |  |
| --- | --- |
| dataPtr | pointer to the array to map  |
| size | the size of the vector expression  |
| stride | optional [Stride](classeigen_1_1stride "Holds strides information for Map.") object, passing the strides.  |

      Map() [3/3]
-----------

    template<typename PlainObjectType , int MapOptions, typename StrideType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Map](classeigen_1_1map)< PlainObjectType, MapOptions, StrideType >::[Map](classeigen_1_1map) | ( | PointerArgType  | *dataPtr*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols*,  |
|  |  | const StrideType &  | *stride* = `StrideType()` |
|  | ) |  |  |

 | inline |

 
 Constructor in the dynamic-size matrix case.

 
Parameters
 

|  |  |
| --- | --- |
| dataPtr | pointer to the array to map  |
| rows | the number of rows of the matrix expression  |
| cols | the number of columns of the matrix expression  |
| stride | optional [Stride](classeigen_1_1stride "Holds strides information for Map.") object, passing the strides.  |

     

---

The documentation for this class was generated from the following file:* [Map.h](https://eigen.tuxfamily.org/dox/Map_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Map.html>

Eigen::IOFormat
===============

  
Stores a set of parameters controlling the way matrices are printed. 

 List of available parameters:


* **precision** number of digits for floating point values, or one of the special constants `StreamPrecision` and `FullPrecision`. The default is the special value `StreamPrecision` which means to use the stream's own precision setting, as set for instance using `cout.precision(3)`. The other special value `FullPrecision` means that the number of digits will be computed to match the full precision of each floating-point type.
* **flags** an OR-ed combination of flags, the default value is 0, the only currently available flag is `DontAlignCols` which allows to disable the alignment of columns, resulting in faster code.
* **coeffSeparator** string printed between two coefficients of the same row
* **rowSeparator** string printed between two rows
* **rowPrefix** string printed at the beginning of each row
* **rowSuffix** string printed at the end of each row
* **matPrefix** string printed at the beginning of the matrix
* **matSuffix** string printed at the end of the matrix
* **fill** character printed to fill the empty space in aligned columns

 Example: 



```
std::string sep = "\n----------------------------------------\n";
Matrix3d m1;
m1 << 1.111111, 2, 3.33333, 4, 5, 6, 7, 8.888888, 9;
 
[IOFormat](structeigen_1_1ioformat#acdcc91702d45c714b11ba42db5beddb5) CommaInitFmt(StreamPrecision, DontAlignCols, ", ", ", ", "", "", " << ", ";");
[IOFormat](structeigen_1_1ioformat#acdcc91702d45c714b11ba42db5beddb5) CleanFmt(4, 0, ", ", "\n", "[", "]");
[IOFormat](structeigen_1_1ioformat#acdcc91702d45c714b11ba42db5beddb5) OctaveFmt(StreamPrecision, 0, ", ", ";\n", "", "", "[", "]");
[IOFormat](structeigen_1_1ioformat#acdcc91702d45c714b11ba42db5beddb5) HeavyFmt(FullPrecision, 0, ", ", ";\n", "[", "]", "[", "]");
 
std::cout << m1 << sep;
std::cout << m1.format(CommaInitFmt) << sep;
std::cout << m1.format(CleanFmt) << sep;
std::cout << m1.format(OctaveFmt) << sep;
std::cout << m1.format(HeavyFmt) << sep;
```

 Output: 



```
1.11    2 3.33
   4    5    6
   7 8.89    9
----------------------------------------
 << 1.11, 2, 3.33, 4, 5, 6, 7, 8.89, 9;
----------------------------------------
[1.111,     2, 3.333]
[    4,     5,     6]
[    7, 8.889,     9]
----------------------------------------
[1.11,    2, 3.33;
    4,    5,    6;
    7, 8.89,    9]
----------------------------------------
[[1.111111,        2,  3.33333];
 [       4,        5,        6];
 [       7, 8.888888,        9]]
----------------------------------------

```


See also

[DenseBase::format()](classeigen_1_1densebase#ab231f1a6057f28d4244145e12c9fc0c7), class [WithFormat](classeigen_1_1withformat "Pseudo expression providing matrix output with given format.") 
 


|  |
| --- |
|  |
|  | [IOFormat](structeigen_1_1ioformat#acdcc91702d45c714b11ba42db5beddb5) (int \_precision=StreamPrecision, int \_flags=0, const std::string &\_coeffSeparator=" ", const std::string &\_rowSeparator="\n", const std::string &\_rowPrefix="", const std::string &\_rowSuffix="", const std::string &\_matPrefix="", const std::string &\_matSuffix="", const char \_fill=' ') |
|  |

  IOFormat()
----------

   

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Eigen::IOFormat::IOFormat  | ( | int  | *\_precision* = `StreamPrecision`,  |
|  |  | int  | *\_flags* = `0`,  |
|  |  | const std::string &  | *\_coeffSeparator* = `" "`,  |
|  |  | const std::string &  | *\_rowSeparator* = `"\n"`,  |
|  |  | const std::string &  | *\_rowPrefix* = `""`,  |
|  |  | const std::string &  | *\_rowSuffix* = `""`,  |
|  |  | const std::string &  | *\_matPrefix* = `""`,  |
|  |  | const std::string &  | *\_matSuffix* = `""`,  |
|  |  | const char  | *\_fill* = `' '` |
|  | ) |  |  |

 | inline |

 
 Default constructor, see class [IOFormat](structeigen_1_1ioformat "Stores a set of parameters controlling the way matrices are printed.") for the meaning of the parameters 

   

---

The documentation for this class was generated from the following file:* [IO.h](https://eigen.tuxfamily.org/dox/IO_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/structEigen_1_1IOFormat.html>

Eigen::LeastSquareDiagonalPreconditioner
========================================

  
### template<typename \_Scalar> class Eigen::LeastSquareDiagonalPreconditioner< \_Scalar >

 Jacobi preconditioner for [LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient "A conjugate gradient solver for sparse (or dense) least-square problems."). 

 This class allows to approximately solve for A' A x = A' b problems assuming A' A is a diagonal matrix. In other words, this preconditioner neglects all off diagonal entries and, in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s language, solves for: 



```
(A.adjoint() * A).diagonal().asDiagonal() * x = b

```


Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the type of the scalar. |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 The diagonal entries are pre-inverted and stored into a dense vector.

 
See also
class [LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient "A conjugate gradient solver for sparse (or dense) least-square problems."), class [DiagonalPreconditioner](classeigen_1_1diagonalpreconditioner "A preconditioner based on the digonal entries.") 
     ![Inheritance graph]      

---

The documentation for this class was generated from the following file:* [BasicPreconditioners.h](https://eigen.tuxfamily.org/dox/BasicPreconditioners_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1LeastSquareDiagonalPreconditioner.html>

Eigen::IncompleteCholesky
=========================

  
### template<typename Scalar, int \_UpLo = Lower, typename \_OrderingType = AMDOrdering<int>> class Eigen::IncompleteCholesky< Scalar, \_UpLo, \_OrderingType >

 Modified Incomplete Cholesky with dual threshold. 

 References : C-J. Lin and J. J. Moré, Incomplete Cholesky Factorizations with Limited memory, SIAM J. Sci. Comput. 21(1), pp. 24-45, 1999

 
Template Parameters
 

|  |  |
| --- | --- |
| Scalar | the scalar type of the input matrices  |
| \_UpLo | The triangular part that will be used for the computations. It can be Lower or Upper. Default is Lower.  |
| \_OrderingType | The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<int>, unless EIGEN\_MPL2\_ONLY is defined, in which case the default is NaturalOrdering<int>. |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 It performs the following incomplete factorization: \( S P A P' S \approx L L' \) where L is a lower triangular factor, S is a diagonal scaling matrix, and P is a fill-in reducing permutation as computed by the ordering method.

 **Shifting** **strategy:** Let \( B = S P A P' S \) be the scaled matrix on which the factorization is carried out, and \( \beta \) be the minimum value of the diagonal. If \( \beta > 0 \) then, the factorization is directly performed on the matrix B. Otherwise, the factorization is performed on the shifted matrix \( B + (\sigma+|\beta| I \) where \( \sigma \) is the initial shift value as returned and set by [setInitialShift()](classeigen_1_1incompletecholesky#a409c9586e7d29566dda2c8f5e38a1228 "Set the initial shift parameter .") method. The default value is \( \sigma = 10^{-3} \). If the factorization fails, then the shift in doubled until it succeed or a maximum of ten attempts. If it still fails, as returned by the [info()](classeigen_1_1incompletecholesky#ada0e68cb22601849464506f5986a88c1 "Reports whether previous computation was successful.") method, then you can either increase the initial shift, or better use another preconditioning technique. 

     ![Inheritance graph]      

|  |
| --- |
|  |
|  template<typename MatrixType >  |
| void  | [analyzePattern](classeigen_1_1incompletecholesky#a702560ecdddef77dc51d20ab22bd974e) (const MatrixType &mat) |
|  | Computes the fill reducing permutation vector using the sparsity pattern of *mat*.  |
|  |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [cols](classeigen_1_1incompletecholesky#ac78d2b46d4071963d3cab4a762de6129) () const EIGEN\_NOEXCEPT |
|  |
| template<typename MatrixType >  |
| void  | [compute](classeigen_1_1incompletecholesky#a7966bedeebbeaa7a8fe4dd1da3797a0b) (const MatrixType &mat) |
|  |
| template<typename MatrixType >  |
| void  | [factorize](classeigen_1_1incompletecholesky#ac39c75ff7ca5d2db9a9f03b937e12601) (const MatrixType &mat) |
|  | Performs the numerical factorization of the input matrix *mat*. [More...](classeigen_1_1incompletecholesky#ac39c75ff7ca5d2db9a9f03b937e12601) |
|  |
|  | [IncompleteCholesky](classeigen_1_1incompletecholesky#adaaa3975b8cf53f910d6a3344af92379) () |
|  |
| template<typename MatrixType >  |
|  | [IncompleteCholesky](classeigen_1_1incompletecholesky#a757499fc814988a5b112b1f34d0295e1) (const MatrixType &matrix) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1incompletecholesky#ada0e68cb22601849464506f5986a88c1) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1incompletecholesky#ada0e68cb22601849464506f5986a88c1) |
|  |
| const [FactorType](classeigen_1_1sparsematrix) &  | [matrixL](classeigen_1_1incompletecholesky#a7d1f1878505fd1862e6f2286d27ff09a) () const |
|  |
| const PermutationType &  | [permutationP](classeigen_1_1incompletecholesky#a0d52cec5e17f485a362766363ba90b02) () const |
|  |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [rows](classeigen_1_1incompletecholesky#a773e54c9ac272b998430bd27d2889277) () const EIGEN\_NOEXCEPT |
|  |
| const [VectorRx](classeigen_1_1matrix) &  | [scalingS](classeigen_1_1incompletecholesky#a30d66dd77147a84ec3302e7d5fe5d924) () const |
|  |
|  void  | [setInitialShift](classeigen_1_1incompletecholesky#a409c9586e7d29566dda2c8f5e38a1228) (RealScalar shift) |
|  | Set the initial shift parameter \( \sigma \).  |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< IncompleteCholesky< Scalar, Lower, AMDOrdering< int > > >](classeigen_1_1sparsesolverbase) |
| const [Solve](classeigen_1_1solve)< [IncompleteCholesky](classeigen_1_1incompletecholesky)< Scalar, Lower, [AMDOrdering](classeigen_1_1amdordering)< int > >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| const [Solve](classeigen_1_1solve)< [IncompleteCholesky](classeigen_1_1incompletecholesky)< Scalar, Lower, [AMDOrdering](classeigen_1_1amdordering)< int > >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

  IncompleteCholesky() [1/2]
--------------------------

    template<typename Scalar , int \_UpLo = Lower, typename \_OrderingType = AMDOrdering<int>>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::IncompleteCholesky](classeigen_1_1incompletecholesky)< Scalar, \_UpLo, \_OrderingType >::[IncompleteCholesky](classeigen_1_1incompletecholesky) | ( |  | ) |  |

 | inline |

 
 Default constructor leaving the object in a partly non-initialized stage.

 You must call [compute()](classeigen_1_1incompletecholesky#a7966bedeebbeaa7a8fe4dd1da3797a0b) or the pair [analyzePattern()](classeigen_1_1incompletecholesky#a702560ecdddef77dc51d20ab22bd974e "Computes the fill reducing permutation vector using the sparsity pattern of mat.")/factorize() to make it valid.

 
See also

[IncompleteCholesky(const MatrixType&)](classeigen_1_1incompletecholesky#a757499fc814988a5b112b1f34d0295e1) 
    IncompleteCholesky() [2/2]
--------------------------

    template<typename Scalar , int \_UpLo = Lower, typename \_OrderingType = AMDOrdering<int>>   template<typename MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::IncompleteCholesky](classeigen_1_1incompletecholesky)< Scalar, \_UpLo, \_OrderingType >::[IncompleteCholesky](classeigen_1_1incompletecholesky) | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Constructor computing the incomplete factorization for the given matrix *matrix*. 

    cols()
------

    template<typename Scalar , int \_UpLo = Lower, typename \_OrderingType = AMDOrdering<int>>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::IncompleteCholesky](classeigen_1_1incompletecholesky)< Scalar, \_UpLo, \_OrderingType >::cols  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
number of columns of the factored matrix 
    compute()
---------

    template<typename Scalar , int \_UpLo = Lower, typename \_OrderingType = AMDOrdering<int>>   template<typename MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::IncompleteCholesky](classeigen_1_1incompletecholesky)< Scalar, \_UpLo, \_OrderingType >::compute  | ( | const MatrixType &  | *mat* | ) |  |

 | inline |

 
 Computes or re-computes the incomplete Cholesky factorization of the input matrix *mat* 

 It is a shortcut for a sequential call to the [analyzePattern()](classeigen_1_1incompletecholesky#a702560ecdddef77dc51d20ab22bd974e "Computes the fill reducing permutation vector using the sparsity pattern of mat.") and [factorize()](classeigen_1_1incompletecholesky#ac39c75ff7ca5d2db9a9f03b937e12601 "Performs the numerical factorization of the input matrix mat.") methods.

 
See also

[analyzePattern()](classeigen_1_1incompletecholesky#a702560ecdddef77dc51d20ab22bd974e "Computes the fill reducing permutation vector using the sparsity pattern of mat."), [factorize()](classeigen_1_1incompletecholesky#ac39c75ff7ca5d2db9a9f03b937e12601 "Performs the numerical factorization of the input matrix mat.") 
    factorize()
-----------

    template<typename Scalar , int \_UpLo = Lower, typename \_OrderingType = AMDOrdering<int>>   template<typename MatrixType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::IncompleteCholesky](classeigen_1_1incompletecholesky)< Scalar, \_UpLo, \_OrderingType >::factorize  | ( | const MatrixType &  | *mat* | ) |  |

 
 Performs the numerical factorization of the input matrix *mat*. 

 The method [analyzePattern()](classeigen_1_1incompletecholesky#a702560ecdddef77dc51d20ab22bd974e "Computes the fill reducing permutation vector using the sparsity pattern of mat.") or [compute()](classeigen_1_1incompletecholesky#a7966bedeebbeaa7a8fe4dd1da3797a0b) must have been called beforehand with a matrix having the same pattern.

 
See also

[compute()](classeigen_1_1incompletecholesky#a7966bedeebbeaa7a8fe4dd1da3797a0b), [analyzePattern()](classeigen_1_1incompletecholesky#a702560ecdddef77dc51d20ab22bd974e "Computes the fill reducing permutation vector using the sparsity pattern of mat.") 
    info()
------

    template<typename Scalar , int \_UpLo = Lower, typename \_OrderingType = AMDOrdering<int>>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::IncompleteCholesky](classeigen_1_1incompletecholesky)< Scalar, \_UpLo, \_OrderingType >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether previous computation was successful. 

 It triggers an assertion if `*this` has not been initialized through the respective constructor, or a call to [compute()](classeigen_1_1incompletecholesky#a7966bedeebbeaa7a8fe4dd1da3797a0b) or [analyzePattern()](classeigen_1_1incompletecholesky#a702560ecdddef77dc51d20ab22bd974e "Computes the fill reducing permutation vector using the sparsity pattern of mat.").

 
Returns

`Success` if computation was successful, `NumericalIssue` if the matrix appears to be negative. 
    matrixL()
---------

    template<typename Scalar , int \_UpLo = Lower, typename \_OrderingType = AMDOrdering<int>>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [FactorType](classeigen_1_1sparsematrix)& [Eigen::IncompleteCholesky](classeigen_1_1incompletecholesky)< Scalar, \_UpLo, \_OrderingType >::matrixL  | ( |  | ) |  const |

 | inline |

 
 
Returns
the sparse lower triangular factor L 
    permutationP()
--------------

    template<typename Scalar , int \_UpLo = Lower, typename \_OrderingType = AMDOrdering<int>>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const PermutationType& [Eigen::IncompleteCholesky](classeigen_1_1incompletecholesky)< Scalar, \_UpLo, \_OrderingType >::permutationP  | ( |  | ) |  const |

 | inline |

 
 
Returns
the fill-in reducing permutation P (can be empty for a natural ordering) 
    rows()
------

    template<typename Scalar , int \_UpLo = Lower, typename \_OrderingType = AMDOrdering<int>>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::IncompleteCholesky](classeigen_1_1incompletecholesky)< Scalar, \_UpLo, \_OrderingType >::rows  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
number of rows of the factored matrix 
    scalingS()
----------

    template<typename Scalar , int \_UpLo = Lower, typename \_OrderingType = AMDOrdering<int>>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [VectorRx](classeigen_1_1matrix)& [Eigen::IncompleteCholesky](classeigen_1_1incompletecholesky)< Scalar, \_UpLo, \_OrderingType >::scalingS  | ( |  | ) |  const |

 | inline |

 
 
Returns
a vector representing the scaling factor S 
   

---

The documentation for this class was generated from the following file:* [IncompleteCholesky.h](https://eigen.tuxfamily.org/dox/IncompleteCholesky_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1IncompleteCholesky.html>

Eigen::JacobiRotation
=====================

  
### template<typename Scalar> class Eigen::JacobiRotation< Scalar >

 Rotation given by a cosine-sine pair. 

 This is defined in the Jacobi module.



```
#include <Eigen/Jacobi> 

```

This class represents a Jacobi or Givens rotation. This is a 2D rotation in the plane `J` of angle \( \theta \) defined by its cosine `c` and sine `s` as follow: \( J = \left ( \begin{array}{cc} c & \overline s \\ -s & \overline c \end{array} \right ) \)

 You can apply the respective counter-clockwise rotation to a column vector `v` by applying its adjoint on the left: \( v = J^\* v \) that translates to the following [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") code: 



```
v.applyOnTheLeft(J.adjoint());

```


See also

[MatrixBase::applyOnTheLeft()](classeigen_1_1matrixbase#a3a08ad41e81d8ad4a37b5d5c7490e765), [MatrixBase::applyOnTheRight()](classeigen_1_1matrixbase#a45d91752925d2757fc8058a293b15462) 
 


|  |
| --- |
|  |
| [JacobiRotation](classeigen_1_1jacobirotation) | [adjoint](classeigen_1_1jacobirotation#a89c8ea615f8fa77ddd5810a1e5fde4da) () const |
|  |
|  | [JacobiRotation](classeigen_1_1jacobirotation#a38fec2c4da529ef3d05ff37b848b4227) () |
|  |
|  | [JacobiRotation](classeigen_1_1jacobirotation#a3e8b5dc0a56f7a2d0f788b1ccb1547cb) (const Scalar &c, const Scalar &s) |
|  |
| void  | [makeGivens](classeigen_1_1jacobirotation#adb5bcb0d28a95e39ca31c2c17e866092) (const Scalar &p, const Scalar &q, Scalar \*r=0) |
|  |
| template<typename Derived >  |
| bool  | [makeJacobi](classeigen_1_1jacobirotation#a69076401f22e883dc76b6ff9074ac669) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) p, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) q) |
|  |
| bool  | [makeJacobi](classeigen_1_1jacobirotation#a6572f272cac38e070a99b466dd1fbc74) (const RealScalar &x, const Scalar &y, const RealScalar &z) |
|  |
| [JacobiRotation](classeigen_1_1jacobirotation) | [operator\*](classeigen_1_1jacobirotation#ada8389f291839964d7b481464f0e4e94) (const [JacobiRotation](classeigen_1_1jacobirotation) &other) |
|  |
| [JacobiRotation](classeigen_1_1jacobirotation) | [transpose](classeigen_1_1jacobirotation#ab40e9cdc4582593511e57ee896e055a2) () const |
|  |

  JacobiRotation() [1/2]
----------------------

    template<typename Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::JacobiRotation](classeigen_1_1jacobirotation)< Scalar >::[JacobiRotation](classeigen_1_1jacobirotation) | ( |  | ) |  |

 | inline |

 
 Default constructor without any initialization. 

    JacobiRotation() [2/2]
----------------------

    template<typename Scalar >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::JacobiRotation](classeigen_1_1jacobirotation)< Scalar >::[JacobiRotation](classeigen_1_1jacobirotation) | ( | const Scalar &  | *c*,  |
|  |  | const Scalar &  | *s* |
|  | ) |  |  |

 | inline |

 
 Construct a planar rotation from a cosine-sine pair (*c*, `s`). 

    adjoint()
---------

    template<typename Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [JacobiRotation](classeigen_1_1jacobirotation) [Eigen::JacobiRotation](classeigen_1_1jacobirotation)< Scalar >::adjoint  | ( |  | ) |  const |

 | inline |

 
 Returns the adjoint transformation 

    makeGivens()
------------

    template<typename Scalar >  

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::JacobiRotation](classeigen_1_1jacobirotation)< Scalar >::makeGivens  | ( | const Scalar &  | *p*,  |
|  |  | const Scalar &  | *q*,  |
|  |  | Scalar \*  | *r* = `0` |
|  | ) |  |  |

 
 Makes `*this` as a Givens rotation `G` such that applying \( G^\* \) to the left of the vector \( V = \left ( \begin{array}{c} p \\ q \end{array} \right )\) yields: \( G^\* V = \left ( \begin{array}{c} r \\ 0 \end{array} \right )\).

 The value of *r* is returned if *r* is not null (the default is null). Also note that G is built such that the cosine is always real.

 Example: 



```
Vector2f v = [Vector2f::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
JacobiRotation<float> G;
G.makeGivens(v.x(), v.y());
cout << "Here is the vector v:" << endl << v << endl;
v.applyOnTheLeft(0, 1, G.adjoint());
cout << "Here is the vector J' \* v:" << endl << v << endl;
```

 Output: 



```
Here is the vector v:
  0.68
-0.211
Here is the vector J' * v:
0.712
    0

```

This function implements the continuous Givens rotation generation algorithm found in Anderson (2000), Discontinuous Plane Rotations and the Symmetric Eigenvalue Problem. LAPACK Working Note 150, University of Tennessee, UT-CS-00-454, December 4, 2000.

 
See also

[MatrixBase::applyOnTheLeft()](classeigen_1_1matrixbase#a3a08ad41e81d8ad4a37b5d5c7490e765), [MatrixBase::applyOnTheRight()](classeigen_1_1matrixbase#a45d91752925d2757fc8058a293b15462) 
    makeJacobi() [1/2]
------------------

    template<typename Scalar >   template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::JacobiRotation](classeigen_1_1jacobirotation)< Scalar >::makeJacobi  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *m*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *p*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *q* |
|  | ) |  |  |

 | inline |

 
 Makes `*this` as a Jacobi rotation `J` such that applying *J* on both the right and left sides of the 2x2 selfadjoint matrix \( B = \left ( \begin{array}{cc} \text{this}\_{pp} & \text{this}\_{pq} \\ (\text{this}\_{pq})^\* & \text{this}\_{qq} \end{array} \right )\) yields a diagonal matrix \( A = J^\* B J \)

 Example: 



```
Matrix2f m = [Matrix2f::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
m = (m + m.adjoint()).eval();
JacobiRotation<float> J;
J.makeJacobi(m, 0, 1);
cout << "Here is the matrix m:" << endl << m << endl;
m.applyOnTheLeft(0, 1, J.adjoint());
m.applyOnTheRight(0, 1, J);
cout << "Here is the matrix J' \* m \* J:" << endl << m << endl;

```

 Output: 



```
Here is the matrix m:
 1.36 0.355
0.355  1.19
Here is the matrix J' * m * J:
 1.64     0
    0 0.913

```


See also
JacobiRotation::makeJacobi(RealScalar, Scalar, RealScalar), [MatrixBase::applyOnTheLeft()](classeigen_1_1matrixbase#a3a08ad41e81d8ad4a37b5d5c7490e765), [MatrixBase::applyOnTheRight()](classeigen_1_1matrixbase#a45d91752925d2757fc8058a293b15462) 
    makeJacobi() [2/2]
------------------

    template<typename Scalar >  

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::JacobiRotation](classeigen_1_1jacobirotation)< Scalar >::makeJacobi  | ( | const RealScalar &  | *x*,  |
|  |  | const Scalar &  | *y*,  |
|  |  | const RealScalar &  | *z* |
|  | ) |  |  |

 
 Makes `*this` as a Jacobi rotation *J* such that applying *J* on both the right and left sides of the selfadjoint 2x2 matrix \( B = \left ( \begin{array}{cc} x & y \\ \overline y & z \end{array} \right )\) yields a diagonal matrix \( A = J^\* B J \)

 
See also
MatrixBase::makeJacobi(const MatrixBase<Derived>&, Index, Index), [MatrixBase::applyOnTheLeft()](classeigen_1_1matrixbase#a3a08ad41e81d8ad4a37b5d5c7490e765), [MatrixBase::applyOnTheRight()](classeigen_1_1matrixbase#a45d91752925d2757fc8058a293b15462) 
    operator\*()
------------

    template<typename Scalar >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [JacobiRotation](classeigen_1_1jacobirotation) [Eigen::JacobiRotation](classeigen_1_1jacobirotation)< Scalar >::operator\*  | ( | const [JacobiRotation](classeigen_1_1jacobirotation)< Scalar > &  | *other* | ) |  |

 | inline |

 
 Concatenates two planar rotation 

    transpose()
-----------

    template<typename Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [JacobiRotation](classeigen_1_1jacobirotation) [Eigen::JacobiRotation](classeigen_1_1jacobirotation)< Scalar >::transpose  | ( |  | ) |  const |

 | inline |

 
 Returns the transposed transformation 

   

---

The documentation for this class was generated from the following file:* [Jacobi.h](https://eigen.tuxfamily.org/dox/Jacobi_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1JacobiRotation.html>

Eigen::LeastSquaresConjugateGradient
====================================

  
### template<typename \_MatrixType, typename \_Preconditioner> class Eigen::LeastSquaresConjugateGradient< \_MatrixType, \_Preconditioner >

 A conjugate gradient solver for sparse (or dense) least-square problems. 

 This class allows to solve for A x = b linear problems using an iterative conjugate gradient algorithm. The matrix A can be non symmetric and rectangular, but the matrix A' A should be positive-definite to guaranty stability. Otherwise, the [SparseLU](classeigen_1_1sparselu "Sparse supernodal LU factorization for general matrices.") or [SparseQR](classeigen_1_1sparseqr "Sparse left-looking QR factorization with numerical column pivoting.") classes might be preferable. The matrix A and the vectors x and b can be either dense or sparse.

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix A, can be a dense or a sparse matrix.  |
| \_Preconditioner | the type of the preconditioner. Default is [LeastSquareDiagonalPreconditioner](classeigen_1_1leastsquarediagonalpreconditioner "Jacobi preconditioner for LeastSquaresConjugateGradient.") |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 The maximal number of iterations and tolerance value can be controlled via the [setMaxIterations()](classeigen_1_1iterativesolverbase#af83de7a7d31d9d4bd1fef6222b07335b) and [setTolerance()](classeigen_1_1iterativesolverbase#ac160a444af8998f93da9aa30e858470d) methods. The defaults are the size of the problem for the maximal number of iterations and NumTraits<Scalar>::epsilon() for the tolerance.

 This class can be used as the direct solver classes. Here is a typical usage example: 



```
int m=1000000, n = 10000;
VectorXd x(n), b(m);
SparseMatrix<double> A(m,n);
// fill A and b
LeastSquaresConjugateGradient<SparseMatrix<double> > lscg;
lscg.compute(A);
x = lscg.solve(b);
std::cout << "#iterations: " << lscg.iterations() << std::endl;
std::cout << "estimated error: " << lscg.error()      << std::endl;
// update b, and solve again
x = lscg.solve(b);

```

By default the iterations start with x=0 as an initial guess of the solution. One can control the start using the [solveWithGuess()](classeigen_1_1iterativesolverbase#adcc18d1ab283786dcbb5a3f63f4b4bd8) method.

 
See also
class [ConjugateGradient](classeigen_1_1conjugategradient "A conjugate gradient solver for sparse (or dense) self-adjoint problems."), [SparseLU](classeigen_1_1sparselu "Sparse supernodal LU factorization for general matrices."), [SparseQR](classeigen_1_1sparseqr "Sparse left-looking QR factorization with numerical column pivoting.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
|  | [LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient#ace69f423fcc1f8960d0e2de0667447c9) () |
|  |
| template<typename MatrixDerived >  |
|  | [LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient#a91c4f2edc20f93cee9b721165937fb99) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| - Public Member Functions inherited from [Eigen::IterativeSolverBase< LeastSquaresConjugateGradient< \_MatrixType, \_Preconditioner > >](classeigen_1_1iterativesolverbase) |
| [LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient)< \_MatrixType, \_Preconditioner > &  | [analyzePattern](classeigen_1_1iterativesolverbase#a3f684fb41019ca04d97ddc08a0d8be2e) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| [LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient)< \_MatrixType, \_Preconditioner > &  | [compute](classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| RealScalar  | [error](classeigen_1_1iterativesolverbase#a117c241af3fb1141ad0916a3cf3157ec) () const |
|  |
| [LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient)< \_MatrixType, \_Preconditioner > &  | [factorize](classeigen_1_1iterativesolverbase#a1374b141721629983cd8276b4b87fc58) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1iterativesolverbase#a0d6b459433a316b4f12d48e5c80d61fe) () const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [iterations](classeigen_1_1iterativesolverbase#ae778dd098bd5e6655625b20b1e9f15da) () const |
|  |
|  | [IterativeSolverBase](classeigen_1_1iterativesolverbase#a0922f2be45082690d7734aa6732fc493) () |
|  |
|  | [IterativeSolverBase](classeigen_1_1iterativesolverbase#a3c68fe3cd929ea1ff8a0d4cbcd65ebad) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [maxIterations](classeigen_1_1iterativesolverbase#a168a74c8dceb6233b220031fdd756ba0) () const |
|  |
| Preconditioner &  | [preconditioner](classeigen_1_1iterativesolverbase#a5e88f2a323a2900205cf807af94f8051) () |
|  |
| const Preconditioner &  | [preconditioner](classeigen_1_1iterativesolverbase#a709a056e17c49b5272e4971bc376cbe4) () const |
|  |
| [LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient)< \_MatrixType, \_Preconditioner > &  | [setMaxIterations](classeigen_1_1iterativesolverbase#af83de7a7d31d9d4bd1fef6222b07335b) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) maxIters) |
|  |
| [LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient)< \_MatrixType, \_Preconditioner > &  | [setTolerance](classeigen_1_1iterativesolverbase#ac160a444af8998f93da9aa30e858470d) (const RealScalar &[tolerance](classeigen_1_1iterativesolverbase#acb442c19b5858d6b9be813dd7d36cc62)) |
|  |
| const [SolveWithGuess](classeigen_1_1solvewithguess)< [LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient)< \_MatrixType, \_Preconditioner >, Rhs, Guess >  | [solveWithGuess](classeigen_1_1iterativesolverbase#adcc18d1ab283786dcbb5a3f63f4b4bd8) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b, const Guess &x0) const |
|  |
| RealScalar  | [tolerance](classeigen_1_1iterativesolverbase#acb442c19b5858d6b9be813dd7d36cc62) () const |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< Derived >](classeigen_1_1sparsesolverbase) |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

  LeastSquaresConjugateGradient() [1/2]
-------------------------------------

    template<typename \_MatrixType , typename \_Preconditioner >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient)< \_MatrixType, \_Preconditioner >::[LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient) | ( |  | ) |  |

 | inline |

 
 Default constructor. 

    LeastSquaresConjugateGradient() [2/2]
-------------------------------------

    template<typename \_MatrixType , typename \_Preconditioner >   template<typename MatrixDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient)< \_MatrixType, \_Preconditioner >::[LeastSquaresConjugateGradient](classeigen_1_1leastsquaresconjugategradient) | ( | const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &  | *A* | ) |  |

 | inlineexplicit |

 
 Initialize the solver with matrix *A* for further `Ax=b` solving.

 This constructor is a shortcut for the default constructor followed by a call to [compute()](classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914).

 
Warning
this class stores a reference to the matrix A as well as some precomputed values that depend on it. Therefore, if *A* is changed this class becomes invalid. Call [compute()](classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914) to update it with the new matrix A, or modify a copy of A. 
   

---

The documentation for this class was generated from the following file:* [LeastSquareConjugateGradient.h](https://eigen.tuxfamily.org/dox/LeastSquareConjugateGradient_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1LeastSquaresConjugateGradient.html>

Eigen::MapBase
==============

  
### template<typename Derived> class Eigen::MapBase< Derived, WriteAccessors >

 Base class for non-const dense [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") and [Block](classeigen_1_1block "Expression of a fixed-size or dynamic-size block.") expression with direct access. 

 This base class provides the non-const low-level accessors (e.g. coeff and coeffRef) of dense [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") and [Block](classeigen_1_1block "Expression of a fixed-size or dynamic-size block.") objects with direct access. It inherits [MapBase<Derived, ReadOnlyAccessors>](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4 "Base class for dense Map and Block expression with direct access.") which defines the const variant for reading specific entries.

 
See also
class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data."), class [Block](classeigen_1_1block "Expression of a fixed-size or dynamic-size block.") 
     ![Inheritance graph]      

|  |
| --- |
|  |
| - Public Member Functions inherited from [Eigen::MapBase< Derived, ReadOnlyAccessors >](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4) |
| const Scalar &  | [coeff](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#aea142bb9ac9aa1b8c6b44f413daa4b88) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) index) const |
|  |
| const Scalar &  | [coeff](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#a6d8ebb28996655c441d5d744ac227c8d) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rowId, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) colId) const |
|  |
| const Scalar &  | [coeffRef](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#a474a755c6699eeeb9fd4fc70c502cdec) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) index) const |
|  |
| const Scalar &  | [coeffRef](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#acaf91005e3230bbffe1c69a4199a0506) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rowId, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) colId) const |
|  |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [cols](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#adb0a19af0c52f9f36160abe0d2de67e1) () const EIGEN\_NOEXCEPT |
|  |
| const Scalar \*  | [data](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#a1bee30414766e9116a7abed067ca8007) () const |
|  |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [rows](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#abc334ba08270706556366d1cfbb05d95) () const EIGEN\_NOEXCEPT |
|  |

 

---

The documentation for this class was generated from the following file:* [MapBase.h](https://eigen.tuxfamily.org/dox/MapBase_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1MapBase_3_01Derived_00_01WriteAccessors_01_4.html>

Eigen::MappedSparseMatrix
=========================

  
### template<typename \_Scalar, int \_Flags, typename \_StorageIndex> class Eigen::MappedSparseMatrix< \_Scalar, \_Flags, \_StorageIndex >

 [Sparse](structeigen_1_1sparse) matrix. 

 
**[Deprecated:](deprecated#_deprecated000033)**
Use [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.")<SparseMatrix<> > 
 
Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the scalar type, i.e. the type of the coefficients |

   See <http://www.netlib.org/linalg/html_templates/node91.html> for details on the storage scheme. 

     ![Inheritance graph]      

|  |
| --- |
|  |
|  | [~MappedSparseMatrix](classeigen_1_1mappedsparsematrix#a0c36a53853f1659ea59447bcb9a20799) () |
|  |
| - Public Member Functions inherited from [Eigen::Map< SparseMatrix< \_Scalar, \_Flags, \_StorageIndex > >](classeigen_1_1map) |
|  | [Map](classeigen_1_1map#a43b3e84aba2ff1a241dbc3d177fb2e22) (PointerArgType dataPtr, const StrideType &stride=StrideType()) |
|  |
|  | [Map](classeigen_1_1map#a3f621386d55a373f53082ac62579897e) (PointerArgType dataPtr, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols, const StrideType &stride=StrideType()) |
|  |
|  | [Map](classeigen_1_1map#a52069afac76e3f609a6865106dc10254) (PointerArgType dataPtr, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, const StrideType &stride=StrideType()) |
|  |

  ~MappedSparseMatrix()
---------------------

    template<typename \_Scalar , int \_Flags, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::MappedSparseMatrix](classeigen_1_1mappedsparsematrix)< \_Scalar, \_Flags, \_StorageIndex >::~[MappedSparseMatrix](classeigen_1_1mappedsparsematrix) | ( |  | ) |  |

 | inline |

 
 Empty destructor 

   

---

The documentation for this class was generated from the following file:* [MappedSparseMatrix.h](https://eigen.tuxfamily.org/dox/MappedSparseMatrix_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1MappedSparseMatrix.html>

Eigen::IterativeSolverBase
==========================

  
### template<typename Derived> class Eigen::IterativeSolverBase< Derived >

 Base class for linear iterative solvers. 

 
See also
class [SimplicialCholesky](classeigen_1_1simplicialcholesky), [DiagonalPreconditioner](classeigen_1_1diagonalpreconditioner "A preconditioner based on the digonal entries."), [IdentityPreconditioner](classeigen_1_1identitypreconditioner "A naive preconditioner which approximates any matrix as the identity matrix.") 
     ![Inheritance graph]      

|  |
| --- |
|  |
| template<typename MatrixDerived >  |
| Derived &  | [analyzePattern](classeigen_1_1iterativesolverbase#a3f684fb41019ca04d97ddc08a0d8be2e) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| template<typename MatrixDerived >  |
| Derived &  | [compute](classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| RealScalar  | [error](classeigen_1_1iterativesolverbase#a117c241af3fb1141ad0916a3cf3157ec) () const |
|  |
| template<typename MatrixDerived >  |
| Derived &  | [factorize](classeigen_1_1iterativesolverbase#a1374b141721629983cd8276b4b87fc58) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1iterativesolverbase#a0d6b459433a316b4f12d48e5c80d61fe) () const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [iterations](classeigen_1_1iterativesolverbase#ae778dd098bd5e6655625b20b1e9f15da) () const |
|  |
|  | [IterativeSolverBase](classeigen_1_1iterativesolverbase#a0922f2be45082690d7734aa6732fc493) () |
|  |
| template<typename MatrixDerived >  |
|  | [IterativeSolverBase](classeigen_1_1iterativesolverbase#a3c68fe3cd929ea1ff8a0d4cbcd65ebad) (const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [maxIterations](classeigen_1_1iterativesolverbase#a168a74c8dceb6233b220031fdd756ba0) () const |
|  |
| Preconditioner &  | [preconditioner](classeigen_1_1iterativesolverbase#a5e88f2a323a2900205cf807af94f8051) () |
|  |
| const Preconditioner &  | [preconditioner](classeigen_1_1iterativesolverbase#a709a056e17c49b5272e4971bc376cbe4) () const |
|  |
| Derived &  | [setMaxIterations](classeigen_1_1iterativesolverbase#af83de7a7d31d9d4bd1fef6222b07335b) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) maxIters) |
|  |
| Derived &  | [setTolerance](classeigen_1_1iterativesolverbase#ac160a444af8998f93da9aa30e858470d) (const RealScalar &[tolerance](classeigen_1_1iterativesolverbase#acb442c19b5858d6b9be813dd7d36cc62)) |
|  |
| template<typename Rhs , typename Guess >  |
| const [SolveWithGuess](classeigen_1_1solvewithguess)< Derived, Rhs, Guess >  | [solveWithGuess](classeigen_1_1iterativesolverbase#adcc18d1ab283786dcbb5a3f63f4b4bd8) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b, const Guess &x0) const |
|  |
| RealScalar  | [tolerance](classeigen_1_1iterativesolverbase#acb442c19b5858d6b9be813dd7d36cc62) () const |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< Derived >](classeigen_1_1sparsesolverbase) |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

  IterativeSolverBase() [1/2]
---------------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::IterativeSolverBase](classeigen_1_1iterativesolverbase)< Derived >::[IterativeSolverBase](classeigen_1_1iterativesolverbase) | ( |  | ) |  |

 | inline |

 
 Default constructor. 

    IterativeSolverBase() [2/2]
---------------------------

    template<typename Derived >   template<typename MatrixDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::IterativeSolverBase](classeigen_1_1iterativesolverbase)< Derived >::[IterativeSolverBase](classeigen_1_1iterativesolverbase) | ( | const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &  | *A* | ) |  |

 | inlineexplicit |

 
 Initialize the solver with matrix *A* for further `Ax=b` solving.

 This constructor is a shortcut for the default constructor followed by a call to [compute()](classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914).

 
Warning
this class stores a reference to the matrix A as well as some precomputed values that depend on it. Therefore, if *A* is changed this class becomes invalid. Call [compute()](classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914) to update it with the new matrix A, or modify a copy of A. 
    analyzePattern()
----------------

    template<typename Derived >   template<typename MatrixDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::IterativeSolverBase](classeigen_1_1iterativesolverbase)< Derived >::analyzePattern  | ( | const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &  | *A* | ) |  |

 | inline |

 
 Initializes the iterative solver for the sparsity pattern of the matrix *A* for further solving `Ax=b` problems.

 Currently, this function mostly calls analyzePattern on the preconditioner. In the future we might, for instance, implement column reordering for faster matrix vector products. 

    compute()
---------

    template<typename Derived >   template<typename MatrixDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::IterativeSolverBase](classeigen_1_1iterativesolverbase)< Derived >::compute  | ( | const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &  | *A* | ) |  |

 | inline |

 
 Initializes the iterative solver with the matrix *A* for further solving `Ax=b` problems.

 Currently, this function mostly initializes/computes the preconditioner. In the future we might, for instance, implement column reordering for faster matrix vector products.

 
Warning
this class stores a reference to the matrix A as well as some precomputed values that depend on it. Therefore, if *A* is changed this class becomes invalid. Call [compute()](classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914) to update it with the new matrix A, or modify a copy of A. 
    error()
-------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::IterativeSolverBase](classeigen_1_1iterativesolverbase)< Derived >::error  | ( |  | ) |  const |

 | inline |

 
 
Returns
the tolerance error reached during the last solve. It is a close approximation of the true relative residual error |Ax-b|/|b|. 
    factorize()
-----------

    template<typename Derived >   template<typename MatrixDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::IterativeSolverBase](classeigen_1_1iterativesolverbase)< Derived >::factorize  | ( | const [EigenBase](structeigen_1_1eigenbase)< MatrixDerived > &  | *A* | ) |  |

 | inline |

 
 Initializes the iterative solver with the numerical values of the matrix *A* for further solving `Ax=b` problems.

 Currently, this function mostly calls factorize on the preconditioner.

 
Warning
this class stores a reference to the matrix A as well as some precomputed values that depend on it. Therefore, if *A* is changed this class becomes invalid. Call [compute()](classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914) to update it with the new matrix A, or modify a copy of A. 
    info()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::IterativeSolverBase](classeigen_1_1iterativesolverbase)< Derived >::info  | ( |  | ) |  const |

 | inline |

 
 
Returns
Success if the iterations converged, and NoConvergence otherwise. 
    iterations()
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::IterativeSolverBase](classeigen_1_1iterativesolverbase)< Derived >::iterations  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of iterations performed during the last solve 
    maxIterations()
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::IterativeSolverBase](classeigen_1_1iterativesolverbase)< Derived >::maxIterations  | ( |  | ) |  const |

 | inline |

 
 
Returns
the max number of iterations. It is either the value set by setMaxIterations or, by default, twice the number of columns of the matrix. 
    preconditioner() [1/2]
----------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Preconditioner& [Eigen::IterativeSolverBase](classeigen_1_1iterativesolverbase)< Derived >::preconditioner  | ( |  | ) |  |

 | inline |

 
 
Returns
a read-write reference to the preconditioner for custom configuration. 
    preconditioner() [2/2]
----------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const Preconditioner& [Eigen::IterativeSolverBase](classeigen_1_1iterativesolverbase)< Derived >::preconditioner  | ( |  | ) |  const |

 | inline |

 
 
Returns
a read-only reference to the preconditioner. 
    setMaxIterations()
------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::IterativeSolverBase](classeigen_1_1iterativesolverbase)< Derived >::setMaxIterations  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *maxIters* | ) |  |

 | inline |

 
 Sets the max number of iterations. Default is twice the number of columns of the matrix. 

    setTolerance()
--------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::IterativeSolverBase](classeigen_1_1iterativesolverbase)< Derived >::setTolerance  | ( | const RealScalar &  | *tolerance* | ) |  |

 | inline |

 
 Sets the tolerance threshold used by the stopping criteria.

 This value is used as an upper bound to the relative residual error: |Ax-b|/|b|. The default value is the machine precision given by NumTraits<Scalar>::epsilon() 

    solveWithGuess()
----------------

    template<typename Derived >   template<typename Rhs , typename Guess >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [SolveWithGuess](classeigen_1_1solvewithguess)<Derived, Rhs, Guess> [Eigen::IterativeSolverBase](classeigen_1_1iterativesolverbase)< Derived >::solveWithGuess  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &  | *b*,  |
|  |  | const Guess &  | *x0* |
|  | ) |  |  const |

 | inline |

 
 
Returns
the solution x of \( A x = b \) using the current decomposition of A and *x0* as an initial solution.
 
See also

[solve()](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f), [compute()](classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914) 
    tolerance()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::IterativeSolverBase](classeigen_1_1iterativesolverbase)< Derived >::tolerance  | ( |  | ) |  const |

 | inline |

 
 
Returns
the tolerance threshold used by the stopping criteria. 
 
See also

[setTolerance()](classeigen_1_1iterativesolverbase#ac160a444af8998f93da9aa30e858470d) 
   

---

The documentation for this class was generated from the following file:* [IterativeSolverBase.h](https://eigen.tuxfamily.org/dox/IterativeSolverBase_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1IterativeSolverBase.html>

Eigen::MapBase
==============

  
### template<typename Derived> class Eigen::MapBase< Derived, ReadOnlyAccessors >

 Base class for dense [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") and [Block](classeigen_1_1block "Expression of a fixed-size or dynamic-size block.") expression with direct access. 

 This base class provides the const low-level accessors (e.g. coeff, coeffRef) of dense [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") and [Block](classeigen_1_1block "Expression of a fixed-size or dynamic-size block.") objects with direct access. Typical users do not have to directly deal with this class.

 This class can be extended by through the macro plugin `EIGEN_MAPBASE_PLUGIN`. See [customizing Eigen](topiccustomizing_plugins)  for details.

 The `Derived` class has to provide the following two methods describing the memory layout: 



```
[Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) innerStride() const; 
```
 
```
[Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) outerStride() const; 

```


See also
class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data."), class [Block](classeigen_1_1block "Expression of a fixed-size or dynamic-size block.") 
     ![Inheritance graph]      

|  |
| --- |
|  |
| const Scalar &  | [coeff](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#aea142bb9ac9aa1b8c6b44f413daa4b88) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) index) const |
|  |
| const Scalar &  | [coeff](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#a6d8ebb28996655c441d5d744ac227c8d) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rowId, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) colId) const |
|  |
| const Scalar &  | [coeffRef](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#a474a755c6699eeeb9fd4fc70c502cdec) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) index) const |
|  |
| const Scalar &  | [coeffRef](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#acaf91005e3230bbffe1c69a4199a0506) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rowId, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) colId) const |
|  |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [cols](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#adb0a19af0c52f9f36160abe0d2de67e1) () const EIGEN\_NOEXCEPT |
|  |
| const Scalar \*  | [data](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#a1bee30414766e9116a7abed067ca8007) () const |
|  |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [rows](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#abc334ba08270706556366d1cfbb05d95) () const EIGEN\_NOEXCEPT |
|  |

  coeff() [1/2]
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const Scalar& Eigen::MapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::coeff  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *index* | ) |  const |

 | inline |

 
  This is an overloaded version of [DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.

 See [DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) for details. 

    coeff() [2/2]
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const Scalar& Eigen::MapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::coeff  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rowId*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *colId* |
|  | ) |  |  const |

 | inline |

 
  This is an overloaded version of [DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index,Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393) provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.

 See [DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index) const](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) for details. 

    coeffRef() [1/2]
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const Scalar& Eigen::MapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::coeffRef  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *index* | ) |  const |

 | inline |

 
  This is the const version of coeffRef(Index) which is thus synonym of coeff(Index). It is provided for convenience. 

    coeffRef() [2/2]
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const Scalar& Eigen::MapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::coeffRef  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rowId*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *colId* |
|  | ) |  |  const |

 | inline |

 
  This is the const version of coeffRef(Index,Index) which is thus synonym of coeff(Index,Index). It is provided for convenience. 

    cols()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) Eigen::MapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::cols  | ( | void  |  | ) |  const |

 | inline |

 
  
Returns
the number of columns. 
 
See also

[rows()](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#abc334ba08270706556366d1cfbb05d95), ColsAtCompileTime 
    data()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const Scalar\* Eigen::MapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::data  | ( |  | ) |  const |

 | inline |

 
 Returns a pointer to the first coefficient of the matrix or vector.

 
Note
When addressing this data, make sure to honor the strides returned by innerStride() and outerStride().
 
See also
innerStride(), outerStride() 
    rows()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) Eigen::MapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::rows  | ( | void  |  | ) |  const |

 | inline |

 
  
Returns
the number of rows. 
 
See also

[cols()](classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4#adb0a19af0c52f9f36160abe0d2de67e1), RowsAtCompileTime 
   

---

The documentation for this class was generated from the following file:* [MapBase.h](https://eigen.tuxfamily.org/dox/MapBase_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1MapBase_3_01Derived_00_01ReadOnlyAccessors_01_4.html>

Eigen::Sparse
=============

  
The type used to identify a general sparse storage. 

 


---

The documentation for this struct was generated from the following file:* [Constants.h](https://eigen.tuxfamily.org/dox/Constants_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/structEigen_1_1Sparse.html>

Eigen::MatrixXpr
================

  
The type used to identify a matrix expression 

 


---

The documentation for this struct was generated from the following file:* [Constants.h](https://eigen.tuxfamily.org/dox/Constants_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/structEigen_1_1MatrixXpr.html>

Eigen::MetisOrdering
====================

  
### template<typename StorageIndex> class Eigen::MetisOrdering< StorageIndex >

 Get the fill-reducing ordering from the METIS package

 If A is the original matrix and Ap is the permuted matrix, the fill-reducing permutation is defined as follows : Row (column) i of A is the matperm(i) row (column) of Ap. WARNING: As computed by METIS, this corresponds to the vector iperm (instead of perm) 

 


---

The documentation for this class was generated from the following file:* [MetisSupport.h](https://eigen.tuxfamily.org/dox/MetisSupport_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1MetisOrdering.html>

Eigen::NaturalOrdering
======================

  
### template<typename StorageIndex> class Eigen::NaturalOrdering< StorageIndex >

 Functor computing the natural ordering (identity)

 
Note
Returns an empty permutation matrix 
 
Template Parameters
 

|  |  |
| --- | --- |
| StorageIndex | The type of indices of the matrix  |

   


|  |
| --- |
|  |
| template<typename MatrixType >  |
| void  | [operator()](classeigen_1_1naturalordering#aa39e772105ed66da9e909f2a9385be37) (const MatrixType &, [PermutationType](classeigen_1_1permutationmatrix) &perm) |
|  |

  operator()()
------------

    template<typename StorageIndex >   template<typename MatrixType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::NaturalOrdering](classeigen_1_1naturalordering)< StorageIndex >::operator()  | ( | const MatrixType &  | ,  |
|  |  | [PermutationType](classeigen_1_1permutationmatrix) &  | *perm* |
|  | ) |  |  |

 | inline |

 
 Compute the permutation vector from a column-major sparse matrix 

   

---

The documentation for this class was generated from the following file:* [Ordering.h](https://eigen.tuxfamily.org/dox/Ordering_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1NaturalOrdering.html>

Eigen::NestByValue
==================

  
### template<typename ExpressionType> class Eigen::NestByValue< ExpressionType >

 Expression which must be nested by value. 

 
Template Parameters
 

|  |  |
| --- | --- |
| ExpressionType | the type of the object of which we are requiring nesting-by-value |

   This class is the return type of [MatrixBase::nestByValue()](classeigen_1_1densebase#a3e2761e2b6da74dba1d17b40cc918bf7) and most of the time this is the only way it is used.

 
See also

[MatrixBase::nestByValue()](classeigen_1_1densebase#a3e2761e2b6da74dba1d17b40cc918bf7) 
  Inherits internal::dense\_xpr\_base::type.

 

---

The documentation for this class was generated from the following file:* [NestByValue.h](https://eigen.tuxfamily.org/dox/NestByValue_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1NestByValue.html>

Eigen::NoAlias
==============

  
### template<typename ExpressionType, template< typename > class StorageBase> class Eigen::NoAlias< ExpressionType, StorageBase >

 Pseudo expression providing an operator = assuming no aliasing. 

 
Template Parameters
 

|  |  |
| --- | --- |
| ExpressionType | the type of the object on which to do the lazy assignment |

   This class represents an expression with special assignment operators assuming no aliasing between the target expression and the source expression. More precisely it alloas to bypass the EvalBeforeAssignBit flag of the source expression. It is the return type of [MatrixBase::noalias()](classeigen_1_1matrixbase#a2c1085de7645f23f240876388457da0b) and most of the time this is the only way it is used.

 
See also

[MatrixBase::noalias()](classeigen_1_1matrixbase#a2c1085de7645f23f240876388457da0b) 
 


---

The documentation for this class was generated from the following file:* [NoAlias.h](https://eigen.tuxfamily.org/dox/NoAlias_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1NoAlias.html>

Eigen::NumTraits
================

  
### template<typename T> class Eigen::NumTraits< T >

 Holds information about the various numeric (i.e. scalar) types allowed by [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."). 

 
Template Parameters
 

|  |  |
| --- | --- |
| T | the numeric type at hand |

   This class stores enums, typedefs and static methods giving information about a numeric type.

 The provided data consists of: 


* A typedef `Real`, giving the "real part" type of *T*. If *T* is already real, then `Real` is just a typedef to *T*. If *T* is `std::complex<U>` then `Real` is a typedef to *U*.
* A typedef `NonInteger`, giving the type that should be used for operations producing non-integral values, such as quotients, square roots, etc. If *T* is a floating-point type, then this typedef just gives *T* again. Note however that many [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") functions such as internal::sqrt simply refuse to take integers. Outside of a few cases, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") doesn't do automatic type promotion. Thus, this typedef is only intended as a helper for code that needs to explicitly promote types.
* A typedef `Literal` giving the type to use for numeric literals such as "2" or "0.5". For instance, for `std::complex<U>`, Literal is defined as `U`. Of course, this type must be fully compatible with *T*. In doubt, just use *T* here.
* A typedef *Nested* giving the type to use to nest a value inside of the expression tree. If you don't know what this means, just use *T* here.
* An enum value *IsComplex*. It is equal to 1 if *T* is a `std::complex` type, and to 0 otherwise.
* An enum value *IsInteger*. It is equal to `1` if *T* is an integer type such as `int`, and to `0` otherwise.
* Enum values ReadCost, AddCost and MulCost representing a rough estimate of the number of CPU cycles needed to by move / add / mul instructions respectively, assuming the data is already stored in CPU registers. Stay vague here. No need to do architecture-specific stuff. If you don't know what this means, just use `[Eigen::HugeCost](namespaceeigen#a3163430a1c13173faffde69016b48aaf)`.
* An enum value *IsSigned*. It is equal to `1` if *T* is a signed type and to 0 if *T* is unsigned.
* An enum value *RequireInitialization*. It is equal to `1` if the constructor of the numeric type *T* must be called, and to 0 if it is safe not to call it. Default is 0 if *T* is an arithmetic type, and 1 otherwise.
* An epsilon() function which, unlike [std::numeric\_limits::epsilon()](http://en.cppreference.com/w/cpp/types/numeric_limits/epsilon), it returns a *Real* instead of a *T*.
* A dummy\_precision() function returning a weak epsilon value. It is mainly used as a default value by the fuzzy comparison operators.
* highest() and lowest() functions returning the highest and lowest possible values respectively.
* digits() function returning the number of radix digits (non-sign digits for integers, mantissa for floating-point). This is the analogue of [std::numeric\_limits<T>::digits](http://en.cppreference.com/w/cpp/types/numeric_limits/digits) which is used as the default implementation if specialized.
* digits10() function returning the number of decimal digits that can be represented without change. This is the analogue of [std::numeric\_limits<T>::digits10](http://en.cppreference.com/w/cpp/types/numeric_limits/digits10) which is used as the default implementation if specialized.
* min\_exponent() and max\_exponent() functions returning the highest and lowest possible values, respectively, such that the radix raised to the power exponent-1 is a normalized floating-point number. These are equivalent to [std::numeric\_limits<T>::min\_exponent](http://en.cppreference.com/w/cpp/types/numeric_limits/min_exponent)/ [std::numeric\_limits<T>::max\_exponent](http://en.cppreference.com/w/cpp/types/numeric_limits/max_exponent).
* infinity() function returning a representation of positive infinity, if available.
* quiet\_NaN function returning a non-signaling "not-a-number", if available.

  Inherits Eigen::GenericNumTraits< T >.

 

---

The documentation for this class was generated from the following file:* [NumTraits.h](https://eigen.tuxfamily.org/dox/NumTraits_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/structEigen_1_1NumTraits.html>

Eigen::OuterStride
==================

  
### template<int Value> class Eigen::OuterStride< Value >

 Convenience specialization of [Stride](classeigen_1_1stride "Holds strides information for Map.") to specify only an outer stride See class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") for some examples. 

     ![Inheritance graph]      

|  |
| --- |
|  |
| - Public Types inherited from [Eigen::Stride< Value, 0 >](classeigen_1_1stride) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) |
|  |
| - Public Member Functions inherited from [Eigen::Stride< Value, 0 >](classeigen_1_1stride) |
| EIGEN\_CONSTEXPR [Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) | [inner](classeigen_1_1stride#ab827ee701f5ccbd8f9bdeb32497df572) () const |
|  |
| EIGEN\_CONSTEXPR [Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) | [outer](classeigen_1_1stride#a010ffe25388932a6c83c6d9d95b95442) () const |
|  |
|  | [Stride](classeigen_1_1stride#ae3f37b08ff44d2afe971c0894c2f44a5) () |
|  |
|  | [Stride](classeigen_1_1stride#aa9bb1a33da8c785d9cc4ad5d799b9253) (const [Stride](classeigen_1_1stride) &other) |
|  |
|  | [Stride](classeigen_1_1stride#a81e299d9d2f8bbfc6d240705dabe5833) ([Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) outerStride, [Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63) innerStride) |
|  |

 

---

The documentation for this class was generated from the following file:* [Stride.h](https://eigen.tuxfamily.org/dox/Stride_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1OuterStride.html>

Eigen::Map
==========

  
### template<typename \_Scalar, int \_Options> class Eigen::Map< const Quaternion< \_Scalar >, \_Options >

 [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") expression mapping a constant memory buffer. 

 
Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the type of the [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") coefficients  |
| \_Options | see class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") |

   This is a specialization of class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") for [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations."). This class allows to view a 4 scalar memory buffer as an [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") object.

 
See also
class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data."), class [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations."), class [QuaternionBase](classeigen_1_1quaternionbase "Base class for quaternion expressions.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
|  | [Map](classeigen_1_1map_3_01const_01quaternion_3_01__scalar_01_4_00_01__options_01_4#a62785b607c1f24dfc042e28dedc791f8) (const Scalar \*coeffs) |
|  |
| - Public Member Functions inherited from [Eigen::QuaternionBase< Map< const Quaternion< \_Scalar >, \_Options > >](classeigen_1_1quaternionbase) |
| [Vector3](classeigen_1_1quaternionbase#a974c0529d55983b0b3a6d99a8466f331) | [\_transformVector](classeigen_1_1quaternionbase#aabef1f6fc62535f6f85d590108915ee8) (const [Vector3](classeigen_1_1quaternionbase#a974c0529d55983b0b3a6d99a8466f331) &v) const |
|  |
| internal::traits< [Map](classeigen_1_1map)< const [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > >::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [angularDistance](classeigen_1_1quaternionbase#a74f13d7c853484996494c26c633ae02a) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| internal::cast\_return\_type< [Map](classeigen_1_1map)< const [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options >, [Quaternion](classeigen_1_1quaternion)< NewScalarType > >::type  | [cast](classeigen_1_1quaternionbase#a951d627764be63ca1e8c2c4c7315e43f) () const |
|  |
| internal::traits< [Map](classeigen_1_1map)< const [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > >::Coefficients &  | [coeffs](classeigen_1_1quaternionbase#ae61294790c0cc308d3f69690a657672c) () |
|  |
| const internal::traits< [Map](classeigen_1_1map)< const [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > >::Coefficients &  | [coeffs](classeigen_1_1quaternionbase#a193e79f616335a0067e3e784c7cf85fa) () const |
|  |
| [Quaternion](classeigen_1_1quaternion)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [conjugate](classeigen_1_1quaternionbase#a5e63b775d0a93161ce6137ec0a17f6b0) () const |
|  |
| [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [dot](classeigen_1_1quaternionbase#aa2d22c5b321c9539dd625ca415422236) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| [Quaternion](classeigen_1_1quaternion)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [inverse](classeigen_1_1quaternionbase#ab12ee41b3b06adc3062217a795a6a9f5) () const |
|  |
| bool  | [isApprox](classeigen_1_1quaternionbase#a64bc41c96a9e99567e0f8409f8f0f680) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >::dummy\_precision()) const |
|  |
| [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [norm](classeigen_1_1quaternionbase#aad4b1faef1eabdc7fdd4d305e9881149) () const |
|  |
| void  | [normalize](classeigen_1_1quaternionbase#a7a487a8a129b46be562f42044102c1f8) () |
|  |
| [Quaternion](classeigen_1_1quaternion)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [normalized](classeigen_1_1quaternionbase#ade799f18b7ec19c02ddae3a4921fa8a0) () const |
|  |
| bool  | [operator!=](classeigen_1_1quaternionbase#a530edf22f03853cd07ba829ea0d505dc) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| [Quaternion](classeigen_1_1quaternion)< typename internal::traits< [Map](classeigen_1_1map)< const [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > >::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [operator\*](classeigen_1_1quaternionbase#afdf1dc395c1cff6716ec9b80fd15b414) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| [Map](classeigen_1_1map)< const [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > &  | [operator\*=](classeigen_1_1quaternionbase#afd8ee6b6420fbdd22fab7cd016212441) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &q) |
|  |
| [Map](classeigen_1_1map)< const [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > &  | [operator=](classeigen_1_1quaternionbase#aa7c114c6e62a37d4fc53b6e82ed78eac) (const [AngleAxisType](classeigen_1_1quaternionbase#aed266c63b10a4028304901d9c8614199) &aa) |
|  |
| [Map](classeigen_1_1map)< const [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > &  | [operator=](classeigen_1_1quaternionbase#a20a6702c9da3fc2950178d920d0aaf84) (const [MatrixBase](classeigen_1_1matrixbase)< MatrixDerived > &xpr) |
|  |
| bool  | [operator==](classeigen_1_1quaternionbase#ad206c9014409c06970884dbfc00e6c3c) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| [Map](classeigen_1_1map)< const [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > &  | [setFromTwoVectors](classeigen_1_1quaternionbase#a7ae84bfbcc9f3f19f10294496a836bee) (const [MatrixBase](classeigen_1_1matrixbase)< Derived1 > &a, const [MatrixBase](classeigen_1_1matrixbase)< Derived2 > &b) |
|  |
| [QuaternionBase](classeigen_1_1quaternionbase) &  | [setIdentity](classeigen_1_1quaternionbase#a4695b0f6eebfb217ae2fbd579ceda24a) () |
|  |
| [Quaternion](classeigen_1_1quaternion)< typename internal::traits< [Map](classeigen_1_1map)< const [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > >::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [slerp](classeigen_1_1quaternionbase#ac840bde67d22f2deca330561c65d144e) (const [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) &t, const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [squaredNorm](classeigen_1_1quaternionbase#a09730db4ef0b546f5cf29f6b180b3c87) () const |
|  |
| [Matrix3](classeigen_1_1quaternionbase#ac3972e6cb0f56cccbe9e3946a7e494f8) | [toRotationMatrix](classeigen_1_1quaternionbase#a8cf07ab9875baba2eecdd62ff93bfc3f) () const |
|  |
| [VectorBlock](classeigen_1_1vectorblock)< Coefficients, 3 >  | [vec](classeigen_1_1quaternionbase#a91f93bde88f52796cfcd92c3594f39e5) () |
|  |
| const [VectorBlock](classeigen_1_1vectorblock)< const Coefficients, 3 >  | [vec](classeigen_1_1quaternionbase#ada8bdb403471df23511bdc0f227962ea) () const |
|  |
| NonConstCoeffReturnType  | [w](classeigen_1_1quaternionbase#ad884cf20a0b0b92bb63ab3fe9d6d6b7f) () |
|  |
| CoeffReturnType  | [w](classeigen_1_1quaternionbase#ab5eae91bedac0afaab0074cec5e535bc) () const |
|  |
| NonConstCoeffReturnType  | [x](classeigen_1_1quaternionbase#a8b05bac2a1c099b341396f725e85f3b1) () |
|  |
| CoeffReturnType  | [x](classeigen_1_1quaternionbase#afdd8e260d5de861a6136cb9e6ceaa4b4) () const |
|  |
| NonConstCoeffReturnType  | [y](classeigen_1_1quaternionbase#a6005245a72520df258d30af6b5448595) () |
|  |
| CoeffReturnType  | [y](classeigen_1_1quaternionbase#aad37efca5d9fde3f4cb03a208f38d74f) () const |
|  |
| NonConstCoeffReturnType  | [z](classeigen_1_1quaternionbase#a9afed6a7fa4fcdfbe599d7b5b207fc1b) () |
|  |
| CoeffReturnType  | [z](classeigen_1_1quaternionbase#a8389b65a61aa3fc76d3ba4bd4a63e529) () const |
|  |
| - Public Member Functions inherited from [Eigen::RotationBase< Derived, \_Dim >](classeigen_1_1rotationbase) |
| Derived  | [inverse](classeigen_1_1rotationbase#a8532fb716ea4267cf8bbdb99e5e54837) () const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [matrix](classeigen_1_1rotationbase#a91b5bdb1c7b90ec7b33107c6f7d3b171) () const |
|  |
| template<typename OtherDerived >  |
| internal::rotation\_base\_generic\_product\_selector< Derived, OtherDerived, OtherDerived::IsVectorAtCompileTime >::ReturnType  | [operator\*](classeigen_1_1rotationbase#a09a4757e7aff7a95bebf4fa8a965a4eb) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &e) const |
|  |
| template<int Mode, int Options>  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Mode >  | [operator\*](classeigen_1_1rotationbase#aaca1c3d834e2bc7ebfd046d96cac990c) (const [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Mode, Options > &t) const |
|  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, [Isometry](group__enums#ggaee59a86102f150923b0cac6d4ff05107a84413028615d2d718bafd2dfb93dafef) >  | [operator\*](classeigen_1_1rotationbase#a26d0603783666526a98d08bd45d9c751) (const [Translation](classeigen_1_1translation)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim > &t) const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [operator\*](classeigen_1_1rotationbase#a05af64a1bc759c5fed4ff7afd1414ba4) (const [UniformScaling](classeigen_1_1uniformscaling)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) > &s) const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [toRotationMatrix](classeigen_1_1rotationbase#a94fe3683c867c39d34505932b07e956a) () const |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::QuaternionBase< Map< const Quaternion< \_Scalar >, \_Options > >](classeigen_1_1quaternionbase) |
| typedef [AngleAxis](classeigen_1_1angleaxis)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [AngleAxisType](classeigen_1_1quaternionbase#aed266c63b10a4028304901d9c8614199) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), 3, 3 >  | [Matrix3](classeigen_1_1quaternionbase#ac3972e6cb0f56cccbe9e3946a7e494f8) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), 3, 1 >  | [Vector3](classeigen_1_1quaternionbase#a974c0529d55983b0b3a6d99a8466f331) |
|  |
| - Public Types inherited from [Eigen::RotationBase< Derived, \_Dim >](classeigen_1_1rotationbase) |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Dim >  | [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) |
|  |
| typedef internal::traits< Derived >::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) |
|  |
| - Static Public Member Functions inherited from [Eigen::QuaternionBase< Map< const Quaternion< \_Scalar >, \_Options > >](classeigen_1_1quaternionbase) |
| static [Quaternion](classeigen_1_1quaternion)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [Identity](classeigen_1_1quaternionbase#a6f31a6f98016f186515b3277f4757962) () |
|  |

  Map()
-----

    template<typename \_Scalar , int \_Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Map](classeigen_1_1map)< const [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options >::[Map](classeigen_1_1map) | ( | const Scalar \*  | *coeffs* | ) |  |

 | inlineexplicit |

 
 Constructs a Mapped [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") object from the pointer *coeffs* 

 The pointer *coeffs* must reference the four coefficients of [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") in the following order: 



```
*coeffs == {[x](classeigen_1_1quaternionbase#afdd8e260d5de861a6136cb9e6ceaa4b4), [y](classeigen_1_1quaternionbase#aad37efca5d9fde3f4cb03a208f38d74f), [z](classeigen_1_1quaternionbase#a8389b65a61aa3fc76d3ba4bd4a63e529), [w](classeigen_1_1quaternionbase#ab5eae91bedac0afaab0074cec5e535bc)} 
```

If the template parameter \_Options is set to [Aligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ae12d0f8f869c40c76128260af2242bc8), then the pointer coeffs must be aligned. 

   

---

The documentation for this class was generated from the following file:* [Quaternion.h](https://eigen.tuxfamily.org/dox/Quaternion_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Map_3_01const_01Quaternion_3_01__Scalar_01_4_00_01__Options_01_4.html>

Eigen::Map
==========

  
### template<typename \_Scalar, int \_Options> class Eigen::Map< Quaternion< \_Scalar >, \_Options >

 Expression of a quaternion from a memory buffer. 

 
Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the type of the [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") coefficients  |
| \_Options | see class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") |

   This is a specialization of class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") for [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations."). This class allows to view a 4 scalar memory buffer as an [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") object.

 
See also
class [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data."), class [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations."), class [QuaternionBase](classeigen_1_1quaternionbase "Base class for quaternion expressions.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
|  | [Map](classeigen_1_1map_3_01quaternion_3_01__scalar_01_4_00_01__options_01_4#a225f365e99258e028ef1ffa0031fab9b) (Scalar \*coeffs) |
|  |
| - Public Member Functions inherited from [Eigen::QuaternionBase< Map< Quaternion< \_Scalar >, \_Options > >](classeigen_1_1quaternionbase) |
| [Vector3](classeigen_1_1quaternionbase#a974c0529d55983b0b3a6d99a8466f331) | [\_transformVector](classeigen_1_1quaternionbase#aabef1f6fc62535f6f85d590108915ee8) (const [Vector3](classeigen_1_1quaternionbase#a974c0529d55983b0b3a6d99a8466f331) &v) const |
|  |
| internal::traits< [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > >::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [angularDistance](classeigen_1_1quaternionbase#a74f13d7c853484996494c26c633ae02a) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| internal::cast\_return\_type< [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options >, [Quaternion](classeigen_1_1quaternion)< NewScalarType > >::type  | [cast](classeigen_1_1quaternionbase#a951d627764be63ca1e8c2c4c7315e43f) () const |
|  |
| internal::traits< [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > >::Coefficients &  | [coeffs](classeigen_1_1quaternionbase#ae61294790c0cc308d3f69690a657672c) () |
|  |
| const internal::traits< [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > >::Coefficients &  | [coeffs](classeigen_1_1quaternionbase#a193e79f616335a0067e3e784c7cf85fa) () const |
|  |
| [Quaternion](classeigen_1_1quaternion)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [conjugate](classeigen_1_1quaternionbase#a5e63b775d0a93161ce6137ec0a17f6b0) () const |
|  |
| [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [dot](classeigen_1_1quaternionbase#aa2d22c5b321c9539dd625ca415422236) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| [Quaternion](classeigen_1_1quaternion)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [inverse](classeigen_1_1quaternionbase#ab12ee41b3b06adc3062217a795a6a9f5) () const |
|  |
| bool  | [isApprox](classeigen_1_1quaternionbase#a64bc41c96a9e99567e0f8409f8f0f680) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >::dummy\_precision()) const |
|  |
| [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [norm](classeigen_1_1quaternionbase#aad4b1faef1eabdc7fdd4d305e9881149) () const |
|  |
| void  | [normalize](classeigen_1_1quaternionbase#a7a487a8a129b46be562f42044102c1f8) () |
|  |
| [Quaternion](classeigen_1_1quaternion)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [normalized](classeigen_1_1quaternionbase#ade799f18b7ec19c02ddae3a4921fa8a0) () const |
|  |
| bool  | [operator!=](classeigen_1_1quaternionbase#a530edf22f03853cd07ba829ea0d505dc) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| [Quaternion](classeigen_1_1quaternion)< typename internal::traits< [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > >::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [operator\*](classeigen_1_1quaternionbase#afdf1dc395c1cff6716ec9b80fd15b414) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > &  | [operator\*=](classeigen_1_1quaternionbase#afd8ee6b6420fbdd22fab7cd016212441) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &q) |
|  |
| [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > &  | [operator=](classeigen_1_1quaternionbase#aa7c114c6e62a37d4fc53b6e82ed78eac) (const [AngleAxisType](classeigen_1_1quaternionbase#aed266c63b10a4028304901d9c8614199) &aa) |
|  |
| [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > &  | [operator=](classeigen_1_1quaternionbase#a20a6702c9da3fc2950178d920d0aaf84) (const [MatrixBase](classeigen_1_1matrixbase)< MatrixDerived > &xpr) |
|  |
| bool  | [operator==](classeigen_1_1quaternionbase#ad206c9014409c06970884dbfc00e6c3c) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > &  | [setFromTwoVectors](classeigen_1_1quaternionbase#a7ae84bfbcc9f3f19f10294496a836bee) (const [MatrixBase](classeigen_1_1matrixbase)< Derived1 > &a, const [MatrixBase](classeigen_1_1matrixbase)< Derived2 > &b) |
|  |
| [QuaternionBase](classeigen_1_1quaternionbase) &  | [setIdentity](classeigen_1_1quaternionbase#a4695b0f6eebfb217ae2fbd579ceda24a) () |
|  |
| [Quaternion](classeigen_1_1quaternion)< typename internal::traits< [Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options > >::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [slerp](classeigen_1_1quaternionbase#ac840bde67d22f2deca330561c65d144e) (const [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) &t, const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [squaredNorm](classeigen_1_1quaternionbase#a09730db4ef0b546f5cf29f6b180b3c87) () const |
|  |
| [Matrix3](classeigen_1_1quaternionbase#ac3972e6cb0f56cccbe9e3946a7e494f8) | [toRotationMatrix](classeigen_1_1quaternionbase#a8cf07ab9875baba2eecdd62ff93bfc3f) () const |
|  |
| [VectorBlock](classeigen_1_1vectorblock)< Coefficients, 3 >  | [vec](classeigen_1_1quaternionbase#a91f93bde88f52796cfcd92c3594f39e5) () |
|  |
| const [VectorBlock](classeigen_1_1vectorblock)< const Coefficients, 3 >  | [vec](classeigen_1_1quaternionbase#ada8bdb403471df23511bdc0f227962ea) () const |
|  |
| NonConstCoeffReturnType  | [w](classeigen_1_1quaternionbase#ad884cf20a0b0b92bb63ab3fe9d6d6b7f) () |
|  |
| CoeffReturnType  | [w](classeigen_1_1quaternionbase#ab5eae91bedac0afaab0074cec5e535bc) () const |
|  |
| NonConstCoeffReturnType  | [x](classeigen_1_1quaternionbase#a8b05bac2a1c099b341396f725e85f3b1) () |
|  |
| CoeffReturnType  | [x](classeigen_1_1quaternionbase#afdd8e260d5de861a6136cb9e6ceaa4b4) () const |
|  |
| NonConstCoeffReturnType  | [y](classeigen_1_1quaternionbase#a6005245a72520df258d30af6b5448595) () |
|  |
| CoeffReturnType  | [y](classeigen_1_1quaternionbase#aad37efca5d9fde3f4cb03a208f38d74f) () const |
|  |
| NonConstCoeffReturnType  | [z](classeigen_1_1quaternionbase#a9afed6a7fa4fcdfbe599d7b5b207fc1b) () |
|  |
| CoeffReturnType  | [z](classeigen_1_1quaternionbase#a8389b65a61aa3fc76d3ba4bd4a63e529) () const |
|  |
| - Public Member Functions inherited from [Eigen::RotationBase< Derived, \_Dim >](classeigen_1_1rotationbase) |
| Derived  | [inverse](classeigen_1_1rotationbase#a8532fb716ea4267cf8bbdb99e5e54837) () const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [matrix](classeigen_1_1rotationbase#a91b5bdb1c7b90ec7b33107c6f7d3b171) () const |
|  |
| template<typename OtherDerived >  |
| internal::rotation\_base\_generic\_product\_selector< Derived, OtherDerived, OtherDerived::IsVectorAtCompileTime >::ReturnType  | [operator\*](classeigen_1_1rotationbase#a09a4757e7aff7a95bebf4fa8a965a4eb) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &e) const |
|  |
| template<int Mode, int Options>  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Mode >  | [operator\*](classeigen_1_1rotationbase#aaca1c3d834e2bc7ebfd046d96cac990c) (const [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Mode, Options > &t) const |
|  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, [Isometry](group__enums#ggaee59a86102f150923b0cac6d4ff05107a84413028615d2d718bafd2dfb93dafef) >  | [operator\*](classeigen_1_1rotationbase#a26d0603783666526a98d08bd45d9c751) (const [Translation](classeigen_1_1translation)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim > &t) const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [operator\*](classeigen_1_1rotationbase#a05af64a1bc759c5fed4ff7afd1414ba4) (const [UniformScaling](classeigen_1_1uniformscaling)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) > &s) const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [toRotationMatrix](classeigen_1_1rotationbase#a94fe3683c867c39d34505932b07e956a) () const |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::QuaternionBase< Map< Quaternion< \_Scalar >, \_Options > >](classeigen_1_1quaternionbase) |
| typedef [AngleAxis](classeigen_1_1angleaxis)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [AngleAxisType](classeigen_1_1quaternionbase#aed266c63b10a4028304901d9c8614199) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), 3, 3 >  | [Matrix3](classeigen_1_1quaternionbase#ac3972e6cb0f56cccbe9e3946a7e494f8) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), 3, 1 >  | [Vector3](classeigen_1_1quaternionbase#a974c0529d55983b0b3a6d99a8466f331) |
|  |
| - Public Types inherited from [Eigen::RotationBase< Derived, \_Dim >](classeigen_1_1rotationbase) |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Dim >  | [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) |
|  |
| typedef internal::traits< Derived >::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) |
|  |
| - Static Public Member Functions inherited from [Eigen::QuaternionBase< Map< Quaternion< \_Scalar >, \_Options > >](classeigen_1_1quaternionbase) |
| static [Quaternion](classeigen_1_1quaternion)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) >  | [Identity](classeigen_1_1quaternionbase#a6f31a6f98016f186515b3277f4757962) () |
|  |

  Map()
-----

    template<typename \_Scalar , int \_Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Map](classeigen_1_1map)< [Quaternion](classeigen_1_1quaternion)< \_Scalar >, \_Options >::[Map](classeigen_1_1map) | ( | Scalar \*  | *coeffs* | ) |  |

 | inlineexplicit |

 
 Constructs a Mapped [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") object from the pointer *coeffs* 

 The pointer *coeffs* must reference the four coefficients of [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") in the following order: 



```
*coeffs == {[x](classeigen_1_1quaternionbase#afdd8e260d5de861a6136cb9e6ceaa4b4), [y](classeigen_1_1quaternionbase#aad37efca5d9fde3f4cb03a208f38d74f), [z](classeigen_1_1quaternionbase#a8389b65a61aa3fc76d3ba4bd4a63e529), [w](classeigen_1_1quaternionbase#ab5eae91bedac0afaab0074cec5e535bc)} 
```

If the template parameter \_Options is set to [Aligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ae12d0f8f869c40c76128260af2242bc8), then the pointer coeffs must be aligned. 

   

---

The documentation for this class was generated from the following file:* [Quaternion.h](https://eigen.tuxfamily.org/dox/Quaternion_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Map_3_01Quaternion_3_01__Scalar_01_4_00_01__Options_01_4.html>

Eigen::PardisoLDLT
==================

  
### template<typename MatrixType, int Options> class Eigen::PardisoLDLT< MatrixType, Options >

 A sparse direct Cholesky ([LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.")) factorization and solver based on the PARDISO library. 

 This class allows to solve for A.X = B sparse linear problems via a LDL^T Cholesky factorization using the Intel MKL PARDISO library. The sparse matrix A is assumed to be selfajoint and positive definite. For complex matrices, A can also be symmetric only, see the *Options* template parameter. The vectors or matrices X and B can be either dense or sparse.

 By default, it runs in in-core mode. To enable PARDISO's out-of-core feature, set: 



```
solver.pardisoParameterArray()[59] = 1; 

```


Template Parameters
 

|  |  |
| --- | --- |
| MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<>  |
| Options | can be any bitwise combination of Upper, Lower, and Symmetric. The default is Upper, meaning only the upper triangular part has to be used. Symmetric can be used for symmetric, non-selfadjoint complex matrices, the default being to assume a selfadjoint matrix. Upper|Lower can be used to tell both triangular parts can be used as input. |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 
See also

[Sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept), class [SimplicialLDLT](classeigen_1_1simplicialldlt "A direct sparse LDLT Cholesky factorizations without square root.") 
  Inherits Eigen::PardisoImpl< Derived >.

 

---

The documentation for this class was generated from the following file:* [PardisoSupport.h](https://eigen.tuxfamily.org/dox/PardisoSupport_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1PardisoLDLT.html>

Eigen::PardisoLLT
=================

  
### template<typename MatrixType, int \_UpLo> class Eigen::PardisoLLT< MatrixType, \_UpLo >

 A sparse direct Cholesky ([LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.")) factorization and solver based on the PARDISO library. 

 This class allows to solve for A.X = B sparse linear problems via a LL^T Cholesky factorization using the Intel MKL PARDISO library. The sparse matrix A must be selfajoint and positive definite. The vectors or matrices X and B can be either dense or sparse.

 By default, it runs in in-core mode. To enable PARDISO's out-of-core feature, set: 



```
solver.pardisoParameterArray()[59] = 1; 

```


Template Parameters
 

|  |  |
| --- | --- |
| MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<>  |
| UpLo | can be any bitwise combination of Upper, Lower. The default is Upper, meaning only the upper triangular part has to be used. Upper|Lower can be used to tell both triangular parts can be used as input. |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 
See also

[Sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept), class [SimplicialLLT](classeigen_1_1simplicialllt "A direct sparse LLT Cholesky factorizations.") 
  Inherits Eigen::PardisoImpl< Derived >.

 

---

The documentation for this class was generated from the following file:* [PardisoSupport.h](https://eigen.tuxfamily.org/dox/PardisoSupport_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1PardisoLLT.html>

Eigen::PardisoLU
================

  
### template<typename MatrixType> class Eigen::PardisoLU< MatrixType >

 A sparse direct LU factorization and solver based on the PARDISO library. 

 This class allows to solve for A.X = B sparse linear problems via a direct LU factorization using the Intel MKL PARDISO library. The sparse matrix A must be squared and invertible. The vectors or matrices X and B can be either dense or sparse.

 By default, it runs in in-core mode. To enable PARDISO's out-of-core feature, set: 



```
solver.pardisoParameterArray()[59] = 1; 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<> |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 
See also

[Sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept), class [SparseLU](classeigen_1_1sparselu "Sparse supernodal LU factorization for general matrices.") 
  Inherits Eigen::PardisoImpl< Derived >.

 

|  |
| --- |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1pardisolu#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1pardisolu#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |

  solve() [1/2]
-------------

    template<typename MatrixType >   template<typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Solve](classeigen_1_1solve)<Derived, Rhs> [Eigen::SparseSolverBase](classeigen_1_1sparsesolverbase)< Derived >::solve  | ( | typename Rhs  |  | ) |  |

 | inline |

 
 
Returns
an expression of the solution x of \( A x = b \) using the current decomposition of A.
 
See also
compute() 
    solve() [2/2]
-------------

    template<typename MatrixType >   template<typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Solve](classeigen_1_1solve)<Derived, Rhs> [Eigen::SparseSolverBase](classeigen_1_1sparsesolverbase)< Derived >::solve  | ( | typename Rhs  |  | ) |  |

 | inline |

 
 
Returns
an expression of the solution x of \( A x = b \) using the current decomposition of A.
 
See also
compute() 
   

---

The documentation for this class was generated from the following file:* [PardisoSupport.h](https://eigen.tuxfamily.org/dox/PardisoSupport_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1PardisoLU.html>

Eigen::PartialReduxExpr
=======================

  
### template<typename MatrixType, typename MemberOp, int Direction> class Eigen::PartialReduxExpr< MatrixType, MemberOp, Direction >

 Generic expression of a partially reduxed matrix. 

 
Template Parameters
 

|  |  |
| --- | --- |
| MatrixType | the type of the matrix we are applying the redux operation  |
| MemberOp | type of the member functor  |
| Direction | indicates the direction of the redux ([Vertical](group__enums#ggad49a7b3738e273eb00932271b36127f7ae2efac6e74ecab5e3b0b1561c5ddf83e) or [Horizontal](group__enums#ggad49a7b3738e273eb00932271b36127f7a961c62410157b64033839488f4d7f7e4)) |

   This class represents an expression of a partial redux operator of a matrix. It is the return type of some [VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations.") functions, and most of the time this is the only way it is used.

 
See also
class [VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations.") 
  Inherits internal::dense\_xpr\_base::type, and Eigen::internal::no\_assignment\_operator.

 

---

The documentation for this class was generated from the following file:* [VectorwiseOp.h](https://eigen.tuxfamily.org/dox/VectorwiseOp_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1PartialReduxExpr.html>

Eigen::MatrixBase
=================

  
### template<typename Derived> class Eigen::MatrixBase< Derived >

 Base class for all dense matrices, vectors, and expressions. 

 This class is the base that is inherited by all matrix, vector, and related expression types. Most of the [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") API is contained in this class, and its base classes. Other important classes for the [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") API are [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."), and [VectorwiseOp](classeigen_1_1vectorwiseop "Pseudo expression providing broadcasting and partial reduction operations.").

 Note that some methods are defined in other modules such as the [LU module](group__lu__module) LU module for all functions related to matrix inversions.

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | is the derived type, e.g. a matrix type, or an expression, etc. |

   When writing a function taking [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") objects as argument, if you want your function to take as argument any matrix, vector, or expression, just let it take a [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") argument. As an example, here is a function printFirstRow which, given a matrix, vector, or expression *x*, prints the first row of *x*.

 
```
template<typename Derived>
void printFirstRow(const [Eigen::MatrixBase<Derived>](classeigen_1_1matrixbase)& [x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000))
{
  cout << [x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000).row(0) << endl;
}
```

This class can be extended with the help of the plugin mechanism described on the page [Extending MatrixBase (and other classes)](topiccustomizing_plugins) by defining the preprocessor symbol `EIGEN_MATRIXBASE_PLUGIN`.

 
See also

[The class hierarchy](topicclasshierarchy) 
     ![Inheritance graph]             

|  |
| --- |
|  |
| const MatrixFunctionReturnValue< Derived >  | [acosh](classeigen_1_1matrixbase#a765140ddee0c6b39bbfa3b8917de67be) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise inverse hyperbolic cosine use ArrayBase::acosh . [More...](classeigen_1_1matrixbase#a765140ddee0c6b39bbfa3b8917de67be) |
|  |
| const AdjointReturnType  | [adjoint](classeigen_1_1matrixbase#afacca1f88da57e5cd87dd07c8ff926bb) () const |
|  |
| void  | [adjointInPlace](classeigen_1_1matrixbase#a51c5982c1f64e45a939515b701fa6f4a) () |
|  |
| template<typename EssentialPart >  |
| void  | [applyHouseholderOnTheLeft](classeigen_1_1matrixbase#a8f2c8059ef3f04cfa0c73b4c012db855) (const EssentialPart &essential, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &tau, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*workspace) |
|  |
| template<typename EssentialPart >  |
| void  | [applyHouseholderOnTheRight](classeigen_1_1matrixbase#ab3e52262b41fa40e194dda245e0f9675) (const EssentialPart &essential, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &tau, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*workspace) |
|  |
| template<typename OtherDerived >  |
| void  | [applyOnTheLeft](classeigen_1_1matrixbase#a3a08ad41e81d8ad4a37b5d5c7490e765) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| template<typename OtherScalar >  |
| void  | [applyOnTheLeft](classeigen_1_1matrixbase#ae669131f6e18f7e8f06fae271754f435) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) p, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) q, const [JacobiRotation](classeigen_1_1jacobirotation)< OtherScalar > &j) |
|  |
| template<typename OtherDerived >  |
| void  | [applyOnTheRight](classeigen_1_1matrixbase#a45d91752925d2757fc8058a293b15462) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| template<typename OtherScalar >  |
| void  | [applyOnTheRight](group__jacobi__module#gaa07f741c86219601664433777827bf1c) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) p, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) q, const [JacobiRotation](classeigen_1_1jacobirotation)< OtherScalar > &j) |
|  |
| [ArrayWrapper](classeigen_1_1arraywrapper)< Derived >  | [array](classeigen_1_1matrixbase#a354c33eec32ceb4193d002f4d41c0497) () |
|  |
| const [ArrayWrapper](classeigen_1_1arraywrapper)< const Derived >  | [array](classeigen_1_1matrixbase#a72f287fe7b2a7e7a66d16cc88166d47f) () const |
|  |
| const [DiagonalWrapper](classeigen_1_1diagonalwrapper)< const Derived >  | [asDiagonal](classeigen_1_1matrixbase#a14235b62c90f93fe910070b4743782d0) () const |
|  |
| const MatrixFunctionReturnValue< Derived >  | [asinh](classeigen_1_1matrixbase#a8efaf691d9c74b362a43b1b793706ea1) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise inverse hyperbolic sine use ArrayBase::asinh . [More...](classeigen_1_1matrixbase#a8efaf691d9c74b362a43b1b793706ea1) |
|  |
| const MatrixFunctionReturnValue< Derived >  | [atanh](classeigen_1_1matrixbase#ab87d29c00e6d75aeab43eff53bf5164c) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise inverse hyperbolic cosine use ArrayBase::atanh . [More...](classeigen_1_1matrixbase#ab87d29c00e6d75aeab43eff53bf5164c) |
|  |
| [BDCSVD](classeigen_1_1bdcsvd)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [bdcSvd](classeigen_1_1matrixbase#ae171b74b5d530846ee0836135ffcf837) (unsigned int computationOptions=0) const |
|  |
| RealScalar  | [blueNorm](classeigen_1_1matrixbase#a3f3faa00163c16824ff03e58a210c74c) () const |
|  |
| const [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [colPivHouseholderQr](classeigen_1_1matrixbase#adee8c19c833245bbb00a591dce68e8a4) () const |
|  |
| const [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [completeOrthogonalDecomposition](classeigen_1_1matrixbase#ae90b6846f05bd30b8d52b66e427e3e09) () const |
|  |
| template<typename ResultType >  |
| void  | [computeInverseAndDetWithCheck](classeigen_1_1matrixbase#a7baaf2fdec0191a2166cf9fd84a2dcb2) (ResultType &[inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf), typename ResultType::Scalar &[determinant](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061), bool &invertible, const RealScalar &absDeterminantThreshold=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename ResultType >  |
| void  | [computeInverseWithCheck](classeigen_1_1matrixbase#a116f3b50d2af7dbdf7473e517a5b8b0f) (ResultType &[inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf), bool &invertible, const RealScalar &absDeterminantThreshold=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| const MatrixFunctionReturnValue< Derived >  | [cos](classeigen_1_1matrixbase#a34d626eb756bbeb4069d1eb0e6494c65) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise cosine use ArrayBase::cos . [More...](classeigen_1_1matrixbase#a34d626eb756bbeb4069d1eb0e6494c65) |
|  |
| const MatrixFunctionReturnValue< Derived >  | [cosh](classeigen_1_1matrixbase#a627e6f11bf5854ade9a5abfc344c0367) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise hyperbolic cosine use ArrayBase::cosh . [More...](classeigen_1_1matrixbase#a627e6f11bf5854ade9a5abfc344c0367) |
|  |
| template<typename OtherDerived >  |
| [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [cross](group__geometry__module#ga0024b44eca99cb7135887c2aaf319d28) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| template<typename OtherDerived >  |
| [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [cross3](group__geometry__module#gabde56e2a0baba550815a0b05139e4d42) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [determinant](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) () const |
|  |
| [DiagonalReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3) () |
|  |
| [ConstDiagonalReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1matrixbase#aebdeedcf67e46d969c556c6c7d9780ee) () const |
|  |
| [DiagonalDynamicIndexReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1matrixbase#a8a13d4b8efbd7797ee8efd3dd988a7f7) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| [ConstDiagonalDynamicIndexReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1matrixbase#aed11a711c0a3d5dbf8bc094008e29846) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [diagonalSize](classeigen_1_1matrixbase#ab79e511b9322b8b801858e253fb257eb) () const |
|  |
| template<typename OtherDerived >  |
| [ScalarBinaryOpTraits](structeigen_1_1scalarbinaryoptraits)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), typename internal::traits< OtherDerived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::ReturnType  | [dot](classeigen_1_1matrixbase#adfd32bf5fcf6ee603c924dde9bf7bc39) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| EigenvaluesReturnType  | [eigenvalues](classeigen_1_1matrixbase#a30430fa3d5b4e74d312fd4f502ac984d) () const |
|  | Computes the eigenvalues of a matrix. [More...](classeigen_1_1matrixbase#a30430fa3d5b4e74d312fd4f502ac984d) |
|  |
| [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), 3, 1 >  | [eulerAngles](group__geometry__module#ga17994d2e81b723295f5bc3b1f862ed3b) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) a0, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) a1, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) a2) const |
|  |
| const MatrixExponentialReturnValue< Derived >  | [exp](classeigen_1_1matrixbase#a70901e189e876f64d7f3fee1dbe942cc) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise exponential use ArrayBase::exp . [More...](classeigen_1_1matrixbase#a70901e189e876f64d7f3fee1dbe942cc) |
|  |
| Derived &  | [forceAlignedAccess](classeigen_1_1matrixbase#afdaf810ac1708ca6d6ecdcfac1e06699) () |
|  |
| const Derived &  | [forceAlignedAccess](classeigen_1_1matrixbase#ad2fdb842d9a715f8778d0b33c29cfe49) () const |
|  |
| template<bool Enable>  |
| internal::conditional< Enable, [ForceAlignedAccess](classeigen_1_1forcealignedaccess)< Derived >, Derived & >::type  | [forceAlignedAccessIf](classeigen_1_1matrixbase#ae35213d1dd4dd13ebe9a7a762d6bb847) () |
|  |
| template<bool Enable>  |
| internal::add\_const\_on\_value\_type< typename internal::conditional< Enable, [ForceAlignedAccess](classeigen_1_1forcealignedaccess)< Derived >, Derived & >::type >::type  | [forceAlignedAccessIf](classeigen_1_1matrixbase#af42d92f115d4b8fa3d5aa731ed496ed1) () const |
|  |
| const [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [fullPivHouseholderQr](classeigen_1_1matrixbase#a863bc0e06b641a089508eabec6835ab2) () const |
|  |
| const [FullPivLU](classeigen_1_1fullpivlu)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [fullPivLu](classeigen_1_1matrixbase#a25da97d31acab0ee5d9d13bdbb0569da) () const |
|  |
| const HNormalizedReturnType  | [hnormalized](group__geometry__module#gadc0e3dd3510cb5a6e70aca9aab1cbf19) () const |
|  | homogeneous normalization [More...](group__geometry__module#gadc0e3dd3510cb5a6e70aca9aab1cbf19) |
|  |
| [HomogeneousReturnType](classeigen_1_1homogeneous) | [homogeneous](group__geometry__module#gaf3229c2d3669e983075ab91f7f480cb1) () const |
|  |
| const [HouseholderQR](classeigen_1_1householderqr)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [householderQr](classeigen_1_1matrixbase#a9a9377aab1cea26db5f25bab7e682f8f) () const |
|  |
| RealScalar  | [hypotNorm](classeigen_1_1matrixbase#a32222d3b6677e6cdf0b801463f329b72) () const |
|  |
| const [Inverse](classeigen_1_1inverse)< Derived >  | [inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf) () const |
|  |
| bool  | [isDiagonal](classeigen_1_1matrixbase#a97027ea54c8cd1ddb1c578fee5cedc67) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isIdentity](classeigen_1_1matrixbase#a4ccbd8dfa06e9d47b9bf84711f8b9d40) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isLowerTriangular](classeigen_1_1matrixbase#a1e96c42d79a56f0a6ade30ce031e17eb) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename OtherDerived >  |
| bool  | [isOrthogonal](classeigen_1_1matrixbase#aefdc8e4e4c156fdd79a21479e75dcd8a) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isUnitary](classeigen_1_1matrixbase#a8a7ee34ce202cac3eeea9cf20c9e4833) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isUpperTriangular](classeigen_1_1matrixbase#aae3ec1660bb4ac584220481c54ab4a64) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| [JacobiSVD](classeigen_1_1jacobisvd)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [jacobiSvd](classeigen_1_1matrixbase#a5745dca9c54390633b434e54a1d1eedd) (unsigned int computationOptions=0) const |
|  |
| template<typename OtherDerived >  |
| const [Product](classeigen_1_1product)< Derived, OtherDerived, LazyProduct >  | [lazyProduct](classeigen_1_1matrixbase#ae0c280b1066c14ed577021f38876527f) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| const [LDLT](classeigen_1_1ldlt)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [ldlt](classeigen_1_1matrixbase#a0ecf058a0727a4cab8b42d79e95072e1) () const |
|  |
| const [LLT](classeigen_1_1llt)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [llt](classeigen_1_1matrixbase#a90c45f7a30265df792d5aeaddead2635) () const |
|  |
| const MatrixLogarithmReturnValue< Derived >  | [log](classeigen_1_1matrixbase#a4dc57b319fc1cf8c9035016e56602a7d) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise logarithm use ArrayBase::log . [More...](classeigen_1_1matrixbase#a4dc57b319fc1cf8c9035016e56602a7d) |
|  |
| template<int p>  |
| RealScalar  | [lpNorm](classeigen_1_1matrixbase#a72586ab059e889e7d2894ff227747e35) () const |
|  |
| const [PartialPivLU](classeigen_1_1partialpivlu)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [lu](classeigen_1_1matrixbase#afb312afbfe960cbda67811552d876fae) () const |
|  |
| template<typename EssentialPart >  |
| void  | [makeHouseholder](classeigen_1_1matrixbase#a13291e900f7e81ddc6e5b8802f82092b) (EssentialPart &essential, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &tau, RealScalar &beta) const |
|  |
| void  | [makeHouseholderInPlace](classeigen_1_1matrixbase#aebf4bac7dffe2685ab93734fb776e817) ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &tau, RealScalar &beta) |
|  |
|  const MatrixFunctionReturnValue< Derived >  | [matrixFunction](classeigen_1_1matrixbase#a1a6cc9f734eb175e785a1118305245fc) (StemFunction f) const |
|  | Helper function for the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module).  |
|  |
| [NoAlias](classeigen_1_1noalias)< Derived, [Eigen::MatrixBase](classeigen_1_1matrixbase) >  | [noalias](classeigen_1_1matrixbase#a2c1085de7645f23f240876388457da0b) () |
|  |
| RealScalar  | [norm](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975) () const |
|  |
| void  | [normalize](classeigen_1_1matrixbase#ad16303c47ba36f7a41ea264cb26bceb6) () |
|  |
| const [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [normalized](classeigen_1_1matrixbase#a5cf2fd4c57e59604fd4116158fd34308) () const |
|  |
| template<typename OtherDerived >  |
| bool  | [operator!=](classeigen_1_1matrixbase#a028c7ac8094d610042fd0f9feca68f63) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| template<typename DiagonalDerived >  |
| const [Product](classeigen_1_1product)< Derived, DiagonalDerived, LazyProduct >  | [operator\*](classeigen_1_1matrixbase#a36fb95c37f0a454e0e2e5cb120b2df7f) (const DiagonalBase< DiagonalDerived > &[diagonal](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3)) const |
|  |
| template<typename OtherDerived >  |
| const [Product](classeigen_1_1product)< Derived, OtherDerived >  | [operator\*](classeigen_1_1matrixbase#ae2d220efbf7047f0894787888288cfcc) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator\*=](classeigen_1_1matrixbase#a3783b6168995ca117a1c19fea3630ac4) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator+=](classeigen_1_1matrixbase#a983cc3be0bbe11b3d041a415b76ce010) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator-=](classeigen_1_1matrixbase#a1042124b0ddee66e78ac7b0a9ac4cc9c) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) |
|  |
| Derived &  | [operator=](classeigen_1_1matrixbase#a373bf62ad398162df5a71963ed7cbeff) (const [MatrixBase](classeigen_1_1matrixbase) &other) |
|  |
| template<typename OtherDerived >  |
| bool  | [operator==](classeigen_1_1matrixbase#a80e3e1e83fdf43f9f7fb6ff51836b24d) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| RealScalar  | [operatorNorm](classeigen_1_1matrixbase#a0ff9bc0b9bea2d0822a2bf3192783102) () const |
|  | Computes the L2 operator norm. [More...](classeigen_1_1matrixbase#a0ff9bc0b9bea2d0822a2bf3192783102) |
|  |
| const [PartialPivLU](classeigen_1_1partialpivlu)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [partialPivLu](classeigen_1_1matrixbase#a6199d8aaf26c1b8ac3097fdfa7733a1e) () const |
|  |
| const MatrixPowerReturnValue< Derived >  | [pow](classeigen_1_1matrixbase#a7ae6c25e6a94a60e147741e76203a73b) (const RealScalar &p) const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise power to `p` use [ArrayBase::pow](classeigen_1_1arraybase#a5df3d99d47747b72d61f235c9fb925e3) . [More...](classeigen_1_1matrixbase#a7ae6c25e6a94a60e147741e76203a73b) |
|  |
| const MatrixComplexPowerReturnValue< Derived >  | [pow](classeigen_1_1matrixbase#a91dcacf224bd8b18346914bdf7eefc31) (const std::complex< RealScalar > &p) const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise power to `p` use [ArrayBase::pow](classeigen_1_1arraybase#a5df3d99d47747b72d61f235c9fb925e3) . [More...](classeigen_1_1matrixbase#a91dcacf224bd8b18346914bdf7eefc31) |
|  |
| template<unsigned int UpLo>  |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::template SelfAdjointViewReturnType< UpLo >::Type  | [selfadjointView](classeigen_1_1matrixbase#ad446541377593656c1399862fe6a0f94) () |
|  |
| template<unsigned int UpLo>  |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::template ConstSelfAdjointViewReturnType< UpLo >::Type  | [selfadjointView](classeigen_1_1matrixbase#a67eb836f331d9b567e7f36ec0782fa07) () const |
|  |
| Derived &  | [setIdentity](classeigen_1_1matrixbase#a18e969adfdf2db4ac44c47fbdc854683) () |
|  |
| Derived &  | [setIdentity](classeigen_1_1matrixbase#a97dec020729928e328fe8ae9aad1e99e) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  | Resizes to the given size, and writes the identity expression (not necessarily square) into \*this. [More...](classeigen_1_1matrixbase#a97dec020729928e328fe8ae9aad1e99e) |
|  |
| Derived &  | [setUnit](classeigen_1_1matrixbase#ac7cf3e0e69550d36de8778b09a645afd) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) i) |
|  | Set the coefficients of `*this` to the i-th unit (basis) vector. [More...](classeigen_1_1matrixbase#ac7cf3e0e69550d36de8778b09a645afd) |
|  |
| Derived &  | [setUnit](classeigen_1_1matrixbase#a90bed3b6468a17a9054b07cde7a751a6) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) newSize, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) i) |
|  | Resizes to the given *newSize*, and writes the i-th unit (basis) vector into \*this. [More...](classeigen_1_1matrixbase#a90bed3b6468a17a9054b07cde7a751a6) |
|  |
| const MatrixFunctionReturnValue< Derived >  | [sin](classeigen_1_1matrixbase#a02f4ff0fcbbae2f3ccaa5981e8ad5e34) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise sine use ArrayBase::sin . [More...](classeigen_1_1matrixbase#a02f4ff0fcbbae2f3ccaa5981e8ad5e34) |
|  |
| const MatrixFunctionReturnValue< Derived >  | [sinh](classeigen_1_1matrixbase#a9c37eab2dc7baf83809269254c9129e0) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise hyperbolic sine use ArrayBase::sinh . [More...](classeigen_1_1matrixbase#a9c37eab2dc7baf83809269254c9129e0) |
|  |
| const [SparseView](classeigen_1_1sparseview)< Derived >  | [sparseView](group__sparsecore__module#ga320dd291cbf4339c6118c41521b75350) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &m\_reference=[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)(0), const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real &m\_epsilon=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| const MatrixSquareRootReturnValue< Derived >  | [sqrt](classeigen_1_1matrixbase#ad873dca860bd47baeeede8663e161b83) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise square root use ArrayBase::sqrt . [More...](classeigen_1_1matrixbase#ad873dca860bd47baeeede8663e161b83) |
|  |
| RealScalar  | [squaredNorm](classeigen_1_1matrixbase#ac8da566526419f9742a6c471bbd87e0a) () const |
|  |
| RealScalar  | [stableNorm](classeigen_1_1matrixbase#ab84d3e64f855813b1eea4202c0697dc1) () const |
|  |
| void  | [stableNormalize](classeigen_1_1matrixbase#a0b1443fa322615379557ade3399a3c3c) () |
|  |
| const [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [stableNormalized](classeigen_1_1matrixbase#a399dca938633b9f8df5ec4beefeccec0) () const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [trace](classeigen_1_1matrixbase#a544b609f65eb2bd3e368b3fc2d79479e) () const |
|  |
| template<unsigned int Mode>  |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::template TriangularViewReturnType< Mode >::Type  | [triangularView](classeigen_1_1matrixbase#a56665aa894f49f2765291fee0eaeb9c6) () |
|  |
| template<unsigned int Mode>  |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::template ConstTriangularViewReturnType< Mode >::Type  | [triangularView](classeigen_1_1matrixbase#aa044521145e74117ad1df42460d7b520) () const |
|  |
| [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [unitOrthogonal](group__geometry__module#gaa0dc2c32a9379eeb2b4c4a05c1a6fe52) (void) const |
|  |
| - Public Member Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| bool  | [all](classeigen_1_1densebase#ae42ab60296c120e9f45ce3b44e1761a4) () const |
|  |
| bool  | [allFinite](classeigen_1_1densebase#af1e669fd3aaae50a4870dc1b8f3b8884) () const |
|  |
| bool  | [any](classeigen_1_1densebase#abfbf4cb72dd577e62fbe035b1c53e695) () const |
|  |
| [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) | [begin](classeigen_1_1densebase#a57591454af931f9dffa71c9da28d5641) () |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [begin](classeigen_1_1densebase#ad9368ce70b06167ec5fc19398d329f5e) () const |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [cbegin](classeigen_1_1densebase#ae9a3dfd9b826ba3103de0128576fb15b) () const |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [cend](classeigen_1_1densebase#aeb3b76f02986c2af2521d07164b5ffde) () const |
|  |
| [ColwiseReturnType](classeigen_1_1vectorwiseop) | [colwise](classeigen_1_1densebase#a1c0e1b6067ec1de6cb8799da55aa7d30) () |
|  |
| [ConstColwiseReturnType](classeigen_1_1vectorwiseop) | [colwise](classeigen_1_1densebase#a58837c81de446efbdb58da07b73a63c1) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [count](classeigen_1_1densebase#a229be090c665b9bf7d1fcdfd1ab6e0c1) () const |
|  |
| [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) | [end](classeigen_1_1densebase#ae71d079e16d91360d10066b316b48485) () |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [end](classeigen_1_1densebase#ab34773522e43bfb02e9cf652d7b5dd60) () const |
|  |
| EvalReturnType  | [eval](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b) () const |
|  |
| void  | [fill](classeigen_1_1densebase#a9be169c308801411aa24be93d30930bf) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| template<unsigned int Added, unsigned int Removed>  |
| EIGEN\_DEPRECATED const Derived &  | [flagged](classeigen_1_1densebase#a9b3f75f76ae40439be870258e80c7346) () const |
|  |
| const [WithFormat](classeigen_1_1withformat)< Derived >  | [format](classeigen_1_1densebase#ab231f1a6057f28d4244145e12c9fc0c7) (const [IOFormat](structeigen_1_1ioformat) &fmt) const |
|  |
| bool  | [hasNaN](classeigen_1_1densebase#ab13d158c900560d3e1b25d85d2d33dd6) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1densebase#a58ca41d9635a8ab3c5a268ef3f7f0d75) () const |
|  |
| template<typename OtherDerived >  |
| bool  | [isApprox](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isApproxToConstant](classeigen_1_1densebase#af9b150d48bc5e4366887ccb466e40c6b) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isConstant](classeigen_1_1densebase#a1ca84e4179b3e5081ed11d89bbd9e74f) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename OtherDerived >  |
| bool  | [isMuchSmallerThan](classeigen_1_1densebase#a3c4db0c6dd974fa88bbb58b2cf3d5664) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename Derived >  |
| bool  | [isMuchSmallerThan](classeigen_1_1densebase#adfca6ff4e473f68fbbeabbd03b7504a9) (const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real &other, const RealScalar &prec) const |
|  |
| bool  | [isOnes](classeigen_1_1densebase#aa56d6b4477cd3c92a9cf42f4b96e47c2) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isZero](classeigen_1_1densebase#af36014ec300f53a65083057ed4e89822) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| template<typename OtherDerived >  |
| EIGEN\_DEPRECATED Derived &  | [lazyAssign](classeigen_1_1densebase#a6bc6c096e3bfc726f28315daecd21b3f) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<int NaNPropagation>  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1) () const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#aced8ffda52ff061b6586ace2657ebf30) (IndexType \*index) const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#a3780b7a9cd184d0b4f3ea797eba9e2b3) (IndexType \*row, IndexType \*col) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [mean](classeigen_1_1densebase#a21ac6c0419a72ad7a88ea0bc189017d7) () const |
|  |
| template<int NaNPropagation>  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#a0739f9c868c331031c7810e21838dcb2) () const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#ac9265f4f91430b9cc75d63fb6865bb29) (IndexType \*index) const |
|  |
| template<int NaNPropagation, typename IndexType >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#aa28152ba4a42b2d112e5fec5469ec4c1) (IndexType \*row, IndexType \*col) const |
|  |
| const [NestByValue](classeigen_1_1nestbyvalue)< Derived >  | [nestByValue](classeigen_1_1densebase#a3e2761e2b6da74dba1d17b40cc918bf7) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1densebase#acb8d5574eff335381e7441ade87700a0) () const |
|  |
| template<typename OtherDerived >  |
| [CommaInitializer](structeigen_1_1commainitializer)< Derived >  | [operator<<](classeigen_1_1densebase#a0f0e34696162b34762b2bf4bd948f90c) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| [CommaInitializer](structeigen_1_1commainitializer)< Derived >  | [operator<<](classeigen_1_1densebase#a0e575eb0ba6cc6bc5f347872abd8509d) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &s) |
|  |
| Derived &  | [operator=](classeigen_1_1densebase#a5281dadff89f46eef719b38e5d073a8f) (const [DenseBase](classeigen_1_1densebase) &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator=](classeigen_1_1densebase#ab66155169d20c035e80d521a8b918e97) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator=](classeigen_1_1densebase#a58915510693d64164e567bd762e1032f) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  | Copies the generic expression *other* into \*this. [More...](classeigen_1_1densebase#a58915510693d64164e567bd762e1032f) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1densebase#a03f71699bc26ca2ee4e42ec4538862d7) () const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [prod](classeigen_1_1densebase#af119d9a4efe5a15cd83c1ccdf01b3a4f) () const |
|  |
| template<typename Func >  |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [redux](classeigen_1_1densebase#a63ce1e4fab36bff43bbadcdd06a67724) (const Func &func) const |
|  |
| template<int RowFactor, int ColFactor>  |
| const [Replicate](classeigen_1_1replicate)< Derived, RowFactor, ColFactor >  | [replicate](classeigen_1_1densebase#a60dadfe80b813d808e91e4521c722a8e) () const |
|  |
| const [Replicate](classeigen_1_1replicate)< Derived, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) >  | [replicate](classeigen_1_1densebase#afae2d5e36f1158d1b1681dac3cdbd58e) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rowFactor, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) colFactor) const |
|  |
| void  | [resize](classeigen_1_1densebase#a2ec5bac4e1ab95808808ef50ccf4cb39) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) newSize) |
|  |
| void  | [resize](classeigen_1_1densebase#a25e2b4887b47b1f2346857d1931efa0f) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| [ReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1densebase#a38ea394036d8b096abf322469c80198f) () |
|  |
| [ConstReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1densebase#a9e2f3ac4019184abf95ca0e1a8d82866) () const |
|  |
| void  | [reverseInPlace](classeigen_1_1densebase#adb8045155ea45f7961fc2a5170e1d921) () |
|  |
| [RowwiseReturnType](classeigen_1_1vectorwiseop) | [rowwise](classeigen_1_1densebase#a6daa3a3156ca0e0722bf78638e1c7f28) () |
|  |
| [ConstRowwiseReturnType](classeigen_1_1vectorwiseop) | [rowwise](classeigen_1_1densebase#aa1cabd3404528fe8cec4bab43d74bffc) () const |
|  |
| template<typename ThenDerived , typename ElseDerived >  |
| const [Select](classeigen_1_1select)< Derived, ThenDerived, ElseDerived >  | [select](classeigen_1_1densebase#a65e78cfcbc9852e6923bebff4323ddca) (const [DenseBase](classeigen_1_1densebase)< ThenDerived > &thenMatrix, const [DenseBase](classeigen_1_1densebase)< ElseDerived > &elseMatrix) const |
|  |
| template<typename ThenDerived >  |
| const [Select](classeigen_1_1select)< Derived, ThenDerived, typename ThenDerived::ConstantReturnType >  | [select](classeigen_1_1densebase#a57ef09a843004095f84c198dd145641b) (const [DenseBase](classeigen_1_1densebase)< ThenDerived > &thenMatrix, const typename ThenDerived::Scalar &elseScalar) const |
|  |
| template<typename ElseDerived >  |
| const [Select](classeigen_1_1select)< Derived, typename ElseDerived::ConstantReturnType, ElseDerived >  | [select](classeigen_1_1densebase#a9e8e78c75887d4539071a0b7a61ca103) (const typename ElseDerived::Scalar &thenScalar, const [DenseBase](classeigen_1_1densebase)< ElseDerived > &elseMatrix) const |
|  |
| Derived &  | [setConstant](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| Derived &  | [setLinSpaced](classeigen_1_1densebase#aeb023532476d3f14c457367e0eb5f3f1) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#aeb023532476d3f14c457367e0eb5f3f1) |
|  |
| Derived &  | [setLinSpaced](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a) |
|  |
| Derived &  | [setOnes](classeigen_1_1densebase#a250ef1b827e748f3f898fb2e55cb96e2) () |
|  |
| Derived &  | [setRandom](classeigen_1_1densebase#ac476e5852129ba32beaa1a8a3d7ee0db) () |
|  |
| Derived &  | [setZero](classeigen_1_1densebase#af230a143de50695d2d1fae93db7e4dcb) () |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [sum](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c) () const |
|  |
| template<typename OtherDerived >  |
| void  | [swap](classeigen_1_1densebase#af9e7e4305fdb7781f2b2f05fa801f21e) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| void  | [swap](classeigen_1_1densebase#a44e25adc6da9cd1d79f4c5bd7c1819cb) ([PlainObjectBase](classeigen_1_1plainobjectbase)< OtherDerived > &other) |
|  |
| [TransposeReturnType](classeigen_1_1transpose) | [transpose](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1densebase#a38c0b074cf93fc194bf91141287cee3f) () const |
|  |
| void  | [transposeInPlace](classeigen_1_1densebase#ac501bd942994af7a95d95bee7a16ad2a) () |
|  |
| CoeffReturnType  | [value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0) () const |
|  |
| template<typename Visitor >  |
| void  | [visit](classeigen_1_1densebase#a4225b90fcc74f18dd479b401124b3841) (Visitor &func) const |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, DirectWriteAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [colStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#af1bac522aee4402639189f387592000b) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a4e94e17926e1cf597deb2928e779cef6) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#abb333f6f10467f6f8d7b59c213dea49e) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rowStride](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a63bc5874eb4e320e54eb079b43b49d22) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, WriteAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4) |
| Scalar &  | [coeffRef](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae66b7d18b2a85f3139b703126974c900) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| Scalar &  | [coeffRef](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#adc8286576b31e11f056057be666a0ec8) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| Scalar &  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a0171eee1d9e582d1ac7ec0f18f5f615a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| Scalar &  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae6ba07bad9e3026afe54806fdefe32bb) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| Scalar &  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#aa2040f14e60fed1a4a68ca7f042e1bbf) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| Scalar &  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af683e04b3926aaf4091581ca24ca09ad) () |
|  |
| Scalar &  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af163a982f5a7ad7e5c3336990b3d7000) () |
|  |
| Scalar &  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#afeaa80359bf0c1311f91cdd74a2042a8) () |
|  |
| Scalar &  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#a858151a06b8c0ff407232d84e695dd73) () |
|  |
| - Public Member Functions inherited from [Eigen::DenseCoeffsBase< Derived, ReadOnlyAccessors >](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4) |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#aa7231d519967c37b4f98002d80756bda) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [coeff](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af9fadc22d12e48c82745dad534a1671a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| CoeffReturnType  | [operator()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ab3dbba4a15d0fe90185d2900e5ef0fd1) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| CoeffReturnType  | [operator[]](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a496672306836589fa04a6ab33cb0cf2a) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) index) const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |
| CoeffReturnType  | [w](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a926f52a94f038db63c6b9103f98dcf0f) () const |
|  |
| CoeffReturnType  | [x](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a189c80109e76752b598d60dfcdab329e) () const |
|  |
| CoeffReturnType  | [y](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a0c6d6904a37805ce47a3238fbd735963) () const |
|  |
| CoeffReturnType  | [z](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#a7c60c97282d4a0f8bca16ef75e231ddb) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| static const IdentityReturnType  | [Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f) () |
|  |
| static const IdentityReturnType  | [Identity](classeigen_1_1matrixbase#acf33ce20ef03ead47cb3dbcd5f416ede) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const BasisReturnType  | [Unit](classeigen_1_1matrixbase#a9daf6d22d10ed8ae00432b0f641455df) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) i) |
|  |
| static const BasisReturnType  | [Unit](classeigen_1_1matrixbase#ac7a03a61014f37ddd2fe61ebac0c9539) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) i) |
|  |
| static const BasisReturnType  | [UnitW](classeigen_1_1matrixbase#af56ba94e5b0330827003eadd26cfadc2) () |
|  |
| static const BasisReturnType  | [UnitX](classeigen_1_1matrixbase#a8a555b7cf626cced54670b98668c4e6d) () |
|  |
| static const BasisReturnType  | [UnitY](classeigen_1_1matrixbase#a00850083489e20249b1d05b394fc5efc) () |
|  |
| static const BasisReturnType  | [UnitZ](classeigen_1_1matrixbase#aabdcdeff1c822a5465fcbe1f78e5afe0) () |
|  |
| - Static Public Member Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#a1fdd3189ae3a41d250593334d82210cf) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#ad8098aa5971139a5585e623dddbea860) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#ad8098aa5971139a5585e623dddbea860) |
|  |
| static const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) |
|  |
| static EIGEN\_DEPRECATED const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#ac8cfbd436a8c9fc50defee5946451176) (Sequential\_t, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| static EIGEN\_DEPRECATED const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d) (Sequential\_t, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a5dc65501accd02c30f7c1840c2a30a41) (const CustomNullaryOp &func) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a3340c9b997f5b53a0131cf927f93b54c) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), const CustomNullaryOp &func) |
|  |
| template<typename CustomNullaryOp >  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a9752ee59976a4b4aad860ad1a9093e7f) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9), const CustomNullaryOp &func) |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101) () |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#a8b2a51018a73a766f5b91aef3487f013) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#ab710a58e4a80fbcb2594242372c8fe56) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19) () |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#ae97f8d9d08f969c733c8144be6225756) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#a7eb5f974a8f0b67eac7080db1da0e308) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) () |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#ae41a9b5050ed27d9e93c82c9c8622cd3) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [rows](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [cols](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)) |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#ac22f79b812fa564061042407f2ba8f5b) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)) |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| enum  | {  [RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab) ,  [ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441) ,  [SizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da25cb495affdbd796198462b8ef06be91) ,  [MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306) ,  [MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) ,  [MaxSizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da3a459062d39cb34452518f5f201161d2) ,  [IsVectorAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da1156955c8099c5072934b74c72654ed0) ,  [NumDimensions](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da4d4548a01ba37a6c2031a3c1f0a37d34) ,  [Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) ,  [IsRowMajor](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da406b6af91d61d348ba1c9764bdd66008) ,  **InnerSizeAtCompileTime** ,  **InnerStrideAtCompileTime** ,  **OuterStrideAtCompileTime**  } |
|  |
| typedef random\_access\_iterator\_type  | [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) |
|  |
| typedef random\_access\_iterator\_type  | [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) |
|  |
| typedef [Array](classeigen_1_1array)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits< Derived >::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits< Derived >::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), [AutoAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea)|(internal::traits< Derived >::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) &[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762) ? [RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f) :[ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62)), internal::traits< Derived >::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits< Derived >::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) >  | [PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits< Derived >::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits< Derived >::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), [AutoAlign](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea)|(internal::traits< Derived >::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) &[RowMajorBit](group__flags#gae4f56c2a60bbe4bd2e44c5b19cbe8762) ? [RowMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f) :[ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62)), internal::traits< Derived >::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits< Derived >::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) >  | [PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e) |
|  |
| typedef internal::conditional< internal::is\_same< typename internal::traits< Derived >::XprKind, [MatrixXpr](structeigen_1_1matrixxpr) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), [PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e), [PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb) >::type  | [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) |
|  | The plain matrix or array type corresponding to this expression. [More...](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) |
|  |
| typedef internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) |
|  |
| typedef internal::traits< Derived >::[StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) | [StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) |
|  | The type used to store indices. [More...](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) |
|  |
| typedef [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [value\_type](classeigen_1_1densebase#a9276182dab8236c33f1e7abf491d504d) |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |
| - Protected Member Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
|  | [DenseBase](classeigen_1_1densebase#aa284042d0e1b0ad9b6a00db7fd2d9f7f) () |
|  |
| - Related Functions inherited from [Eigen::DenseBase< Derived >](classeigen_1_1densebase) |
| template<typename Derived >  |
| std::ostream &  | [operator<<](classeigen_1_1densebase#a3806d3f42de165878dace160e6aba40a) (std::ostream &s, const [DenseBase](classeigen_1_1densebase)< Derived > &m) |
|  |

  acosh()
-------

    template<typename Derived >  

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixFunctionReturnValue<Derived> [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::acosh  | ( |  | ) |  const |

 
 This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise inverse hyperbolic cosine use ArrayBase::acosh . 

 
Returns
an expression of the matrix inverse hyperbolic cosine of `*this`. 
    adjoint()
---------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [MatrixBase](classeigen_1_1matrixbase)< Derived >::AdjointReturnType [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::adjoint |

 | inline |

 
 
Returns
an expression of the adjoint (i.e. conjugate transpose) of \*this.
 Example: 



```
Matrix2cf m = [Matrix2cf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the 2x2 complex matrix m:" << endl << m << endl;
cout << "Here is the adjoint of m:" << endl << m.adjoint() << endl;
```

 Output: 



```
Here is the 2x2 complex matrix m:
 (-0.211,0.68) (-0.605,0.823)
 (0.597,0.566)  (0.536,-0.33)
Here is the adjoint of m:
 (-0.211,-0.68)  (0.597,-0.566)
(-0.605,-0.823)    (0.536,0.33)

```


Warning
If you want to replace a matrix by its own adjoint, do **NOT** do this: 
```
m = m.adjoint(); // bug!!! caused by aliasing effect

```
 Instead, use the [adjointInPlace()](classeigen_1_1matrixbase#a51c5982c1f64e45a939515b701fa6f4a) method: 
```
m.adjointInPlace();

```
 which gives [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") good opportunities for optimization, or alternatively you can also do: 
```
m = m.adjoint().eval();

```


 
See also

[adjointInPlace()](classeigen_1_1matrixbase#a51c5982c1f64e45a939515b701fa6f4a), [transpose()](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c), conjugate(), class [Transpose](classeigen_1_1transpose "Expression of the transpose of a matrix."), class internal::scalar\_conjugate\_op 
    adjointInPlace()
----------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| void [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::adjointInPlace |

 | inline |

 
 This is the "in place" version of [adjoint()](classeigen_1_1matrixbase#afacca1f88da57e5cd87dd07c8ff926bb): it replaces `*this` by its own transpose. Thus, doing 



```
m.adjointInPlace();

```

 has the same effect on m as doing 



```
m = m.adjoint().eval();

```

 and is faster and also safer because in the latter line of code, forgetting the [eval()](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b) results in a bug caused by aliasing.

 Notice however that this method is only useful if you want to replace a matrix by its own adjoint. If you just need the adjoint of a matrix, use [adjoint()](classeigen_1_1matrixbase#afacca1f88da57e5cd87dd07c8ff926bb).

 
Note
if the matrix is not square, then `*this` must be a resizable matrix. This excludes (non-square) fixed-size matrices, block-expressions and maps.
 
See also

[transpose()](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c), [adjoint()](classeigen_1_1matrixbase#afacca1f88da57e5cd87dd07c8ff926bb), [transposeInPlace()](classeigen_1_1densebase#ac501bd942994af7a95d95bee7a16ad2a) 
    applyHouseholderOnTheLeft()
---------------------------

    template<typename Derived >   template<typename EssentialPart >  

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::applyHouseholderOnTheLeft  | ( | const EssentialPart &  | *essential*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *tau*,  |
|  |  | [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*  | *workspace* |
|  | ) |  |  |

 
 Apply the elementary reflector H given by \( H = I - tau v v^\*\) with \( v^T = [1 essential^T] \) from the left to a vector or matrix.

 On input: 



Parameters
 

|  |  |
| --- | --- |
| essential | the essential part of the vector `v` |
| tau | the scaling factor of the Householder transformation  |
| workspace | a pointer to working space with at least this->[cols()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe) entries |

   
See also

[MatrixBase::makeHouseholder()](classeigen_1_1matrixbase#a13291e900f7e81ddc6e5b8802f82092b), [MatrixBase::makeHouseholderInPlace()](classeigen_1_1matrixbase#aebf4bac7dffe2685ab93734fb776e817), [MatrixBase::applyHouseholderOnTheRight()](classeigen_1_1matrixbase#ab3e52262b41fa40e194dda245e0f9675) 
    applyHouseholderOnTheRight()
----------------------------

    template<typename Derived >   template<typename EssentialPart >  

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::applyHouseholderOnTheRight  | ( | const EssentialPart &  | *essential*,  |
|  |  | const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *tau*,  |
|  |  | [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*  | *workspace* |
|  | ) |  |  |

 
 Apply the elementary reflector H given by \( H = I - tau v v^\*\) with \( v^T = [1 essential^T] \) from the right to a vector or matrix.

 On input: 



Parameters
 

|  |  |
| --- | --- |
| essential | the essential part of the vector `v` |
| tau | the scaling factor of the Householder transformation  |
| workspace | a pointer to working space with at least this->[rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2) entries |

   
See also

[MatrixBase::makeHouseholder()](classeigen_1_1matrixbase#a13291e900f7e81ddc6e5b8802f82092b), [MatrixBase::makeHouseholderInPlace()](classeigen_1_1matrixbase#aebf4bac7dffe2685ab93734fb776e817), [MatrixBase::applyHouseholderOnTheLeft()](classeigen_1_1matrixbase#a8f2c8059ef3f04cfa0c73b4c012db855) 
    applyOnTheLeft() [1/2]
----------------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::applyOnTheLeft  | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 replaces `*this` by *other* \* `*this`.

 Example: 



```
Matrix3f A = [Matrix3f::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3,3), B;
B << 0,1,0,  
     0,0,1,  
     1,0,0;
cout << "At start, A = " << endl << A << endl;
A.applyOnTheLeft(B); 
cout << "After applyOnTheLeft, A = " << endl << A << endl;

```

 Output: 



```
At start, A = 
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
After applyOnTheLeft, A = 
-0.211  0.823  0.536
 0.566 -0.605 -0.444
  0.68  0.597  -0.33

```
    applyOnTheLeft() [2/2]
----------------------

    template<typename Derived >   template<typename OtherScalar >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::applyOnTheLeft  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *p*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *q*,  |
|  |  | const [JacobiRotation](classeigen_1_1jacobirotation)< OtherScalar > &  | *j* |
|  | ) |  |  |

 | inline |

 
 This is defined in the Jacobi module.



```
#include <Eigen/Jacobi> 

```

 Applies the rotation in the plane *j* to the rows *p* and *q* of `*this`, i.e., it computes B = J \* B, with \( B = \left ( \begin{array}{cc} \text{\*this.row}(p) \\ \text{\*this.row}(q) \end{array} \right ) \).

 
See also
class [JacobiRotation](classeigen_1_1jacobirotation "Rotation given by a cosine-sine pair."), [MatrixBase::applyOnTheRight()](classeigen_1_1matrixbase#a45d91752925d2757fc8058a293b15462), internal::apply\_rotation\_in\_the\_plane() 
    applyOnTheRight()
-----------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::applyOnTheRight  | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 replaces `*this` by `*this` \* *other*. It is equivalent to [MatrixBase::operator\*=()](classeigen_1_1matrixbase#a3783b6168995ca117a1c19fea3630ac4).

 Example: 



```
Matrix3f A = [Matrix3f::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3,3), B;
B << 0,1,0,  
     0,0,1,  
     1,0,0;
cout << "At start, A = " << endl << A << endl;
A *= B;
cout << "After A \*= B, A = " << endl << A << endl;
A.applyOnTheRight(B);  // equivalent to A \*= B
cout << "After applyOnTheRight, A = " << endl << A << endl;

```

 Output: 



```
At start, A = 
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
After A *= B, A = 
 -0.33   0.68  0.597
 0.536 -0.211  0.823
-0.444  0.566 -0.605
After applyOnTheRight, A = 
 0.597  -0.33   0.68
 0.823  0.536 -0.211
-0.605 -0.444  0.566

```
    array() [1/2]
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ArrayWrapper](classeigen_1_1arraywrapper)<Derived> [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::array  | ( |  | ) |  |

 | inline |

 
 
Returns
an [Array](classeigen_1_1arraybase)  expression of this matrix 
 
See also

[ArrayBase::matrix()](classeigen_1_1arraybase#af01e9ea8087e390af8af453bbe4c276c) 
    array() [2/2]
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [ArrayWrapper](classeigen_1_1arraywrapper)<const Derived> [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::array  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const [Array](classeigen_1_1arraybase)  expression of this matrix 
 
See also

[ArrayBase::matrix()](classeigen_1_1arraybase#af01e9ea8087e390af8af453bbe4c276c) 
    asDiagonal()
------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [DiagonalWrapper](classeigen_1_1diagonalwrapper)< const Derived > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::asDiagonal |

 | inline |

 
 
Returns
a pseudo-expression of a diagonal matrix with \*this as vector of diagonal coefficients
 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 Example: 



```
cout << Matrix3i(Vector3i(2,5,6).[asDiagonal](classeigen_1_1matrixbase#a14235b62c90f93fe910070b4743782d0)()) << endl;
```

 Output: 



```
2 0 0
0 5 0
0 0 6

```


See also
class [DiagonalWrapper](classeigen_1_1diagonalwrapper "Expression of a diagonal matrix."), class [DiagonalMatrix](classeigen_1_1diagonalmatrix "Represents a diagonal matrix with its storage."), [diagonal()](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3), [isDiagonal()](classeigen_1_1matrixbase#a97027ea54c8cd1ddb1c578fee5cedc67) 
    asinh()
-------

    template<typename Derived >  

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixFunctionReturnValue<Derived> [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::asinh  | ( |  | ) |  const |

 
 This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise inverse hyperbolic sine use ArrayBase::asinh . 

 
Returns
an expression of the matrix inverse hyperbolic sine of `*this`. 
    atanh()
-------

    template<typename Derived >  

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixFunctionReturnValue<Derived> [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::atanh  | ( |  | ) |  const |

 
 This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise inverse hyperbolic cosine use ArrayBase::atanh . 

 
Returns
an expression of the matrix inverse hyperbolic cosine of `*this`. 
    bdcSvd()
--------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [BDCSVD](classeigen_1_1bdcsvd)< typename [MatrixBase](classeigen_1_1matrixbase)< Derived >::[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::bdcSvd  | ( | unsigned int  | *computationOptions* = `0` | ) |  const |

 | inline |

 
 This is defined in the SVD module.



```
#include <Eigen/SVD> 

```


Returns
the singular value decomposition of `*this` computed by Divide & Conquer algorithm
 
See also
class [BDCSVD](classeigen_1_1bdcsvd "class Bidiagonal Divide and Conquer SVD") 
    blueNorm()
----------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [NumTraits](structeigen_1_1numtraits)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::blueNorm |

 | inline |

 
 
Returns
the *l2* norm of `*this` using the Blue's algorithm. A Portable Fortran Program to Find the Euclidean Norm of a Vector, ACM TOMS, Vol 4, Issue 1, 1978.
 For architecture/scalar types without vectorization, this version is much faster than [stableNorm()](classeigen_1_1matrixbase#ab84d3e64f855813b1eea4202c0697dc1). Otherwise the [stableNorm()](classeigen_1_1matrixbase#ab84d3e64f855813b1eea4202c0697dc1) is faster.

 
See also

[norm()](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975), [stableNorm()](classeigen_1_1matrixbase#ab84d3e64f855813b1eea4202c0697dc1), [hypotNorm()](classeigen_1_1matrixbase#a32222d3b6677e6cdf0b801463f329b72) 
    colPivHouseholderQr()
---------------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< typename [MatrixBase](classeigen_1_1matrixbase)< Derived >::[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::colPivHouseholderQr |

 | inline |

 
 
Returns
the column-pivoting Householder QR decomposition of `*this`.
 
See also
class [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting.") 
    completeOrthogonalDecomposition()
---------------------------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< typename [MatrixBase](classeigen_1_1matrixbase)< Derived >::[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::completeOrthogonalDecomposition |

 | inline |

 
 
Returns
the complete orthogonal decomposition of `*this`.
 
See also
class [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition "Complete orthogonal decomposition (COD) of a matrix.") 
    computeInverseAndDetWithCheck()
-------------------------------

    template<typename Derived >   template<typename ResultType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::computeInverseAndDetWithCheck  | ( | ResultType &  | *inverse*,  |
|  |  | typename ResultType::Scalar &  | *determinant*,  |
|  |  | bool &  | *invertible*,  |
|  |  | const RealScalar &  | *absDeterminantThreshold* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)>::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 This is defined in the LU module.



```
#include <Eigen/LU> 

```

Computation of matrix inverse and determinant, with invertibility check.

 This is only for fixed-size square matrices of size up to 4x4.

 Notice that it will trigger a copy of input matrix when trying to do the inverse in place.

 
Parameters
 

|  |  |
| --- | --- |
| inverse | Reference to the matrix in which to store the inverse.  |
| determinant | Reference to the variable in which to store the determinant.  |
| invertible | Reference to the bool variable in which to store whether the matrix is invertible.  |
| absDeterminantThreshold | Optional parameter controlling the invertibility check. The matrix will be declared invertible if the absolute value of its determinant is greater than this threshold. |

   Example: 



```
Matrix3d m = [Matrix3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
Matrix3d [inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf);
bool invertible;
double [determinant](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061);
m.computeInverseAndDetWithCheck([inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf),[determinant](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061),invertible);
cout << "Its determinant is " << [determinant](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) << endl;
if(invertible) {
  cout << "It is invertible, and its inverse is:" << endl << [inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf) << endl;
}
else {
  cout << "It is not invertible." << endl;
}
```

 Output: 



```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Its determinant is 0.209
It is invertible, and its inverse is:
-0.199   2.23   2.84
  1.01 -0.555  -1.42
 -1.62   3.59   3.29

```


See also

[inverse()](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf), [computeInverseWithCheck()](classeigen_1_1matrixbase#a116f3b50d2af7dbdf7473e517a5b8b0f) 
    computeInverseWithCheck()
-------------------------

    template<typename Derived >   template<typename ResultType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::computeInverseWithCheck  | ( | ResultType &  | *inverse*,  |
|  |  | bool &  | *invertible*,  |
|  |  | const RealScalar &  | *absDeterminantThreshold* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)>::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 This is defined in the LU module.



```
#include <Eigen/LU> 

```

Computation of matrix inverse, with invertibility check.

 This is only for fixed-size square matrices of size up to 4x4.

 Notice that it will trigger a copy of input matrix when trying to do the inverse in place.

 
Parameters
 

|  |  |
| --- | --- |
| inverse | Reference to the matrix in which to store the inverse.  |
| invertible | Reference to the bool variable in which to store whether the matrix is invertible.  |
| absDeterminantThreshold | Optional parameter controlling the invertibility check. The matrix will be declared invertible if the absolute value of its determinant is greater than this threshold. |

   Example: 



```
Matrix3d m = [Matrix3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
Matrix3d [inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf);
bool invertible;
m.computeInverseWithCheck([inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf),invertible);
if(invertible) {
  cout << "It is invertible, and its inverse is:" << endl << [inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf) << endl;
}
else {
  cout << "It is not invertible." << endl;
}

```

 Output: 



```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
It is invertible, and its inverse is:
-0.199   2.23   2.84
  1.01 -0.555  -1.42
 -1.62   3.59   3.29

```


See also

[inverse()](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf), [computeInverseAndDetWithCheck()](classeigen_1_1matrixbase#a7baaf2fdec0191a2166cf9fd84a2dcb2) 
    cos()
-----

    template<typename Derived >  

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixFunctionReturnValue<Derived> [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::cos  | ( |  | ) |  const |

 
 This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise cosine use ArrayBase::cos . 

 
Returns
an expression of the matrix cosine of `*this`. 
    cosh()
------

    template<typename Derived >  

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixFunctionReturnValue<Derived> [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::cosh  | ( |  | ) |  const |

 
 This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise hyperbolic cosine use ArrayBase::cosh . 

 
Returns
an expression of the matrix hyperbolic cosine of `*this`. 
    determinant()
-------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::determinant |

 | inline |

 
 This is defined in the LU module.



```
#include <Eigen/LU> 

```


Returns
the determinant of this matrix 
    diagonal() [1/4]
----------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::template DiagonalIndexReturnType< Index\_ >::Type [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::diagonal |

 | inline |

 
 
Returns
an expression of the main diagonal of the matrix `*this` 
 `*this` is not required to be square.

 Example: 



```
Matrix3i m = [Matrix3i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here are the coefficients on the main diagonal of m:" << endl
     << m.diagonal() << endl;

```

 Output: 



```
Here is the matrix m:
 7  6 -3
-2  9  6
 6 -6 -5
Here are the coefficients on the main diagonal of m:
 7
 9
-5

```


See also
class [Diagonal](classeigen_1_1diagonal "Expression of a diagonal/subdiagonal/superdiagonal in a matrix.")

 
Returns
an expression of the *DiagIndex-th* sub or super diagonal of the matrix `*this` 
 `*this` is not required to be square.

 The template parameter *DiagIndex* represent a super diagonal if *DiagIndex* > 0 and a sub diagonal otherwise. *DiagIndex* == 0 is equivalent to the main diagonal.

 Example: 



```
Matrix4i m = [Matrix4i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here are the coefficients on the 1st super-diagonal and 2nd sub-diagonal of m:" << endl
     << m.diagonal<1>().[transpose](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c)() << endl
     << m.diagonal<-2>().[transpose](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c)() << endl;
```

 Output: 



```
Here is the matrix m:
 7  9 -5 -3
-2 -6  1  0
 6 -3  0  9
 6  6  3  9
Here are the coefficients on the 1st super-diagonal and 2nd sub-diagonal of m:
9 1 9
6 6

```


See also

[MatrixBase::diagonal()](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3), class [Diagonal](classeigen_1_1diagonal "Expression of a diagonal/subdiagonal/superdiagonal in a matrix.") 
    diagonal() [2/4]
----------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::template ConstDiagonalIndexReturnType< Index\_ >::Type [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::diagonal |

 | inline |

 
 This is the const version of [diagonal()](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3).

 This is the const version of [diagonal<int>()](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3). 

    diagonal() [3/4]
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::[DiagonalDynamicIndexReturnType](classeigen_1_1diagonal) [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::diagonal  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *index* | ) |  |

 | inline |

 
 
Returns
an expression of the *DiagIndex-th* sub or super diagonal of the matrix `*this` 
 `*this` is not required to be square.

 The template parameter *DiagIndex* represent a super diagonal if *DiagIndex* > 0 and a sub diagonal otherwise. *DiagIndex* == 0 is equivalent to the main diagonal.

 Example: 



```
Matrix4i m = [Matrix4i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here are the coefficients on the 1st super-diagonal and 2nd sub-diagonal of m:" << endl
     << m.diagonal(1).transpose() << endl
     << m.diagonal(-2).transpose() << endl;

```

 Output: 



```
Here is the matrix m:
 7  9 -5 -3
-2 -6  1  0
 6 -3  0  9
 6  6  3  9
Here are the coefficients on the 1st super-diagonal and 2nd sub-diagonal of m:
9 1 9
6 6

```


See also

[MatrixBase::diagonal()](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3), class [Diagonal](classeigen_1_1diagonal "Expression of a diagonal/subdiagonal/superdiagonal in a matrix.") 
    diagonal() [4/4]
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::[ConstDiagonalDynamicIndexReturnType](classeigen_1_1diagonal) [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::diagonal  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *index* | ) |  const |

 | inline |

 
 This is the const version of [diagonal(Index)](classeigen_1_1matrixbase#a8a13d4b8efbd7797ee8efd3dd988a7f7). 

    diagonalSize()
--------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::diagonalSize  | ( |  | ) |  const |

 | inline |

 
 
Returns
the size of the main diagonal, which is min([rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2),[cols()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe)). 
 
See also

[rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [cols()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), [SizeAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da25cb495affdbd796198462b8ef06be91). 
    dot()
-----

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [ScalarBinaryOpTraits](structeigen_1_1scalarbinaryoptraits)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), typename internal::traits< OtherDerived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::ReturnType [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::dot  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 
Returns
the dot product of \*this with other.
 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 
Note
If the scalar type is complex numbers, then this function returns the hermitian (sesquilinear) dot product, conjugate-linear in the first variable and linear in the second variable.
 
See also

[squaredNorm()](classeigen_1_1matrixbase#ac8da566526419f9742a6c471bbd87e0a), [norm()](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975) 
    eigenvalues()
-------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::EigenvaluesReturnType [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::eigenvalues |

 | inline |

 
 Computes the eigenvalues of a matrix. 

 
Returns
Column vector containing the eigenvalues.
 This is defined in the Eigenvalues module.



```
#include <Eigen/Eigenvalues> 

```

 This function computes the eigenvalues with the help of the [EigenSolver](classeigen_1_1eigensolver "Computes eigenvalues and eigenvectors of general matrices.") class (for real matrices) or the [ComplexEigenSolver](classeigen_1_1complexeigensolver "Computes eigenvalues and eigenvectors of general complex matrices.") class (for complex matrices).

 The eigenvalues are repeated according to their algebraic multiplicity, so there are as many eigenvalues as rows in the matrix.

 The [SelfAdjointView](classeigen_1_1selfadjointview "Expression of a selfadjoint matrix from a triangular part of a dense matrix.") class provides a better algorithm for selfadjoint matrices.

 Example: 



```
MatrixXd ones = [MatrixXd::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)(3,3);
VectorXcd eivals = ones.eigenvalues();
cout << "The eigenvalues of the 3x3 matrix of ones are:" << endl << eivals << endl;
```

 Output: 



```
The eigenvalues of the 3x3 matrix of ones are:
(-5.31e-17,0)
        (3,0)
        (0,0)

```


See also

[EigenSolver::eigenvalues()](classeigen_1_1eigensolver#a114189009e42f5e03372a7a3dfa33b97 "Returns the eigenvalues of given matrix."), [ComplexEigenSolver::eigenvalues()](classeigen_1_1complexeigensolver#a10c25c7620e7faedcd39991cce3a757b "Returns the eigenvalues of given matrix."), [SelfAdjointView::eigenvalues()](classeigen_1_1selfadjointview#ad4f34424b4ea12de9bbc5623cb938b4f "Computes the eigenvalues of a matrix.") 
    exp()
-----

    template<typename Derived >  

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixExponentialReturnValue<Derived> [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::exp  | ( |  | ) |  const |

 
 This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise exponential use ArrayBase::exp . 

 
Returns
an expression of the matrix exponential of `*this`. 
    forceAlignedAccess() [1/2]
--------------------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [ForceAlignedAccess](classeigen_1_1forcealignedaccess)< Derived > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::forceAlignedAccess |

 | inline |

 
 
Returns
an expression of \*this with forced aligned access 
 
See also
forceAlignedAccessIf(), class [ForceAlignedAccess](classeigen_1_1forcealignedaccess "Enforce aligned packet loads and stores regardless of what is requested.") 
    forceAlignedAccess() [2/2]
--------------------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [ForceAlignedAccess](classeigen_1_1forcealignedaccess)< Derived > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::forceAlignedAccess |

 | inline |

 
 
Returns
an expression of \*this with forced aligned access 
 
See also
forceAlignedAccessIf(),class [ForceAlignedAccess](classeigen_1_1forcealignedaccess "Enforce aligned packet loads and stores regardless of what is requested.") 
    forceAlignedAccessIf() [1/2]
----------------------------

    template<typename Derived >   template<bool Enable>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::conditional<Enable,[ForceAlignedAccess](classeigen_1_1forcealignedaccess)<Derived>,Derived&>::type [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::forceAlignedAccessIf  | ( |  | ) |  |

 | inline |

 
 
Returns
an expression of \*this with forced aligned access if *Enable* is true. 
 
See also

[forceAlignedAccess()](classeigen_1_1matrixbase#afdaf810ac1708ca6d6ecdcfac1e06699), class [ForceAlignedAccess](classeigen_1_1forcealignedaccess "Enforce aligned packet loads and stores regardless of what is requested.") 
    forceAlignedAccessIf() [2/2]
----------------------------

    template<typename Derived >   template<bool Enable>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::add\_const\_on\_value\_type<typename internal::conditional<Enable,[ForceAlignedAccess](classeigen_1_1forcealignedaccess)<Derived>,Derived&>::type>::type [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::forceAlignedAccessIf  | ( |  | ) |  const |

 | inline |

 
 
Returns
an expression of \*this with forced aligned access if *Enable* is true. 
 
See also

[forceAlignedAccess()](classeigen_1_1matrixbase#afdaf810ac1708ca6d6ecdcfac1e06699), class [ForceAlignedAccess](classeigen_1_1forcealignedaccess "Enforce aligned packet loads and stores regardless of what is requested.") 
    fullPivHouseholderQr()
----------------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< typename [MatrixBase](classeigen_1_1matrixbase)< Derived >::[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::fullPivHouseholderQr |

 | inline |

 
 
Returns
the full-pivoting Householder QR decomposition of `*this`.
 
See also
class [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with full pivoting.") 
    fullPivLu()
-----------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [FullPivLU](classeigen_1_1fullpivlu)< typename [MatrixBase](classeigen_1_1matrixbase)< Derived >::[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::fullPivLu |

 | inline |

 
 This is defined in the LU module.



```
#include <Eigen/LU> 

```


Returns
the full-pivoting LU decomposition of `*this`.
 
See also
class [FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features.") 
    householderQr()
---------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [HouseholderQR](classeigen_1_1householderqr)< typename [MatrixBase](classeigen_1_1matrixbase)< Derived >::[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::householderQr |

 | inline |

 
 
Returns
the Householder QR decomposition of `*this`.
 
See also
class [HouseholderQR](classeigen_1_1householderqr "Householder QR decomposition of a matrix.") 
    hypotNorm()
-----------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [NumTraits](structeigen_1_1numtraits)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::hypotNorm |

 | inline |

 
 
Returns
the *l2* norm of `*this` avoiding undeflow and overflow. This version use a concatenation of hypot() calls, and it is very slow.
 
See also

[norm()](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975), [stableNorm()](classeigen_1_1matrixbase#ab84d3e64f855813b1eea4202c0697dc1) 
    Identity() [1/2]
----------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [MatrixBase](classeigen_1_1matrixbase)< Derived >::IdentityReturnType [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::Identity |

 | inlinestatic |

 
 
Returns
an expression of the identity matrix (not necessarily square).
 This variant is only for fixed-size [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") types. For dynamic-size types, you need to use the variant taking size arguments.

 Example: 



```
cout << Matrix<double, 3, 4>::Identity() << endl;

```

 Output: 



```
1 0 0 0
0 1 0 0
0 0 1 0

```


See also

[Identity(Index,Index)](classeigen_1_1matrixbase#acf33ce20ef03ead47cb3dbcd5f416ede), [setIdentity()](classeigen_1_1matrixbase#a18e969adfdf2db4ac44c47fbdc854683), [isIdentity()](classeigen_1_1matrixbase#a4ccbd8dfa06e9d47b9bf84711f8b9d40) 
    Identity() [2/2]
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [MatrixBase](classeigen_1_1matrixbase)< Derived >::IdentityReturnType [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::Identity  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols* |
|  | ) |  |  |

 | inlinestatic |

 
 
Returns
an expression of the identity matrix (not necessarily square).
 The parameters *rows* and *cols* are the number of rows and of columns of the returned matrix. Must be compatible with this [MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.") type.

 This variant is meant to be used for dynamic-size matrix types. For fixed-size types, it is redundant to pass *rows* and *cols* as arguments, so [Identity()](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f) should be used instead.

 Example: 



```
cout << [MatrixXd::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)(4, 3) << endl;
```

 Output: 



```
1 0 0
0 1 0
0 0 1
0 0 0

```


See also

[Identity()](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f), [setIdentity()](classeigen_1_1matrixbase#a18e969adfdf2db4ac44c47fbdc854683), [isIdentity()](classeigen_1_1matrixbase#a4ccbd8dfa06e9d47b9bf84711f8b9d40) 
    inverse()
---------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [Inverse](classeigen_1_1inverse)< Derived > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::inverse |

 | inline |

 
 This is defined in the LU module.



```
#include <Eigen/LU> 

```


Returns
the matrix inverse of this matrix.
 For small fixed sizes up to 4x4, this method uses cofactors. In the general case, this method uses class [PartialPivLU](classeigen_1_1partialpivlu "LU decomposition of a matrix with partial pivoting, and related features.").

 
Note
This matrix must be invertible, otherwise the result is undefined. If you need an invertibility check, do the following: * for fixed sizes up to 4x4, use [computeInverseAndDetWithCheck()](classeigen_1_1matrixbase#a7baaf2fdec0191a2166cf9fd84a2dcb2).
* for the general case, use class [FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features.").

 Example: 
```
Matrix3d m = [Matrix3d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Its inverse is:" << endl << m.inverse() << endl;

```
 Output: 
```
Here is the matrix m:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Its inverse is:
-0.199   2.23   2.84
  1.01 -0.555  -1.42
 -1.62   3.59   3.29

```


 
See also

[computeInverseAndDetWithCheck()](classeigen_1_1matrixbase#a7baaf2fdec0191a2166cf9fd84a2dcb2) 
    isDiagonal()
------------

    template<typename Derived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| bool [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::isDiagonal  | ( | const RealScalar &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)>::dummy_precision()` | ) |  const |

 
 
Returns
true if \*this is approximately equal to a diagonal matrix, within the precision given by *prec*.
 Example: 



```
Matrix3d m = 10000 * [Matrix3d::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)();
m(0,2) = 1;
cout << "Here's the matrix m:" << endl << m << endl;
cout << "m.isDiagonal() returns: " << m.isDiagonal() << endl;
cout << "m.isDiagonal(1e-3) returns: " << m.isDiagonal(1e-3) << endl;
 

```

 Output: 



```
Here's the matrix m:
1e+04     0     1
    0 1e+04     0
    0     0 1e+04
m.isDiagonal() returns: 0
m.isDiagonal(1e-3) returns: 1

```


See also

[asDiagonal()](classeigen_1_1matrixbase#a14235b62c90f93fe910070b4743782d0) 
    isIdentity()
------------

    template<typename Derived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| bool [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::isIdentity  | ( | const RealScalar &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)>::dummy_precision()` | ) |  const |

 
 
Returns
true if \*this is approximately equal to the identity matrix (not necessarily square), within the precision given by *prec*.
 Example: 



```
Matrix3d m = [Matrix3d::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)();
m(0,2) = 1e-4;
cout << "Here's the matrix m:" << endl << m << endl;
cout << "m.isIdentity() returns: " << m.isIdentity() << endl;
cout << "m.isIdentity(1e-3) returns: " << m.isIdentity(1e-3) << endl;

```

 Output: 



```
Here's the matrix m:
     1      0 0.0001
     0      1      0
     0      0      1
m.isIdentity() returns: 0
m.isIdentity(1e-3) returns: 1

```


See also
class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [Identity()](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f), [Identity(Index,Index)](classeigen_1_1matrixbase#acf33ce20ef03ead47cb3dbcd5f416ede), [setIdentity()](classeigen_1_1matrixbase#a18e969adfdf2db4ac44c47fbdc854683) 
    isLowerTriangular()
-------------------

    template<typename Derived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| bool [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::isLowerTriangular  | ( | const RealScalar &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)>::dummy_precision()` | ) |  const |

 
 
Returns
true if \*this is approximately equal to a lower triangular matrix, within the precision given by *prec*.
 
See also

[isUpperTriangular()](classeigen_1_1matrixbase#aae3ec1660bb4ac584220481c54ab4a64) 
    isOrthogonal()
--------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::isOrthogonal  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other*,  |
|  |  | const RealScalar &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)>::dummy_precision()` |
|  | ) |  |  const |

 
 
Returns
true if \*this is approximately orthogonal to *other*, within the precision given by *prec*.
 Example: 



```
Vector3d v(1,0,0);
Vector3d [w](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af683e04b3926aaf4091581ca24ca09ad)(1e-4,0,1);
cout << "Here's the vector v:" << endl << v << endl;
cout << "Here's the vector w:" << endl << [w](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af683e04b3926aaf4091581ca24ca09ad) << endl;
cout << "v.isOrthogonal(w) returns: " << v.isOrthogonal([w](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af683e04b3926aaf4091581ca24ca09ad)) << endl;
cout << "v.isOrthogonal(w,1e-3) returns: " << v.isOrthogonal([w](classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4#af683e04b3926aaf4091581ca24ca09ad),1e-3) << endl;
```

 Output: 



```
Here's the vector v:
1
0
0
Here's the vector w:
0.0001
     0
     1
v.isOrthogonal(w) returns: 0
v.isOrthogonal(w,1e-3) returns: 1

```
    isUnitary()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| bool [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::isUnitary  | ( | const RealScalar &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)>::dummy_precision()` | ) |  const |

 
 
Returns
true if \*this is approximately an unitary matrix, within the precision given by *prec*. In the case where the *Scalar* type is real numbers, a unitary matrix is an orthogonal matrix, whence the name.
 
Note
This can be used to check whether a family of vectors forms an orthonormal basis. Indeed, `m.isUnitary()` returns true if and only if the columns (equivalently, the rows) of m form an orthonormal basis.
 Example: 



```
Matrix3d m = [Matrix3d::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)();
m(0,2) = 1e-4;
cout << "Here's the matrix m:" << endl << m << endl;
cout << "m.isUnitary() returns: " << m.isUnitary() << endl;
cout << "m.isUnitary(1e-3) returns: " << m.isUnitary(1e-3) << endl;

```

 Output: 



```
Here's the matrix m:
     1      0 0.0001
     0      1      0
     0      0      1
m.isUnitary() returns: 0
m.isUnitary(1e-3) returns: 1

```
    isUpperTriangular()
-------------------

    template<typename Derived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| bool [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::isUpperTriangular  | ( | const RealScalar &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)>::dummy_precision()` | ) |  const |

 
 
Returns
true if \*this is approximately equal to an upper triangular matrix, within the precision given by *prec*.
 
See also

[isLowerTriangular()](classeigen_1_1matrixbase#a1e96c42d79a56f0a6ade30ce031e17eb) 
    jacobiSvd()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [JacobiSVD](classeigen_1_1jacobisvd)< typename [MatrixBase](classeigen_1_1matrixbase)< Derived >::[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::jacobiSvd  | ( | unsigned int  | *computationOptions* = `0` | ) |  const |

 | inline |

 
 This is defined in the SVD module.



```
#include <Eigen/SVD> 

```


Returns
the singular value decomposition of `*this` computed by two-sided Jacobi transformations.
 
See also
class [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") 
    lazyProduct()
-------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Product](classeigen_1_1product)< Derived, OtherDerived, LazyProduct > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::lazyProduct  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 
Returns
an expression of the matrix product of `*this` and *other* without implicit evaluation.
 The returned product will behave like any other expressions: the coefficients of the product will be computed once at a time as requested. This might be useful in some extremely rare cases when only a small and no coherent fraction of the result's coefficients have to be computed.

 
Warning
This version of the matrix product can be much much slower. So use it only if you know what you are doing and that you measured a true speed improvement.
 
See also
operator\*(const MatrixBase&) 
    ldlt()
------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [LDLT](classeigen_1_1ldlt)< typename [MatrixBase](classeigen_1_1matrixbase)< Derived >::[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::ldlt |

 | inline |

 
 This is defined in the Cholesky module.



```
#include <Eigen/Cholesky> 

```
 
Returns
the Cholesky decomposition with full pivoting without square root of `*this` 
 
See also

[SelfAdjointView::ldlt()](classeigen_1_1selfadjointview#a644155eef17b37c95d85b9f65bb49ac4) 
    llt()
-----

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [LLT](classeigen_1_1llt)< typename [MatrixBase](classeigen_1_1matrixbase)< Derived >::[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::llt |

 | inline |

 
 This is defined in the Cholesky module.



```
#include <Eigen/Cholesky> 

```
 
Returns
the [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") decomposition of `*this` 
 
See also

[SelfAdjointView::llt()](classeigen_1_1selfadjointview#a405e810491642a7f7b785f2ad6f93619) 
    log()
-----

    template<typename Derived >  

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixLogarithmReturnValue<Derived> [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::log  | ( |  | ) |  const |

 
 This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise logarithm use ArrayBase::log . 

 
Returns
an expression of the matrix logarithm of `*this`. 
    lpNorm()
--------

    template<typename Derived >   template<int p>  

|  |
| --- |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::RealScalar [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::lpNorm |

 
 
Returns
the **coefficient-wise** \( \ell^p \) norm of `*this`, that is, returns the p-th root of the sum of the p-th powers of the absolute values of the coefficients of `*this`. If *p* is the special value *[Eigen::Infinity](namespaceeigen#a7951593b031e13d90223c83d022ce99e)*, this function returns the \( \ell^\infty \) norm, that is the maximum of the absolute values of the coefficients of `*this`.
 In all cases, if `*this` is empty, then the value 0 is returned.

 
Note
For matrices, this function does not compute the [operator-norm](https://en.wikipedia.org/wiki/Operator_norm). That is, if `*this` is a matrix, then its coefficients are interpreted as a 1D vector. Nonetheless, you can easily compute the 1-norm and \(\infty\)-norm matrix operator norms using [partial reductions](group__tutorialreductionsvisitorsbroadcasting#TutorialReductionsVisitorsBroadcastingReductionsNorm) .
 
See also

[norm()](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975) 
    lu()
----

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [PartialPivLU](classeigen_1_1partialpivlu)< typename [MatrixBase](classeigen_1_1matrixbase)< Derived >::[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::lu |

 | inline |

 
 This is defined in the LU module.



```
#include <Eigen/LU> 

```

Synonym of [partialPivLu()](classeigen_1_1matrixbase#a6199d8aaf26c1b8ac3097fdfa7733a1e).

 
Returns
the partial-pivoting LU decomposition of `*this`.
 
See also
class [PartialPivLU](classeigen_1_1partialpivlu "LU decomposition of a matrix with partial pivoting, and related features.") 
    makeHouseholder()
-----------------

    template<typename Derived >   template<typename EssentialPart >  

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::makeHouseholder  | ( | EssentialPart &  | *essential*,  |
|  |  | [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *tau*,  |
|  |  | RealScalar &  | *beta* |
|  | ) |  |  const |

 
 Computes the elementary reflector H such that: \( H \*this = [ beta 0 ... 0]^T \) where the transformation H is: \( H = I - tau v v^\*\) and the vector v is: \( v^T = [1 essential^T] \)

 On output: 



Parameters
 

|  |  |
| --- | --- |
| essential | the essential part of the vector `v` |
| tau | the scaling factor of the Householder transformation  |
| beta | the result of H \* `*this` |

   
See also

[MatrixBase::makeHouseholderInPlace()](classeigen_1_1matrixbase#aebf4bac7dffe2685ab93734fb776e817), [MatrixBase::applyHouseholderOnTheLeft()](classeigen_1_1matrixbase#a8f2c8059ef3f04cfa0c73b4c012db855), [MatrixBase::applyHouseholderOnTheRight()](classeigen_1_1matrixbase#ab3e52262b41fa40e194dda245e0f9675) 
    makeHouseholderInPlace()
------------------------

    template<typename Derived >  

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::makeHouseholderInPlace  | ( | [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &  | *tau*,  |
|  |  | RealScalar &  | *beta* |
|  | ) |  |  |

 
 Computes the elementary reflector H such that: \( H \*this = [ beta 0 ... 0]^T \) where the transformation H is: \( H = I - tau v v^\*\) and the vector v is: \( v^T = [1 essential^T] \)

 The essential part of the vector `v` is stored in \*this.

 On output: 



Parameters
 

|  |  |
| --- | --- |
| tau | the scaling factor of the Householder transformation  |
| beta | the result of H \* `*this` |

   
See also

[MatrixBase::makeHouseholder()](classeigen_1_1matrixbase#a13291e900f7e81ddc6e5b8802f82092b), [MatrixBase::applyHouseholderOnTheLeft()](classeigen_1_1matrixbase#a8f2c8059ef3f04cfa0c73b4c012db855), [MatrixBase::applyHouseholderOnTheRight()](classeigen_1_1matrixbase#ab3e52262b41fa40e194dda245e0f9675) 
    noalias()
---------

    template<typename Derived >  

|  |
| --- |
| [NoAlias](classeigen_1_1noalias)< Derived, [MatrixBase](classeigen_1_1matrixbase) > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::noalias |

 
 
Returns
a pseudo expression of `*this` with an operator= assuming no aliasing between `*this` and the source expression.
 More precisely, [noalias()](classeigen_1_1matrixbase#a2c1085de7645f23f240876388457da0b) allows to bypass the EvalBeforeAssignBit flag. Currently, even though several expressions may alias, only product expressions have this flag. Therefore, [noalias()](classeigen_1_1matrixbase#a2c1085de7645f23f240876388457da0b) is only useful when the source expression contains a matrix product.

 Here are some examples where noalias is useful: 



```
D.noalias()  = A * B;
D.noalias() += A.transpose() * B;
D.noalias() -= 2 * A * B.adjoint();

```

On the other hand the following example will lead to a **wrong** result: 



```
A.noalias() = A * B;

```

 because the result matrix A is also an operand of the matrix product. Therefore, there is no alternative than evaluating A \* B in a temporary, that is the default behavior when you write: 



```
A = A * B;

```


See also
class [NoAlias](classeigen_1_1noalias "Pseudo expression providing an operator = assuming no aliasing.") 
    norm()
------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [NumTraits](structeigen_1_1numtraits)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::norm |

 | inline |

 
 
Returns
, for vectors, the *l2* norm of `*this`, and for matrices the Frobenius norm. In both cases, it consists in the square root of the sum of the square of all the matrix entries. For vectors, this is also equals to the square root of the dot product of `*this` with itself.
 
See also

[lpNorm()](classeigen_1_1matrixbase#a72586ab059e889e7d2894ff227747e35), [dot()](classeigen_1_1matrixbase#adfd32bf5fcf6ee603c924dde9bf7bc39), [squaredNorm()](classeigen_1_1matrixbase#ac8da566526419f9742a6c471bbd87e0a) 
    normalize()
-----------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| void [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::normalize |

 | inline |

 
 Normalizes the vector, i.e. divides it by its own norm.

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 
Warning
If the input vector is too small (i.e., this->[norm()](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975)==0), then `*this` is left unchanged.
 
See also

[norm()](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975), [normalized()](classeigen_1_1matrixbase#a5cf2fd4c57e59604fd4116158fd34308) 
    normalized()
------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [MatrixBase](classeigen_1_1matrixbase)< Derived >::[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::normalized |

 | inline |

 
 
Returns
an expression of the quotient of `*this` by its own norm.
 
Warning
If the input vector is too small (i.e., this->[norm()](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975)==0), then this function returns a copy of the input.
 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 
See also

[norm()](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975), [normalize()](classeigen_1_1matrixbase#ad16303c47ba36f7a41ea264cb26bceb6) 
    operator!=()
------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| bool [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::operator!=  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 
Returns
true if at least one pair of coefficients of `*this` and *other* are not exactly equal to each other. 
 
Warning
When using floating point scalar values you probably should rather use a fuzzy comparison such as [isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) 
 
See also

[isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c), operator== 
    operator\*() [1/2]
------------------

    template<typename Derived >   template<typename DiagonalDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Product](classeigen_1_1product)< Derived, DiagonalDerived, LazyProduct > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::operator\*  | ( | const DiagonalBase< DiagonalDerived > &  | *a\_diagonal* | ) |  const |

 | inline |

 
 
Returns
the diagonal matrix product of `*this` by the diagonal matrix *diagonal*. 
    operator\*() [2/2]
------------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Product](classeigen_1_1product)< Derived, OtherDerived > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::operator\*  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 
Returns
the matrix product of `*this` and *other*.
 
Note
If instead of the matrix product you want the coefficient-wise product, see Cwise::operator\*().
 
See also

[lazyProduct()](classeigen_1_1matrixbase#ae0c280b1066c14ed577021f38876527f), operator\*=(const MatrixBase&), Cwise::operator\*() 
    operator\*=()
-------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::operator\*=  | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 replaces `*this` by `*this` \* *other*.

 
Returns
a reference to `*this` 
 Example: 



```
Matrix3f A = [Matrix3f::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(3,3), B;
B << 0,1,0,  
     0,0,1,  
     1,0,0;
cout << "At start, A = " << endl << A << endl;
A *= B;
cout << "After A \*= B, A = " << endl << A << endl;
A.applyOnTheRight(B);  // equivalent to A \*= B
cout << "After applyOnTheRight, A = " << endl << A << endl;

```

 Output: 



```
At start, A = 
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
After A *= B, A = 
 -0.33   0.68  0.597
 0.536 -0.211  0.823
-0.444  0.566 -0.605
After applyOnTheRight, A = 
 0.597  -0.33   0.68
 0.823  0.536 -0.211
-0.605 -0.444  0.566

```
    operator+=()
------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::operator+=  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 replaces `*this` by `*this` + *other*.

 
Returns
a reference to `*this` 
    operator-=()
------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::operator-=  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 replaces `*this` by `*this` - *other*.

 
Returns
a reference to `*this` 
    operator=()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::operator=  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *other* | ) |  |

 | inline |

 
 Special case of the template operator=, in order to prevent the compiler from generating a default operator= (issue hit with g++ 4.1) 

    operator==()
------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| bool [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::operator==  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 
Returns
true if each coefficients of `*this` and *other* are all exactly equal. 
 
Warning
When using floating point scalar values you probably should rather use a fuzzy comparison such as [isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) 
 
See also

[isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c), operator!= 
    operatorNorm()
--------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [MatrixBase](classeigen_1_1matrixbase)< Derived >::RealScalar [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::operatorNorm |

 | inline |

 
 Computes the L2 operator norm. 

 
Returns
Operator norm of the matrix.
 This is defined in the Eigenvalues module.



```
#include <Eigen/Eigenvalues> 

```

 This function computes the L2 operator norm of a matrix, which is also known as the spectral norm. The norm of a matrix \( A \) is defined to be 


 \[ \|A\|\_2 = \max\_x \frac{\|Ax\|\_2}{\|x\|\_2} \] 

  where the maximum is over all vectors and the norm on the right is the Euclidean vector norm. The norm equals the largest singular value, which is the square root of the largest eigenvalue of the positive semi-definite matrix \( A^\*A \).

 The current implementation uses the eigenvalues of \( A^\*A \), as computed by [SelfAdjointView::eigenvalues()](classeigen_1_1selfadjointview#ad4f34424b4ea12de9bbc5623cb938b4f "Computes the eigenvalues of a matrix."), to compute the operator norm of a matrix. The [SelfAdjointView](classeigen_1_1selfadjointview "Expression of a selfadjoint matrix from a triangular part of a dense matrix.") class provides a better algorithm for selfadjoint matrices.

 Example: 



```
MatrixXd ones = [MatrixXd::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)(3,3);
cout << "The operator norm of the 3x3 matrix of ones is "
     << ones.operatorNorm() << endl;

```

 Output: 



```
The operator norm of the 3x3 matrix of ones is 3

```


See also

[SelfAdjointView::eigenvalues()](classeigen_1_1selfadjointview#ad4f34424b4ea12de9bbc5623cb938b4f "Computes the eigenvalues of a matrix."), [SelfAdjointView::operatorNorm()](classeigen_1_1selfadjointview#a12a7da482e31ec9c517dca92dd7bae61 "Computes the L2 operator norm.") 
    partialPivLu()
--------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [PartialPivLU](classeigen_1_1partialpivlu)< typename [MatrixBase](classeigen_1_1matrixbase)< Derived >::[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) > [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::partialPivLu |

 | inline |

 
 This is defined in the LU module.



```
#include <Eigen/LU> 

```


Returns
the partial-pivoting LU decomposition of `*this`.
 
See also
class [PartialPivLU](classeigen_1_1partialpivlu "LU decomposition of a matrix with partial pivoting, and related features.") 
    pow() [1/2]
-----------

    template<typename Derived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const MatrixPowerReturnValue<Derived> [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::pow  | ( | const RealScalar &  | *p* | ) |  const |

 
 This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise power to `p` use [ArrayBase::pow](classeigen_1_1arraybase#a5df3d99d47747b72d61f235c9fb925e3) . 

 
Returns
an expression of the matrix power to `p` of `*this`. 
    pow() [2/2]
-----------

    template<typename Derived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const MatrixComplexPowerReturnValue<Derived> [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::pow  | ( | const std::complex< RealScalar > &  | *p* | ) |  const |

 
 This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise power to `p` use [ArrayBase::pow](classeigen_1_1arraybase#a5df3d99d47747b72d61f235c9fb925e3) . 

 
Returns
an expression of the matrix power to `p` of `*this`. 
    selfadjointView() [1/2]
-----------------------

    template<typename Derived >   template<unsigned int UpLo>  

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [MatrixBase](classeigen_1_1matrixbase)<Derived>::template SelfAdjointViewReturnType<UpLo>::Type [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::selfadjointView  | ( |  | ) |  |

 
 
Returns
an expression of a symmetric/self-adjoint view extracted from the upper or lower triangular part of the current matrix
 The parameter *UpLo* can be either `[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)` or `[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)` 

 Example: 



```
Matrix3i m = [Matrix3i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the symmetric matrix extracted from the upper part of m:" << endl
     << Matrix3i(m.selfadjointView<[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>()) << endl;
cout << "Here is the symmetric matrix extracted from the lower part of m:" << endl
     << Matrix3i(m.selfadjointView<[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>()) << endl;
```

 Output: 



```
Here is the matrix m:
 7  6 -3
-2  9  6
 6 -6 -5
Here is the symmetric matrix extracted from the upper part of m:
 7  6 -3
 6  9  6
-3  6 -5
Here is the symmetric matrix extracted from the lower part of m:
 7 -2  6
-2  9 -6
 6 -6 -5

```


See also
class [SelfAdjointView](classeigen_1_1selfadjointview "Expression of a selfadjoint matrix from a triangular part of a dense matrix.") 
    selfadjointView() [2/2]
-----------------------

    template<typename Derived >   template<unsigned int UpLo>  

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [MatrixBase](classeigen_1_1matrixbase)<Derived>::template ConstSelfAdjointViewReturnType<UpLo>::Type [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::selfadjointView  | ( |  | ) |  const |

 
 This is the const version of MatrixBase::selfadjointView() 

    setIdentity() [1/2]
-------------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| Derived & [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::setIdentity |

 | inline |

 
 Writes the identity expression (not necessarily square) into \*this.

 Example: 



```
Matrix4i m = [Matrix4i::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)();
m.block<3,3>(1,0).[setIdentity](classeigen_1_1matrixbase#a18e969adfdf2db4ac44c47fbdc854683)();
cout << m << endl;
```

 Output: 



```
0 0 0 0
1 0 0 0
0 1 0 0
0 0 1 0

```


See also
class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [Identity()](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f), [Identity(Index,Index)](classeigen_1_1matrixbase#acf33ce20ef03ead47cb3dbcd5f416ede), [isIdentity()](classeigen_1_1matrixbase#a4ccbd8dfa06e9d47b9bf84711f8b9d40) 
    setIdentity() [2/2]
-------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::setIdentity  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols* |
|  | ) |  |  |

 | inline |

 
 Resizes to the given size, and writes the identity expression (not necessarily square) into \*this. 

 
Parameters
 

|  |  |
| --- | --- |
| rows | the new number of rows  |
| cols | the new number of columns |

   Example: 



```
MatrixXf m;
m.setIdentity(3, 3);
cout << m << endl;

```

 Output: 



```
1 0 0
0 1 0
0 0 1

```


See also

[MatrixBase::setIdentity()](classeigen_1_1matrixbase#a18e969adfdf2db4ac44c47fbdc854683), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Identity()](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f) 
    setUnit() [1/2]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::setUnit  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *i* | ) |  |

 | inline |

 
 Set the coefficients of `*this` to the i-th unit (basis) vector. 

 
Parameters
 

|  |  |
| --- | --- |
| i | index of the unique coefficient to be set to 1 |

   This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 
See also

[MatrixBase::setIdentity()](classeigen_1_1matrixbase#a18e969adfdf2db4ac44c47fbdc854683), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Unit(Index,Index)](classeigen_1_1matrixbase#ac7a03a61014f37ddd2fe61ebac0c9539) 
    setUnit() [2/2]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::setUnit  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *newSize*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *i* |
|  | ) |  |  |

 | inline |

 
 Resizes to the given *newSize*, and writes the i-th unit (basis) vector into \*this. 

 
Parameters
 

|  |  |
| --- | --- |
| newSize | the new size of the vector  |
| i | index of the unique coefficient to be set to 1 |

   This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 
See also

[MatrixBase::setIdentity()](classeigen_1_1matrixbase#a18e969adfdf2db4ac44c47fbdc854683), class [CwiseNullaryOp](classeigen_1_1cwisenullaryop "Generic expression of a matrix where all coefficients are defined by a functor."), [MatrixBase::Unit(Index,Index)](classeigen_1_1matrixbase#ac7a03a61014f37ddd2fe61ebac0c9539) 
    sin()
-----

    template<typename Derived >  

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixFunctionReturnValue<Derived> [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::sin  | ( |  | ) |  const |

 
 This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise sine use ArrayBase::sin . 

 
Returns
an expression of the matrix sine of `*this`. 
    sinh()
------

    template<typename Derived >  

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixFunctionReturnValue<Derived> [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::sinh  | ( |  | ) |  const |

 
 This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise hyperbolic sine use ArrayBase::sinh . 

 
Returns
an expression of the matrix hyperbolic sine of `*this`. 
    sqrt()
------

    template<typename Derived >  

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixSquareRootReturnValue<Derived> [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::sqrt  | ( |  | ) |  const |

 
 This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise square root use ArrayBase::sqrt . 

 
Returns
an expression of the matrix square root of `*this`. 
    squaredNorm()
-------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [NumTraits](structeigen_1_1numtraits)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::squaredNorm |

 | inline |

 
 
Returns
, for vectors, the squared *l2* norm of `*this`, and for matrices the squared Frobenius norm. In both cases, it consists in the sum of the square of all the matrix entries. For vectors, this is also equals to the dot product of `*this` with itself.
 
See also

[dot()](classeigen_1_1matrixbase#adfd32bf5fcf6ee603c924dde9bf7bc39), [norm()](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975), [lpNorm()](classeigen_1_1matrixbase#a72586ab059e889e7d2894ff227747e35) 
    stableNorm()
------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [NumTraits](structeigen_1_1numtraits)< typename internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::stableNorm |

 | inline |

 
 
Returns
the *l2* norm of `*this` avoiding underflow and overflow. This version use a blockwise two passes algorithm: 1 - find the absolute largest coefficient `s` 2 - compute \( s \Vert \frac{\*this}{s} \Vert \) in a standard way
 For architecture/scalar types supporting vectorization, this version is faster than [blueNorm()](classeigen_1_1matrixbase#a3f3faa00163c16824ff03e58a210c74c). Otherwise the [blueNorm()](classeigen_1_1matrixbase#a3f3faa00163c16824ff03e58a210c74c) is much faster.

 
See also

[norm()](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975), [blueNorm()](classeigen_1_1matrixbase#a3f3faa00163c16824ff03e58a210c74c), [hypotNorm()](classeigen_1_1matrixbase#a32222d3b6677e6cdf0b801463f329b72) 
    stableNormalize()
-----------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| void [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::stableNormalize |

 | inline |

 
 Normalizes the vector while avoid underflow and overflow

 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 This method is analogue to the [normalize()](classeigen_1_1matrixbase#ad16303c47ba36f7a41ea264cb26bceb6) method, but it reduces the risk of underflow and overflow when computing the norm.

 
Warning
If the input vector is too small (i.e., this->[norm()](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975)==0), then `*this` is left unchanged.
 
See also

[stableNorm()](classeigen_1_1matrixbase#ab84d3e64f855813b1eea4202c0697dc1), [stableNormalized()](classeigen_1_1matrixbase#a399dca938633b9f8df5ec4beefeccec0), [normalize()](classeigen_1_1matrixbase#ad16303c47ba36f7a41ea264cb26bceb6) 
    stableNormalized()
------------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [MatrixBase](classeigen_1_1matrixbase)< Derived >::[PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::stableNormalized |

 | inline |

 
 
Returns
an expression of the quotient of `*this` by its own norm while avoiding underflow and overflow.
 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 This method is analogue to the [normalized()](classeigen_1_1matrixbase#a5cf2fd4c57e59604fd4116158fd34308) method, but it reduces the risk of underflow and overflow when computing the norm.

 
Warning
If the input vector is too small (i.e., this->[norm()](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975)==0), then this function returns a copy of the input.
 
See also

[stableNorm()](classeigen_1_1matrixbase#ab84d3e64f855813b1eea4202c0697dc1), [stableNormalize()](classeigen_1_1matrixbase#a0b1443fa322615379557ade3399a3c3c), [normalized()](classeigen_1_1matrixbase#a5cf2fd4c57e59604fd4116158fd34308) 
    trace()
-------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| internal::traits< Derived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::trace |

 | inline |

 
 
Returns
the trace of `*this`, i.e. the sum of the coefficients on the main diagonal.
 `*this` can be any matrix, not necessarily square.

 
See also

[diagonal()](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3), [sum()](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c) 
    triangularView() [1/2]
----------------------

    template<typename Derived >   template<unsigned int Mode>  

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [MatrixBase](classeigen_1_1matrixbase)<Derived>::template TriangularViewReturnType<Mode>::Type [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::triangularView  | ( |  | ) |  |

 
 
Returns
an expression of a triangular view extracted from the current matrix
 The parameter *Mode* can have the following values: `[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)`, `[StrictlyUpper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda7b37877e0b9b0df28c9c2b669a633265)`, `[UnitUpper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdadd28224d7ea92689930be73c1b50b0ad)`, `[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)`, `[StrictlyLower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda2424988b6fca98be70b595632753ba81)`, `[UnitLower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda8f40b928c10a71ba03e5f75ad2a72fda)`.

 Example: 



```
Matrix3i m = [Matrix3i::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the upper-triangular matrix extracted from m:" << endl
     << Matrix3i(m.triangularView<[Eigen::Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>()) << endl;
cout << "Here is the strictly-upper-triangular matrix extracted from m:" << endl
     << Matrix3i(m.triangularView<[Eigen::StrictlyUpper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda7b37877e0b9b0df28c9c2b669a633265)>()) << endl;
cout << "Here is the unit-lower-triangular matrix extracted from m:" << endl
     << Matrix3i(m.triangularView<[Eigen::UnitLower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda8f40b928c10a71ba03e5f75ad2a72fda)>()) << endl;
// FIXME need to implement output for triangularViews (Bug 885)
```

 Output: 



```
Here is the matrix m:
 7  6 -3
-2  9  6
 6 -6 -5
Here is the upper-triangular matrix extracted from m:
 7  6 -3
 0  9  6
 0  0 -5
Here is the strictly-upper-triangular matrix extracted from m:
 0  6 -3
 0  0  6
 0  0  0
Here is the unit-lower-triangular matrix extracted from m:
 1  0  0
-2  1  0
 6 -6  1

```


See also
class [TriangularView](classeigen_1_1triangularview "Expression of a triangular part in a matrix.") 
    triangularView() [2/2]
----------------------

    template<typename Derived >   template<unsigned int Mode>  

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [MatrixBase](classeigen_1_1matrixbase)<Derived>::template ConstTriangularViewReturnType<Mode>::Type [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::triangularView  | ( |  | ) |  const |

 
 This is the const version of MatrixBase::triangularView() 

    Unit() [1/2]
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [MatrixBase](classeigen_1_1matrixbase)< Derived >::BasisReturnType [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::Unit  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *i* | ) |  |

 | inlinestatic |

 
 
Returns
an expression of the i-th unit (basis) vector.
 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 This variant is for fixed-size vector only.

 
See also

[MatrixBase::Unit(Index,Index)](classeigen_1_1matrixbase#ac7a03a61014f37ddd2fe61ebac0c9539), [MatrixBase::UnitX()](classeigen_1_1matrixbase#a8a555b7cf626cced54670b98668c4e6d), [MatrixBase::UnitY()](classeigen_1_1matrixbase#a00850083489e20249b1d05b394fc5efc), [MatrixBase::UnitZ()](classeigen_1_1matrixbase#aabdcdeff1c822a5465fcbe1f78e5afe0), [MatrixBase::UnitW()](classeigen_1_1matrixbase#af56ba94e5b0330827003eadd26cfadc2) 
    Unit() [2/2]
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [MatrixBase](classeigen_1_1matrixbase)< Derived >::BasisReturnType [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::Unit  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *newSize*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *i* |
|  | ) |  |  |

 | inlinestatic |

 
 
Returns
an expression of the i-th unit (basis) vector.
 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 
See also

[MatrixBase::Unit(Index)](classeigen_1_1matrixbase#a9daf6d22d10ed8ae00432b0f641455df), [MatrixBase::UnitX()](classeigen_1_1matrixbase#a8a555b7cf626cced54670b98668c4e6d), [MatrixBase::UnitY()](classeigen_1_1matrixbase#a00850083489e20249b1d05b394fc5efc), [MatrixBase::UnitZ()](classeigen_1_1matrixbase#aabdcdeff1c822a5465fcbe1f78e5afe0), [MatrixBase::UnitW()](classeigen_1_1matrixbase#af56ba94e5b0330827003eadd26cfadc2) 
    UnitW()
-------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [MatrixBase](classeigen_1_1matrixbase)< Derived >::BasisReturnType [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::UnitW |

 | inlinestatic |

 
 
Returns
an expression of the W axis unit vector (0,0,0,1)
 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 
See also

[MatrixBase::Unit(Index,Index)](classeigen_1_1matrixbase#ac7a03a61014f37ddd2fe61ebac0c9539), [MatrixBase::Unit(Index)](classeigen_1_1matrixbase#a9daf6d22d10ed8ae00432b0f641455df), [MatrixBase::UnitY()](classeigen_1_1matrixbase#a00850083489e20249b1d05b394fc5efc), [MatrixBase::UnitZ()](classeigen_1_1matrixbase#aabdcdeff1c822a5465fcbe1f78e5afe0), [MatrixBase::UnitW()](classeigen_1_1matrixbase#af56ba94e5b0330827003eadd26cfadc2) 
    UnitX()
-------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [MatrixBase](classeigen_1_1matrixbase)< Derived >::BasisReturnType [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::UnitX |

 | inlinestatic |

 
 
Returns
an expression of the X axis unit vector (1{,0}^\*)
 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 
See also

[MatrixBase::Unit(Index,Index)](classeigen_1_1matrixbase#ac7a03a61014f37ddd2fe61ebac0c9539), [MatrixBase::Unit(Index)](classeigen_1_1matrixbase#a9daf6d22d10ed8ae00432b0f641455df), [MatrixBase::UnitY()](classeigen_1_1matrixbase#a00850083489e20249b1d05b394fc5efc), [MatrixBase::UnitZ()](classeigen_1_1matrixbase#aabdcdeff1c822a5465fcbe1f78e5afe0), [MatrixBase::UnitW()](classeigen_1_1matrixbase#af56ba94e5b0330827003eadd26cfadc2) 
    UnitY()
-------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [MatrixBase](classeigen_1_1matrixbase)< Derived >::BasisReturnType [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::UnitY |

 | inlinestatic |

 
 
Returns
an expression of the Y axis unit vector (0,1{,0}^\*)
 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 
See also

[MatrixBase::Unit(Index,Index)](classeigen_1_1matrixbase#ac7a03a61014f37ddd2fe61ebac0c9539), [MatrixBase::Unit(Index)](classeigen_1_1matrixbase#a9daf6d22d10ed8ae00432b0f641455df), [MatrixBase::UnitY()](classeigen_1_1matrixbase#a00850083489e20249b1d05b394fc5efc), [MatrixBase::UnitZ()](classeigen_1_1matrixbase#aabdcdeff1c822a5465fcbe1f78e5afe0), [MatrixBase::UnitW()](classeigen_1_1matrixbase#af56ba94e5b0330827003eadd26cfadc2) 
    UnitZ()
-------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [MatrixBase](classeigen_1_1matrixbase)< Derived >::BasisReturnType [Eigen::MatrixBase](classeigen_1_1matrixbase)< Derived >::UnitZ |

 | inlinestatic |

 
 
Returns
an expression of the Z axis unit vector (0,0,1{,0}^\*)
 This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.

 
See also

[MatrixBase::Unit(Index,Index)](classeigen_1_1matrixbase#ac7a03a61014f37ddd2fe61ebac0c9539), [MatrixBase::Unit(Index)](classeigen_1_1matrixbase#a9daf6d22d10ed8ae00432b0f641455df), [MatrixBase::UnitY()](classeigen_1_1matrixbase#a00850083489e20249b1d05b394fc5efc), [MatrixBase::UnitZ()](classeigen_1_1matrixbase#aabdcdeff1c822a5465fcbe1f78e5afe0), [MatrixBase::UnitW()](classeigen_1_1matrixbase#af56ba94e5b0330827003eadd26cfadc2) 
   

---

The documentation for this class was generated from the following files:* [MatrixBase.h](https://eigen.tuxfamily.org/dox/MatrixBase_8h_source.html)
* [LDLT.h](https://eigen.tuxfamily.org/dox/LDLT_8h_source.html)
* [LLT.h](https://eigen.tuxfamily.org/dox/LLT_8h_source.html)
* [Assign.h](https://eigen.tuxfamily.org/dox/Assign_8h_source.html)
* [CwiseBinaryOp.h](https://eigen.tuxfamily.org/dox/CwiseBinaryOp_8h_source.html)
* [CwiseNullaryOp.h](https://eigen.tuxfamily.org/dox/CwiseNullaryOp_8h_source.html)
* [Diagonal.h](https://eigen.tuxfamily.org/dox/Diagonal_8h_source.html)
* [DiagonalMatrix.h](https://eigen.tuxfamily.org/dox/DiagonalMatrix_8h_source.html)
* [DiagonalProduct.h](https://eigen.tuxfamily.org/dox/DiagonalProduct_8h_source.html)
* [Dot.h](https://eigen.tuxfamily.org/dox/Dot_8h_source.html)
* [ForceAlignedAccess.h](https://eigen.tuxfamily.org/dox/ForceAlignedAccess_8h_source.html)
* [GeneralProduct.h](https://eigen.tuxfamily.org/dox/GeneralProduct_8h_source.html)
* [NoAlias.h](https://eigen.tuxfamily.org/dox/NoAlias_8h_source.html)
* [PermutationMatrix.h](https://eigen.tuxfamily.org/dox/PermutationMatrix_8h_source.html)
* [Redux.h](https://eigen.tuxfamily.org/dox/Redux_8h_source.html)
* [SelfAdjointView.h](https://eigen.tuxfamily.org/dox/SelfAdjointView_8h_source.html)
* [StableNorm.h](https://eigen.tuxfamily.org/dox/StableNorm_8h_source.html)
* [Transpose.h](https://eigen.tuxfamily.org/dox/Transpose_8h_source.html)
* [TriangularMatrix.h](https://eigen.tuxfamily.org/dox/TriangularMatrix_8h_source.html)
* [MatrixBaseEigenvalues.h](https://eigen.tuxfamily.org/dox/MatrixBaseEigenvalues_8h_source.html)
* [EulerAngles.h](https://eigen.tuxfamily.org/dox/EulerAngles_8h_source.html)
* [Homogeneous.h](https://eigen.tuxfamily.org/dox/Homogeneous_8h_source.html)
* [OrthoMethods.h](https://eigen.tuxfamily.org/dox/OrthoMethods_8h_source.html)
* [Householder.h](https://eigen.tuxfamily.org/dox/Householder_8h_source.html)
* [Jacobi.h](https://eigen.tuxfamily.org/dox/Jacobi_8h_source.html)
* [Determinant.h](https://eigen.tuxfamily.org/dox/Determinant_8h_source.html)
* [FullPivLU.h](https://eigen.tuxfamily.org/dox/FullPivLU_8h_source.html)
* [InverseImpl.h](https://eigen.tuxfamily.org/dox/InverseImpl_8h_source.html)
* [PartialPivLU.h](https://eigen.tuxfamily.org/dox/PartialPivLU_8h_source.html)
* [ColPivHouseholderQR.h](https://eigen.tuxfamily.org/dox/ColPivHouseholderQR_8h_source.html)
* [CompleteOrthogonalDecomposition.h](https://eigen.tuxfamily.org/dox/CompleteOrthogonalDecomposition_8h_source.html)
* [FullPivHouseholderQR.h](https://eigen.tuxfamily.org/dox/FullPivHouseholderQR_8h_source.html)
* [HouseholderQR.h](https://eigen.tuxfamily.org/dox/HouseholderQR_8h_source.html)
* [SparseView.h](https://eigen.tuxfamily.org/dox/SparseView_8h_source.html)
* [BDCSVD.h](https://eigen.tuxfamily.org/dox/BDCSVD_8h_source.html)
* [JacobiSVD.h](https://eigen.tuxfamily.org/dox/JacobiSVD_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1MatrixBase.html>

Eigen::PastixLDLT
=================

  
### template<typename \_MatrixType, int \_UpLo> class Eigen::PastixLDLT< \_MatrixType, \_UpLo >

 A sparse direct supernodal Cholesky ([LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.")) factorization and solver based on the PaStiX library. 

 This class is used to solve the linear systems A.X = B via a LDL^T supernodal Cholesky factorization available in the PaStiX library. The matrix A should be symmetric and positive definite WARNING Selfadjoint complex matrices are not supported in the current version of PaStiX The vectors or matrices X and B can be either dense or sparse

 
Template Parameters
 

|  |  |
| --- | --- |
| MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<>  |
| UpLo | The part of the matrix to use : Lower or Upper. The default is Lower as required by PaStiX |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 
See also

[Sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept), class [SimplicialLDLT](classeigen_1_1simplicialldlt "A direct sparse LDLT Cholesky factorizations without square root.") 
  Inherits Eigen::PastixBase< Derived >.

 

|  |
| --- |
|  |
| void  | [analyzePattern](classeigen_1_1pastixldlt#a01947862303ca404b9ce5033751a221b) (const MatrixType &matrix) |
|  |
| void  | [compute](classeigen_1_1pastixldlt#abf3135c2dc17d9df26fef80e6456a691) (const MatrixType &matrix) |
|  |
| void  | [factorize](classeigen_1_1pastixldlt#a182b0ee676a131413363cc73bc309ef7) (const MatrixType &matrix) |
|  |

  analyzePattern()
----------------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PastixLDLT](classeigen_1_1pastixldlt)< \_MatrixType, \_UpLo >::analyzePattern  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Compute the LDL^T symbolic factorization of `matrix` using its sparsity pattern The result of this operation can be used with successive matrices having the same pattern as `matrix` 



See also

[factorize()](classeigen_1_1pastixldlt#a182b0ee676a131413363cc73bc309ef7) 
    compute()
---------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PastixLDLT](classeigen_1_1pastixldlt)< \_MatrixType, \_UpLo >::compute  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Compute the L and D factors of the LDL^T factorization of `matrix` 



See also

[analyzePattern()](classeigen_1_1pastixldlt#a01947862303ca404b9ce5033751a221b) [factorize()](classeigen_1_1pastixldlt#a182b0ee676a131413363cc73bc309ef7) 
    factorize()
-----------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PastixLDLT](classeigen_1_1pastixldlt)< \_MatrixType, \_UpLo >::factorize  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Compute the LDL^T supernodal numerical factorization of `matrix` 

   

---

The documentation for this class was generated from the following file:* [PaStiXSupport.h](https://eigen.tuxfamily.org/dox/PaStiXSupport_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1PastixLDLT.html>

Eigen::PastixLLT
================

  
### template<typename \_MatrixType, int \_UpLo> class Eigen::PastixLLT< \_MatrixType, \_UpLo >

 A sparse direct supernodal Cholesky ([LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.")) factorization and solver based on the PaStiX library. 

 This class is used to solve the linear systems A.X = B via a LL^T supernodal Cholesky factorization available in the PaStiX library. The matrix A should be symmetric and positive definite WARNING Selfadjoint complex matrices are not supported in the current version of PaStiX The vectors or matrices X and B can be either dense or sparse

 
Template Parameters
 

|  |  |
| --- | --- |
| MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<>  |
| UpLo | The part of the matrix to use : Lower or Upper. The default is Lower as required by PaStiX |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 
See also

[Sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept), class [SimplicialLLT](classeigen_1_1simplicialllt "A direct sparse LLT Cholesky factorizations.") 
  Inherits Eigen::PastixBase< Derived >.

 

|  |
| --- |
|  |
| void  | [analyzePattern](classeigen_1_1pastixllt#a671e8444ae2f04db3565e35caa958667) (const MatrixType &matrix) |
|  |
| void  | [compute](classeigen_1_1pastixllt#a54fcdef53903851e2d8113a6ed330b5c) (const MatrixType &matrix) |
|  |
| void  | [factorize](classeigen_1_1pastixllt#a63dac317804b18a4704a519d7bdfaaff) (const MatrixType &matrix) |
|  |

  analyzePattern()
----------------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PastixLLT](classeigen_1_1pastixllt)< \_MatrixType, \_UpLo >::analyzePattern  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Compute the LL^T symbolic factorization of `matrix` using its sparsity pattern The result of this operation can be used with successive matrices having the same pattern as `matrix` 



See also

[factorize()](classeigen_1_1pastixllt#a63dac317804b18a4704a519d7bdfaaff) 
    compute()
---------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PastixLLT](classeigen_1_1pastixllt)< \_MatrixType, \_UpLo >::compute  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Compute the L factor of the LL^T supernodal factorization of `matrix` 



See also

[analyzePattern()](classeigen_1_1pastixllt#a671e8444ae2f04db3565e35caa958667) [factorize()](classeigen_1_1pastixllt#a63dac317804b18a4704a519d7bdfaaff) 
    factorize()
-----------

    template<typename \_MatrixType , int \_UpLo>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PastixLLT](classeigen_1_1pastixllt)< \_MatrixType, \_UpLo >::factorize  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Compute the LL^T supernodal numerical factorization of `matrix` 



See also

[analyzePattern()](classeigen_1_1pastixllt#a671e8444ae2f04db3565e35caa958667) 
   

---

The documentation for this class was generated from the following file:* [PaStiXSupport.h](https://eigen.tuxfamily.org/dox/PaStiXSupport_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1PastixLLT.html>

Eigen::PastixLU
===============

  
### template<typename \_MatrixType, bool IsStrSym> class Eigen::PastixLU< \_MatrixType, IsStrSym >

 Interface to the PaStix solver. 

 [Sparse](structeigen_1_1sparse) direct LU solver based on PaStiX library.

 This class is used to solve the linear systems A.X = B via the PaStix library. The matrix can be either real or complex, symmetric or not.

 
See also
TutorialSparseDirectSolvers
 This class is used to solve the linear systems A.X = B with a supernodal LU factorization in the PaStiX library. The matrix A should be squared and nonsingular PaStiX requires that the matrix A has a symmetric structural pattern. This interface can symmetrize the input matrix otherwise. The vectors or matrices X and B can be either dense or sparse.

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<>  |
| IsStrSym | Indicates if the input matrix has a symmetric pattern, default is false NOTE : Note that if the analysis and factorization phase are called separately, the input matrix will be symmetrized at each call, hence it is advised to symmetrize the matrix in a end-user program and set `IsStrSym` to true |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 
See also

[Sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept), class [SparseLU](classeigen_1_1sparselu "Sparse supernodal LU factorization for general matrices.") 
  Inherits Eigen::PastixBase< Derived >.

 

|  |
| --- |
|  |
| void  | [analyzePattern](classeigen_1_1pastixlu#abae3ca7f1254106d9e2d5e0f273189fa) (const MatrixType &matrix) |
|  |
| void  | [compute](classeigen_1_1pastixlu#adc28ee2550086c7bdfe991d624bde2ee) (const MatrixType &matrix) |
|  |
| void  | [factorize](classeigen_1_1pastixlu#ac178a87b499a2210a402787fbfd98f26) (const MatrixType &matrix) |
|  |

  analyzePattern()
----------------

    template<typename \_MatrixType , bool IsStrSym>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PastixLU](classeigen_1_1pastixlu)< \_MatrixType, IsStrSym >::analyzePattern  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Compute the LU symbolic factorization of `matrix` using its sparsity pattern. Several ordering methods can be used at this step. See the PaStiX user's manual. The result of this operation can be used with successive matrices having the same pattern as `matrix` 



See also

[factorize()](classeigen_1_1pastixlu#ac178a87b499a2210a402787fbfd98f26) 
    compute()
---------

    template<typename \_MatrixType , bool IsStrSym>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PastixLU](classeigen_1_1pastixlu)< \_MatrixType, IsStrSym >::compute  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Compute the LU supernodal factorization of `matrix`. iparm and dparm can be used to tune the PaStiX parameters. see the PaStiX user's manual 



See also

[analyzePattern()](classeigen_1_1pastixlu#abae3ca7f1254106d9e2d5e0f273189fa) [factorize()](classeigen_1_1pastixlu#ac178a87b499a2210a402787fbfd98f26) 
    factorize()
-----------

    template<typename \_MatrixType , bool IsStrSym>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PastixLU](classeigen_1_1pastixlu)< \_MatrixType, IsStrSym >::factorize  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Compute the LU supernodal factorization of `matrix` WARNING The matrix `matrix` should have the same structural pattern as the same used in the analysis phase. 



See also

[analyzePattern()](classeigen_1_1pastixlu#abae3ca7f1254106d9e2d5e0f273189fa) 
   

---

The documentation for this class was generated from the following file:* [PaStiXSupport.h](https://eigen.tuxfamily.org/dox/PaStiXSupport_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1PastixLU.html>

Eigen::PermutationStorage
=========================

  
The type used to identify a permutation storage. 

 


---

The documentation for this struct was generated from the following file:* [Constants.h](https://eigen.tuxfamily.org/dox/Constants_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/structEigen_1_1PermutationStorage.html>

Eigen::ParametrizedLine
=======================

  
### template<typename \_Scalar, int \_AmbientDim, int \_Options> class Eigen::ParametrizedLine< \_Scalar, \_AmbientDim, \_Options >

 A parametrized line. 

 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```

A parametrized line is defined by an origin point \( \mathbf{o} \) and a unit direction vector \( \mathbf{d} \) such that the line corresponds to the set \( l(t) = \mathbf{o} + t \mathbf{d} \), \( t \in \mathbf{R} \).

 
Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the scalar type, i.e., the type of the coefficients  |
| \_AmbientDim | the dimension of the ambient space, can be a compile time value or Dynamic.  |

   


|  |
| --- |
|  |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1parametrizedline#a3c9f84dd8608940282b16652a296c764) |
|  |




|  |
| --- |
|  |
| template<typename NewScalarType >  |
| internal::cast\_return\_type< [ParametrizedLine](classeigen_1_1parametrizedline), [ParametrizedLine](classeigen_1_1parametrizedline)< NewScalarType, AmbientDimAtCompileTime, Options > >::type  | [cast](classeigen_1_1parametrizedline#acd906e5340b05a41e098496aa861e5a5) () const |
|  |
| [Index](classeigen_1_1parametrizedline#a3c9f84dd8608940282b16652a296c764) | [dim](classeigen_1_1parametrizedline#a68d562318c269edaa8ecb7aca98706d4) () const |
|  |
| RealScalar  | [distance](classeigen_1_1parametrizedline#a25c3e5822420b850e92023cec644c0a0) (const [VectorType](classeigen_1_1matrix) &p) const |
|  |
| template<int OtherOptions>  |
| \_Scalar  | [intersection](classeigen_1_1parametrizedline#a980dc8dc59ea6de2fb496055181a1d08) (const [Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, OtherOptions > &hyperplane) const |
|  |
| template<int OtherOptions>  |
| \_Scalar  | [intersectionParameter](classeigen_1_1parametrizedline#af1d5100ee79a651e97ef716ad1af2ebe) (const [Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, OtherOptions > &hyperplane) const |
|  |
| template<int OtherOptions>  |
| [VectorType](classeigen_1_1matrix) | [intersectionPoint](classeigen_1_1parametrizedline#a0ebbede4dd8f60da43128af9aabf0ead) (const [Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, OtherOptions > &hyperplane) const |
|  |
| bool  | [isApprox](classeigen_1_1parametrizedline#adb58b8eb1d9a81a4b02b7bbbebd84413) (const [ParametrizedLine](classeigen_1_1parametrizedline) &other, const typename [NumTraits](structeigen_1_1numtraits)< Scalar >::Real &prec=[NumTraits](structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
|  | [ParametrizedLine](classeigen_1_1parametrizedline#a43e71a77728409e15220495dc9724f04) () |
|  |
| template<int OtherOptions>  |
|  | [ParametrizedLine](classeigen_1_1parametrizedline#a3f26a2ac6fe39d39ba72e148f0f877ad) (const [Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, OtherOptions > &hyperplane) |
|  |
| template<typename OtherScalarType , int OtherOptions>  |
|  | [ParametrizedLine](classeigen_1_1parametrizedline#abf4318b4e0c2469e83ab049c9c177b80) (const [ParametrizedLine](classeigen_1_1parametrizedline)< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &other) |
|  |
|  | [ParametrizedLine](classeigen_1_1parametrizedline#a9ae3a16ee1d2a6cf09f45007451fa148) (const [VectorType](classeigen_1_1matrix) &origin, const [VectorType](classeigen_1_1matrix) &direction) |
|  |
|  | [ParametrizedLine](classeigen_1_1parametrizedline#a5261e771f71d975eaa9ebf8bc598129b) ([Index](classeigen_1_1parametrizedline#a3c9f84dd8608940282b16652a296c764) \_dim) |
|  |
| [VectorType](classeigen_1_1matrix) | [pointAt](classeigen_1_1parametrizedline#a925fd2bd7ce6927de196859f2f5bec41) (const Scalar &t) const |
|  |
| [VectorType](classeigen_1_1matrix) | [projection](classeigen_1_1parametrizedline#a37c3fe8af9a90adce20b1f6ee62c04ea) (const [VectorType](classeigen_1_1matrix) &p) const |
|  |
| RealScalar  | [squaredDistance](classeigen_1_1parametrizedline#a5cb6544a7fff4c3571c0a5eb82eec8bb) (const [VectorType](classeigen_1_1matrix) &p) const |
|  |
| template<typename XprType >  |
| [ParametrizedLine](classeigen_1_1parametrizedline) &  | [transform](classeigen_1_1parametrizedline#a1c2a0ceacef80e76b71f56992a721e6a) (const [MatrixBase](classeigen_1_1matrixbase)< XprType > &mat, [TransformTraits](group__enums#gaee59a86102f150923b0cac6d4ff05107) traits=[Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb)) |
|  |
| template<int TrOptions>  |
| [ParametrizedLine](classeigen_1_1parametrizedline) &  | [transform](classeigen_1_1parametrizedline#a09d711ff37c2f421c65f398b9c7120b1) (const [Transform](classeigen_1_1transform)< Scalar, AmbientDimAtCompileTime, [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb), TrOptions > &t, [TransformTraits](group__enums#gaee59a86102f150923b0cac6d4ff05107) traits=[Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb)) |
|  |




|  |
| --- |
|  |
| static [ParametrizedLine](classeigen_1_1parametrizedline) | [Through](classeigen_1_1parametrizedline#a9e6c2b409eae9da4f66439fff8d4ffcc) (const [VectorType](classeigen_1_1matrix) &p0, const [VectorType](classeigen_1_1matrix) &p1) |
|  |

  Index
-----

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |
| --- |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::[Index](classeigen_1_1parametrizedline#a3c9f84dd8608940282b16652a296c764) |

 
 
**[Deprecated:](deprecated#_deprecated000026)**
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3 
    ParametrizedLine() [1/5]
------------------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::[ParametrizedLine](classeigen_1_1parametrizedline) | ( |  | ) |  |

 | inline |

 
 Default constructor without initialization 

    ParametrizedLine() [2/5]
------------------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::[ParametrizedLine](classeigen_1_1parametrizedline) | ( | [Index](classeigen_1_1parametrizedline#a3c9f84dd8608940282b16652a296c764) | *\_dim* | ) |  |

 | inlineexplicit |

 
 Constructs a dynamic-size line with *\_dim* the dimension of the ambient space 

    ParametrizedLine() [3/5]
------------------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::[ParametrizedLine](classeigen_1_1parametrizedline) | ( | const [VectorType](classeigen_1_1matrix) &  | *origin*,  |
|  |  | const [VectorType](classeigen_1_1matrix) &  | *direction* |
|  | ) |  |  |

 | inline |

 
 Initializes a parametrized line of direction *direction* and origin *origin*. 



Warning
the vector direction is assumed to be normalized. 
    ParametrizedLine() [4/5]
------------------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>   template<int OtherOptions>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::[ParametrizedLine](classeigen_1_1parametrizedline) | ( | const [Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, OtherOptions > &  | *hyperplane* | ) |  |

 | inlineexplicit |

 
 Constructs a parametrized line from a 2D hyperplane

 
Warning
the ambient space must have dimension 2 such that the hyperplane actually describes a line 
    ParametrizedLine() [5/5]
------------------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>   template<typename OtherScalarType , int OtherOptions>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::[ParametrizedLine](classeigen_1_1parametrizedline) | ( | const [ParametrizedLine](classeigen_1_1parametrizedline)< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &  | *other* | ) |  |

 | inlineexplicit |

 
 Copy constructor with scalar type conversion 

    cast()
------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>   template<typename NewScalarType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::cast\_return\_type<[ParametrizedLine](classeigen_1_1parametrizedline), [ParametrizedLine](classeigen_1_1parametrizedline)<NewScalarType,AmbientDimAtCompileTime,Options> >::type [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::cast  | ( |  | ) |  const |

 | inline |

 
 
Returns

`*this` with scalar type casted to *NewScalarType* 
 Note that if *NewScalarType* is equal to the current scalar type of `*this` then this function smartly returns a const reference to `*this`. 

    dim()
-----

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](classeigen_1_1parametrizedline#a3c9f84dd8608940282b16652a296c764) [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::dim  | ( |  | ) |  const |

 | inline |

 
 
Returns
the dimension in which the line holds 
    distance()
----------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| RealScalar [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::distance  | ( | const [VectorType](classeigen_1_1matrix) &  | *p* | ) |  const |

 | inline |

 
 
Returns
the distance of a point *p* to its projection onto the line `*this`. 
 
See also

[squaredDistance()](classeigen_1_1parametrizedline#a5cb6544a7fff4c3571c0a5eb82eec8bb) 
    intersection()
--------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>   template<int OtherOptions>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| \_Scalar [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::intersection  | ( | const [Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, OtherOptions > &  | *hyperplane* | ) |  const |

 | inline |

 
 
**[Deprecated:](deprecated#_deprecated000025)**
use intersectionParameter() 
 
Returns
the parameter value of the intersection between `*this` and the given *hyperplane* 
    intersectionParameter()
-----------------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>   template<int OtherOptions>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| \_Scalar [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::intersectionParameter  | ( | const [Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, OtherOptions > &  | *hyperplane* | ) |  const |

 | inline |

 
 
Returns
the parameter value of the intersection between `*this` and the given *hyperplane* 
    intersectionPoint()
-------------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>   template<int OtherOptions>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::[VectorType](classeigen_1_1matrix) [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::intersectionPoint  | ( | const [Hyperplane](classeigen_1_1hyperplane)< \_Scalar, \_AmbientDim, OtherOptions > &  | *hyperplane* | ) |  const |

 | inline |

 
 
Returns
the point of the intersection between `*this` and the given hyperplane 
    isApprox()
----------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::isApprox  | ( | const [ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options > &  | *other*,  |
|  |  | const typename [NumTraits](structeigen_1_1numtraits)< Scalar >::Real &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<Scalar>::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 
Returns

`true` if `*this` is approximately equal to *other*, within the precision determined by *prec*.
 
See also

[MatrixBase::isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) 
    pointAt()
---------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::[VectorType](classeigen_1_1matrix) [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::pointAt  | ( | const Scalar &  | *t* | ) |  const |

 | inline |

 
 
Returns
the point at *t* along this line 
    projection()
------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [VectorType](classeigen_1_1matrix) [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::projection  | ( | const [VectorType](classeigen_1_1matrix) &  | *p* | ) |  const |

 | inline |

 
 
Returns
the projection of a point *p* onto the line `*this`. 
    squaredDistance()
-----------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| RealScalar [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::squaredDistance  | ( | const [VectorType](classeigen_1_1matrix) &  | *p* | ) |  const |

 | inline |

 
 
Returns
the squared distance of a point *p* to its projection onto the line `*this`. 
 
See also

[distance()](classeigen_1_1parametrizedline#a25c3e5822420b850e92023cec644c0a0) 
    Through()
---------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| static [ParametrizedLine](classeigen_1_1parametrizedline) [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::Through  | ( | const [VectorType](classeigen_1_1matrix) &  | *p0*,  |
|  |  | const [VectorType](classeigen_1_1matrix) &  | *p1* |
|  | ) |  |  |

 | inlinestatic |

 
 Constructs a parametrized line going from *p0* to *p1*. 

    transform() [1/2]
-----------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>   template<typename XprType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [ParametrizedLine](classeigen_1_1parametrizedline)& [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::transform  | ( | const [MatrixBase](classeigen_1_1matrixbase)< XprType > &  | *mat*,  |
|  |  | [TransformTraits](group__enums#gaee59a86102f150923b0cac6d4ff05107) | *traits* = `[Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb)` |
|  | ) |  |  |

 | inline |

 
 Applies the transformation matrix *mat* to `*this` and returns a reference to `*this`.

 
Parameters
 

|  |  |
| --- | --- |
| mat | the Dim x Dim transformation matrix  |
| traits | specifies whether the matrix *mat* represents an [Isometry](group__enums#ggaee59a86102f150923b0cac6d4ff05107a84413028615d2d718bafd2dfb93dafef) or a more generic [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb) transformation. The default is [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb).  |

      transform() [2/2]
-----------------

    template<typename \_Scalar , int \_AmbientDim, int \_Options>   template<int TrOptions>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [ParametrizedLine](classeigen_1_1parametrizedline)& [Eigen::ParametrizedLine](classeigen_1_1parametrizedline)< \_Scalar, \_AmbientDim, \_Options >::transform  | ( | const [Transform](classeigen_1_1transform)< Scalar, AmbientDimAtCompileTime, [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb), TrOptions > &  | *t*,  |
|  |  | [TransformTraits](group__enums#gaee59a86102f150923b0cac6d4ff05107) | *traits* = `[Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb)` |
|  | ) |  |  |

 | inline |

 
 Applies the transformation *t* to `*this` and returns a reference to `*this`.

 
Parameters
 

|  |  |
| --- | --- |
| t | the transformation of dimension Dim  |
| traits | specifies whether the transformation *t* represents an [Isometry](group__enums#ggaee59a86102f150923b0cac6d4ff05107a84413028615d2d718bafd2dfb93dafef) or a more generic [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb) transformation. The default is [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb). Other kind of transformations are not supported.  |

     

---

The documentation for this class was generated from the following file:* [ParametrizedLine.h](https://eigen.tuxfamily.org/dox/ParametrizedLine_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1ParametrizedLine.html>

Eigen::PermutationWrapper
=========================

  
### template<typename \_IndicesType> class Eigen::PermutationWrapper< \_IndicesType >

 Class to view a vector of integers as a permutation matrix. 

 
Template Parameters
 

|  |  |
| --- | --- |
| \_IndicesType | the type of the vector of integer (can be any compatible expression) |

   This class allows to view any vector expression of integers as a permutation matrix.

 
See also
class [PermutationBase](classeigen_1_1permutationbase "Base class for permutations."), class [PermutationMatrix](classeigen_1_1permutationmatrix "Permutation matrix.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
| const internal::remove\_all< typename IndicesType::Nested >::type &  | [indices](classeigen_1_1permutationwrapper#a88ae93cc14c136b2eec4a286b4c10c34) () const |
|  |
| - Public Member Functions inherited from [Eigen::PermutationBase< PermutationWrapper< \_IndicesType > >](classeigen_1_1permutationbase) |
| [PermutationWrapper](classeigen_1_1permutationwrapper)< \_IndicesType > &  | [applyTranspositionOnTheLeft](classeigen_1_1permutationbase#a4e3455bf12b56123e38a8220c6b508dc) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) i, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) j) |
|  |
| [PermutationWrapper](classeigen_1_1permutationwrapper)< \_IndicesType > &  | [applyTranspositionOnTheRight](classeigen_1_1permutationbase#a5f98da0712570d0c4b12f61839ae4193) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) i, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) j) |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1permutationbase#a26961ef6cfef586d412054ee5a20d430) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [determinant](classeigen_1_1permutationbase#a1fc7a5823544700c2e0795e87f9c6d09) () const |
|  |
| IndicesType &  | [indices](classeigen_1_1permutationbase#a16fa3afafdf703399d62c80f950802f1) () |
|  |
| const IndicesType &  | [indices](classeigen_1_1permutationbase#adec727546b6882ecaa57e76d084951c5) () const |
|  |
| InverseReturnType  | [inverse](classeigen_1_1permutationbase#adb9af427f317202366c2832876064eb3) () const |
|  |
| PlainPermutationType  | [operator\*](classeigen_1_1permutationbase#a865e88989a76b7e92f39bad5250b89c4) (const InverseImpl< Other, [PermutationStorage](structeigen_1_1permutationstorage) > &other) const |
|  |
| PlainPermutationType  | [operator\*](classeigen_1_1permutationbase#ae81574e059f6b9b7de2ea747fd346a1b) (const [PermutationBase](classeigen_1_1permutationbase)< Other > &other) const |
|  |
| [PermutationWrapper](classeigen_1_1permutationwrapper)< \_IndicesType > &  | [operator=](classeigen_1_1permutationbase#a8e15540549c5a4e2d5b3b426fef8fbcf) (const [PermutationBase](classeigen_1_1permutationbase)< OtherDerived > &other) |
|  |
| [PermutationWrapper](classeigen_1_1permutationwrapper)< \_IndicesType > &  | [operator=](classeigen_1_1permutationbase#acaa7cce9ea62c811cec12e86dbb2f0de) (const TranspositionsBase< OtherDerived > &tr) |
|  |
| void  | [resize](classeigen_1_1permutationbase#a0e0fda6e84d69e02432e4770359bb532) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) newSize) |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1permutationbase#acd7ed28ee514287f933de8467768925b) () const |
|  |
| void  | [setIdentity](classeigen_1_1permutationbase#a6805bb75fd7966ea71895c24ff196444) () |
|  |
| void  | [setIdentity](classeigen_1_1permutationbase#a830a80511a61634ef437795916f7f8da) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) newSize) |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1permutationbase#a2216f9ce7b453ac39c46ff0323daeac9) () const |
|  |
| DenseMatrixType  | [toDenseMatrix](classeigen_1_1permutationbase#addfa91a2c2c69c76159f1091368a505f) () const |
|  |
| InverseReturnType  | [transpose](classeigen_1_1permutationbase#a05805e9f4182eec3f6632e1c765b5ffe) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  indices()
---------

    template<typename \_IndicesType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const internal::remove\_all<typename IndicesType::Nested>::type& [Eigen::PermutationWrapper](classeigen_1_1permutationwrapper)< \_IndicesType >::indices  | ( |  | ) |  const |

 | inline |

 
 const version of [indices()](classeigen_1_1permutationbase#a16fa3afafdf703399d62c80f950802f1). 

   

---

The documentation for this class was generated from the following file:* [PermutationMatrix.h](https://eigen.tuxfamily.org/dox/PermutationMatrix_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1PermutationWrapper.html>

Eigen::Ref
==========

  
### template<typename PlainObjectType, int Options, typename StrideType> class Eigen::Ref< PlainObjectType, Options, StrideType >

 A matrix or vector expression mapping an existing expression. 

 
Template Parameters
 

|  |  |
| --- | --- |
| PlainObjectType | the equivalent matrix type of the mapped data  |
| Options | specifies the pointer alignment in bytes. It can be: `[Aligned128](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a60057da2408e499b5656244d0b26cc20)`, , `[Aligned64](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a2639cfa1e8faac751556bc0009fe95a4)`, `[Aligned32](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a8a380b1cd0c3e5a6cceac06f8235157a)`, `[Aligned16](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ad0b140cd97bc74365b51843d28379655)`, `[Aligned8](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a9d99d7a9ff1da5c949bec22733bfba14)` or `[Unaligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a4e19dd09d5ff42295ba1d72d12a46686)`. The default is `[Unaligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1a4e19dd09d5ff42295ba1d72d12a46686)`.  |
| StrideType | optionally specifies strides. By default, [Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.") implies a contiguous storage along the inner dimension (inner stride==1), but accepts a variable outer stride (leading dimension). This can be overridden by specifying strides. The type passed here must be a specialization of the [Stride](classeigen_1_1stride "Holds strides information for Map.") template, see examples below. |

   This class provides a way to write non-template functions taking [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") objects as parameters while limiting the number of copies. A Ref<> object can represent either a const expression or a l-value: 



```
// in-out argument:
void foo1(Ref<VectorXf> x);
 
// read-only const argument:
void foo2(const Ref<const VectorXf>& x);

```

In the in-out case, the input argument must satisfy the constraints of the actual Ref<> type, otherwise a compilation issue will be triggered. By default, a Ref<VectorXf> can reference any dense vector expression of float having a contiguous memory layout. Likewise, a Ref<MatrixXf> can reference any column-major dense matrix expression of float whose column's elements are contiguously stored with the possibility to have a constant space in-between each column, i.e. the inner stride must be equal to 1, but the outer stride (or leading dimension) can be greater than the number of rows.

 In the const case, if the input expression does not match the above requirement, then it is evaluated into a temporary before being passed to the function. Here are some examples: 



```
MatrixXf A;
VectorXf a;
foo1(a.head());             // OK
foo1(A.col());              // OK
foo1(A.row());              // Compilation error because here innerstride!=1
foo2(A.row());              // Compilation error because A.row() is a 1xN object while foo2 is expecting a Nx1 object
foo2(A.row().transpose());  // The row is copied into a contiguous temporary
foo2(2*a);                  // The expression is evaluated into a temporary
foo2(A.col().segment(2,4)); // No temporary

```

The range of inputs that can be referenced without temporary can be enlarged using the last two template parameters. Here is an example accepting an innerstride!=1: 



```
// in-out argument:
void foo3(Ref<VectorXf,0,InnerStride<> > x);
foo3(A.row());              // OK

```

 The downside here is that the function foo3 might be significantly slower than foo1 because it won't be able to exploit vectorization, and will involve more expensive address computations even if the input is contiguously stored in memory. To overcome this issue, one might propose to overload internally calling a template function, e.g.: 



```
// in the .h:
void foo(const Ref<MatrixXf>& A);
void foo(const Ref<MatrixXf,0,Stride<> >& A);
 
// in the .cpp:
template<typename TypeOfA> void foo_impl(const TypeOfA& A) {
    ... // crazy code goes here
}
void foo(const Ref<MatrixXf>& A) { foo_impl(A); }
void foo(const Ref<MatrixXf,0,Stride<> >& A) { foo_impl(A); }

```

See also the following stackoverflow questions for further references:


* [Correct usage of the Eigen::Ref<> class](http://stackoverflow.com/questions/21132538/correct-usage-of-the-eigenref-class)

 
See also

[PlainObjectBase::Map()](classeigen_1_1plainobjectbase#aaf9fcc07dc13f89cf71d4a4e2b220d24), [Storage orders](group__topicstorageorders) 
  Inherits Eigen::RefBase< Derived >.

 

|  |
| --- |
|  |
| template<typename Derived >  |
|  | [Ref](classeigen_1_1ref#a037addaa81f13e5765e30a92d2c4f2b1) ([DenseBase](classeigen_1_1densebase)< Derived > &expr) |
|  |

  Ref()
-----

    template<typename PlainObjectType , int Options, typename StrideType >   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Ref](classeigen_1_1ref)< PlainObjectType, Options, StrideType >::[Ref](classeigen_1_1ref) | ( | [DenseBase](classeigen_1_1densebase)< Derived > &  | *expr* | ) |  |

 | inline |

 
 Implicit constructor from any dense expression 

   

---

The documentation for this class was generated from the following file:* [Ref.h](https://eigen.tuxfamily.org/dox/Ref_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Ref.html>

Eigen::Replicate
================

  
### template<typename MatrixType, int RowFactor, int ColFactor> class Eigen::Replicate< MatrixType, RowFactor, ColFactor >

 Expression of the multiple replication of a matrix or vector. 

 
Template Parameters
 

|  |  |
| --- | --- |
| MatrixType | the type of the object we are replicating  |
| RowFactor | number of repetitions at compile time along the vertical direction, can be Dynamic.  |
| ColFactor | number of repetitions at compile time along the horizontal direction, can be Dynamic. |

   This class represents an expression of the multiple replication of a matrix or vector. It is the return type of [DenseBase::replicate()](classeigen_1_1densebase#a60dadfe80b813d808e91e4521c722a8e) and most of the time this is the only way it is used.

 
See also

[DenseBase::replicate()](classeigen_1_1densebase#a60dadfe80b813d808e91e4521c722a8e) 
  Inherits internal::dense\_xpr\_base::type.

 

---

The documentation for this class was generated from the following file:* [Replicate.h](https://eigen.tuxfamily.org/dox/Replicate_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Replicate.html>

Eigen::Reverse
==============

  
### template<typename MatrixType, int Direction> class Eigen::Reverse< MatrixType, Direction >

 Expression of the reverse of a vector or matrix. 

 
Template Parameters
 

|  |  |
| --- | --- |
| MatrixType | the type of the object of which we are taking the reverse  |
| Direction | defines the direction of the reverse operation, can be Vertical, Horizontal, or BothDirections |

   This class represents an expression of the reverse of a vector. It is the return type of [MatrixBase::reverse()](classeigen_1_1densebase#a38ea394036d8b096abf322469c80198f) and [VectorwiseOp::reverse()](classeigen_1_1vectorwiseop#ab8caf5367e2bd636536c8a0e0c89fe15) and most of the time this is the only way it is used.

 
See also

[MatrixBase::reverse()](classeigen_1_1densebase#a38ea394036d8b096abf322469c80198f), [VectorwiseOp::reverse()](classeigen_1_1vectorwiseop#ab8caf5367e2bd636536c8a0e0c89fe15) 
  Inherits internal::dense\_xpr\_base::type.

 

---

The documentation for this class was generated from the following file:* [Reverse.h](https://eigen.tuxfamily.org/dox/Reverse_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Reverse.html>

Eigen::Homogeneous
==================

  
### template<typename MatrixType, int \_Direction> class Eigen::Homogeneous< MatrixType, \_Direction >

 Expression of one (or a set of) homogeneous vector(s) 

 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Parameters
 

|  |  |
| --- | --- |
| MatrixType | the type of the object in which we are making homogeneous |

   This class represents an expression of one (or a set of) homogeneous vector(s). It is the return type of [MatrixBase::homogeneous()](group__geometry__module#gaf3229c2d3669e983075ab91f7f480cb1) and most of the time this is the only way it is used.

 
See also

[MatrixBase::homogeneous()](group__geometry__module#gaf3229c2d3669e983075ab91f7f480cb1) 
     ![Inheritance graph]       

|  |
| --- |
|  |
| - Public Types inherited from [Eigen::DenseBase< Homogeneous< MatrixType, \_Direction > >](classeigen_1_1densebase) |
| typedef random\_access\_iterator\_type  | [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) |
|  |
| typedef random\_access\_iterator\_type  | [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) |
|  |
| typedef [Array](classeigen_1_1array)< typename internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), AutoAlign|(internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) &RowMajorBit ? RowMajor :ColMajor), internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) >  | [PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< typename internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), AutoAlign|(internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) &RowMajorBit ? RowMajor :ColMajor), internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) >  | [PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e) |
|  |
| typedef internal::conditional< internal::is\_same< typename internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::XprKind, [MatrixXpr](structeigen_1_1matrixxpr) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), [PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e), [PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb) >::type  | [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) |
|  | The plain matrix or array type corresponding to this expression. [More...](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) |
|  |
| typedef internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) |
|  |
| typedef internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) | [StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) |
|  | The type used to store indices. [More...](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) |
|  |
| typedef [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [value\_type](classeigen_1_1densebase#a9276182dab8236c33f1e7abf491d504d) |
|  |
| - Public Member Functions inherited from [Eigen::MatrixBase< Homogeneous< MatrixType, \_Direction > >](classeigen_1_1matrixbase) |
| const MatrixFunctionReturnValue< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [acosh](classeigen_1_1matrixbase#a765140ddee0c6b39bbfa3b8917de67be) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise inverse hyperbolic cosine use ArrayBase::acosh . [More...](classeigen_1_1matrixbase#a765140ddee0c6b39bbfa3b8917de67be) |
|  |
| const AdjointReturnType  | [adjoint](classeigen_1_1matrixbase#afacca1f88da57e5cd87dd07c8ff926bb) () const |
|  |
| void  | [adjointInPlace](classeigen_1_1matrixbase#a51c5982c1f64e45a939515b701fa6f4a) () |
|  |
| void  | [applyHouseholderOnTheLeft](classeigen_1_1matrixbase#a8f2c8059ef3f04cfa0c73b4c012db855) (const EssentialPart &essential, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &tau, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*workspace) |
|  |
| void  | [applyHouseholderOnTheRight](classeigen_1_1matrixbase#ab3e52262b41fa40e194dda245e0f9675) (const EssentialPart &essential, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &tau, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*workspace) |
|  |
| void  | [applyOnTheLeft](classeigen_1_1matrixbase#a3a08ad41e81d8ad4a37b5d5c7490e765) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| void  | [applyOnTheLeft](classeigen_1_1matrixbase#ae669131f6e18f7e8f06fae271754f435) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) p, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) q, const [JacobiRotation](classeigen_1_1jacobirotation)< OtherScalar > &j) |
|  |
| void  | [applyOnTheRight](classeigen_1_1matrixbase#a45d91752925d2757fc8058a293b15462) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| void  | [applyOnTheRight](group__jacobi__module#gaa07f741c86219601664433777827bf1c) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) p, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) q, const [JacobiRotation](classeigen_1_1jacobirotation)< OtherScalar > &j) |
|  |
| [ArrayWrapper](classeigen_1_1arraywrapper)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [array](classeigen_1_1matrixbase#a354c33eec32ceb4193d002f4d41c0497) () |
|  |
| const [ArrayWrapper](classeigen_1_1arraywrapper)< const [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [array](classeigen_1_1matrixbase#a72f287fe7b2a7e7a66d16cc88166d47f) () const |
|  |
| const [DiagonalWrapper](classeigen_1_1diagonalwrapper)< const [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [asDiagonal](classeigen_1_1matrixbase#a14235b62c90f93fe910070b4743782d0) () const |
|  |
| const MatrixFunctionReturnValue< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [asinh](classeigen_1_1matrixbase#a8efaf691d9c74b362a43b1b793706ea1) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise inverse hyperbolic sine use ArrayBase::asinh . [More...](classeigen_1_1matrixbase#a8efaf691d9c74b362a43b1b793706ea1) |
|  |
| const MatrixFunctionReturnValue< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [atanh](classeigen_1_1matrixbase#ab87d29c00e6d75aeab43eff53bf5164c) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise inverse hyperbolic cosine use ArrayBase::atanh . [More...](classeigen_1_1matrixbase#ab87d29c00e6d75aeab43eff53bf5164c) |
|  |
| [BDCSVD](classeigen_1_1bdcsvd)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [bdcSvd](classeigen_1_1matrixbase#ae171b74b5d530846ee0836135ffcf837) (unsigned int computationOptions=0) const |
|  |
| RealScalar  | [blueNorm](classeigen_1_1matrixbase#a3f3faa00163c16824ff03e58a210c74c) () const |
|  |
| const [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [colPivHouseholderQr](classeigen_1_1matrixbase#adee8c19c833245bbb00a591dce68e8a4) () const |
|  |
| const [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [completeOrthogonalDecomposition](classeigen_1_1matrixbase#ae90b6846f05bd30b8d52b66e427e3e09) () const |
|  |
| void  | [computeInverseAndDetWithCheck](classeigen_1_1matrixbase#a7baaf2fdec0191a2166cf9fd84a2dcb2) (ResultType &[inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf), typename ResultType::Scalar &[determinant](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061), bool &invertible, const RealScalar &absDeterminantThreshold=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| void  | [computeInverseWithCheck](classeigen_1_1matrixbase#a116f3b50d2af7dbdf7473e517a5b8b0f) (ResultType &[inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf), bool &invertible, const RealScalar &absDeterminantThreshold=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| const MatrixFunctionReturnValue< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [cos](classeigen_1_1matrixbase#a34d626eb756bbeb4069d1eb0e6494c65) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise cosine use ArrayBase::cos . [More...](classeigen_1_1matrixbase#a34d626eb756bbeb4069d1eb0e6494c65) |
|  |
| const MatrixFunctionReturnValue< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [cosh](classeigen_1_1matrixbase#a627e6f11bf5854ade9a5abfc344c0367) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise hyperbolic cosine use ArrayBase::cosh . [More...](classeigen_1_1matrixbase#a627e6f11bf5854ade9a5abfc344c0367) |
|  |
| [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [cross](group__geometry__module#ga0024b44eca99cb7135887c2aaf319d28) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [cross3](group__geometry__module#gabde56e2a0baba550815a0b05139e4d42) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [determinant](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) () const |
|  |
| [DiagonalReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3) () |
|  |
| [ConstDiagonalReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1matrixbase#aebdeedcf67e46d969c556c6c7d9780ee) () const |
|  |
| [DiagonalDynamicIndexReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1matrixbase#a8a13d4b8efbd7797ee8efd3dd988a7f7) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) index) |
|  |
| [ConstDiagonalDynamicIndexReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1matrixbase#aed11a711c0a3d5dbf8bc094008e29846) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) index) const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [diagonalSize](classeigen_1_1matrixbase#ab79e511b9322b8b801858e253fb257eb) () const |
|  |
| [ScalarBinaryOpTraits](structeigen_1_1scalarbinaryoptraits)< typename internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), typename internal::traits< OtherDerived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::ReturnType  | [dot](classeigen_1_1matrixbase#adfd32bf5fcf6ee603c924dde9bf7bc39) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| EigenvaluesReturnType  | [eigenvalues](classeigen_1_1matrixbase#a30430fa3d5b4e74d312fd4f502ac984d) () const |
|  | Computes the eigenvalues of a matrix. [More...](classeigen_1_1matrixbase#a30430fa3d5b4e74d312fd4f502ac984d) |
|  |
| [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), 3, 1 >  | [eulerAngles](group__geometry__module#ga17994d2e81b723295f5bc3b1f862ed3b) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) a0, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) a1, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) a2) const |
|  |
| const MatrixExponentialReturnValue< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [exp](classeigen_1_1matrixbase#a70901e189e876f64d7f3fee1dbe942cc) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise exponential use ArrayBase::exp . [More...](classeigen_1_1matrixbase#a70901e189e876f64d7f3fee1dbe942cc) |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [forceAlignedAccess](classeigen_1_1matrixbase#afdaf810ac1708ca6d6ecdcfac1e06699) () |
|  |
| const [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [forceAlignedAccess](classeigen_1_1matrixbase#ad2fdb842d9a715f8778d0b33c29cfe49) () const |
|  |
| internal::conditional< Enable, [ForceAlignedAccess](classeigen_1_1forcealignedaccess)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >, [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > & >::type  | [forceAlignedAccessIf](classeigen_1_1matrixbase#ae35213d1dd4dd13ebe9a7a762d6bb847) () |
|  |
| internal::add\_const\_on\_value\_type< typename internal::conditional< Enable, [ForceAlignedAccess](classeigen_1_1forcealignedaccess)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >, [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > & >::type >::type  | [forceAlignedAccessIf](classeigen_1_1matrixbase#af42d92f115d4b8fa3d5aa731ed496ed1) () const |
|  |
| const [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [fullPivHouseholderQr](classeigen_1_1matrixbase#a863bc0e06b641a089508eabec6835ab2) () const |
|  |
| const [FullPivLU](classeigen_1_1fullpivlu)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [fullPivLu](classeigen_1_1matrixbase#a25da97d31acab0ee5d9d13bdbb0569da) () const |
|  |
| const HNormalizedReturnType  | [hnormalized](group__geometry__module#gadc0e3dd3510cb5a6e70aca9aab1cbf19) () const |
|  | homogeneous normalization [More...](group__geometry__module#gadc0e3dd3510cb5a6e70aca9aab1cbf19) |
|  |
| [HomogeneousReturnType](classeigen_1_1homogeneous) | [homogeneous](group__geometry__module#gaf3229c2d3669e983075ab91f7f480cb1) () const |
|  |
| const [HouseholderQR](classeigen_1_1householderqr)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [householderQr](classeigen_1_1matrixbase#a9a9377aab1cea26db5f25bab7e682f8f) () const |
|  |
| RealScalar  | [hypotNorm](classeigen_1_1matrixbase#a32222d3b6677e6cdf0b801463f329b72) () const |
|  |
| const [Inverse](classeigen_1_1inverse)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf) () const |
|  |
| bool  | [isDiagonal](classeigen_1_1matrixbase#a97027ea54c8cd1ddb1c578fee5cedc67) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isIdentity](classeigen_1_1matrixbase#a4ccbd8dfa06e9d47b9bf84711f8b9d40) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isLowerTriangular](classeigen_1_1matrixbase#a1e96c42d79a56f0a6ade30ce031e17eb) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isOrthogonal](classeigen_1_1matrixbase#aefdc8e4e4c156fdd79a21479e75dcd8a) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isUnitary](classeigen_1_1matrixbase#a8a7ee34ce202cac3eeea9cf20c9e4833) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isUpperTriangular](classeigen_1_1matrixbase#aae3ec1660bb4ac584220481c54ab4a64) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| [JacobiSVD](classeigen_1_1jacobisvd)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [jacobiSvd](classeigen_1_1matrixbase#a5745dca9c54390633b434e54a1d1eedd) (unsigned int computationOptions=0) const |
|  |
| const [Product](classeigen_1_1product)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction >, OtherDerived, LazyProduct >  | [lazyProduct](classeigen_1_1matrixbase#ae0c280b1066c14ed577021f38876527f) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| const [LDLT](classeigen_1_1ldlt)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [ldlt](classeigen_1_1matrixbase#a0ecf058a0727a4cab8b42d79e95072e1) () const |
|  |
| const [LLT](classeigen_1_1llt)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [llt](classeigen_1_1matrixbase#a90c45f7a30265df792d5aeaddead2635) () const |
|  |
| const MatrixLogarithmReturnValue< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [log](classeigen_1_1matrixbase#a4dc57b319fc1cf8c9035016e56602a7d) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise logarithm use ArrayBase::log . [More...](classeigen_1_1matrixbase#a4dc57b319fc1cf8c9035016e56602a7d) |
|  |
| RealScalar  | [lpNorm](classeigen_1_1matrixbase#a72586ab059e889e7d2894ff227747e35) () const |
|  |
| const [PartialPivLU](classeigen_1_1partialpivlu)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [lu](classeigen_1_1matrixbase#afb312afbfe960cbda67811552d876fae) () const |
|  |
| void  | [makeHouseholder](classeigen_1_1matrixbase#a13291e900f7e81ddc6e5b8802f82092b) (EssentialPart &essential, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &tau, RealScalar &beta) const |
|  |
| void  | [makeHouseholderInPlace](classeigen_1_1matrixbase#aebf4bac7dffe2685ab93734fb776e817) ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &tau, RealScalar &beta) |
|  |
|  const MatrixFunctionReturnValue< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [matrixFunction](classeigen_1_1matrixbase#a1a6cc9f734eb175e785a1118305245fc) (StemFunction f) const |
|  | Helper function for the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module).  |
|  |
| [NoAlias](classeigen_1_1noalias)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction >, [Eigen::MatrixBase](classeigen_1_1matrixbase) >  | [noalias](classeigen_1_1matrixbase#a2c1085de7645f23f240876388457da0b) () |
|  |
| RealScalar  | [norm](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975) () const |
|  |
| void  | [normalize](classeigen_1_1matrixbase#ad16303c47ba36f7a41ea264cb26bceb6) () |
|  |
| const [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [normalized](classeigen_1_1matrixbase#a5cf2fd4c57e59604fd4116158fd34308) () const |
|  |
| bool  | [operator!=](classeigen_1_1matrixbase#a028c7ac8094d610042fd0f9feca68f63) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| const [Product](classeigen_1_1product)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction >, DiagonalDerived, LazyProduct >  | [operator\*](classeigen_1_1matrixbase#a36fb95c37f0a454e0e2e5cb120b2df7f) (const DiagonalBase< DiagonalDerived > &[diagonal](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3)) const |
|  |
| const [Product](classeigen_1_1product)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction >, OtherDerived >  | [operator\*](classeigen_1_1matrixbase#ae2d220efbf7047f0894787888288cfcc) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [operator\*=](classeigen_1_1matrixbase#a3783b6168995ca117a1c19fea3630ac4) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [operator+=](classeigen_1_1matrixbase#a983cc3be0bbe11b3d041a415b76ce010) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [operator-=](classeigen_1_1matrixbase#a1042124b0ddee66e78ac7b0a9ac4cc9c) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [operator=](classeigen_1_1matrixbase#a373bf62ad398162df5a71963ed7cbeff) (const [MatrixBase](classeigen_1_1matrixbase) &other) |
|  |
| bool  | [operator==](classeigen_1_1matrixbase#a80e3e1e83fdf43f9f7fb6ff51836b24d) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| RealScalar  | [operatorNorm](classeigen_1_1matrixbase#a0ff9bc0b9bea2d0822a2bf3192783102) () const |
|  | Computes the L2 operator norm. [More...](classeigen_1_1matrixbase#a0ff9bc0b9bea2d0822a2bf3192783102) |
|  |
| const [PartialPivLU](classeigen_1_1partialpivlu)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [partialPivLu](classeigen_1_1matrixbase#a6199d8aaf26c1b8ac3097fdfa7733a1e) () const |
|  |
| const MatrixPowerReturnValue< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [pow](classeigen_1_1matrixbase#a7ae6c25e6a94a60e147741e76203a73b) (const RealScalar &p) const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise power to `p` use ArrayBase::pow . [More...](classeigen_1_1matrixbase#a7ae6c25e6a94a60e147741e76203a73b) |
|  |
| const MatrixComplexPowerReturnValue< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [pow](classeigen_1_1matrixbase#a91dcacf224bd8b18346914bdf7eefc31) (const std::complex< RealScalar > &p) const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise power to `p` use ArrayBase::pow . [More...](classeigen_1_1matrixbase#a91dcacf224bd8b18346914bdf7eefc31) |
|  |
| [MatrixBase](classeigen_1_1matrixbase)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::template SelfAdjointViewReturnType< UpLo >::Type  | [selfadjointView](classeigen_1_1matrixbase#ad446541377593656c1399862fe6a0f94) () |
|  |
| [MatrixBase](classeigen_1_1matrixbase)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::template ConstSelfAdjointViewReturnType< UpLo >::Type  | [selfadjointView](classeigen_1_1matrixbase#a67eb836f331d9b567e7f36ec0782fa07) () const |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [setIdentity](classeigen_1_1matrixbase#a18e969adfdf2db4ac44c47fbdc854683) () |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [setIdentity](classeigen_1_1matrixbase#a97dec020729928e328fe8ae9aad1e99e) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  | Resizes to the given size, and writes the identity expression (not necessarily square) into \*this. [More...](classeigen_1_1matrixbase#a97dec020729928e328fe8ae9aad1e99e) |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [setUnit](classeigen_1_1matrixbase#ac7cf3e0e69550d36de8778b09a645afd) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) i) |
|  | Set the coefficients of `*this` to the i-th unit (basis) vector. [More...](classeigen_1_1matrixbase#ac7cf3e0e69550d36de8778b09a645afd) |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [setUnit](classeigen_1_1matrixbase#a90bed3b6468a17a9054b07cde7a751a6) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) newSize, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) i) |
|  | Resizes to the given *newSize*, and writes the i-th unit (basis) vector into \*this. [More...](classeigen_1_1matrixbase#a90bed3b6468a17a9054b07cde7a751a6) |
|  |
| const MatrixFunctionReturnValue< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [sin](classeigen_1_1matrixbase#a02f4ff0fcbbae2f3ccaa5981e8ad5e34) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise sine use ArrayBase::sin . [More...](classeigen_1_1matrixbase#a02f4ff0fcbbae2f3ccaa5981e8ad5e34) |
|  |
| const MatrixFunctionReturnValue< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [sinh](classeigen_1_1matrixbase#a9c37eab2dc7baf83809269254c9129e0) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise hyperbolic sine use ArrayBase::sinh . [More...](classeigen_1_1matrixbase#a9c37eab2dc7baf83809269254c9129e0) |
|  |
| const [SparseView](classeigen_1_1sparseview)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [sparseView](group__sparsecore__module#ga320dd291cbf4339c6118c41521b75350) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &m\_reference=[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)(0), const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real &m\_epsilon=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| const MatrixSquareRootReturnValue< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [sqrt](classeigen_1_1matrixbase#ad873dca860bd47baeeede8663e161b83) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise square root use ArrayBase::sqrt . [More...](classeigen_1_1matrixbase#ad873dca860bd47baeeede8663e161b83) |
|  |
| RealScalar  | [squaredNorm](classeigen_1_1matrixbase#ac8da566526419f9742a6c471bbd87e0a) () const |
|  |
| RealScalar  | [stableNorm](classeigen_1_1matrixbase#ab84d3e64f855813b1eea4202c0697dc1) () const |
|  |
| void  | [stableNormalize](classeigen_1_1matrixbase#a0b1443fa322615379557ade3399a3c3c) () |
|  |
| const [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [stableNormalized](classeigen_1_1matrixbase#a399dca938633b9f8df5ec4beefeccec0) () const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [trace](classeigen_1_1matrixbase#a544b609f65eb2bd3e368b3fc2d79479e) () const |
|  |
| [MatrixBase](classeigen_1_1matrixbase)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::template TriangularViewReturnType< Mode >::Type  | [triangularView](classeigen_1_1matrixbase#a56665aa894f49f2765291fee0eaeb9c6) () |
|  |
| [MatrixBase](classeigen_1_1matrixbase)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::template ConstTriangularViewReturnType< Mode >::Type  | [triangularView](classeigen_1_1matrixbase#aa044521145e74117ad1df42460d7b520) () const |
|  |
| [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [unitOrthogonal](group__geometry__module#gaa0dc2c32a9379eeb2b4c4a05c1a6fe52) (void) const |
|  |
| - Public Member Functions inherited from [Eigen::DenseBase< Homogeneous< MatrixType, \_Direction > >](classeigen_1_1densebase) |
| bool  | [all](classeigen_1_1densebase#ae42ab60296c120e9f45ce3b44e1761a4) () const |
|  |
| bool  | [allFinite](classeigen_1_1densebase#af1e669fd3aaae50a4870dc1b8f3b8884) () const |
|  |
| bool  | [any](classeigen_1_1densebase#abfbf4cb72dd577e62fbe035b1c53e695) () const |
|  |
| [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) | [begin](classeigen_1_1densebase#a57591454af931f9dffa71c9da28d5641) () |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [begin](classeigen_1_1densebase#ad9368ce70b06167ec5fc19398d329f5e) () const |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [cbegin](classeigen_1_1densebase#ae9a3dfd9b826ba3103de0128576fb15b) () const |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [cend](classeigen_1_1densebase#aeb3b76f02986c2af2521d07164b5ffde) () const |
|  |
| [ColwiseReturnType](classeigen_1_1vectorwiseop) | [colwise](classeigen_1_1densebase#a1c0e1b6067ec1de6cb8799da55aa7d30) () |
|  |
| [ConstColwiseReturnType](classeigen_1_1vectorwiseop) | [colwise](classeigen_1_1densebase#a58837c81de446efbdb58da07b73a63c1) () const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [count](classeigen_1_1densebase#a229be090c665b9bf7d1fcdfd1ab6e0c1) () const |
|  |
| [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) | [end](classeigen_1_1densebase#ae71d079e16d91360d10066b316b48485) () |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [end](classeigen_1_1densebase#ab34773522e43bfb02e9cf652d7b5dd60) () const |
|  |
| EvalReturnType  | [eval](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b) () const |
|  |
| void  | [fill](classeigen_1_1densebase#a9be169c308801411aa24be93d30930bf) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| EIGEN\_DEPRECATED const [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [flagged](classeigen_1_1densebase#a9b3f75f76ae40439be870258e80c7346) () const |
|  |
| const [WithFormat](classeigen_1_1withformat)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [format](classeigen_1_1densebase#ab231f1a6057f28d4244145e12c9fc0c7) (const [IOFormat](structeigen_1_1ioformat) &fmt) const |
|  |
| bool  | [hasNaN](classeigen_1_1densebase#ab13d158c900560d3e1b25d85d2d33dd6) () const |
|  |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [innerSize](classeigen_1_1densebase#a58ca41d9635a8ab3c5a268ef3f7f0d75) () const |
|  |
| bool  | [isApprox](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isApproxToConstant](classeigen_1_1densebase#af9b150d48bc5e4366887ccb466e40c6b) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isConstant](classeigen_1_1densebase#a1ca84e4179b3e5081ed11d89bbd9e74f) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isMuchSmallerThan](classeigen_1_1densebase#a3c4db0c6dd974fa88bbb58b2cf3d5664) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isMuchSmallerThan](classeigen_1_1densebase#adfca6ff4e473f68fbbeabbd03b7504a9) (const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real &other, const RealScalar &prec) const |
|  |
| bool  | [isOnes](classeigen_1_1densebase#aa56d6b4477cd3c92a9cf42f4b96e47c2) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isZero](classeigen_1_1densebase#af36014ec300f53a65083057ed4e89822) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| EIGEN\_DEPRECATED [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [lazyAssign](classeigen_1_1densebase#a6bc6c096e3bfc726f28315daecd21b3f) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1) () const |
|  |
| internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#aced8ffda52ff061b6586ace2657ebf30) (IndexType \*index) const |
|  |
| internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#a3780b7a9cd184d0b4f3ea797eba9e2b3) (IndexType \*row, IndexType \*col) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [mean](classeigen_1_1densebase#a21ac6c0419a72ad7a88ea0bc189017d7) () const |
|  |
| internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#a0739f9c868c331031c7810e21838dcb2) () const |
|  |
| internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#ac9265f4f91430b9cc75d63fb6865bb29) (IndexType \*index) const |
|  |
| internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#aa28152ba4a42b2d112e5fec5469ec4c1) (IndexType \*row, IndexType \*col) const |
|  |
| const [NestByValue](classeigen_1_1nestbyvalue)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [nestByValue](classeigen_1_1densebase#a3e2761e2b6da74dba1d17b40cc918bf7) () const |
|  |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [nonZeros](classeigen_1_1densebase#acb8d5574eff335381e7441ade87700a0) () const |
|  |
| [CommaInitializer](structeigen_1_1commainitializer)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [operator<<](classeigen_1_1densebase#a0f0e34696162b34762b2bf4bd948f90c) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| [CommaInitializer](structeigen_1_1commainitializer)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >  | [operator<<](classeigen_1_1densebase#a0e575eb0ba6cc6bc5f347872abd8509d) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &s) |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [operator=](classeigen_1_1densebase#a5281dadff89f46eef719b38e5d073a8f) (const [DenseBase](classeigen_1_1densebase) &other) |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [operator=](classeigen_1_1densebase#ab66155169d20c035e80d521a8b918e97) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [operator=](classeigen_1_1densebase#a58915510693d64164e567bd762e1032f) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  | Copies the generic expression *other* into \*this. [More...](classeigen_1_1densebase#a58915510693d64164e567bd762e1032f) |
|  |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [outerSize](classeigen_1_1densebase#a03f71699bc26ca2ee4e42ec4538862d7) () const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [prod](classeigen_1_1densebase#af119d9a4efe5a15cd83c1ccdf01b3a4f) () const |
|  |
| internal::traits< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [redux](classeigen_1_1densebase#a63ce1e4fab36bff43bbadcdd06a67724) (const Func &func) const |
|  |
| const [Replicate](classeigen_1_1replicate)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction >, RowFactor, ColFactor >  | [replicate](classeigen_1_1densebase#a60dadfe80b813d808e91e4521c722a8e) () const |
|  |
| const [Replicate](classeigen_1_1replicate)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction >, Dynamic, Dynamic >  | [replicate](classeigen_1_1densebase#afae2d5e36f1158d1b1681dac3cdbd58e) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rowFactor, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) colFactor) const |
|  |
| void  | [resize](classeigen_1_1densebase#a2ec5bac4e1ab95808808ef50ccf4cb39) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) newSize) |
|  |
| void  | [resize](classeigen_1_1densebase#a25e2b4887b47b1f2346857d1931efa0f) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| [ReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1densebase#a38ea394036d8b096abf322469c80198f) () |
|  |
| [ConstReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1densebase#a9e2f3ac4019184abf95ca0e1a8d82866) () const |
|  |
| void  | [reverseInPlace](classeigen_1_1densebase#adb8045155ea45f7961fc2a5170e1d921) () |
|  |
| [RowwiseReturnType](classeigen_1_1vectorwiseop) | [rowwise](classeigen_1_1densebase#a6daa3a3156ca0e0722bf78638e1c7f28) () |
|  |
| [ConstRowwiseReturnType](classeigen_1_1vectorwiseop) | [rowwise](classeigen_1_1densebase#aa1cabd3404528fe8cec4bab43d74bffc) () const |
|  |
| const [Select](classeigen_1_1select)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction >, ThenDerived, ElseDerived >  | [select](classeigen_1_1densebase#a65e78cfcbc9852e6923bebff4323ddca) (const [DenseBase](classeigen_1_1densebase)< ThenDerived > &thenMatrix, const [DenseBase](classeigen_1_1densebase)< ElseDerived > &elseMatrix) const |
|  |
| const [Select](classeigen_1_1select)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction >, ThenDerived, typename ThenDerived::ConstantReturnType >  | [select](classeigen_1_1densebase#a57ef09a843004095f84c198dd145641b) (const [DenseBase](classeigen_1_1densebase)< ThenDerived > &thenMatrix, const typename ThenDerived::Scalar &elseScalar) const |
|  |
| const [Select](classeigen_1_1select)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction >, typename ElseDerived::ConstantReturnType, ElseDerived >  | [select](classeigen_1_1densebase#a9e8e78c75887d4539071a0b7a61ca103) (const typename ElseDerived::Scalar &thenScalar, const [DenseBase](classeigen_1_1densebase)< ElseDerived > &elseMatrix) const |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [setConstant](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [setLinSpaced](classeigen_1_1densebase#aeb023532476d3f14c457367e0eb5f3f1) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#aeb023532476d3f14c457367e0eb5f3f1) |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [setLinSpaced](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a) |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [setOnes](classeigen_1_1densebase#a250ef1b827e748f3f898fb2e55cb96e2) () |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [setRandom](classeigen_1_1densebase#ac476e5852129ba32beaa1a8a3d7ee0db) () |
|  |
| [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > &  | [setZero](classeigen_1_1densebase#af230a143de50695d2d1fae93db7e4dcb) () |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [sum](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c) () const |
|  |
| void  | [swap](classeigen_1_1densebase#af9e7e4305fdb7781f2b2f05fa801f21e) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| void  | [swap](classeigen_1_1densebase#a44e25adc6da9cd1d79f4c5bd7c1819cb) ([PlainObjectBase](classeigen_1_1plainobjectbase)< OtherDerived > &other) |
|  |
| [TransposeReturnType](classeigen_1_1transpose) | [transpose](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1densebase#a38c0b074cf93fc194bf91141287cee3f) () const |
|  |
| void  | [transposeInPlace](classeigen_1_1densebase#ac501bd942994af7a95d95bee7a16ad2a) () |
|  |
| CoeffReturnType  | [value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0) () const |
|  |
| void  | [visit](classeigen_1_1densebase#a4225b90fcc74f18dd479b401124b3841) (Visitor &func) const |
|  |
| - Static Public Member Functions inherited from [Eigen::MatrixBase< Homogeneous< MatrixType, \_Direction > >](classeigen_1_1matrixbase) |
| static const IdentityReturnType  | [Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f) () |
|  |
| static const IdentityReturnType  | [Identity](classeigen_1_1matrixbase#acf33ce20ef03ead47cb3dbcd5f416ede) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| static const BasisReturnType  | [Unit](classeigen_1_1matrixbase#a9daf6d22d10ed8ae00432b0f641455df) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) i) |
|  |
| static const BasisReturnType  | [Unit](classeigen_1_1matrixbase#ac7a03a61014f37ddd2fe61ebac0c9539) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) i) |
|  |
| static const BasisReturnType  | [UnitW](classeigen_1_1matrixbase#af56ba94e5b0330827003eadd26cfadc2) () |
|  |
| static const BasisReturnType  | [UnitX](classeigen_1_1matrixbase#a8a555b7cf626cced54670b98668c4e6d) () |
|  |
| static const BasisReturnType  | [UnitY](classeigen_1_1matrixbase#a00850083489e20249b1d05b394fc5efc) () |
|  |
| static const BasisReturnType  | [UnitZ](classeigen_1_1matrixbase#aabdcdeff1c822a5465fcbe1f78e5afe0) () |
|  |
| - Static Public Member Functions inherited from [Eigen::DenseBase< Homogeneous< MatrixType, \_Direction > >](classeigen_1_1densebase) |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#a1fdd3189ae3a41d250593334d82210cf) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#ad8098aa5971139a5585e623dddbea860) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| static const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) |
|  |
| static EIGEN\_DEPRECATED const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#ac8cfbd436a8c9fc50defee5946451176) (Sequential\_t, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| static EIGEN\_DEPRECATED const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d) (Sequential\_t, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a5dc65501accd02c30f7c1840c2a30a41) (const CustomNullaryOp &func) |
|  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a3340c9b997f5b53a0131cf927f93b54c) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols, const CustomNullaryOp &func) |
|  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a9752ee59976a4b4aad860ad1a9093e7f) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, const CustomNullaryOp &func) |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101) () |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#a8b2a51018a73a766f5b91aef3487f013) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#ab710a58e4a80fbcb2594242372c8fe56) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19) () |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#ae97f8d9d08f969c733c8144be6225756) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#a7eb5f974a8f0b67eac7080db1da0e308) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) () |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#ae41a9b5050ed27d9e93c82c9c8622cd3) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#ac22f79b812fa564061042407f2ba8f5b) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |
| - Protected Member Functions inherited from [Eigen::DenseBase< Homogeneous< MatrixType, \_Direction > >](classeigen_1_1densebase) |
|  | [DenseBase](classeigen_1_1densebase#aa284042d0e1b0ad9b6a00db7fd2d9f7f) () |
|  |
| - Related Functions inherited from [Eigen::DenseBase< Homogeneous< MatrixType, \_Direction > >](classeigen_1_1densebase) |
| std::ostream &  | [operator<<](classeigen_1_1densebase#a3806d3f42de165878dace160e6aba40a) (std::ostream &s, const [DenseBase](classeigen_1_1densebase)< [Homogeneous](classeigen_1_1homogeneous)< MatrixType, \_Direction > > &m) |
|  |

 

---

The documentation for this class was generated from the following file:* [Homogeneous.h](https://eigen.tuxfamily.org/dox/Homogeneous_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Homogeneous.html>

Eigen::PermutationBase
======================

  
### template<typename Derived> class Eigen::PermutationBase< Derived >

 Base class for permutations. 

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | the derived class |

   This class is the base class for all expressions representing a permutation matrix, internally stored as a vector of integers. The convention followed here is that if \( \sigma \) is a permutation, the corresponding permutation matrix \( P\_\sigma \) is such that if \( (e\_1,\ldots,e\_p) \) is the canonical basis, we have: 


 \[ P\_\sigma(e\_i) = e\_{\sigma(i)}. \] 

  This convention ensures that for any two permutations \( \sigma, \tau \), we have: 


 \[ P\_{\sigma\circ\tau} = P\_\sigma P\_\tau. \] 

 Permutation matrices are square and invertible.

 Notice that in addition to the member functions and operators listed here, there also are non-member operator\* to multiply any kind of permutation object with any kind of matrix expression ([MatrixBase](classeigen_1_1matrixbase "Base class for all dense matrices, vectors, and expressions.")) on either side.

 
See also
class [PermutationMatrix](classeigen_1_1permutationmatrix "Permutation matrix."), class [PermutationWrapper](classeigen_1_1permutationwrapper "Class to view a vector of integers as a permutation matrix.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
| Derived &  | [applyTranspositionOnTheLeft](classeigen_1_1permutationbase#a4e3455bf12b56123e38a8220c6b508dc) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) i, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) j) |
|  |
| Derived &  | [applyTranspositionOnTheRight](classeigen_1_1permutationbase#a5f98da0712570d0c4b12f61839ae4193) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) i, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) j) |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1permutationbase#a26961ef6cfef586d412054ee5a20d430) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [determinant](classeigen_1_1permutationbase#a1fc7a5823544700c2e0795e87f9c6d09) () const |
|  |
| IndicesType &  | [indices](classeigen_1_1permutationbase#a16fa3afafdf703399d62c80f950802f1) () |
|  |
| const IndicesType &  | [indices](classeigen_1_1permutationbase#adec727546b6882ecaa57e76d084951c5) () const |
|  |
| InverseReturnType  | [inverse](classeigen_1_1permutationbase#adb9af427f317202366c2832876064eb3) () const |
|  |
| template<typename Other >  |
| PlainPermutationType  | [operator\*](classeigen_1_1permutationbase#a865e88989a76b7e92f39bad5250b89c4) (const InverseImpl< Other, [PermutationStorage](structeigen_1_1permutationstorage) > &other) const |
|  |
| template<typename Other >  |
| PlainPermutationType  | [operator\*](classeigen_1_1permutationbase#ae81574e059f6b9b7de2ea747fd346a1b) (const [PermutationBase](classeigen_1_1permutationbase)< Other > &other) const |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator=](classeigen_1_1permutationbase#a8e15540549c5a4e2d5b3b426fef8fbcf) (const [PermutationBase](classeigen_1_1permutationbase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| Derived &  | [operator=](classeigen_1_1permutationbase#acaa7cce9ea62c811cec12e86dbb2f0de) (const TranspositionsBase< OtherDerived > &tr) |
|  |
| void  | [resize](classeigen_1_1permutationbase#a0e0fda6e84d69e02432e4770359bb532) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) newSize) |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1permutationbase#acd7ed28ee514287f933de8467768925b) () const |
|  |
| void  | [setIdentity](classeigen_1_1permutationbase#a6805bb75fd7966ea71895c24ff196444) () |
|  |
| void  | [setIdentity](classeigen_1_1permutationbase#a830a80511a61634ef437795916f7f8da) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) newSize) |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1permutationbase#a2216f9ce7b453ac39c46ff0323daeac9) () const |
|  |
| DenseMatrixType  | [toDenseMatrix](classeigen_1_1permutationbase#addfa91a2c2c69c76159f1091368a505f) () const |
|  |
| InverseReturnType  | [transpose](classeigen_1_1permutationbase#a05805e9f4182eec3f6632e1c765b5ffe) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  applyTranspositionOnTheLeft()
-----------------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived& [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::applyTranspositionOnTheLeft  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *i*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *j* |
|  | ) |  |  |

 | inline |

 
 Multiplies \*this by the transposition \((ij)\) on the left.

 
Returns
a reference to \*this.
 
Warning
This is much slower than [applyTranspositionOnTheRight(Index,Index)](classeigen_1_1permutationbase#a5f98da0712570d0c4b12f61839ae4193): this has linear complexity and requires a lot of branching.
 
See also

[applyTranspositionOnTheRight(Index,Index)](classeigen_1_1permutationbase#a5f98da0712570d0c4b12f61839ae4193) 
    applyTranspositionOnTheRight()
------------------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived& [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::applyTranspositionOnTheRight  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *i*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *j* |
|  | ) |  |  |

 | inline |

 
 Multiplies \*this by the transposition \((ij)\) on the right.

 
Returns
a reference to \*this.
 This is a fast operation, it only consists in swapping two indices.

 
See also

[applyTranspositionOnTheLeft(Index,Index)](classeigen_1_1permutationbase#a4e3455bf12b56123e38a8220c6b508dc) 
    cols()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::cols  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
the number of columns 
    determinant()
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::determinant  | ( |  | ) |  const |

 | inline |

 
 
Returns
the determinant of the permutation matrix, which is either 1 or -1 depending on the parity of the permutation.
 This function is O(`n`) procedure allocating a buffer of `n` booleans. 

    indices() [1/2]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| IndicesType& [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::indices  | ( |  | ) |  |

 | inline |

 
 
Returns
a reference to the stored array representing the permutation. 
    indices() [2/2]
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const IndicesType& [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::indices  | ( |  | ) |  const |

 | inline |

 
 const version of [indices()](classeigen_1_1permutationbase#a16fa3afafdf703399d62c80f950802f1). 

    inverse()
---------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| InverseReturnType [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::inverse  | ( |  | ) |  const |

 | inline |

 
 
Returns
the inverse permutation matrix.
 
Note
This function returns the result by value. In order to make that efficient, it is implemented as just a return statement using a special constructor, hopefully allowing the compiler to perform a RVO (return value optimization). 
    operator\*() [1/2]
------------------

    template<typename Derived >   template<typename Other >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| PlainPermutationType [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::operator\*  | ( | const InverseImpl< Other, [PermutationStorage](structeigen_1_1permutationstorage) > &  | *other* | ) |  const |

 | inline |

 
 
Returns
the product of a permutation with another inverse permutation.
 
Note
This function returns the result by value. In order to make that efficient, it is implemented as just a return statement using a special constructor, hopefully allowing the compiler to perform a RVO (return value optimization). 
    operator\*() [2/2]
------------------

    template<typename Derived >   template<typename Other >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| PlainPermutationType [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::operator\*  | ( | const [PermutationBase](classeigen_1_1permutationbase)< Other > &  | *other* | ) |  const |

 | inline |

 
 
Returns
the product permutation matrix.
 
Note
This function returns the result by value. In order to make that efficient, it is implemented as just a return statement using a special constructor, hopefully allowing the compiler to perform a RVO (return value optimization). 
    operator=() [1/2]
-----------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::operator=  | ( | const [PermutationBase](classeigen_1_1permutationbase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Copies the other permutation into \*this 

    operator=() [2/2]
-----------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::operator=  | ( | const TranspositionsBase< OtherDerived > &  | *tr* | ) |  |

 | inline |

 
 Assignment from the [Transpositions](classeigen_1_1transpositions "Represents a sequence of transpositions (row/column interchange)") *tr* 

    resize()
--------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::resize  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *newSize* | ) |  |

 | inline |

 
 Resizes to given size. 

    rows()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::rows  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
the number of rows 
    setIdentity() [1/2]
-------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::setIdentity  | ( |  | ) |  |

 | inline |

 
 Sets \*this to be the identity permutation matrix 

    setIdentity() [2/2]
-------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::setIdentity  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *newSize* | ) |  |

 | inline |

 
 Sets \*this to be the identity permutation matrix of given size. 

    size()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::size  | ( |  | ) |  const |

 | inline |

 
 
Returns
the size of a side of the respective square matrix, i.e., the number of indices 
    toDenseMatrix()
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| DenseMatrixType [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::toDenseMatrix  | ( |  | ) |  const |

 | inline |

 
 
Returns
a [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") object initialized from this permutation matrix. Notice that it is inefficient to return this [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") object by value. For efficiency, favor using the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") constructor taking [EigenBase](structeigen_1_1eigenbase) objects. 
    transpose()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| InverseReturnType [Eigen::PermutationBase](classeigen_1_1permutationbase)< Derived >::transpose  | ( |  | ) |  const |

 | inline |

 
 
Returns
the tranpose permutation matrix.
 
Note
This function returns the result by value. In order to make that efficient, it is implemented as just a return statement using a special constructor, hopefully allowing the compiler to perform a RVO (return value optimization). 
   

---

The documentation for this class was generated from the following file:* [PermutationMatrix.h](https://eigen.tuxfamily.org/dox/PermutationMatrix_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1PermutationBase.html>

Eigen::PermutationMatrix
========================

  
### template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename \_StorageIndex> class Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >

 Permutation matrix. 

 
Template Parameters
 

|  |  |
| --- | --- |
| SizeAtCompileTime | the number of rows/cols, or Dynamic  |
| MaxSizeAtCompileTime | the maximum number of rows/cols, or Dynamic. This optional parameter defaults to SizeAtCompileTime. Most of the time, you should not have to specify it.  |
| \_StorageIndex | the integer type of the indices |

   This class represents a permutation matrix, internally stored as a vector of integers.

 
See also
class [PermutationBase](classeigen_1_1permutationbase "Base class for permutations."), class [PermutationWrapper](classeigen_1_1permutationwrapper "Class to view a vector of integers as a permutation matrix."), class [DiagonalMatrix](classeigen_1_1diagonalmatrix "Represents a diagonal matrix with its storage.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
| IndicesType &  | [indices](classeigen_1_1permutationmatrix#ac089ead468a58d75f276ad2b253578c0) () |
|  |
| const IndicesType &  | [indices](classeigen_1_1permutationmatrix#a2f1ab379207fcd1ceb33941e25cf50c2) () const |
|  |
| template<typename Other >  |
| [PermutationMatrix](classeigen_1_1permutationmatrix) &  | [operator=](classeigen_1_1permutationmatrix#aeced50f1c3a43b3e4b3de76d57e9c46a) (const [PermutationBase](classeigen_1_1permutationbase)< Other > &other) |
|  |
| template<typename Other >  |
| [PermutationMatrix](classeigen_1_1permutationmatrix) &  | [operator=](classeigen_1_1permutationmatrix#a75cdc77886972636637f22c41216feb9) (const TranspositionsBase< Other > &tr) |
|  |
| template<typename Other >  |
|  | [PermutationMatrix](classeigen_1_1permutationmatrix#a204b8bbba3c4d33c1a24bb60ad72b202) (const [MatrixBase](classeigen_1_1matrixbase)< Other > &[indices](classeigen_1_1permutationmatrix#a2f1ab379207fcd1ceb33941e25cf50c2)) |
|  |
| template<typename OtherDerived >  |
|  | [PermutationMatrix](classeigen_1_1permutationmatrix#a7ae7016a606b08573013115dcf2e56f2) (const [PermutationBase](classeigen_1_1permutationbase)< OtherDerived > &other) |
|  |
| template<typename Other >  |
|  | [PermutationMatrix](classeigen_1_1permutationmatrix#a0b9a4e51bea9c778a38f6e89db484af4) (const TranspositionsBase< Other > &tr) |
|  |
|  | [PermutationMatrix](classeigen_1_1permutationmatrix#aea29eab1fd6a6562971db7b9c04c11aa) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [size](classeigen_1_1permutationbase#a2216f9ce7b453ac39c46ff0323daeac9)) |
|  |
| - Public Member Functions inherited from [Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex > >](classeigen_1_1permutationbase) |
| [PermutationMatrix](classeigen_1_1permutationmatrix)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex > &  | [applyTranspositionOnTheLeft](classeigen_1_1permutationbase#a4e3455bf12b56123e38a8220c6b508dc) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) i, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) j) |
|  |
| [PermutationMatrix](classeigen_1_1permutationmatrix)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex > &  | [applyTranspositionOnTheRight](classeigen_1_1permutationbase#a5f98da0712570d0c4b12f61839ae4193) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) i, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) j) |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1permutationbase#a26961ef6cfef586d412054ee5a20d430) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [determinant](classeigen_1_1permutationbase#a1fc7a5823544700c2e0795e87f9c6d09) () const |
|  |
| IndicesType &  | [indices](classeigen_1_1permutationbase#a16fa3afafdf703399d62c80f950802f1) () |
|  |
| const IndicesType &  | [indices](classeigen_1_1permutationbase#adec727546b6882ecaa57e76d084951c5) () const |
|  |
| InverseReturnType  | [inverse](classeigen_1_1permutationbase#adb9af427f317202366c2832876064eb3) () const |
|  |
| PlainPermutationType  | [operator\*](classeigen_1_1permutationbase#a865e88989a76b7e92f39bad5250b89c4) (const InverseImpl< Other, [PermutationStorage](structeigen_1_1permutationstorage) > &other) const |
|  |
| PlainPermutationType  | [operator\*](classeigen_1_1permutationbase#ae81574e059f6b9b7de2ea747fd346a1b) (const [PermutationBase](classeigen_1_1permutationbase)< Other > &other) const |
|  |
| [PermutationMatrix](classeigen_1_1permutationmatrix)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex > &  | [operator=](classeigen_1_1permutationbase#a8e15540549c5a4e2d5b3b426fef8fbcf) (const [PermutationBase](classeigen_1_1permutationbase)< OtherDerived > &other) |
|  |
| [PermutationMatrix](classeigen_1_1permutationmatrix)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex > &  | [operator=](classeigen_1_1permutationbase#acaa7cce9ea62c811cec12e86dbb2f0de) (const TranspositionsBase< OtherDerived > &tr) |
|  |
| void  | [resize](classeigen_1_1permutationbase#a0e0fda6e84d69e02432e4770359bb532) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) newSize) |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1permutationbase#acd7ed28ee514287f933de8467768925b) () const |
|  |
| void  | [setIdentity](classeigen_1_1permutationbase#a6805bb75fd7966ea71895c24ff196444) () |
|  |
| void  | [setIdentity](classeigen_1_1permutationbase#a830a80511a61634ef437795916f7f8da) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) newSize) |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1permutationbase#a2216f9ce7b453ac39c46ff0323daeac9) () const |
|  |
| DenseMatrixType  | [toDenseMatrix](classeigen_1_1permutationbase#addfa91a2c2c69c76159f1091368a505f) () const |
|  |
| InverseReturnType  | [transpose](classeigen_1_1permutationbase#a05805e9f4182eec3f6632e1c765b5ffe) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  PermutationMatrix() [1/4]
-------------------------

    template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::PermutationMatrix](classeigen_1_1permutationmatrix)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >::[PermutationMatrix](classeigen_1_1permutationmatrix) | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *size* | ) |  |

 | inlineexplicit |

 
 Constructs an uninitialized permutation matrix of given size. 

    PermutationMatrix() [2/4]
-------------------------

    template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename \_StorageIndex >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::PermutationMatrix](classeigen_1_1permutationmatrix)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >::[PermutationMatrix](classeigen_1_1permutationmatrix) | ( | const [PermutationBase](classeigen_1_1permutationbase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Copy constructor. 

    PermutationMatrix() [3/4]
-------------------------

    template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename \_StorageIndex >   template<typename Other >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::PermutationMatrix](classeigen_1_1permutationmatrix)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >::[PermutationMatrix](classeigen_1_1permutationmatrix) | ( | const [MatrixBase](classeigen_1_1matrixbase)< Other > &  | *indices* | ) |  |

 | inlineexplicit |

 
 Generic constructor from expression of the indices. The indices array has the meaning that the permutations sends each integer i to indices[i].

 
Warning
It is your responsibility to check that the indices array that you passes actually describes a permutation, i.e., each value between 0 and n-1 occurs exactly once, where n is the array's size. 
    PermutationMatrix() [4/4]
-------------------------

    template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename \_StorageIndex >   template<typename Other >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::PermutationMatrix](classeigen_1_1permutationmatrix)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >::[PermutationMatrix](classeigen_1_1permutationmatrix) | ( | const TranspositionsBase< Other > &  | *tr* | ) |  |

 | inlineexplicit |

 
 Convert the [Transpositions](classeigen_1_1transpositions "Represents a sequence of transpositions (row/column interchange)") *tr* to a permutation matrix 

    indices() [1/2]
---------------

    template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| IndicesType& [Eigen::PermutationMatrix](classeigen_1_1permutationmatrix)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >::indices  | ( |  | ) |  |

 | inline |

 
 
Returns
a reference to the stored array representing the permutation. 
    indices() [2/2]
---------------

    template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const IndicesType& [Eigen::PermutationMatrix](classeigen_1_1permutationmatrix)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >::indices  | ( |  | ) |  const |

 | inline |

 
 const version of [indices()](classeigen_1_1permutationmatrix#ac089ead468a58d75f276ad2b253578c0). 

    operator=() [1/2]
-----------------

    template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename \_StorageIndex >   template<typename Other >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [PermutationMatrix](classeigen_1_1permutationmatrix)& [Eigen::PermutationMatrix](classeigen_1_1permutationmatrix)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >::operator=  | ( | const [PermutationBase](classeigen_1_1permutationbase)< Other > &  | *other* | ) |  |

 | inline |

 
 Copies the other permutation into \*this 

    operator=() [2/2]
-----------------

    template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename \_StorageIndex >   template<typename Other >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [PermutationMatrix](classeigen_1_1permutationmatrix)& [Eigen::PermutationMatrix](classeigen_1_1permutationmatrix)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >::operator=  | ( | const TranspositionsBase< Other > &  | *tr* | ) |  |

 | inline |

 
 Assignment from the [Transpositions](classeigen_1_1transpositions "Represents a sequence of transpositions (row/column interchange)") *tr* 

   

---

The documentation for this class was generated from the following file:* [PermutationMatrix.h](https://eigen.tuxfamily.org/dox/PermutationMatrix_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1PermutationMatrix.html>

Eigen::RealQZ
=============

  
### template<typename \_MatrixType> class Eigen::RealQZ< \_MatrixType >

 Performs a real QZ decomposition of a pair of square matrices. 

 This is defined in the Eigenvalues module.



```
#include <Eigen/Eigenvalues> 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which we are computing the real QZ decomposition; this is expected to be an instantiation of the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class template. |

   Given a real square matrices A and B, this class computes the real QZ decomposition: \( A = Q S Z \), \( B = Q T Z \) where Q and Z are real orthogonal matrixes, T is upper-triangular matrix, and S is upper quasi-triangular matrix. An orthogonal matrix is a matrix whose inverse is equal to its transpose, \( U^{-1} = U^T \). A quasi-triangular matrix is a block-triangular matrix whose diagonal consists of 1-by-1 blocks and 2-by-2 blocks where further reduction is impossible due to complex eigenvalues.

 The eigenvalues of the pencil \( A - z B \) can be obtained from 1x1 and 2x2 blocks on the diagonals of S and T.

 Call the function [compute()](classeigen_1_1realqz#a2b6847964d9f1903193cc3e67c196849 "Computes QZ decomposition of given matrix.") to compute the real QZ decomposition of a given pair of matrices. Alternatively, you can use the [RealQZ(const MatrixType& B, const MatrixType& B, bool computeQZ)](classeigen_1_1realqz#ac6e41c839f8dae31c9a3906ea7540119 "Constructor; computes real QZ decomposition of given matrices.") constructor which computes the real QZ decomposition at construction time. Once the decomposition is computed, you can use the [matrixS()](classeigen_1_1realqz#ad24d7bf534afb55adaef00f00846adaf "Returns matrix S in the QZ decomposition."), [matrixT()](classeigen_1_1realqz#a8dc963d8ea2a17df9d8d718e9e34d06f "Returns matrix S in the QZ decomposition."), [matrixQ()](classeigen_1_1realqz#a212bc2f69ea4eff830fde70e209e40fb "Returns matrix Q in the QZ decomposition.") and [matrixZ()](classeigen_1_1realqz#a19a116383f11423179b4d8f316da6f67 "Returns matrix Z in the QZ decomposition.") functions to retrieve the matrices S, T, Q and Z in the decomposition. If computeQZ==false, some time is saved by not computing matrices Q and Z.

 Example: 



```
MatrixXf A = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
MatrixXf B = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
RealQZ<MatrixXf> qz(4); // preallocate space for 4x4 matrices
qz.compute(A,B);  // A = Q S Z, B = Q T Z
 
// print original matrices and result of decomposition
cout << "A:\n" << A << "\n" << "B:\n" << B << "\n";
cout << "S:\n" << qz.matrixS() << "\n" << "T:\n" << qz.matrixT() << "\n";
cout << "Q:\n" << qz.matrixQ() << "\n" << "Z:\n" << qz.matrixZ() << "\n";
 
// verify precision
cout << "\nErrors:"
  << "\n|A-QSZ|: " << (A-qz.matrixQ()*qz.matrixS()*qz.matrixZ()).norm()
  << ", |B-QTZ|: " << (B-qz.matrixQ()*qz.matrixT()*qz.matrixZ()).norm()
  << "\n|QQ\* - I|: " << (qz.matrixQ()*qz.matrixQ().adjoint() - [MatrixXf::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)(4,4)).norm()
  << ", |ZZ\* - I|: " << (qz.matrixZ()*qz.matrixZ().adjoint() - [MatrixXf::Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f)(4,4)).norm()
  << "\n";
```

 Output: 



```
A:
   0.68   0.823  -0.444   -0.27
 -0.211  -0.605   0.108  0.0268
  0.566   -0.33 -0.0452   0.904
  0.597   0.536   0.258   0.832
B:
 0.271 -0.967 -0.687  0.998
 0.435 -0.514 -0.198 -0.563
-0.717 -0.726  -0.74 0.0259
 0.214  0.608 -0.782  0.678
S:
-0.668   1.26 -0.598 0.0941
 0.317  -0.27 -0.279   0.64
     0      0 -0.398 -0.164
     0      0      0  -1.12
T:
 -1.55      0  0.342  -0.54
     0   1.01 -0.457  0.128
     0      0  -1.25  0.438
     0      0      0  0.746
Q:
-0.587 -0.138  0.552  0.576
  0.19 -0.208  0.761 -0.585
-0.292  0.918  0.152 -0.223
-0.731  -0.31 -0.306 -0.526
Z:
-0.0204   0.213   -0.78   0.588
 -0.961  -0.184   -0.14  -0.153
 -0.269   0.783   0.462    0.32
-0.0674  -0.555   0.398   0.727
 
Errors:
|A-QSZ|: 1.36e-06, |B-QTZ|: 1.83e-06
|QQ* - I|: 8.18e-07, |ZZ* - I|: 7.36e-07

```


Note
The implementation is based on the algorithm in "Matrix Computations" by Gene H. Golub and Charles F. Van Loan, and a paper "An algorithm for generalized eigenvalue problems" by C.B.Moler and G.W.Stewart.
 
See also
class [RealSchur](classeigen_1_1realschur "Performs a real Schur decomposition of a square matrix."), class [ComplexSchur](classeigen_1_1complexschur "Performs a complex Schur decomposition of a real or complex square matrix."), class [EigenSolver](classeigen_1_1eigensolver "Computes eigenvalues and eigenvectors of general matrices."), class [ComplexEigenSolver](classeigen_1_1complexeigensolver "Computes eigenvalues and eigenvectors of general complex matrices.") 
 


|  |
| --- |
|  |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1realqz#a6201e534e901b5f4e66f72c176b534a3) |
|  |




|  |
| --- |
|  |
| [RealQZ](classeigen_1_1realqz) &  | [compute](classeigen_1_1realqz#a2b6847964d9f1903193cc3e67c196849) (const MatrixType &A, const MatrixType &B, bool computeQZ=true) |
|  | Computes QZ decomposition of given matrix. [More...](classeigen_1_1realqz#a2b6847964d9f1903193cc3e67c196849) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1realqz#a36bd77afed89f3f5c110a715e69e4c64) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1realqz#a36bd77afed89f3f5c110a715e69e4c64) |
|  |
|  [Index](classeigen_1_1realqz#a6201e534e901b5f4e66f72c176b534a3) | [iterations](classeigen_1_1realqz#afbecc6d0ab1de42be9db79428da48ab6) () const |
|  | Returns number of performed QR-like iterations.  |
|  |
| const MatrixType &  | [matrixQ](classeigen_1_1realqz#a212bc2f69ea4eff830fde70e209e40fb) () const |
|  | Returns matrix Q in the QZ decomposition. [More...](classeigen_1_1realqz#a212bc2f69ea4eff830fde70e209e40fb) |
|  |
| const MatrixType &  | [matrixS](classeigen_1_1realqz#ad24d7bf534afb55adaef00f00846adaf) () const |
|  | Returns matrix S in the QZ decomposition. [More...](classeigen_1_1realqz#ad24d7bf534afb55adaef00f00846adaf) |
|  |
| const MatrixType &  | [matrixT](classeigen_1_1realqz#a8dc963d8ea2a17df9d8d718e9e34d06f) () const |
|  | Returns matrix S in the QZ decomposition. [More...](classeigen_1_1realqz#a8dc963d8ea2a17df9d8d718e9e34d06f) |
|  |
| const MatrixType &  | [matrixZ](classeigen_1_1realqz#a19a116383f11423179b4d8f316da6f67) () const |
|  | Returns matrix Z in the QZ decomposition. [More...](classeigen_1_1realqz#a19a116383f11423179b4d8f316da6f67) |
|  |
|  | [RealQZ](classeigen_1_1realqz#ac6e41c839f8dae31c9a3906ea7540119) (const MatrixType &A, const MatrixType &B, bool computeQZ=true) |
|  | Constructor; computes real QZ decomposition of given matrices. [More...](classeigen_1_1realqz#ac6e41c839f8dae31c9a3906ea7540119) |
|  |
|  | [RealQZ](classeigen_1_1realqz#ad8fb9235870a8361a2fdd8dcc2e80d01) ([Index](classeigen_1_1realqz#a6201e534e901b5f4e66f72c176b534a3) size=RowsAtCompileTime==[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) ? 1 :RowsAtCompileTime) |
|  | Default constructor. [More...](classeigen_1_1realqz#ad8fb9235870a8361a2fdd8dcc2e80d01) |
|  |
| [RealQZ](classeigen_1_1realqz) &  | [setMaxIterations](classeigen_1_1realqz#a30ae65666b1757e4a2b6a28eaec12226) ([Index](classeigen_1_1realqz#a6201e534e901b5f4e66f72c176b534a3) maxIters) |
|  |

  Index
-----

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::RealQZ](classeigen_1_1realqz)< \_MatrixType >::[Index](classeigen_1_1realqz#a6201e534e901b5f4e66f72c176b534a3) |

 
 
**[Deprecated:](deprecated#_deprecated000017)**
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3 
    RealQZ() [1/2]
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::RealQZ](classeigen_1_1realqz)< \_MatrixType >::[RealQZ](classeigen_1_1realqz) | ( | [Index](classeigen_1_1realqz#a6201e534e901b5f4e66f72c176b534a3) | *size* = `RowsAtCompileTime==[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) ? 1 : RowsAtCompileTime` | ) |  |

 | inlineexplicit |

 
 Default constructor. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | size | Positive integer, size of the matrix whose QZ decomposition will be computed. |

   The default constructor is useful in cases in which the user intends to perform decompositions via [compute()](classeigen_1_1realqz#a2b6847964d9f1903193cc3e67c196849 "Computes QZ decomposition of given matrix."). The `size` parameter is only used as a hint. It is not an error to give a wrong `size`, but it may impair performance.

 
See also

[compute()](classeigen_1_1realqz#a2b6847964d9f1903193cc3e67c196849 "Computes QZ decomposition of given matrix.") for an example. 
    RealQZ() [2/2]
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::RealQZ](classeigen_1_1realqz)< \_MatrixType >::[RealQZ](classeigen_1_1realqz) | ( | const MatrixType &  | *A*,  |
|  |  | const MatrixType &  | *B*,  |
|  |  | bool  | *computeQZ* = `true` |
|  | ) |  |  |

 | inline |

 
 Constructor; computes real QZ decomposition of given matrices. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | A | [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") A.  |
| [in] | B | [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") B.  |
| [in] | computeQZ | If false, A and Z are not computed. |

   This constructor calls [compute()](classeigen_1_1realqz#a2b6847964d9f1903193cc3e67c196849 "Computes QZ decomposition of given matrix.") to compute the QZ decomposition. 

    compute()
---------

    template<typename MatrixType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [RealQZ](classeigen_1_1realqz)< MatrixType > & [Eigen::RealQZ](classeigen_1_1realqz)< MatrixType >::compute  | ( | const MatrixType &  | *A*,  |
|  |  | const MatrixType &  | *B*,  |
|  |  | bool  | *computeQZ* = `true` |
|  | ) |  |  |

 
 Computes QZ decomposition of given matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | A | [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") A.  |
| [in] | B | [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") B.  |
| [in] | computeQZ | If false, A and Z are not computed.  |

   
Returns
Reference to `*this` 
    info()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::RealQZ](classeigen_1_1realqz)< \_MatrixType >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether previous computation was successful. 

 
Returns

`Success` if computation was successful, `NoConvergence` otherwise. 
    matrixQ()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixType& [Eigen::RealQZ](classeigen_1_1realqz)< \_MatrixType >::matrixQ  | ( |  | ) |  const |

 | inline |

 
 Returns matrix Q in the QZ decomposition. 

 
Returns
A const reference to the matrix Q. 
    matrixS()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixType& [Eigen::RealQZ](classeigen_1_1realqz)< \_MatrixType >::matrixS  | ( |  | ) |  const |

 | inline |

 
 Returns matrix S in the QZ decomposition. 

 
Returns
A const reference to the matrix S. 
    matrixT()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixType& [Eigen::RealQZ](classeigen_1_1realqz)< \_MatrixType >::matrixT  | ( |  | ) |  const |

 | inline |

 
 Returns matrix S in the QZ decomposition. 

 
Returns
A const reference to the matrix S. 
    matrixZ()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixType& [Eigen::RealQZ](classeigen_1_1realqz)< \_MatrixType >::matrixZ  | ( |  | ) |  const |

 | inline |

 
 Returns matrix Z in the QZ decomposition. 

 
Returns
A const reference to the matrix Z. 
    setMaxIterations()
------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [RealQZ](classeigen_1_1realqz)& [Eigen::RealQZ](classeigen_1_1realqz)< \_MatrixType >::setMaxIterations  | ( | [Index](classeigen_1_1realqz#a6201e534e901b5f4e66f72c176b534a3) | *maxIters* | ) |  |

 | inline |

 
 Sets the maximal number of iterations allowed to converge to one eigenvalue or decouple the problem. 

   

---

The documentation for this class was generated from the following file:* [RealQZ.h](https://eigen.tuxfamily.org/dox/RealQZ_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1RealQZ.html>

Eigen::RealSchur
================

  
### template<typename \_MatrixType> class Eigen::RealSchur< \_MatrixType >

 Performs a real Schur decomposition of a square matrix. 

 This is defined in the Eigenvalues module.



```
#include <Eigen/Eigenvalues> 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which we are computing the real Schur decomposition; this is expected to be an instantiation of the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class template. |

   Given a real square matrix A, this class computes the real Schur decomposition: \( A = U T U^T \) where U is a real orthogonal matrix and T is a real quasi-triangular matrix. An orthogonal matrix is a matrix whose inverse is equal to its transpose, \( U^{-1} = U^T \). A quasi-triangular matrix is a block-triangular matrix whose diagonal consists of 1-by-1 blocks and 2-by-2 blocks with complex eigenvalues. The eigenvalues of the blocks on the diagonal of T are the same as the eigenvalues of the matrix A, and thus the real Schur decomposition is used in [EigenSolver](classeigen_1_1eigensolver "Computes eigenvalues and eigenvectors of general matrices.") to compute the eigendecomposition of a matrix.

 Call the function [compute()](classeigen_1_1realschur#a60caf9ffad11d728ea458c4dd36d0a98 "Computes Schur decomposition of given matrix.") to compute the real Schur decomposition of a given matrix. Alternatively, you can use the RealSchur(const MatrixType&, bool) constructor which computes the real Schur decomposition at construction time. Once the decomposition is computed, you can use the [matrixU()](classeigen_1_1realschur#a85622ccbecff99c8933d21f0a22b22bb "Returns the orthogonal matrix in the Schur decomposition.") and [matrixT()](classeigen_1_1realschur#abb78996b43b8642a5f507415730445cb "Returns the quasi-triangular matrix in the Schur decomposition.") functions to retrieve the matrices U and T in the decomposition.

 The documentation of RealSchur(const MatrixType&, bool) contains an example of the typical use of this class.

 
Note
The implementation is adapted from [JAMA](http://math.nist.gov/javanumerics/jama/) (public domain). Their code is based on EISPACK.
 
See also
class [ComplexSchur](classeigen_1_1complexschur "Performs a complex Schur decomposition of a real or complex square matrix."), class [EigenSolver](classeigen_1_1eigensolver "Computes eigenvalues and eigenvectors of general matrices."), class [ComplexEigenSolver](classeigen_1_1complexeigensolver "Computes eigenvalues and eigenvectors of general complex matrices.") 
 


|  |
| --- |
|  |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1realschur#a8bd4653e2d9569a44ecc95e746422d3f) |
|  |




|  |
| --- |
|  |
| template<typename InputType >  |
| [RealSchur](classeigen_1_1realschur) &  | [compute](classeigen_1_1realschur#a60caf9ffad11d728ea458c4dd36d0a98) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix, bool computeU=true) |
|  | Computes Schur decomposition of given matrix. [More...](classeigen_1_1realschur#a60caf9ffad11d728ea458c4dd36d0a98) |
|  |
| template<typename HessMatrixType , typename OrthMatrixType >  |
| [RealSchur](classeigen_1_1realschur) &  | [computeFromHessenberg](classeigen_1_1realschur#ac4acc917dcaddefae5f35acd2c536d65) (const HessMatrixType &matrixH, const OrthMatrixType &matrixQ, bool computeU) |
|  | Computes Schur decomposition of a Hessenberg matrix H = Z T Z^T. [More...](classeigen_1_1realschur#ac4acc917dcaddefae5f35acd2c536d65) |
|  |
|  [Index](classeigen_1_1realschur#a8bd4653e2d9569a44ecc95e746422d3f) | [getMaxIterations](classeigen_1_1realschur#a99453076a9617a6af353b5b1f3220c25) () |
|  | Returns the maximum number of iterations.  |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1realschur#a386fd2b1a3a8401eca7183ac074deec8) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1realschur#a386fd2b1a3a8401eca7183ac074deec8) |
|  |
| const MatrixType &  | [matrixT](classeigen_1_1realschur#abb78996b43b8642a5f507415730445cb) () const |
|  | Returns the quasi-triangular matrix in the Schur decomposition. [More...](classeigen_1_1realschur#abb78996b43b8642a5f507415730445cb) |
|  |
| const MatrixType &  | [matrixU](classeigen_1_1realschur#a85622ccbecff99c8933d21f0a22b22bb) () const |
|  | Returns the orthogonal matrix in the Schur decomposition. [More...](classeigen_1_1realschur#a85622ccbecff99c8933d21f0a22b22bb) |
|  |
| template<typename InputType >  |
|  | [RealSchur](classeigen_1_1realschur#afef4d3dc5a493aca2760c20b34337016) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix, bool computeU=true) |
|  | Constructor; computes real Schur decomposition of given matrix. [More...](classeigen_1_1realschur#afef4d3dc5a493aca2760c20b34337016) |
|  |
|  | [RealSchur](classeigen_1_1realschur#a826c83e2f1d4c8332606a14ea121ff5f) ([Index](classeigen_1_1realschur#a8bd4653e2d9569a44ecc95e746422d3f) size=RowsAtCompileTime==[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) ? 1 :RowsAtCompileTime) |
|  | Default constructor. [More...](classeigen_1_1realschur#a826c83e2f1d4c8332606a14ea121ff5f) |
|  |
| [RealSchur](classeigen_1_1realschur) &  | [setMaxIterations](classeigen_1_1realschur#ad189e8776ee20a12046694f98b354322) ([Index](classeigen_1_1realschur#a8bd4653e2d9569a44ecc95e746422d3f) maxIters) |
|  | Sets the maximum number of iterations allowed. [More...](classeigen_1_1realschur#ad189e8776ee20a12046694f98b354322) |
|  |




|  |
| --- |
|  |
| static const int  | [m\_maxIterationsPerRow](classeigen_1_1realschur#a5cf45fb60964a3e7ea3a6718a8d7acdf) |
|  | Maximum number of iterations per row. [More...](classeigen_1_1realschur#a5cf45fb60964a3e7ea3a6718a8d7acdf) |
|  |

  Index
-----

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::RealSchur](classeigen_1_1realschur)< \_MatrixType >::[Index](classeigen_1_1realschur#a8bd4653e2d9569a44ecc95e746422d3f) |

 
 
**[Deprecated:](deprecated#_deprecated000018)**
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3 
    RealSchur() [1/2]
-----------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::RealSchur](classeigen_1_1realschur)< \_MatrixType >::[RealSchur](classeigen_1_1realschur) | ( | [Index](classeigen_1_1realschur#a8bd4653e2d9569a44ecc95e746422d3f) | *size* = `RowsAtCompileTime==[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) ? 1 : RowsAtCompileTime` | ) |  |

 | inlineexplicit |

 
 Default constructor. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | size | Positive integer, size of the matrix whose Schur decomposition will be computed. |

   The default constructor is useful in cases in which the user intends to perform decompositions via [compute()](classeigen_1_1realschur#a60caf9ffad11d728ea458c4dd36d0a98 "Computes Schur decomposition of given matrix."). The `size` parameter is only used as a hint. It is not an error to give a wrong `size`, but it may impair performance.

 
See also

[compute()](classeigen_1_1realschur#a60caf9ffad11d728ea458c4dd36d0a98 "Computes Schur decomposition of given matrix.") for an example. 
    RealSchur() [2/2]
-----------------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::RealSchur](classeigen_1_1realschur)< \_MatrixType >::[RealSchur](classeigen_1_1realschur) | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix*,  |
|  |  | bool  | *computeU* = `true` |
|  | ) |  |  |

 | inlineexplicit |

 
 Constructor; computes real Schur decomposition of given matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matrix | Square matrix whose Schur decomposition is to be computed.  |
| [in] | computeU | If true, both T and U are computed; if false, only T is computed. |

   This constructor calls [compute()](classeigen_1_1realschur#a60caf9ffad11d728ea458c4dd36d0a98 "Computes Schur decomposition of given matrix.") to compute the Schur decomposition.

 Example: 



```
MatrixXd A = [MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(6,6);
cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl;
 
RealSchur<MatrixXd> schur(A);
cout << "The orthogonal matrix U is:" << endl << schur.matrixU() << endl;
cout << "The quasi-triangular matrix T is:" << endl << schur.matrixT() << endl << endl;
 
MatrixXd U = schur.matrixU();
MatrixXd T = schur.matrixT();
cout << "U \* T \* U^T = " << endl << U * T * U.transpose() << endl;
```

 Output: 



```
Here is a random 6x6 matrix, A:
   0.68   -0.33   -0.27  -0.717  -0.687  0.0259
 -0.211   0.536  0.0268   0.214  -0.198   0.678
  0.566  -0.444   0.904  -0.967   -0.74   0.225
  0.597   0.108   0.832  -0.514  -0.782  -0.408
  0.823 -0.0452   0.271  -0.726   0.998   0.275
 -0.605   0.258   0.435   0.608  -0.563  0.0486

The orthogonal matrix U is:
  0.348  -0.754 0.00435  -0.351  0.0146   0.432
  -0.16  -0.266  -0.747   0.457  -0.366  0.0571
  0.505  -0.157  0.0746   0.644   0.518  -0.177
  0.703   0.324  -0.409  -0.349  -0.187  -0.275
  0.296   0.372    0.24   0.324  -0.379   0.684
 -0.126   0.305   -0.46  -0.161   0.647   0.485
The quasi-triangular matrix T is:
   -0.2   -1.83   0.864   0.271    1.09   0.139
  0.647   0.298 -0.0536   0.676  -0.288  0.0231
      0       0   0.967  -0.201  -0.429   0.847
      0       0       0   0.353   0.603   0.694
      0       0       0       0   0.572   -1.03
      0       0       0       0  0.0184   0.664

U * T * U^T = 
   0.68   -0.33   -0.27  -0.717  -0.687  0.0259
 -0.211   0.536  0.0268   0.214  -0.198   0.678
  0.566  -0.444   0.904  -0.967   -0.74   0.225
  0.597   0.108   0.832  -0.514  -0.782  -0.408
  0.823 -0.0452   0.271  -0.726   0.998   0.275
 -0.605   0.258   0.435   0.608  -0.563  0.0486

```
    compute()
---------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [RealSchur](classeigen_1_1realschur)& [Eigen::RealSchur](classeigen_1_1realschur)< \_MatrixType >::compute  | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix*,  |
|  |  | bool  | *computeU* = `true` |
|  | ) |  |  |

 
 Computes Schur decomposition of given matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matrix | Square matrix whose Schur decomposition is to be computed.  |
| [in] | computeU | If true, both T and U are computed; if false, only T is computed.  |

   
Returns
Reference to `*this` 
 The Schur decomposition is computed by first reducing the matrix to Hessenberg form using the class [HessenbergDecomposition](classeigen_1_1hessenbergdecomposition "Reduces a square matrix to Hessenberg form by an orthogonal similarity transformation."). The Hessenberg matrix is then reduced to triangular form by performing Francis QR iterations with implicit double shift. The cost of computing the Schur decomposition depends on the number of iterations; as a rough guide, it may be taken to be \(25n^3\) flops if *computeU* is true and \(10n^3\) flops if *computeU* is false.

 Example: 



```
MatrixXf A = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
RealSchur<MatrixXf> schur(4);
schur.compute(A, /\* computeU = \*/ false);
cout << "The matrix T in the decomposition of A is:" << endl << schur.matrixT() << endl;
schur.compute(A.inverse(), /\* computeU = \*/ false);
cout << "The matrix T in the decomposition of A^(-1) is:" << endl << schur.matrixT() << endl;

```

 Output: 



```
The matrix T in the decomposition of A is:
 0.523 -0.698  0.148  0.742
 0.475  0.986 -0.793  0.721
     0      0  -0.28  -0.77
     0      0 0.0145 -0.367
The matrix T in the decomposition of A^(-1) is:
-3.06 -4.57 -5.97  5.48
0.168 -2.62 -3.27   3.9
    0     0 0.427 0.573
    0     0 -1.05  1.35

```


See also
compute(const MatrixType&, bool, Index) 
    computeFromHessenberg()
-----------------------

    template<typename \_MatrixType >   template<typename HessMatrixType , typename OrthMatrixType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [RealSchur](classeigen_1_1realschur)& [Eigen::RealSchur](classeigen_1_1realschur)< \_MatrixType >::computeFromHessenberg  | ( | const HessMatrixType &  | *matrixH*,  |
|  |  | const OrthMatrixType &  | *matrixQ*,  |
|  |  | bool  | *computeU* |
|  | ) |  |  |

 
 Computes Schur decomposition of a Hessenberg matrix H = Z T Z^T. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matrixH | [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") in Hessenberg form H  |
| [in] | matrixQ | orthogonal matrix Q that transform a matrix A to H : A = Q H Q^T  |
|  | computeU | Computes the matriX U of the Schur vectors  |

   
Returns
Reference to `*this` 
 This routine assumes that the matrix is already reduced in Hessenberg form matrixH using either the class [HessenbergDecomposition](classeigen_1_1hessenbergdecomposition "Reduces a square matrix to Hessenberg form by an orthogonal similarity transformation.") or another mean. It computes the upper quasi-triangular matrix T of the Schur decomposition of H When computeU is true, this routine computes the matrix U such that A = U T U^T = (QZ) T (QZ)^T = Q H Q^T where A is the initial matrix

 NOTE Q is referenced if computeU is true; so, if the initial orthogonal matrix is not available, the user should give an identity matrix (Q.setIdentity())

 
See also
compute(const MatrixType&, bool) 
    info()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::RealSchur](classeigen_1_1realschur)< \_MatrixType >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether previous computation was successful. 

 
Returns

`Success` if computation was successful, `NoConvergence` otherwise. 
    matrixT()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixType& [Eigen::RealSchur](classeigen_1_1realschur)< \_MatrixType >::matrixT  | ( |  | ) |  const |

 | inline |

 
 Returns the quasi-triangular matrix in the Schur decomposition. 

 
Returns
A const reference to the matrix T.
 
Precondition
Either the constructor RealSchur(const MatrixType&, bool) or the member function compute(const MatrixType&, bool) has been called before to compute the Schur decomposition of a matrix.
 
See also
RealSchur(const MatrixType&, bool) for an example 
    matrixU()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixType& [Eigen::RealSchur](classeigen_1_1realschur)< \_MatrixType >::matrixU  | ( |  | ) |  const |

 | inline |

 
 Returns the orthogonal matrix in the Schur decomposition. 

 
Returns
A const reference to the matrix U.
 
Precondition
Either the constructor RealSchur(const MatrixType&, bool) or the member function compute(const MatrixType&, bool) has been called before to compute the Schur decomposition of a matrix, and `computeU` was set to true (the default value).
 
See also
RealSchur(const MatrixType&, bool) for an example 
    setMaxIterations()
------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [RealSchur](classeigen_1_1realschur)& [Eigen::RealSchur](classeigen_1_1realschur)< \_MatrixType >::setMaxIterations  | ( | [Index](classeigen_1_1realschur#a8bd4653e2d9569a44ecc95e746422d3f) | *maxIters* | ) |  |

 | inline |

 
 Sets the maximum number of iterations allowed. 

 If not specified by the user, the maximum number of iterations is m\_maxIterationsPerRow times the size of the matrix. 

    m\_maxIterationsPerRow
----------------------

    template<typename \_MatrixType >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const int [Eigen::RealSchur](classeigen_1_1realschur)< \_MatrixType >::m\_maxIterationsPerRow |

 | static |

 
 Maximum number of iterations per row. 

 If not otherwise specified, the maximum number of iterations is this number times the size of the matrix. It is currently set to 40. 

   

---

The documentation for this class was generated from the following file:* [RealSchur.h](https://eigen.tuxfamily.org/dox/RealSchur_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1RealSchur.html>

Eigen::Reshaped
===============

  
### template<typename XprType, int Rows, int Cols, int Order> class Eigen::Reshaped< XprType, Rows, Cols, Order >

 Expression of a fixed-size or dynamic-size reshape. 

 
Template Parameters
 

|  |  |
| --- | --- |
| XprType | the type of the expression in which we are taking a reshape  |
| Rows | the number of rows of the reshape we are taking at compile time (optional)  |
| Cols | the number of columns of the reshape we are taking at compile time (optional)  |
| Order | can be ColMajor or RowMajor, default is ColMajor. |

   This class represents an expression of either a fixed-size or dynamic-size reshape. It is the return type of DenseBase::reshaped(NRowsType,NColsType) and most of the time this is the only way it is used.

 However, in C++98, if you want to directly maniputate reshaped expressions, for instance if you want to write a function returning such an expression, you will need to use this class. In C++11, it is advised to use the *auto* keyword for such use cases.

 Here is an example illustrating the dynamic case: 



```
#include <Eigen/Core>
#include <iostream>
using namespace std;
using namespace [Eigen](namespaceeigen);
 
template<typename Derived>
const Reshaped<const Derived>
reshape_helper(const MatrixBase<Derived>& m, int rows, int cols)
{
  return Reshaped<const Derived>(m.derived(), rows, cols);
}
 
int main(int, char**)
{
  MatrixXd m(3, 4);
  m << 1, 4, 7, 10,
       2, 5, 8, 11,
       3, 6, 9, 12;
  cout << m << endl;
  Ref<const MatrixXd> n = reshape_helper(m, 2, 6);
  cout << "Matrix m is:" << endl << m << endl;
  cout << "Matrix n is:" << endl << n << endl;
}
```

 Output: 



```
 1  4  7 10
 2  5  8 11
 3  6  9 12
Matrix m is:
 1  4  7 10
 2  5  8 11
 3  6  9 12
Matrix n is:
 1  3  5  7  9 11
 2  4  6  8 10 12

```

Here is an example illustrating the fixed-size case: 



```
#include <Eigen/Core>
#include <iostream>
using namespace [Eigen](namespaceeigen);
using namespace std;
 
template<typename Derived>
[Eigen::Reshaped<Derived, 4, 2>](classeigen_1_1reshaped)
reshape_helper(MatrixBase<Derived>& m)
{
  return [Eigen::Reshaped<Derived, 4, 2>](classeigen_1_1reshaped)(m.derived());
}
 
int main(int, char**)
{
  MatrixXd m(2, 4);
  m << 1, 2, 3, 4,
       5, 6, 7, 8;
  MatrixXd n = reshape_helper(m);
  cout << "matrix m is:" << endl << m << endl;
  cout << "matrix n is:" << endl << n << endl;
  return 0;
}
```

 Output: 



```
matrix m is:
1 2 3 4
5 6 7 8
matrix n is:
1 3
5 7
2 4
6 8

```


See also
DenseBase::reshaped(NRowsType,NColsType) 
  Inherits Eigen::ReshapedImpl< XprType, Rows, Cols, Order, internal::traits< XprType >::StorageKind >.

 

|  |
| --- |
|  |
|  | [Reshaped](classeigen_1_1reshaped#a6de25b03b93cb3dc55ba7fcafae87984) (XprType &xpr) |
|  |
|  | [Reshaped](classeigen_1_1reshaped#a26f25c9bc61d72ae9db5d62112d4a26a) (XprType &xpr, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) reshapeRows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) reshapeCols) |
|  |

  Reshaped() [1/2]
----------------

    template<typename XprType , int Rows, int Cols, int Order>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Reshaped](classeigen_1_1reshaped)< XprType, Rows, Cols, Order >::[Reshaped](classeigen_1_1reshaped) | ( | XprType &  | *xpr* | ) |  |

 | inline |

 
 Fixed-size constructor 

    Reshaped() [2/2]
----------------

    template<typename XprType , int Rows, int Cols, int Order>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Reshaped](classeigen_1_1reshaped)< XprType, Rows, Cols, Order >::[Reshaped](classeigen_1_1reshaped) | ( | XprType &  | *xpr*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *reshapeRows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *reshapeCols* |
|  | ) |  |  |

 | inline |

 
 Dynamic-size constructor 

   

---

The documentation for this class was generated from the following file:* [Reshaped.h](https://eigen.tuxfamily.org/dox/Reshaped_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Reshaped.html>

Eigen::ScalarBinaryOpTraits
===========================

  
### template<typename ScalarA, typename ScalarB, typename BinaryOp = internal::scalar\_product\_op<ScalarA,ScalarB>> class Eigen::ScalarBinaryOpTraits< ScalarA, ScalarB, BinaryOp >

 Determines whether the given binary operation of two numeric types is allowed and what the scalar return type is. 

 This class permits to control the scalar return type of any binary operation performed on two different scalar types through (partial) template specializations.

 For instance, let `U1`, `U2` and `U3` be three user defined scalar types for which most operations between instances of `U1` and `U2` returns an `U3`. You can let Eigen knows that by defining: 



```
template<typename BinaryOp>
struct ScalarBinaryOpTraits<U1,U2,BinaryOp> { typedef U3 ReturnType;  };
template<typename BinaryOp>
struct ScalarBinaryOpTraits<U2,U1,BinaryOp> { typedef U3 ReturnType;  };

```

 You can then explicitly disable some particular operations to get more explicit error messages: 



```
template<>
struct ScalarBinaryOpTraits<U1,U2,internal::scalar_max_op<U1,U2> > {};

```

 Or customize the return type for individual operation: 



```
template<>
struct ScalarBinaryOpTraits<U1,U2,internal::scalar_sum_op<U1,U2> > { typedef U1 ReturnType; };

```

By default, the following generic combinations are supported: 




| ScalarA | ScalarB | BinaryOp | ReturnType | Note  |
| --- | --- | --- | --- | --- |
| `T` | `T` | `*` | `T` |  |
| `NumTraits<T>::Real` | `T` | `*` | `T` | Only if `NumTraits<T>::IsComplex` |
| `T` | `NumTraits<T>::Real` | `*` | `T` | Only if `NumTraits<T>::IsComplex` |

 
See also

[CwiseBinaryOp](classeigen_1_1cwisebinaryop "Generic expression where a coefficient-wise binary operator is applied to two expressions.") 
 


---

The documentation for this class was generated from the following file:* [XprHelper.h](https://eigen.tuxfamily.org/dox/XprHelper_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/structEigen_1_1ScalarBinaryOpTraits.html>

Eigen::Select
=============

  
### template<typename ConditionMatrixType, typename ThenMatrixType, typename ElseMatrixType> class Eigen::Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >

 Expression of a coefficient wise version of the C++ ternary operator ?: 

 
Parameters
 

|  |  |
| --- | --- |
| ConditionMatrixType | the type of the *condition* expression which must be a boolean matrix  |
| ThenMatrixType | the type of the *then* expression  |
| ElseMatrixType | the type of the *else* expression |

   This class represents an expression of a coefficient wise version of the C++ ternary operator ?:. It is the return type of [DenseBase::select()](classeigen_1_1densebase#a65e78cfcbc9852e6923bebff4323ddca) and most of the time this is the only way it is used.

 
See also

[DenseBase::select(const DenseBase<ThenDerived>&, const DenseBase<ElseDerived>&) const](classeigen_1_1densebase#a65e78cfcbc9852e6923bebff4323ddca) 
  Inherits internal::dense\_xpr\_base::type, and Eigen::internal::no\_assignment\_operator.

 

---

The documentation for this class was generated from the following file:* [Select.h](https://eigen.tuxfamily.org/dox/Select_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Select.html>

Eigen::Ref
==========

  
### template<typename SparseMatrixType, int Options> class Eigen::Ref< SparseMatrixType, Options >

 A sparse matrix expression referencing an existing sparse expression. 

 
Template Parameters
 

|  |  |
| --- | --- |
| SparseMatrixType | the equivalent sparse matrix type of the referenced data, it must be a template instance of class [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.").  |
| Options | specifies whether the a standard compressed format is required `Options` is `[StandardCompressedFormat](namespaceeigen#aaec054b156d7e5de1d19a4b2c125ce6aabd3632507a3697fb48c77eff79851a74)`, or `0`. The default is `0`. |

   
See also
class [Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.") 
     ![Inheritance graph]          

|  |
| --- |
|  |
| template<typename Derived >  |
|  | [Ref](classeigen_1_1ref_3_01sparsematrixtype_00_01options_01_4#a5a27af935f839a42d85421f5cce99a68) ([SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived > &expr) |
|  |
| - Public Member Functions inherited from [Eigen::SparseMapBase< Derived, WriteAccessors >](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4) |
| Scalar &  | [coeffRef](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#aa9c42d48b9dd6f947ce3c257fe4bf2ca) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| StorageIndex \*  | [innerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af5cd1f13dde8578eb9891a4ac4a11977) () |
|  |
| StorageIndex \*  | [innerNonZeroPtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af877ea4e285a4497f80987fea66f7459) () |
|  |
| StorageIndex \*  | [outerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#a3b74af754254837fc591cd9936688b95) () |
|  |
| Scalar \*  | [valuePtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af91648a18729ae8ff29cb1d8751c5655) () |
|  |
|  | [~SparseMapBase](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#a4dfbcf3ac411885b1710ad04892c984d) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseMapBase< Derived, ReadOnlyAccessors >](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4) |
| Scalar  | [coeff](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a195e66f79171f78cc22d91fff37e36e3) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a0fc44f3781a869a3a410edd6691fd899) () const |
|  |
| const StorageIndex \*  | [innerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#ab044564756f472877b2c1a5706e540e2) () const |
|  |
| const StorageIndex \*  | [innerNonZeroPtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a2b35a1d701d6c6ea36b2d9f19660a68c) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a0df6dba8d71e0fb15b2995510853f83e) () const |
|  |
| bool  | [isCompressed](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#aafab4afa7ab2ff89eff049d4c71e2ce4) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a753e975b7b3643d821dc061141786870) () const |
|  |
| const StorageIndex \*  | [outerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a24c55dd8de4aca30e7c90b69aa5dca6b) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a3d6ede19db6d42074ae063bc876231b1) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a3cdd6cab0abd7ac01925a695fc315d34) () const |
|  |
| const Scalar \*  | [valuePtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a574ea9371c22eabebdda21c0787312dc) () const |
|  |
|  | [~SparseMapBase](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#ab375aedf824909a7f1a6af24ee60d70f) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseCompressedBase< Derived >](classeigen_1_1sparsecompressedbase) |
| [Map](classeigen_1_1map)< [Array](classeigen_1_1array)< Scalar, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 1 > >  | [coeffs](classeigen_1_1sparsecompressedbase#a7cf299e08d2a4f6d6869e631e51b12fe) () |
|  |
| const [Map](classeigen_1_1map)< const [Array](classeigen_1_1array)< Scalar, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 1 > >  | [coeffs](classeigen_1_1sparsecompressedbase#a101b155485ae59ea1261c4f6040f3dc4) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsecompressedbase#a197111c1289644f1ea38fe683ccdd82a) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsecompressedbase#aa64818e1aa43015dad01b114b2ab4687) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsecompressedbase#a411e972b097e6aef225415a4c2d0a0b5) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsecompressedbase#afc056a3895eae1a4c4767252ff04966a) () const |
|  |
| bool  | [isCompressed](classeigen_1_1sparsecompressedbase#a837934b33a80fe996ff20500373d3a61) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1sparsecompressedbase#a03de8b3da2c142ce8698a76123b3e7d3) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsecompressedbase#a53a82f962686e18c8dc07a4b9a85ed7b) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsecompressedbase#a2624d4c2661c582de168246c56e8d71e) () const |
|  |
| Scalar \*  | [valuePtr](classeigen_1_1sparsecompressedbase#a0f12f72d14b6c277d09be9f5ce2eab95) () |
|  |
| const Scalar \*  | [valuePtr](classeigen_1_1sparsecompressedbase#a0f44c739398794ea77f310b745cc5627) () const |
|  |
| - Public Member Functions inherited from [Eigen::SparseMatrixBase< Derived >](classeigen_1_1sparsematrixbase) |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1sparsematrixbase#aca7ce296424ef6e478ab0fb19547a7ee) () const |
|  |
| const internal::eval< Derived >::type  | [eval](classeigen_1_1sparsematrixbase#a761bd872a06b59632fcff7b7807a77ce) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1sparsematrixbase#a180fcba1ccf3cdf3252a263bc1de7a1d) () const |
|  |
| bool  | [isVector](classeigen_1_1sparsematrixbase#a7eedffa867031f649fd0fb9cc23ce4be) () const |
|  |
| template<typename OtherDerived >  |
| const [Product](classeigen_1_1product)< Derived, OtherDerived, AliasFreeProduct >  | [operator\*](classeigen_1_1sparsematrixbase#a9d4d71b3f34389e6fc01f2b86e43f7a4) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &other) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1sparsematrixbase#ac86cc88a4cfef21db6b64ec0ab4c8f0a) () const |
|  |
| const [SparseView](classeigen_1_1sparseview)< Derived >  | [pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d) (const Scalar &reference=Scalar(0), const RealScalar &epsilon=[NumTraits](structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1sparsematrixbase#a1944e9fa9ce7937bfc3a87b2cb94371f) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1sparsematrixbase#a124bc57921775eb9aa2dfd9727e23472) () const |
|  |
| SparseSymmetricPermutationProduct< Derived, [Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)|[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749) >  | [twistedBy](classeigen_1_1sparsematrixbase#a51d4898bd6a57cc3ba543a39b102423e) (const [PermutationMatrix](classeigen_1_1permutationmatrix)< [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) > &perm) const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::SparseMatrixBase< Derived >](classeigen_1_1sparsematrixbase) |
| enum  | {  [RowsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a456cda7b9d938e57194036a41d634604) ,  [ColsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a27ba349f075d026c1f51d1ec69aa5b14) ,  [SizeAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5aa5022cfa2bb53129883e9b7b8abd3d68) ,  **MaxRowsAtCompileTime** ,  **MaxColsAtCompileTime** ,  **MaxSizeAtCompileTime** ,  [IsVectorAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a14a3f566ed2a074beddb8aef0223bfdf) ,  [NumDimensions](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a2366131ffcc38bff48a1c7572eb86dd3) ,  [Flags](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a2af043b36fe9e08df0107cf6de496165) ,  **IsRowMajor** ,  **InnerSizeAtCompileTime**  } |
|  |
| typedef internal::traits< Derived >::[StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) | [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) |
|  |
| typedef Scalar  | [value\_type](classeigen_1_1sparsematrixbase#ac254d3b61718ebc2136d27bac043dcb7) |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |
| - Protected Member Functions inherited from [Eigen::SparseCompressedBase< Derived >](classeigen_1_1sparsecompressedbase) |
|  | [SparseCompressedBase](classeigen_1_1sparsecompressedbase#af79f020db965367d97eb954fc68d8f99) () |
|  |

  Ref()
-----

    template<typename SparseMatrixType , int Options>   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Ref](classeigen_1_1ref)< SparseMatrixType, Options >::[Ref](classeigen_1_1ref) | ( | [SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived > &  | *expr* | ) |  |

 | inline |

 
 Implicit constructor from any sparse expression (2D matrix or 1D vector) 

   

---

The documentation for this class was generated from the following file:* [SparseRef.h](https://eigen.tuxfamily.org/dox/SparseRef_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Ref_3_01SparseMatrixType_00_01Options_01_4.html>

Eigen::Ref
==========

  
### template<typename SparseVectorType> class Eigen::Ref< SparseVectorType >

 A sparse vector expression referencing an existing sparse vector expression. 

 
Template Parameters
 

|  |  |
| --- | --- |
| SparseVectorType | the equivalent sparse vector type of the referenced data, it must be a template instance of class [SparseVector](classeigen_1_1sparsevector "a sparse vector class"). |

   
See also
class [Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.") 
     ![Inheritance graph]          

|  |
| --- |
|  |
| template<typename Derived >  |
|  | [Ref](classeigen_1_1ref_3_01sparsevectortype_01_4#a125c83639030247f78157fa606c03f56) ([SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived > &expr) |
|  |
| - Public Member Functions inherited from [Eigen::SparseMapBase< Derived, WriteAccessors >](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4) |
| Scalar &  | [coeffRef](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#aa9c42d48b9dd6f947ce3c257fe4bf2ca) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| StorageIndex \*  | [innerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af5cd1f13dde8578eb9891a4ac4a11977) () |
|  |
| StorageIndex \*  | [innerNonZeroPtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af877ea4e285a4497f80987fea66f7459) () |
|  |
| StorageIndex \*  | [outerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#a3b74af754254837fc591cd9936688b95) () |
|  |
| Scalar \*  | [valuePtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af91648a18729ae8ff29cb1d8751c5655) () |
|  |
|  | [~SparseMapBase](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#a4dfbcf3ac411885b1710ad04892c984d) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseMapBase< Derived, ReadOnlyAccessors >](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4) |
| Scalar  | [coeff](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a195e66f79171f78cc22d91fff37e36e3) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a0fc44f3781a869a3a410edd6691fd899) () const |
|  |
| const StorageIndex \*  | [innerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#ab044564756f472877b2c1a5706e540e2) () const |
|  |
| const StorageIndex \*  | [innerNonZeroPtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a2b35a1d701d6c6ea36b2d9f19660a68c) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a0df6dba8d71e0fb15b2995510853f83e) () const |
|  |
| bool  | [isCompressed](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#aafab4afa7ab2ff89eff049d4c71e2ce4) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a753e975b7b3643d821dc061141786870) () const |
|  |
| const StorageIndex \*  | [outerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a24c55dd8de4aca30e7c90b69aa5dca6b) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a3d6ede19db6d42074ae063bc876231b1) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a3cdd6cab0abd7ac01925a695fc315d34) () const |
|  |
| const Scalar \*  | [valuePtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a574ea9371c22eabebdda21c0787312dc) () const |
|  |
|  | [~SparseMapBase](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#ab375aedf824909a7f1a6af24ee60d70f) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseCompressedBase< Derived >](classeigen_1_1sparsecompressedbase) |
| [Map](classeigen_1_1map)< [Array](classeigen_1_1array)< Scalar, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 1 > >  | [coeffs](classeigen_1_1sparsecompressedbase#a7cf299e08d2a4f6d6869e631e51b12fe) () |
|  |
| const [Map](classeigen_1_1map)< const [Array](classeigen_1_1array)< Scalar, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 1 > >  | [coeffs](classeigen_1_1sparsecompressedbase#a101b155485ae59ea1261c4f6040f3dc4) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsecompressedbase#a197111c1289644f1ea38fe683ccdd82a) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsecompressedbase#aa64818e1aa43015dad01b114b2ab4687) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsecompressedbase#a411e972b097e6aef225415a4c2d0a0b5) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsecompressedbase#afc056a3895eae1a4c4767252ff04966a) () const |
|  |
| bool  | [isCompressed](classeigen_1_1sparsecompressedbase#a837934b33a80fe996ff20500373d3a61) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1sparsecompressedbase#a03de8b3da2c142ce8698a76123b3e7d3) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsecompressedbase#a53a82f962686e18c8dc07a4b9a85ed7b) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsecompressedbase#a2624d4c2661c582de168246c56e8d71e) () const |
|  |
| Scalar \*  | [valuePtr](classeigen_1_1sparsecompressedbase#a0f12f72d14b6c277d09be9f5ce2eab95) () |
|  |
| const Scalar \*  | [valuePtr](classeigen_1_1sparsecompressedbase#a0f44c739398794ea77f310b745cc5627) () const |
|  |
| - Public Member Functions inherited from [Eigen::SparseMatrixBase< Derived >](classeigen_1_1sparsematrixbase) |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1sparsematrixbase#aca7ce296424ef6e478ab0fb19547a7ee) () const |
|  |
| const internal::eval< Derived >::type  | [eval](classeigen_1_1sparsematrixbase#a761bd872a06b59632fcff7b7807a77ce) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1sparsematrixbase#a180fcba1ccf3cdf3252a263bc1de7a1d) () const |
|  |
| bool  | [isVector](classeigen_1_1sparsematrixbase#a7eedffa867031f649fd0fb9cc23ce4be) () const |
|  |
| template<typename OtherDerived >  |
| const [Product](classeigen_1_1product)< Derived, OtherDerived, AliasFreeProduct >  | [operator\*](classeigen_1_1sparsematrixbase#a9d4d71b3f34389e6fc01f2b86e43f7a4) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &other) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1sparsematrixbase#ac86cc88a4cfef21db6b64ec0ab4c8f0a) () const |
|  |
| const [SparseView](classeigen_1_1sparseview)< Derived >  | [pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d) (const Scalar &reference=Scalar(0), const RealScalar &epsilon=[NumTraits](structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1sparsematrixbase#a1944e9fa9ce7937bfc3a87b2cb94371f) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1sparsematrixbase#a124bc57921775eb9aa2dfd9727e23472) () const |
|  |
| SparseSymmetricPermutationProduct< Derived, [Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)|[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749) >  | [twistedBy](classeigen_1_1sparsematrixbase#a51d4898bd6a57cc3ba543a39b102423e) (const [PermutationMatrix](classeigen_1_1permutationmatrix)< [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) > &perm) const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::SparseMatrixBase< Derived >](classeigen_1_1sparsematrixbase) |
| enum  | {  [RowsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a456cda7b9d938e57194036a41d634604) ,  [ColsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a27ba349f075d026c1f51d1ec69aa5b14) ,  [SizeAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5aa5022cfa2bb53129883e9b7b8abd3d68) ,  **MaxRowsAtCompileTime** ,  **MaxColsAtCompileTime** ,  **MaxSizeAtCompileTime** ,  [IsVectorAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a14a3f566ed2a074beddb8aef0223bfdf) ,  [NumDimensions](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a2366131ffcc38bff48a1c7572eb86dd3) ,  [Flags](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a2af043b36fe9e08df0107cf6de496165) ,  **IsRowMajor** ,  **InnerSizeAtCompileTime**  } |
|  |
| typedef internal::traits< Derived >::[StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) | [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) |
|  |
| typedef Scalar  | [value\_type](classeigen_1_1sparsematrixbase#ac254d3b61718ebc2136d27bac043dcb7) |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |
| - Protected Member Functions inherited from [Eigen::SparseCompressedBase< Derived >](classeigen_1_1sparsecompressedbase) |
|  | [SparseCompressedBase](classeigen_1_1sparsecompressedbase#af79f020db965367d97eb954fc68d8f99) () |
|  |

  Ref()
-----

    template<typename SparseVectorType >   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Ref](classeigen_1_1ref)< SparseVectorType >::[Ref](classeigen_1_1ref) | ( | [SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived > &  | *expr* | ) |  |

 | inline |

 
 Implicit constructor from any 1D sparse vector expression 

   

---

The documentation for this class was generated from the following file:* [SparseRef.h](https://eigen.tuxfamily.org/dox/SparseRef_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Ref_3_01SparseVectorType_01_4.html>

Eigen::RotationBase
===================

  
### template<typename Derived, int \_Dim> class Eigen::RotationBase< Derived, \_Dim >

 Common base class for compact rotation representations. 

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | is the derived type, i.e., a rotation type  |
| \_Dim | the dimension of the space  |

       ![Inheritance graph]           

|  |
| --- |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Dim >  | [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) |
|  |
| typedef internal::traits< Derived >::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) |
|  |




|  |
| --- |
|  |
| Derived  | [inverse](classeigen_1_1rotationbase#a8532fb716ea4267cf8bbdb99e5e54837) () const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [matrix](classeigen_1_1rotationbase#a91b5bdb1c7b90ec7b33107c6f7d3b171) () const |
|  |
| template<typename OtherDerived >  |
| internal::rotation\_base\_generic\_product\_selector< Derived, OtherDerived, OtherDerived::IsVectorAtCompileTime >::ReturnType  | [operator\*](classeigen_1_1rotationbase#a09a4757e7aff7a95bebf4fa8a965a4eb) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &e) const |
|  |
| template<int Mode, int Options>  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Mode >  | [operator\*](classeigen_1_1rotationbase#aaca1c3d834e2bc7ebfd046d96cac990c) (const [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Mode, Options > &t) const |
|  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, [Isometry](group__enums#ggaee59a86102f150923b0cac6d4ff05107a84413028615d2d718bafd2dfb93dafef) >  | [operator\*](classeigen_1_1rotationbase#a26d0603783666526a98d08bd45d9c751) (const [Translation](classeigen_1_1translation)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim > &t) const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [operator\*](classeigen_1_1rotationbase#a05af64a1bc759c5fed4ff7afd1414ba4) (const [UniformScaling](classeigen_1_1uniformscaling)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) > &s) const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [toRotationMatrix](classeigen_1_1rotationbase#a94fe3683c867c39d34505932b07e956a) () const |
|  |

  RotationMatrixType
------------------

    template<typename Derived , int \_Dim>  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4),Dim,Dim> [Eigen::RotationBase](classeigen_1_1rotationbase)< Derived, \_Dim >::[RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) |

 
 corresponding linear transformation matrix type 

    Scalar
------

    template<typename Derived , int \_Dim>  

|  |
| --- |
| typedef internal::traits<Derived>::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) [Eigen::RotationBase](classeigen_1_1rotationbase)< Derived, \_Dim >::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) |

 
 the scalar type of the coefficients 

    inverse()
---------

    template<typename Derived , int \_Dim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Derived [Eigen::RotationBase](classeigen_1_1rotationbase)< Derived, \_Dim >::inverse  | ( |  | ) |  const |

 | inline |

 
 
Returns
the inverse rotation 
    matrix()
--------

    template<typename Derived , int \_Dim>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) [Eigen::RotationBase](classeigen_1_1rotationbase)< Derived, \_Dim >::matrix  | ( |  | ) |  const |

 | inline |

 
 
Returns
an equivalent rotation matrix This function is added to be conform with the [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") class' naming scheme. 
    operator\*() [1/4]
------------------

    template<typename Derived , int \_Dim>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| internal::rotation\_base\_generic\_product\_selector<Derived,OtherDerived,OtherDerived::IsVectorAtCompileTime>::ReturnType [Eigen::RotationBase](classeigen_1_1rotationbase)< Derived, \_Dim >::operator\*  | ( | const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &  | *e* | ) |  const |

 | inline |

 
 
Returns
the concatenation of the rotation `*this` with a generic expression *e* *e* can be:* a DimxDim linear transformation matrix
* a DimxDim diagonal matrix (axis aligned scaling)
* a vector of size Dim

 
    operator\*() [2/4]
------------------

    template<typename Derived , int \_Dim>   template<int Mode, int Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)<[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4),Dim,Mode> [Eigen::RotationBase](classeigen_1_1rotationbase)< Derived, \_Dim >::operator\*  | ( | const [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Mode, Options > &  | *t* | ) |  const |

 | inline |

 
 
Returns
the concatenation of the rotation `*this` with a transformation *t* 
    operator\*() [3/4]
------------------

    template<typename Derived , int \_Dim>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)<[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4),Dim,[Isometry](group__enums#ggaee59a86102f150923b0cac6d4ff05107a84413028615d2d718bafd2dfb93dafef)> [Eigen::RotationBase](classeigen_1_1rotationbase)< Derived, \_Dim >::operator\*  | ( | const [Translation](classeigen_1_1translation)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim > &  | *t* | ) |  const |

 | inline |

 
 
Returns
the concatenation of the rotation `*this` with a translation *t* 
    operator\*() [4/4]
------------------

    template<typename Derived , int \_Dim>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) [Eigen::RotationBase](classeigen_1_1rotationbase)< Derived, \_Dim >::operator\*  | ( | const [UniformScaling](classeigen_1_1uniformscaling)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) > &  | *s* | ) |  const |

 | inline |

 
 
Returns
the concatenation of the rotation `*this` with a uniform scaling *s* 
    toRotationMatrix()
------------------

    template<typename Derived , int \_Dim>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) [Eigen::RotationBase](classeigen_1_1rotationbase)< Derived, \_Dim >::toRotationMatrix  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
an equivalent rotation matrix 
   

---

The documentation for this class was generated from the following file:* [RotationBase.h](https://eigen.tuxfamily.org/dox/RotationBase_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1RotationBase.html>

Eigen::SimplicialCholesky
=========================

  
### template<typename \_MatrixType, int \_UpLo, typename \_Ordering> class Eigen::SimplicialCholesky< \_MatrixType, \_UpLo, \_Ordering >

 
**[Deprecated:](deprecated#_deprecated000032)**
use [SimplicialLDLT](classeigen_1_1simplicialldlt "A direct sparse LDLT Cholesky factorizations without square root.") or class [SimplicialLLT](classeigen_1_1simplicialllt "A direct sparse LLT Cholesky factorizations.")

 
See also
class [SimplicialLDLT](classeigen_1_1simplicialldlt "A direct sparse LDLT Cholesky factorizations without square root."), class [SimplicialLLT](classeigen_1_1simplicialllt "A direct sparse LLT Cholesky factorizations.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
| void  | [analyzePattern](classeigen_1_1simplicialcholesky#a6af3f64b855a96a2635302f863b5fd91) (const MatrixType &a) |
|  |
| [SimplicialCholesky](classeigen_1_1simplicialcholesky) &  | [compute](classeigen_1_1simplicialcholesky#a7883b49a88b26162ba6d8b044e2ee75b) (const MatrixType &matrix) |
|  |
| void  | [factorize](classeigen_1_1simplicialcholesky#ab1b21d430cc2a8e332221313a4f2f2e3) (const MatrixType &a) |
|  |
| - Public Member Functions inherited from [Eigen::SimplicialCholeskyBase< SimplicialCholesky< \_MatrixType, \_UpLo, \_Ordering > >](classeigen_1_1simplicialcholeskybase) |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1simplicialcholeskybase#a3ac877f73aaaff670e6ae7554eb02fc8) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1simplicialcholeskybase#a3ac877f73aaaff670e6ae7554eb02fc8) |
|  |
| const [PermutationMatrix](classeigen_1_1permutationmatrix)< Dynamic, Dynamic, StorageIndex > &  | [permutationP](classeigen_1_1simplicialcholeskybase#aff1480e595a21726beaec9a586a94d5a) () const |
|  |
| const [PermutationMatrix](classeigen_1_1permutationmatrix)< Dynamic, Dynamic, StorageIndex > &  | [permutationPinv](classeigen_1_1simplicialcholeskybase#a0e23d1f4a88c211be7098faf1cb41674) () const |
|  |
| [SimplicialCholesky](classeigen_1_1simplicialcholesky)< \_MatrixType, \_UpLo, \_Ordering > &  | [setShift](classeigen_1_1simplicialcholeskybase#a362352f755101faaac59c1ed9d5e3559) (const RealScalar &offset, const RealScalar &scale=1) |
|  |
|  | [SimplicialCholeskyBase](classeigen_1_1simplicialcholeskybase#a098baba1dbe07ca3a775c8df1f8a0e71) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< SimplicialCholesky< \_MatrixType, \_UpLo, \_Ordering > >](classeigen_1_1sparsesolverbase) |
| const [Solve](classeigen_1_1solve)< [SimplicialCholesky](classeigen_1_1simplicialcholesky)< \_MatrixType, \_UpLo, \_Ordering >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| const [Solve](classeigen_1_1solve)< [SimplicialCholesky](classeigen_1_1simplicialcholesky)< \_MatrixType, \_UpLo, \_Ordering >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |




|  |
| --- |
|  |
| - Protected Member Functions inherited from [Eigen::SimplicialCholeskyBase< SimplicialCholesky< \_MatrixType, \_UpLo, \_Ordering > >](classeigen_1_1simplicialcholeskybase) |
| void  | [compute](classeigen_1_1simplicialcholeskybase#a9a741744dda2261cae26cddf96a35bf0) (const MatrixType &matrix) |
|  |

  analyzePattern()
----------------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SimplicialCholesky](classeigen_1_1simplicialcholesky)< \_MatrixType, \_UpLo, \_Ordering >::analyzePattern  | ( | const MatrixType &  | *a* | ) |  |

 | inline |

 
 Performs a symbolic decomposition on the sparcity of *matrix*.

 This function is particularly useful when solving for several problems having the same structure.

 
See also

[factorize()](classeigen_1_1simplicialcholesky#ab1b21d430cc2a8e332221313a4f2f2e3) 
    compute()
---------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [SimplicialCholesky](classeigen_1_1simplicialcholesky)& [Eigen::SimplicialCholesky](classeigen_1_1simplicialcholesky)< \_MatrixType, \_UpLo, \_Ordering >::compute  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Computes the sparse Cholesky decomposition of *matrix* 

    factorize()
-----------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SimplicialCholesky](classeigen_1_1simplicialcholesky)< \_MatrixType, \_UpLo, \_Ordering >::factorize  | ( | const MatrixType &  | *a* | ) |  |

 | inline |

 
 Performs a numeric decomposition of *matrix* 

 The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed.

 
See also

[analyzePattern()](classeigen_1_1simplicialcholesky#a6af3f64b855a96a2635302f863b5fd91) 
   

---

The documentation for this class was generated from the following file:* [SimplicialCholesky.h](https://eigen.tuxfamily.org/dox/SimplicialCholesky_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SimplicialCholesky.html>

Eigen::Solve
============

  
### template<typename Decomposition, typename RhsType> class Eigen::Solve< Decomposition, RhsType >

 Pseudo expression representing a solving operation. 

 
Template Parameters
 

|  |  |
| --- | --- |
| Decomposition | the type of the matrix or decomposition object  |
| Rhstype | the type of the right-hand side |

   This class represents an expression of A.solve(B) and most of the time this is the only way it is used. 

  Inherits Eigen::SolveImpl< Decomposition, RhsType, internal::traits< RhsType >::StorageKind >.

 

---

The documentation for this class was generated from the following file:* [Solve.h](https://eigen.tuxfamily.org/dox/Solve_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Solve.html>

Eigen::QuaternionBase
=====================

  
### template<class Derived> class Eigen::QuaternionBase< Derived >

 Base class for quaternion expressions. 

 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Template Parameters
 

|  |  |
| --- | --- |
| Derived | derived type (CRTP)  |

   
See also
class [Quaternion](classeigen_1_1quaternion "The quaternion class used to represent 3D orientations and rotations.") 
     ![Inheritance graph]      

|  |
| --- |
|  |
| typedef [AngleAxis](classeigen_1_1angleaxis)< Scalar >  | [AngleAxisType](classeigen_1_1quaternionbase#aed266c63b10a4028304901d9c8614199) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< Scalar, 3, 3 >  | [Matrix3](classeigen_1_1quaternionbase#ac3972e6cb0f56cccbe9e3946a7e494f8) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< Scalar, 3, 1 >  | [Vector3](classeigen_1_1quaternionbase#a974c0529d55983b0b3a6d99a8466f331) |
|  |
| - Public Types inherited from [Eigen::RotationBase< Derived, 3 >](classeigen_1_1rotationbase) |
| typedef [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Dim >  | [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) |
|  |
| typedef internal::traits< Derived >::[Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) | [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) |
|  |




|  |
| --- |
|  |
| [Vector3](classeigen_1_1quaternionbase#a974c0529d55983b0b3a6d99a8466f331) | [\_transformVector](classeigen_1_1quaternionbase#aabef1f6fc62535f6f85d590108915ee8) (const [Vector3](classeigen_1_1quaternionbase#a974c0529d55983b0b3a6d99a8466f331) &v) const |
|  |
| template<class OtherDerived >  |
| internal::traits< Derived >::Scalar  | [angularDistance](classeigen_1_1quaternionbase#a74f13d7c853484996494c26c633ae02a) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| template<typename NewScalarType >  |
| internal::cast\_return\_type< Derived, [Quaternion](classeigen_1_1quaternion)< NewScalarType > >::type  | [cast](classeigen_1_1quaternionbase#a951d627764be63ca1e8c2c4c7315e43f) () const |
|  |
| internal::traits< Derived >::Coefficients &  | [coeffs](classeigen_1_1quaternionbase#ae61294790c0cc308d3f69690a657672c) () |
|  |
| const internal::traits< Derived >::Coefficients &  | [coeffs](classeigen_1_1quaternionbase#a193e79f616335a0067e3e784c7cf85fa) () const |
|  |
| [Quaternion](classeigen_1_1quaternion)< Scalar >  | [conjugate](classeigen_1_1quaternionbase#a5e63b775d0a93161ce6137ec0a17f6b0) () const |
|  |
| template<class OtherDerived >  |
| Scalar  | [dot](classeigen_1_1quaternionbase#aa2d22c5b321c9539dd625ca415422236) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| [Quaternion](classeigen_1_1quaternion)< Scalar >  | [inverse](classeigen_1_1quaternionbase#ab12ee41b3b06adc3062217a795a6a9f5) () const |
|  |
| template<class OtherDerived >  |
| bool  | [isApprox](classeigen_1_1quaternionbase#a64bc41c96a9e99567e0f8409f8f0f680) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| Scalar  | [norm](classeigen_1_1quaternionbase#aad4b1faef1eabdc7fdd4d305e9881149) () const |
|  |
| void  | [normalize](classeigen_1_1quaternionbase#a7a487a8a129b46be562f42044102c1f8) () |
|  |
| [Quaternion](classeigen_1_1quaternion)< Scalar >  | [normalized](classeigen_1_1quaternionbase#ade799f18b7ec19c02ddae3a4921fa8a0) () const |
|  |
| template<class OtherDerived >  |
| bool  | [operator!=](classeigen_1_1quaternionbase#a530edf22f03853cd07ba829ea0d505dc) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| template<class OtherDerived >  |
| [Quaternion](classeigen_1_1quaternion)< typename internal::traits< Derived >::Scalar >  | [operator\*](classeigen_1_1quaternionbase#afdf1dc395c1cff6716ec9b80fd15b414) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| template<class OtherDerived >  |
| Derived &  | [operator\*=](classeigen_1_1quaternionbase#afd8ee6b6420fbdd22fab7cd016212441) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &q) |
|  |
| Derived &  | [operator=](classeigen_1_1quaternionbase#aa7c114c6e62a37d4fc53b6e82ed78eac) (const [AngleAxisType](classeigen_1_1quaternionbase#aed266c63b10a4028304901d9c8614199) &aa) |
|  |
| template<class MatrixDerived >  |
| Derived &  | [operator=](classeigen_1_1quaternionbase#a20a6702c9da3fc2950178d920d0aaf84) (const [MatrixBase](classeigen_1_1matrixbase)< MatrixDerived > &xpr) |
|  |
| template<class OtherDerived >  |
| bool  | [operator==](classeigen_1_1quaternionbase#ad206c9014409c06970884dbfc00e6c3c) (const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| template<typename Derived1 , typename Derived2 >  |
| Derived &  | [setFromTwoVectors](classeigen_1_1quaternionbase#a7ae84bfbcc9f3f19f10294496a836bee) (const [MatrixBase](classeigen_1_1matrixbase)< Derived1 > &a, const [MatrixBase](classeigen_1_1matrixbase)< Derived2 > &b) |
|  |
| [QuaternionBase](classeigen_1_1quaternionbase) &  | [setIdentity](classeigen_1_1quaternionbase#a4695b0f6eebfb217ae2fbd579ceda24a) () |
|  |
| template<class OtherDerived >  |
| [Quaternion](classeigen_1_1quaternion)< typename internal::traits< Derived >::Scalar >  | [slerp](classeigen_1_1quaternionbase#ac840bde67d22f2deca330561c65d144e) (const Scalar &t, const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &other) const |
|  |
| Scalar  | [squaredNorm](classeigen_1_1quaternionbase#a09730db4ef0b546f5cf29f6b180b3c87) () const |
|  |
| [Matrix3](classeigen_1_1quaternionbase#ac3972e6cb0f56cccbe9e3946a7e494f8) | [toRotationMatrix](classeigen_1_1quaternionbase#a8cf07ab9875baba2eecdd62ff93bfc3f) () const |
|  |
| [VectorBlock](classeigen_1_1vectorblock)< Coefficients, 3 >  | [vec](classeigen_1_1quaternionbase#a91f93bde88f52796cfcd92c3594f39e5) () |
|  |
| const [VectorBlock](classeigen_1_1vectorblock)< const Coefficients, 3 >  | [vec](classeigen_1_1quaternionbase#ada8bdb403471df23511bdc0f227962ea) () const |
|  |
| NonConstCoeffReturnType  | [w](classeigen_1_1quaternionbase#ad884cf20a0b0b92bb63ab3fe9d6d6b7f) () |
|  |
| CoeffReturnType  | [w](classeigen_1_1quaternionbase#ab5eae91bedac0afaab0074cec5e535bc) () const |
|  |
| NonConstCoeffReturnType  | [x](classeigen_1_1quaternionbase#a8b05bac2a1c099b341396f725e85f3b1) () |
|  |
| CoeffReturnType  | [x](classeigen_1_1quaternionbase#afdd8e260d5de861a6136cb9e6ceaa4b4) () const |
|  |
| NonConstCoeffReturnType  | [y](classeigen_1_1quaternionbase#a6005245a72520df258d30af6b5448595) () |
|  |
| CoeffReturnType  | [y](classeigen_1_1quaternionbase#aad37efca5d9fde3f4cb03a208f38d74f) () const |
|  |
| NonConstCoeffReturnType  | [z](classeigen_1_1quaternionbase#a9afed6a7fa4fcdfbe599d7b5b207fc1b) () |
|  |
| CoeffReturnType  | [z](classeigen_1_1quaternionbase#a8389b65a61aa3fc76d3ba4bd4a63e529) () const |
|  |
| - Public Member Functions inherited from [Eigen::RotationBase< Derived, 3 >](classeigen_1_1rotationbase) |
| Derived  | [inverse](classeigen_1_1rotationbase#a8532fb716ea4267cf8bbdb99e5e54837) () const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [matrix](classeigen_1_1rotationbase#a91b5bdb1c7b90ec7b33107c6f7d3b171) () const |
|  |
| internal::rotation\_base\_generic\_product\_selector< Derived, OtherDerived, OtherDerived::IsVectorAtCompileTime >::ReturnType  | [operator\*](classeigen_1_1rotationbase#a09a4757e7aff7a95bebf4fa8a965a4eb) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &e) const |
|  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Mode >  | [operator\*](classeigen_1_1rotationbase#aaca1c3d834e2bc7ebfd046d96cac990c) (const [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Mode, Options > &t) const |
|  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim, Isometry >  | [operator\*](classeigen_1_1rotationbase#a26d0603783666526a98d08bd45d9c751) (const [Translation](classeigen_1_1translation)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4), Dim > &t) const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [operator\*](classeigen_1_1rotationbase#a05af64a1bc759c5fed4ff7afd1414ba4) (const [UniformScaling](classeigen_1_1uniformscaling)< [Scalar](classeigen_1_1rotationbase#af9b43eac462d7aa70b018efd49c13ef4) > &s) const |
|  |
| [RotationMatrixType](classeigen_1_1rotationbase#a83602509674c9d635551998460342951) | [toRotationMatrix](classeigen_1_1rotationbase#a94fe3683c867c39d34505932b07e956a) () const |
|  |




|  |
| --- |
|  |
| static [Quaternion](classeigen_1_1quaternion)< Scalar >  | [Identity](classeigen_1_1quaternionbase#a6f31a6f98016f186515b3277f4757962) () |
|  |

  AngleAxisType
-------------

    template<class Derived >  

|  |
| --- |
| typedef [AngleAxis](classeigen_1_1angleaxis)<Scalar> [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::[AngleAxisType](classeigen_1_1quaternionbase#aed266c63b10a4028304901d9c8614199) |

 
 the equivalent angle-axis type 

    Matrix3
-------

    template<class Derived >  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<Scalar,3,3> [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::[Matrix3](classeigen_1_1quaternionbase#ac3972e6cb0f56cccbe9e3946a7e494f8) |

 
 the equivalent rotation matrix type 

    Vector3
-------

    template<class Derived >  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<Scalar,3,1> [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::[Vector3](classeigen_1_1quaternionbase#a974c0529d55983b0b3a6d99a8466f331) |

 
 the type of a 3D vector 

    \_transformVector()
-------------------

    template<class Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [QuaternionBase](classeigen_1_1quaternionbase)< Derived >::[Vector3](classeigen_1_1quaternionbase#a974c0529d55983b0b3a6d99a8466f331) [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::\_transformVector  | ( | const [Vector3](classeigen_1_1quaternionbase#a974c0529d55983b0b3a6d99a8466f331) &  | *v* | ) |  const |

 | inline |

 
 return the result vector of *v* through the rotation

 Rotation of a vector by a quaternion. 



Remarks
If the quaternion is used to rotate several points (>1) then it is much more efficient to first convert it to a 3x3 [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors."). Comparison of the operation cost for n transformations:* Quaternion2: 30n
* Via a Matrix3: 24 + 15n

 
    angularDistance()
-----------------

    template<class Derived >   template<class OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| internal::traits<Derived>::Scalar [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::angularDistance  | ( | const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 
Returns
the angle (in radian) between two rotations 
 
See also

[dot()](classeigen_1_1quaternionbase#aa2d22c5b321c9539dd625ca415422236) 
    cast()
------

    template<class Derived >   template<typename NewScalarType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::cast\_return\_type<Derived,[Quaternion](classeigen_1_1quaternion)<NewScalarType> >::type [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::cast  | ( |  | ) |  const |

 | inline |

 
 
Returns

`*this` with scalar type casted to *NewScalarType* 
 Note that if *NewScalarType* is equal to the current scalar type of `*this` then this function smartly returns a const reference to `*this`. 

    coeffs() [1/2]
--------------

    template<class Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::traits<Derived>::Coefficients& [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::coeffs  | ( |  | ) |  |

 | inline |

 
 
Returns
a vector expression of the coefficients (x,y,z,w) 
    coeffs() [2/2]
--------------

    template<class Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const internal::traits<Derived>::Coefficients& [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::coeffs  | ( |  | ) |  const |

 | inline |

 
 
Returns
a read-only vector expression of the coefficients (x,y,z,w) 
    conjugate()
-----------

    template<class Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Quaternion](classeigen_1_1quaternion)< typename internal::traits< Derived >::Scalar > [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::conjugate  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
the conjugated quaternion  the conjugate of the `*this` which is equal to the multiplicative inverse if the quaternion is normalized. The conjugate of a quaternion represents the opposite rotation.
 
See also
Quaternion2::inverse() 
    dot()
-----

    template<class Derived >   template<class OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Scalar [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::dot  | ( | const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 
Returns
the dot product of `*this` and *other* Geometrically speaking, the dot product of two unit quaternions corresponds to the cosine of half the angle between the two rotations. 
 
See also
angularDistance() 
    Identity()
----------

    template<class Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| static [Quaternion](classeigen_1_1quaternion)<Scalar> [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::Identity  | ( |  | ) |  |

 | inlinestatic |

 
 
Returns
a quaternion representing an identity rotation 
 
See also

[MatrixBase::Identity()](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f) 
    inverse()
---------

    template<class Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [Quaternion](classeigen_1_1quaternion)< typename internal::traits< Derived >::Scalar > [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::inverse |

 | inline |

 
 
Returns
the quaternion describing the inverse rotation  the multiplicative inverse of `*this` Note that in most cases, i.e., if you simply want the opposite rotation, and/or the quaternion is normalized, then it is enough to use the conjugate.
 
See also

[QuaternionBase::conjugate()](classeigen_1_1quaternionbase#a5e63b775d0a93161ce6137ec0a17f6b0) 
    isApprox()
----------

    template<class Derived >   template<class OtherDerived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::isApprox  | ( | const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &  | *other*,  |
|  |  | const RealScalar &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<Scalar>::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 
Returns

`true` if `*this` is approximately equal to *other*, within the precision determined by *prec*.
 
See also

[MatrixBase::isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) 
    norm()
------

    template<class Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::norm  | ( |  | ) |  const |

 | inline |

 
 
Returns
the norm of the quaternion's coefficients 
 
See also

[QuaternionBase::squaredNorm()](classeigen_1_1quaternionbase#a09730db4ef0b546f5cf29f6b180b3c87), [MatrixBase::norm()](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975) 
    normalize()
-----------

    template<class Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::normalize  | ( | void  |  | ) |  |

 | inline |

 
 Normalizes the quaternion `*this` 



See also

[normalized()](classeigen_1_1quaternionbase#ade799f18b7ec19c02ddae3a4921fa8a0), [MatrixBase::normalize()](classeigen_1_1matrixbase#ad16303c47ba36f7a41ea264cb26bceb6) 
    normalized()
------------

    template<class Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Quaternion](classeigen_1_1quaternion)<Scalar> [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::normalized  | ( |  | ) |  const |

 | inline |

 
 
Returns
a normalized copy of `*this` 
 
See also

[normalize()](classeigen_1_1quaternionbase#a7a487a8a129b46be562f42044102c1f8), [MatrixBase::normalized()](classeigen_1_1matrixbase#a5cf2fd4c57e59604fd4116158fd34308) 
    operator!=()
------------

    template<class Derived >   template<class OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| bool [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::operator!=  | ( | const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 
Returns
true if at least one pair of coefficients of `*this` and *other* are not exactly equal to each other. 
 
Warning
When using floating point scalar values you probably should rather use a fuzzy comparison such as [isApprox()](classeigen_1_1quaternionbase#a64bc41c96a9e99567e0f8409f8f0f680) 
 
See also

[isApprox()](classeigen_1_1quaternionbase#a64bc41c96a9e99567e0f8409f8f0f680), operator== 
    operator\*()
------------

    template<class Derived >   template<class OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Quaternion](classeigen_1_1quaternion)<typename internal::traits<Derived>::Scalar> [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::operator\*  | ( | const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 
Returns
the concatenation of two rotations as a quaternion-quaternion product 
    operator\*=()
-------------

    template<class Derived >   template<class OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::operator\*=  | ( | const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 
See also
operator\*(Quaternion) 
    operator=() [1/2]
-----------------

    template<class Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived & [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::operator=  | ( | const [AngleAxisType](classeigen_1_1quaternionbase#aed266c63b10a4028304901d9c8614199) &  | *aa* | ) |  |

 | inline |

 
 Set `*this` from an angle-axis *aa* and returns a reference to `*this` 

    operator=() [2/2]
-----------------

    template<class Derived >   template<class MatrixDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::operator=  | ( | const [MatrixBase](classeigen_1_1matrixbase)< MatrixDerived > &  | *xpr* | ) |  |

 | inline |

 
 Set `*this` from the expression *xpr:* 


* if *xpr* is a 4x1 vector, then *xpr* is assumed to be a quaternion
* if *xpr* is a 3x3 matrix, then *xpr* is assumed to be rotation matrix and *xpr* is converted to a quaternion

    operator==()
------------

    template<class Derived >   template<class OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| bool [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::operator==  | ( | const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 
Returns
true if each coefficients of `*this` and *other* are all exactly equal. 
 
Warning
When using floating point scalar values you probably should rather use a fuzzy comparison such as [isApprox()](classeigen_1_1quaternionbase#a64bc41c96a9e99567e0f8409f8f0f680) 
 
See also

[isApprox()](classeigen_1_1quaternionbase#a64bc41c96a9e99567e0f8409f8f0f680), operator!= 
    setFromTwoVectors()
-------------------

    template<class Derived >   template<typename Derived1 , typename Derived2 >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived & [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::setFromTwoVectors  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived1 > &  | *a*,  |
|  |  | const [MatrixBase](classeigen_1_1matrixbase)< Derived2 > &  | *b* |
|  | ) |  |  |

 | inline |

 
 
Returns
the quaternion which transform *a* into *b* through a rotation
 Sets `*this` to be a quaternion representing a rotation between the two arbitrary vectors *a* and *b*. In other words, the built rotation represent a rotation sending the line of direction *a* to the line of direction *b*, both lines passing through the origin.

 
Returns
a reference to `*this`.
 Note that the two input vectors do **not** have to be normalized, and do not need to have the same norm. 

    setIdentity()
-------------

    template<class Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [QuaternionBase](classeigen_1_1quaternionbase)& [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::setIdentity  | ( |  | ) |  |

 | inline |

 
 
See also

[QuaternionBase::Identity()](classeigen_1_1quaternionbase#a6f31a6f98016f186515b3277f4757962), [MatrixBase::setIdentity()](classeigen_1_1matrixbase#a18e969adfdf2db4ac44c47fbdc854683) 
    slerp()
-------

    template<class Derived >   template<class OtherDerived >  

|  |  |  |  |
| --- | --- | --- | --- |
| [Quaternion](classeigen_1_1quaternion)<typename internal::traits<Derived>::Scalar> [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::slerp  | ( | const Scalar &  | *t*,  |
|  |  | const [QuaternionBase](classeigen_1_1quaternionbase)< OtherDerived > &  | *other* |
|  | ) |  |  const |

 
 
Returns
the spherical linear interpolation between the two quaternions `*this` and *other* at the parameter *t* in [0;1].
 This represents an interpolation for a constant motion between `*this` and *other*, see also <http://en.wikipedia.org/wiki/Slerp>. 

    squaredNorm()
-------------

    template<class Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::squaredNorm  | ( |  | ) |  const |

 | inline |

 
 
Returns
the squared norm of the quaternion's coefficients 
 
See also

[QuaternionBase::norm()](classeigen_1_1quaternionbase#aad4b1faef1eabdc7fdd4d305e9881149), [MatrixBase::squaredNorm()](classeigen_1_1matrixbase#ac8da566526419f9742a6c471bbd87e0a) 
    toRotationMatrix()
------------------

    template<class Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [QuaternionBase](classeigen_1_1quaternionbase)< Derived >::[Matrix3](classeigen_1_1quaternionbase#ac3972e6cb0f56cccbe9e3946a7e494f8) [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::toRotationMatrix  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
an equivalent 3x3 rotation matrix
 Convert the quaternion to a 3x3 rotation matrix. The quaternion is required to be normalized, otherwise the result is undefined. 

    vec() [1/2]
-----------

    template<class Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [VectorBlock](classeigen_1_1vectorblock)<Coefficients,3> [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::vec  | ( |  | ) |  |

 | inline |

 
 
Returns
a vector expression of the imaginary part (x,y,z) 
    vec() [2/2]
-----------

    template<class Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [VectorBlock](classeigen_1_1vectorblock)<const Coefficients,3> [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::vec  | ( |  | ) |  const |

 | inline |

 
 
Returns
a read-only vector expression of the imaginary part (x,y,z) 
    w() [1/2]
---------

    template<class Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| NonConstCoeffReturnType [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::w  | ( |  | ) |  |

 | inline |

 
 
Returns
a reference to the `w` coefficient (if Derived is a non-const lvalue) 
    w() [2/2]
---------

    template<class Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| CoeffReturnType [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::w  | ( |  | ) |  const |

 | inline |

 
 
Returns
the `w` coefficient 
    x() [1/2]
---------

    template<class Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| NonConstCoeffReturnType [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::x  | ( |  | ) |  |

 | inline |

 
 
Returns
a reference to the `x` coefficient (if Derived is a non-const lvalue) 
    x() [2/2]
---------

    template<class Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| CoeffReturnType [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::x  | ( |  | ) |  const |

 | inline |

 
 
Returns
the `x` coefficient 
    y() [1/2]
---------

    template<class Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| NonConstCoeffReturnType [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::y  | ( |  | ) |  |

 | inline |

 
 
Returns
a reference to the `y` coefficient (if Derived is a non-const lvalue) 
    y() [2/2]
---------

    template<class Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| CoeffReturnType [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::y  | ( |  | ) |  const |

 | inline |

 
 
Returns
the `y` coefficient 
    z() [1/2]
---------

    template<class Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| NonConstCoeffReturnType [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::z  | ( |  | ) |  |

 | inline |

 
 
Returns
a reference to the `z` coefficient (if Derived is a non-const lvalue) 
    z() [2/2]
---------

    template<class Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| CoeffReturnType [Eigen::QuaternionBase](classeigen_1_1quaternionbase)< Derived >::z  | ( |  | ) |  const |

 | inline |

 
 
Returns
the `z` coefficient 
   

---

The documentation for this class was generated from the following file:* [Quaternion.h](https://eigen.tuxfamily.org/dox/Quaternion_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1QuaternionBase.html>

Eigen::SimplicialCholeskyBase
=============================

  
### template<typename Derived> class Eigen::SimplicialCholeskyBase< Derived >

 A base class for direct sparse Cholesky factorizations. 

 This is a base class for LL^T and LDL^T Cholesky factorizations of sparse matrices that are selfadjoint and positive definite. These factorizations allow for solving A.X = B where X and B can be either dense or sparse.

 In order to reduce the fill-in, a symmetric permutation P is applied prior to the factorization such that the factorized matrix is P A P^-1.

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | the type of the derived class, that is the actual factorization type.  |

       ![Inheritance graph]      

|  |
| --- |
|  |
| struct  | [keep\_diag](structeigen_1_1simplicialcholeskybase_1_1keep__diag) |
|  |




|  |
| --- |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1simplicialcholeskybase#a3ac877f73aaaff670e6ae7554eb02fc8) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1simplicialcholeskybase#a3ac877f73aaaff670e6ae7554eb02fc8) |
|  |
| const [PermutationMatrix](classeigen_1_1permutationmatrix)< [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), StorageIndex > &  | [permutationP](classeigen_1_1simplicialcholeskybase#aff1480e595a21726beaec9a586a94d5a) () const |
|  |
| const [PermutationMatrix](classeigen_1_1permutationmatrix)< [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), StorageIndex > &  | [permutationPinv](classeigen_1_1simplicialcholeskybase#a0e23d1f4a88c211be7098faf1cb41674) () const |
|  |
| Derived &  | [setShift](classeigen_1_1simplicialcholeskybase#a362352f755101faaac59c1ed9d5e3559) (const RealScalar &offset, const RealScalar &scale=1) |
|  |
|  | [SimplicialCholeskyBase](classeigen_1_1simplicialcholeskybase#a098baba1dbe07ca3a775c8df1f8a0e71) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< Derived >](classeigen_1_1sparsesolverbase) |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |




|  |
| --- |
|  |
| template<bool DoLDLT>  |
| void  | [compute](classeigen_1_1simplicialcholeskybase#a9a741744dda2261cae26cddf96a35bf0) (const MatrixType &matrix) |
|  |

  SimplicialCholeskyBase()
------------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::SimplicialCholeskyBase](classeigen_1_1simplicialcholeskybase)< Derived >::[SimplicialCholeskyBase](classeigen_1_1simplicialcholeskybase) | ( |  | ) |  |

 | inline |

 
 Default constructor 

    compute()
---------

    template<typename Derived >   template<bool DoLDLT>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SimplicialCholeskyBase](classeigen_1_1simplicialcholeskybase)< Derived >::compute  | ( | const MatrixType &  | *matrix* | ) |  |

 | inlineprotected |

 
 Computes the sparse Cholesky decomposition of *matrix* 

    info()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::SimplicialCholeskyBase](classeigen_1_1simplicialcholeskybase)< Derived >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether previous computation was successful. 

 
Returns

`Success` if computation was successful, `NumericalIssue` if the matrix.appears to be negative. 
    permutationP()
--------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [PermutationMatrix](classeigen_1_1permutationmatrix)<[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2),[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2),StorageIndex>& [Eigen::SimplicialCholeskyBase](classeigen_1_1simplicialcholeskybase)< Derived >::permutationP  | ( |  | ) |  const |

 | inline |

 
 
Returns
the permutation P 
 
See also

[permutationPinv()](classeigen_1_1simplicialcholeskybase#a0e23d1f4a88c211be7098faf1cb41674) 
    permutationPinv()
-----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [PermutationMatrix](classeigen_1_1permutationmatrix)<[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2),[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2),StorageIndex>& [Eigen::SimplicialCholeskyBase](classeigen_1_1simplicialcholeskybase)< Derived >::permutationPinv  | ( |  | ) |  const |

 | inline |

 
 
Returns
the inverse P^-1 of the permutation P 
 
See also

[permutationP()](classeigen_1_1simplicialcholeskybase#aff1480e595a21726beaec9a586a94d5a) 
    setShift()
----------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Derived& [Eigen::SimplicialCholeskyBase](classeigen_1_1simplicialcholeskybase)< Derived >::setShift  | ( | const RealScalar &  | *offset*,  |
|  |  | const RealScalar &  | *scale* = `1` |
|  | ) |  |  |

 | inline |

 
 Sets the shift parameters that will be used to adjust the diagonal coefficients during the numerical factorization.

 During the numerical factorization, the diagonal coefficients are transformed by the following linear model:  
 `d_ii` = *offset* + *scale* \* `d_ii` 

 The default is the identity transformation with *offset=0*, and *scale=1*.

 
Returns
a reference to `*this`. 
   

---

The documentation for this class was generated from the following files:* [SimplicialCholesky.h](https://eigen.tuxfamily.org/dox/SimplicialCholesky_8h_source.html)
* [SimplicialCholesky\_impl.h](https://eigen.tuxfamily.org/dox/SimplicialCholesky__impl_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SimplicialCholeskyBase.html>

Eigen::SimplicialLDLT
=====================

  
### template<typename \_MatrixType, int \_UpLo, typename \_Ordering> class Eigen::SimplicialLDLT< \_MatrixType, \_UpLo, \_Ordering >

 A direct sparse [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting.") Cholesky factorizations without square root. 

 This class provides a LDL^T Cholesky factorizations without square root of sparse matrices that are selfadjoint and positive definite. The factorization allows for solving A.X = B where X and B can be either dense or sparse.

 In order to reduce the fill-in, a symmetric permutation P is applied prior to the factorization such that the factorized matrix is P A P^-1.

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<>  |
| \_UpLo | the triangular part that will be used for the computations. It can be Lower or Upper. Default is Lower.  |
| \_Ordering | The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<> |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 
See also
class [SimplicialLLT](classeigen_1_1simplicialllt "A direct sparse LLT Cholesky factorizations."), class [AMDOrdering](classeigen_1_1amdordering), class [NaturalOrdering](classeigen_1_1naturalordering) 
     ![Inheritance graph]       

|  |
| --- |
|  |
| void  | [analyzePattern](classeigen_1_1simplicialldlt#aaf7c852056195d05de863362638517b7) (const MatrixType &a) |
|  |
| [SimplicialLDLT](classeigen_1_1simplicialldlt) &  | [compute](classeigen_1_1simplicialldlt#a55429e59dbdf16a5696ee28bbf14e44f) (const MatrixType &matrix) |
|  |
| Scalar  | [determinant](classeigen_1_1simplicialldlt#aa25042f3b49880f5e487d468ea20b1b7) () const |
|  |
| void  | [factorize](classeigen_1_1simplicialldlt#a8cf16bd92a712d36310397972bdef044) (const MatrixType &a) |
|  |
| const MatrixL  | [matrixL](classeigen_1_1simplicialldlt#ae8f502eff0c95771115968510e4d9af5) () const |
|  |
| const MatrixU  | [matrixU](classeigen_1_1simplicialldlt#ae98ed1c7ce8f9165adf5fb08cbb36b70) () const |
|  |
|  | [SimplicialLDLT](classeigen_1_1simplicialldlt#a3f26ae6105ffa36af9b8710e01e5caed) () |
|  |
|  | [SimplicialLDLT](classeigen_1_1simplicialldlt#a07cb76aee396862f94c3eedc6d77d908) (const MatrixType &matrix) |
|  |
| const [VectorType](classeigen_1_1matrix) | [vectorD](classeigen_1_1simplicialldlt#abe54532ce80558a0474b11763702107b) () const |
|  |
| - Public Member Functions inherited from [Eigen::SimplicialCholeskyBase< SimplicialLDLT< \_MatrixType, \_UpLo, \_Ordering > >](classeigen_1_1simplicialcholeskybase) |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1simplicialcholeskybase#a3ac877f73aaaff670e6ae7554eb02fc8) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1simplicialcholeskybase#a3ac877f73aaaff670e6ae7554eb02fc8) |
|  |
| const [PermutationMatrix](classeigen_1_1permutationmatrix)< Dynamic, Dynamic, StorageIndex > &  | [permutationP](classeigen_1_1simplicialcholeskybase#aff1480e595a21726beaec9a586a94d5a) () const |
|  |
| const [PermutationMatrix](classeigen_1_1permutationmatrix)< Dynamic, Dynamic, StorageIndex > &  | [permutationPinv](classeigen_1_1simplicialcholeskybase#a0e23d1f4a88c211be7098faf1cb41674) () const |
|  |
| [SimplicialLDLT](classeigen_1_1simplicialldlt)< \_MatrixType, \_UpLo, \_Ordering > &  | [setShift](classeigen_1_1simplicialcholeskybase#a362352f755101faaac59c1ed9d5e3559) (const RealScalar &offset, const RealScalar &scale=1) |
|  |
|  | [SimplicialCholeskyBase](classeigen_1_1simplicialcholeskybase#a098baba1dbe07ca3a775c8df1f8a0e71) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< SimplicialLDLT< \_MatrixType, \_UpLo, \_Ordering > >](classeigen_1_1sparsesolverbase) |
| const [Solve](classeigen_1_1solve)< [SimplicialLDLT](classeigen_1_1simplicialldlt)< \_MatrixType, \_UpLo, \_Ordering >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| const [Solve](classeigen_1_1solve)< [SimplicialLDLT](classeigen_1_1simplicialldlt)< \_MatrixType, \_UpLo, \_Ordering >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |




|  |
| --- |
|  |
| - Protected Member Functions inherited from [Eigen::SimplicialCholeskyBase< SimplicialLDLT< \_MatrixType, \_UpLo, \_Ordering > >](classeigen_1_1simplicialcholeskybase) |
| void  | [compute](classeigen_1_1simplicialcholeskybase#a9a741744dda2261cae26cddf96a35bf0) (const MatrixType &matrix) |
|  |

  SimplicialLDLT() [1/2]
----------------------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::SimplicialLDLT](classeigen_1_1simplicialldlt)< \_MatrixType, \_UpLo, \_Ordering >::[SimplicialLDLT](classeigen_1_1simplicialldlt) | ( |  | ) |  |

 | inline |

 
 Default constructor 

    SimplicialLDLT() [2/2]
----------------------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::SimplicialLDLT](classeigen_1_1simplicialldlt)< \_MatrixType, \_UpLo, \_Ordering >::[SimplicialLDLT](classeigen_1_1simplicialldlt) | ( | const MatrixType &  | *matrix* | ) |  |

 | inlineexplicit |

 
 Constructs and performs the [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") factorization of *matrix* 

    analyzePattern()
----------------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SimplicialLDLT](classeigen_1_1simplicialldlt)< \_MatrixType, \_UpLo, \_Ordering >::analyzePattern  | ( | const MatrixType &  | *a* | ) |  |

 | inline |

 
 Performs a symbolic decomposition on the sparcity of *matrix*.

 This function is particularly useful when solving for several problems having the same structure.

 
See also

[factorize()](classeigen_1_1simplicialldlt#a8cf16bd92a712d36310397972bdef044) 
    compute()
---------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [SimplicialLDLT](classeigen_1_1simplicialldlt)& [Eigen::SimplicialLDLT](classeigen_1_1simplicialldlt)< \_MatrixType, \_UpLo, \_Ordering >::compute  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Computes the sparse Cholesky decomposition of *matrix* 

    determinant()
-------------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar [Eigen::SimplicialLDLT](classeigen_1_1simplicialldlt)< \_MatrixType, \_UpLo, \_Ordering >::determinant  | ( |  | ) |  const |

 | inline |

 
 
Returns
the determinant of the underlying matrix from the current factorization 
    factorize()
-----------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SimplicialLDLT](classeigen_1_1simplicialldlt)< \_MatrixType, \_UpLo, \_Ordering >::factorize  | ( | const MatrixType &  | *a* | ) |  |

 | inline |

 
 Performs a numeric decomposition of *matrix* 

 The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed.

 
See also

[analyzePattern()](classeigen_1_1simplicialldlt#aaf7c852056195d05de863362638517b7) 
    matrixL()
---------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixL [Eigen::SimplicialLDLT](classeigen_1_1simplicialldlt)< \_MatrixType, \_UpLo, \_Ordering >::matrixL  | ( |  | ) |  const |

 | inline |

 
 
Returns
an expression of the factor L 
    matrixU()
---------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixU [Eigen::SimplicialLDLT](classeigen_1_1simplicialldlt)< \_MatrixType, \_UpLo, \_Ordering >::matrixU  | ( |  | ) |  const |

 | inline |

 
 
Returns
an expression of the factor U (= L^\*) 
    vectorD()
---------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [VectorType](classeigen_1_1matrix) [Eigen::SimplicialLDLT](classeigen_1_1simplicialldlt)< \_MatrixType, \_UpLo, \_Ordering >::vectorD  | ( |  | ) |  const |

 | inline |

 
 
Returns
a vector expression of the diagonal D 
   

---

The documentation for this class was generated from the following file:* [SimplicialCholesky.h](https://eigen.tuxfamily.org/dox/SimplicialCholesky_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SimplicialLDLT.html>

Eigen::SimplicialLLT
====================

  
### template<typename \_MatrixType, int \_UpLo, typename \_Ordering> class Eigen::SimplicialLLT< \_MatrixType, \_UpLo, \_Ordering >

 A direct sparse [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") Cholesky factorizations. 

 This class provides a LL^T Cholesky factorizations of sparse matrices that are selfadjoint and positive definite. The factorization allows for solving A.X = B where X and B can be either dense or sparse.

 In order to reduce the fill-in, a symmetric permutation P is applied prior to the factorization such that the factorized matrix is P A P^-1.

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<>  |
| \_UpLo | the triangular part that will be used for the computations. It can be Lower or Upper. Default is Lower.  |
| \_Ordering | The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<> |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 
See also
class [SimplicialLDLT](classeigen_1_1simplicialldlt "A direct sparse LDLT Cholesky factorizations without square root."), class [AMDOrdering](classeigen_1_1amdordering), class [NaturalOrdering](classeigen_1_1naturalordering) 
     ![Inheritance graph]       

|  |
| --- |
|  |
| void  | [analyzePattern](classeigen_1_1simplicialllt#ad6e49b1c0d2ec5c8e118538260f3002c) (const MatrixType &a) |
|  |
| [SimplicialLLT](classeigen_1_1simplicialllt) &  | [compute](classeigen_1_1simplicialllt#a24ffa253377a1cec7a44b856fae1f71a) (const MatrixType &matrix) |
|  |
| Scalar  | [determinant](classeigen_1_1simplicialllt#a956595848e6fac7a389d091b3fdc9567) () const |
|  |
| void  | [factorize](classeigen_1_1simplicialllt#a8a140b34b08df74c7426ee29b986b228) (const MatrixType &a) |
|  |
| const MatrixL  | [matrixL](classeigen_1_1simplicialllt#ae2b24f8f6d62a8444193904988374299) () const |
|  |
| const MatrixU  | [matrixU](classeigen_1_1simplicialllt#a23522d6444c344ddb14e48dbfac128ed) () const |
|  |
|  | [SimplicialLLT](classeigen_1_1simplicialllt#ad25633e34d7c21b77fe05c873ffbe416) () |
|  |
|  | [SimplicialLLT](classeigen_1_1simplicialllt#a342735f17d0306aa5581e91010091427) (const MatrixType &matrix) |
|  |
| - Public Member Functions inherited from [Eigen::SimplicialCholeskyBase< SimplicialLLT< \_MatrixType, \_UpLo, \_Ordering > >](classeigen_1_1simplicialcholeskybase) |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1simplicialcholeskybase#a3ac877f73aaaff670e6ae7554eb02fc8) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1simplicialcholeskybase#a3ac877f73aaaff670e6ae7554eb02fc8) |
|  |
| const [PermutationMatrix](classeigen_1_1permutationmatrix)< Dynamic, Dynamic, StorageIndex > &  | [permutationP](classeigen_1_1simplicialcholeskybase#aff1480e595a21726beaec9a586a94d5a) () const |
|  |
| const [PermutationMatrix](classeigen_1_1permutationmatrix)< Dynamic, Dynamic, StorageIndex > &  | [permutationPinv](classeigen_1_1simplicialcholeskybase#a0e23d1f4a88c211be7098faf1cb41674) () const |
|  |
| [SimplicialLLT](classeigen_1_1simplicialllt)< \_MatrixType, \_UpLo, \_Ordering > &  | [setShift](classeigen_1_1simplicialcholeskybase#a362352f755101faaac59c1ed9d5e3559) (const RealScalar &offset, const RealScalar &scale=1) |
|  |
|  | [SimplicialCholeskyBase](classeigen_1_1simplicialcholeskybase#a098baba1dbe07ca3a775c8df1f8a0e71) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< SimplicialLLT< \_MatrixType, \_UpLo, \_Ordering > >](classeigen_1_1sparsesolverbase) |
| const [Solve](classeigen_1_1solve)< [SimplicialLLT](classeigen_1_1simplicialllt)< \_MatrixType, \_UpLo, \_Ordering >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| const [Solve](classeigen_1_1solve)< [SimplicialLLT](classeigen_1_1simplicialllt)< \_MatrixType, \_UpLo, \_Ordering >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |




|  |
| --- |
|  |
| - Protected Member Functions inherited from [Eigen::SimplicialCholeskyBase< SimplicialLLT< \_MatrixType, \_UpLo, \_Ordering > >](classeigen_1_1simplicialcholeskybase) |
| void  | [compute](classeigen_1_1simplicialcholeskybase#a9a741744dda2261cae26cddf96a35bf0) (const MatrixType &matrix) |
|  |

  SimplicialLLT() [1/2]
---------------------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::SimplicialLLT](classeigen_1_1simplicialllt)< \_MatrixType, \_UpLo, \_Ordering >::[SimplicialLLT](classeigen_1_1simplicialllt) | ( |  | ) |  |

 | inline |

 
 Default constructor 

    SimplicialLLT() [2/2]
---------------------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::SimplicialLLT](classeigen_1_1simplicialllt)< \_MatrixType, \_UpLo, \_Ordering >::[SimplicialLLT](classeigen_1_1simplicialllt) | ( | const MatrixType &  | *matrix* | ) |  |

 | inlineexplicit |

 
 Constructs and performs the [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") factorization of *matrix* 

    analyzePattern()
----------------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SimplicialLLT](classeigen_1_1simplicialllt)< \_MatrixType, \_UpLo, \_Ordering >::analyzePattern  | ( | const MatrixType &  | *a* | ) |  |

 | inline |

 
 Performs a symbolic decomposition on the sparcity of *matrix*.

 This function is particularly useful when solving for several problems having the same structure.

 
See also

[factorize()](classeigen_1_1simplicialllt#a8a140b34b08df74c7426ee29b986b228) 
    compute()
---------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [SimplicialLLT](classeigen_1_1simplicialllt)& [Eigen::SimplicialLLT](classeigen_1_1simplicialllt)< \_MatrixType, \_UpLo, \_Ordering >::compute  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Computes the sparse Cholesky decomposition of *matrix* 

    determinant()
-------------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar [Eigen::SimplicialLLT](classeigen_1_1simplicialllt)< \_MatrixType, \_UpLo, \_Ordering >::determinant  | ( |  | ) |  const |

 | inline |

 
 
Returns
the determinant of the underlying matrix from the current factorization 
    factorize()
-----------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SimplicialLLT](classeigen_1_1simplicialllt)< \_MatrixType, \_UpLo, \_Ordering >::factorize  | ( | const MatrixType &  | *a* | ) |  |

 | inline |

 
 Performs a numeric decomposition of *matrix* 

 The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed.

 
See also

[analyzePattern()](classeigen_1_1simplicialllt#ad6e49b1c0d2ec5c8e118538260f3002c) 
    matrixL()
---------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixL [Eigen::SimplicialLLT](classeigen_1_1simplicialllt)< \_MatrixType, \_UpLo, \_Ordering >::matrixL  | ( |  | ) |  const |

 | inline |

 
 
Returns
an expression of the factor L 
    matrixU()
---------

    template<typename \_MatrixType , int \_UpLo, typename \_Ordering >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const MatrixU [Eigen::SimplicialLLT](classeigen_1_1simplicialllt)< \_MatrixType, \_UpLo, \_Ordering >::matrixU  | ( |  | ) |  const |

 | inline |

 
 
Returns
an expression of the factor U (= L^\*) 
   

---

The documentation for this class was generated from the following file:* [SimplicialCholesky.h](https://eigen.tuxfamily.org/dox/SimplicialCholesky_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SimplicialLLT.html>

Eigen::SolverBase
=================

  
### template<typename Derived> class Eigen::SolverBase< Derived >

 A base class for matrix decomposition and solvers. 

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | the actual type of the decomposition/solver. |

   Any matrix decomposition inheriting this base class provide the following API:

 
```
MatrixType A, b, x;
DecompositionType dec(A);
x = dec.solve(b);             // solve A \* x = b
x = dec.transpose().solve(b); // solve A^T \* x = b
x = dec.adjoint().solve(b);   // solve A' \* x = b

```


Warning
Currently, any other usage of [transpose()](classeigen_1_1solverbase#a732e75b5132bb4db3775916927b0e86c) and [adjoint()](classeigen_1_1solverbase#a05a3686a89888681c8e0c2bcab6d1ce5) are not supported and will produce compilation errors.
 
See also
class [PartialPivLU](classeigen_1_1partialpivlu "LU decomposition of a matrix with partial pivoting, and related features."), class [FullPivLU](classeigen_1_1fullpivlu "LU decomposition of a matrix with complete pivoting, and related features."), class [HouseholderQR](classeigen_1_1householderqr "Householder QR decomposition of a matrix."), class [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with column-pivoting."), class [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr "Householder rank-revealing QR decomposition of a matrix with full pivoting."), class [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition "Complete orthogonal decomposition (COD) of a matrix."), class [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features."), class [LDLT](classeigen_1_1ldlt "Robust Cholesky decomposition of a matrix with pivoting."), class [SVDBase](classeigen_1_1svdbase "Base class of SVD algorithms.") 
     ![Inheritance graph]           

|  |
| --- |
|  |
| AdjointReturnType  | [adjoint](classeigen_1_1solverbase#a05a3686a89888681c8e0c2bcab6d1ce5) () const |
|  |
| Derived &  | [derived](classeigen_1_1solverbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](classeigen_1_1solverbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1solverbase#a7fd647d110487799205df6f99547879d) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
|  | [SolverBase](classeigen_1_1solverbase#a4d5e5baddfba3790ab1a5f247dcc4dc1) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1solverbase#a732e75b5132bb4db3775916927b0e86c) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  SolverBase()
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::SolverBase](classeigen_1_1solverbase)< Derived >::[SolverBase](classeigen_1_1solverbase) | ( |  | ) |  |

 | inline |

 
 Default constructor 

    adjoint()
---------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| AdjointReturnType [Eigen::SolverBase](classeigen_1_1solverbase)< Derived >::adjoint  | ( |  | ) |  const |

 | inline |

 
 
Returns
an expression of the adjoint of the factored matrix
 A typical usage is to solve for the adjoint problem A' x = b: 



```
x = dec.adjoint().solve(b); 

```

For real scalar types, this function is equivalent to [transpose()](classeigen_1_1solverbase#a732e75b5132bb4db3775916927b0e86c).

 
See also

[transpose()](classeigen_1_1solverbase#a732e75b5132bb4db3775916927b0e86c), [solve()](classeigen_1_1solverbase#a7fd647d110487799205df6f99547879d) 
    derived() [1/2]
---------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| Derived& [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::derived |

 | inline |

 
 
Returns
a reference to the derived object 
    derived() [2/2]
---------------

    template<typename Derived >  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const Derived& [Eigen::EigenBase](structeigen_1_1eigenbase)< Derived >::derived |

 | inline |

 
 
Returns
a const reference to the derived object 
    solve()
-------

    template<typename Derived >   template<typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Solve](classeigen_1_1solve)<Derived, Rhs> [Eigen::SolverBase](classeigen_1_1solverbase)< Derived >::solve  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &  | *b* | ) |  const |

 | inline |

 
 
Returns
an expression of the solution x of \( A x = b \) using the current decomposition of A. 
    transpose()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ConstTransposeReturnType](classeigen_1_1diagonal) [Eigen::SolverBase](classeigen_1_1solverbase)< Derived >::transpose  | ( |  | ) |  const |

 | inline |

 
 
Returns
an expression of the transposed of the factored matrix.
 A typical usage is to solve for the transposed problem A^T x = b: 



```
x = dec.transpose().solve(b); 

```


See also

[adjoint()](classeigen_1_1solverbase#a05a3686a89888681c8e0c2bcab6d1ce5), [solve()](classeigen_1_1solverbase#a7fd647d110487799205df6f99547879d) 
   

---

The documentation for this class was generated from the following file:* [SolverBase.h](https://eigen.tuxfamily.org/dox/SolverBase_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SolverBase.html>

Eigen::SolverStorage
====================

  
The type used to identify a general solver (factored) storage. 

 


---

The documentation for this struct was generated from the following file:* [Constants.h](https://eigen.tuxfamily.org/dox/Constants_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/structEigen_1_1SolverStorage.html>

Eigen::SolveWithGuess
=====================

  
### template<typename Decomposition, typename RhsType, typename GuessType> class Eigen::SolveWithGuess< Decomposition, RhsType, GuessType >

 Pseudo expression representing a solving operation. 

 
Template Parameters
 

|  |  |
| --- | --- |
| Decomposition | the type of the matrix or decomposion object  |
| Rhstype | the type of the right-hand side |

   This class represents an expression of A.solve(B) and most of the time this is the only way it is used. 

  Inherits internal::generic\_xpr\_base::type.

 

---

The documentation for this class was generated from the following file:* [SolveWithGuess.h](https://eigen.tuxfamily.org/dox/SolveWithGuess_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SolveWithGuess.html>

Eigen::SelfAdjointView
======================

  
### template<typename \_MatrixType, unsigned int UpLo> class Eigen::SelfAdjointView< \_MatrixType, UpLo >

 Expression of a selfadjoint matrix from a triangular part of a dense matrix. 

 
Parameters
 

|  |  |
| --- | --- |
| MatrixType | the type of the dense matrix storing the coefficients  |
| TriangularPart | can be either `[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)` or `[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)` |

   This class is an expression of a sefladjoint matrix from a triangular part of a matrix with given dense storage of the coefficients. It is the return type of MatrixBase::selfadjointView() and most of the time this is the only way that it is used.

 
See also
class [TriangularBase](classeigen_1_1triangularbase "Base class for triangular part in a matrix."), MatrixBase::selfadjointView() 
     ![Inheritance graph]       

|  |
| --- |
|  |
| typedef [Matrix](classeigen_1_1matrix)< [RealScalar](classeigen_1_1selfadjointview#af9f0234ebeae4c4ca512bcd5fb5e8bb1), internal::traits< MatrixType >::ColsAtCompileTime, 1 >  | [EigenvaluesReturnType](classeigen_1_1selfadjointview#a8ae92703d920130b38a383f8b165146c) |
|  |
| typedef [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1selfadjointview#af52acc0942ece2de9b6db4a99cc6656e) >::Real  | [RealScalar](classeigen_1_1selfadjointview#af9f0234ebeae4c4ca512bcd5fb5e8bb1) |
|  |
|  typedef internal::traits< [SelfAdjointView](classeigen_1_1selfadjointview) >::[Scalar](classeigen_1_1selfadjointview#af52acc0942ece2de9b6db4a99cc6656e) | [Scalar](classeigen_1_1selfadjointview#af52acc0942ece2de9b6db4a99cc6656e) |
|  | The type of coefficients in this matrix.  |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |




|  |
| --- |
|  |
| const [AdjointReturnType](classeigen_1_1selfadjointview) | [adjoint](classeigen_1_1selfadjointview#a1297532e129be85c6a9ff0c8ef735301) () const |
|  |
| [Scalar](classeigen_1_1selfadjointview#af52acc0942ece2de9b6db4a99cc6656e) | [coeff](classeigen_1_1selfadjointview#aa4e1f964b34c76697bcdd3b54b84d814) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| [Scalar](classeigen_1_1selfadjointview#af52acc0942ece2de9b6db4a99cc6656e) &  | [coeffRef](classeigen_1_1selfadjointview#ab5b030515fcee3d1d4f84c0d9d13bd67) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| const [ConjugateReturnType](classeigen_1_1selfadjointview) | [conjugate](classeigen_1_1selfadjointview#a6671a26f31ead5f6e14d1d7d1221d9ec) () const |
|  |
| template<bool Cond>  |
| internal::conditional< Cond, [ConjugateReturnType](classeigen_1_1selfadjointview), [ConstSelfAdjointView](classeigen_1_1selfadjointview) >::type  | [conjugateIf](classeigen_1_1selfadjointview#ad50f99f2a8d8d8bb8eb79733af5fcf9b) () const |
|  |
| MatrixType::ConstDiagonalReturnType  | [diagonal](classeigen_1_1selfadjointview#a9fcc7108054ac4a3b0ef758c794c16a7) () const |
|  |
| [EigenvaluesReturnType](classeigen_1_1selfadjointview#a8ae92703d920130b38a383f8b165146c) | [eigenvalues](classeigen_1_1selfadjointview#ad4f34424b4ea12de9bbc5623cb938b4f) () const |
|  | Computes the eigenvalues of a matrix. [More...](classeigen_1_1selfadjointview#ad4f34424b4ea12de9bbc5623cb938b4f) |
|  |
| const [LDLT](classeigen_1_1ldlt)< PlainObject, UpLo >  | [ldlt](classeigen_1_1selfadjointview#a644155eef17b37c95d85b9f65bb49ac4) () const |
|  |
| const [LLT](classeigen_1_1llt)< PlainObject, UpLo >  | [llt](classeigen_1_1selfadjointview#a405e810491642a7f7b785f2ad6f93619) () const |
|  |
| template<typename OtherDerived >  |
| const [Product](classeigen_1_1product)< [SelfAdjointView](classeigen_1_1selfadjointview), OtherDerived >  | [operator\*](classeigen_1_1selfadjointview#af18c39fdc7783c63766ba22ce0e784c3) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &rhs) const |
|  |
| [RealScalar](classeigen_1_1selfadjointview#af9f0234ebeae4c4ca512bcd5fb5e8bb1) | [operatorNorm](classeigen_1_1selfadjointview#a12a7da482e31ec9c517dca92dd7bae61) () const |
|  | Computes the L2 operator norm. [More...](classeigen_1_1selfadjointview#a12a7da482e31ec9c517dca92dd7bae61) |
|  |
| template<typename DerivedU , typename DerivedV >  |
| [SelfAdjointView](classeigen_1_1selfadjointview) &  | [rankUpdate](classeigen_1_1selfadjointview#a1b5afab9f9df919cba99d8ed1a260567) (const [MatrixBase](classeigen_1_1matrixbase)< DerivedU > &u, const [MatrixBase](classeigen_1_1matrixbase)< DerivedV > &v, const [Scalar](classeigen_1_1selfadjointview#af52acc0942ece2de9b6db4a99cc6656e) &alpha=[Scalar](classeigen_1_1selfadjointview#af52acc0942ece2de9b6db4a99cc6656e)(1)) |
|  |
| template<typename DerivedU >  |
| [SelfAdjointView](classeigen_1_1selfadjointview) &  | [rankUpdate](classeigen_1_1selfadjointview#acc37b0437e0eee05f861bce511df9c77) (const [MatrixBase](classeigen_1_1matrixbase)< DerivedU > &u, const [Scalar](classeigen_1_1selfadjointview#af52acc0942ece2de9b6db4a99cc6656e) &alpha=[Scalar](classeigen_1_1selfadjointview#af52acc0942ece2de9b6db4a99cc6656e)(1)) |
|  |
| [TransposeReturnType](classeigen_1_1selfadjointview) | [transpose](classeigen_1_1selfadjointview#ad779637ca3e3aeff2d35e1806e59f7d9) () |
|  |
| const [ConstTransposeReturnType](classeigen_1_1selfadjointview) | [transpose](classeigen_1_1selfadjointview#a33950671584ae306fbdc1c23f010be88) () const |
|  |
| template<unsigned int TriMode>  |
| internal::conditional<(TriMode &([Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)|[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)))==(UpLo &([Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)|[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749))), [TriangularView](classeigen_1_1triangularview)< MatrixType, TriMode >, [TriangularView](classeigen_1_1triangularview)< typename MatrixType::AdjointReturnType, TriMode > >::type  | [triangularView](classeigen_1_1selfadjointview#aacba330c3a12d1cac75c2f9df8c0f347) () const |
|  |
| - Public Member Functions inherited from [Eigen::TriangularBase< SelfAdjointView< \_MatrixType, UpLo > >](classeigen_1_1triangularbase) |
| void  | [copyCoeff](classeigen_1_1triangularbase#a0abe130a9130ac6df16f3c8c55490b43) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col, Other &other) |
|  |
| void  | [evalTo](classeigen_1_1triangularbase#a604d4f76a376ced36f8b9c3374c76c3e) ([MatrixBase](classeigen_1_1matrixbase)< DenseDerived > &other) const |
|  |
| void  | [evalToLazy](classeigen_1_1triangularbase#ab8db3e55eee50cdc56650b3498e235eb) ([MatrixBase](classeigen_1_1matrixbase)< DenseDerived > &other) const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |

  EigenvaluesReturnType
---------------------

    template<typename \_MatrixType , unsigned int UpLo>  

|  |
| --- |
| typedef [Matrix](classeigen_1_1matrix)<[RealScalar](classeigen_1_1selfadjointview#af9f0234ebeae4c4ca512bcd5fb5e8bb1), internal::traits<MatrixType>::ColsAtCompileTime, 1> [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< \_MatrixType, UpLo >::[EigenvaluesReturnType](classeigen_1_1selfadjointview#a8ae92703d920130b38a383f8b165146c) |

 
 Return type of [eigenvalues()](classeigen_1_1selfadjointview#ad4f34424b4ea12de9bbc5623cb938b4f "Computes the eigenvalues of a matrix.") 

    RealScalar
----------

    template<typename \_MatrixType , unsigned int UpLo>  

|  |
| --- |
| typedef [NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1selfadjointview#af52acc0942ece2de9b6db4a99cc6656e)>::Real [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< \_MatrixType, UpLo >::[RealScalar](classeigen_1_1selfadjointview#af9f0234ebeae4c4ca512bcd5fb5e8bb1) |

 
 Real part of [Scalar](classeigen_1_1selfadjointview#af52acc0942ece2de9b6db4a99cc6656e "The type of coefficients in this matrix.") 

    adjoint()
---------

    template<typename \_MatrixType , unsigned int UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [AdjointReturnType](classeigen_1_1selfadjointview) [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< \_MatrixType, UpLo >::adjoint  | ( |  | ) |  const |

 | inline |

 
 
See also

[MatrixBase::adjoint() const](classeigen_1_1matrixbase#afacca1f88da57e5cd87dd07c8ff926bb)  
    coeff()
-------

    template<typename \_MatrixType , unsigned int UpLo>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Scalar](classeigen_1_1selfadjointview#af52acc0942ece2de9b6db4a99cc6656e) [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< \_MatrixType, UpLo >::coeff  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *row*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *col* |
|  | ) |  |  const |

 | inline |

 
 
See also

[MatrixBase::coeff()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393) 
 
Warning
the coordinates must fit into the referenced triangular part 
    coeffRef()
----------

    template<typename \_MatrixType , unsigned int UpLo>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Scalar](classeigen_1_1selfadjointview#af52acc0942ece2de9b6db4a99cc6656e)& [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< \_MatrixType, UpLo >::coeffRef  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *row*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *col* |
|  | ) |  |  |

 | inline |

 
 
See also
MatrixBase::coeffRef() 
 
Warning
the coordinates must fit into the referenced triangular part 
    conjugate()
-----------

    template<typename \_MatrixType , unsigned int UpLo>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [ConjugateReturnType](classeigen_1_1selfadjointview) [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< \_MatrixType, UpLo >::conjugate  | ( | void  |  | ) |  const |

 | inline |

 
 
See also
MatrixBase::conjugate() const 
    conjugateIf()
-------------

    template<typename \_MatrixType , unsigned int UpLo>   template<bool Cond>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::conditional<Cond,[ConjugateReturnType](classeigen_1_1selfadjointview),[ConstSelfAdjointView](classeigen_1_1selfadjointview)>::type [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< \_MatrixType, UpLo >::conjugateIf  | ( |  | ) |  const |

 | inline |

 
 
Returns
an expression of the complex conjugate of `*this` if Cond==true, returns `*this` otherwise. 
    diagonal()
----------

    template<typename \_MatrixType , unsigned int UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| MatrixType::ConstDiagonalReturnType [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< \_MatrixType, UpLo >::diagonal  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const expression of the main diagonal of the matrix `*this` 
 This method simply returns the diagonal of the nested expression, thus by-passing the [SelfAdjointView](classeigen_1_1selfadjointview "Expression of a selfadjoint matrix from a triangular part of a dense matrix.") decorator.

 
See also

[MatrixBase::diagonal()](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3), class [Diagonal](classeigen_1_1diagonal "Expression of a diagonal/subdiagonal/superdiagonal in a matrix.") 
    eigenvalues()
-------------

    template<typename MatrixType , unsigned int UpLo>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [SelfAdjointView](classeigen_1_1selfadjointview)< MatrixType, UpLo >::[EigenvaluesReturnType](classeigen_1_1selfadjointview#a8ae92703d920130b38a383f8b165146c) [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< MatrixType, UpLo >::eigenvalues |

 | inline |

 
 Computes the eigenvalues of a matrix. 

 
Returns
Column vector containing the eigenvalues.
 This is defined in the Eigenvalues module.



```
#include <Eigen/Eigenvalues> 

```

 This function computes the eigenvalues with the help of the [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver "Computes eigenvalues and eigenvectors of selfadjoint matrices.") class. The eigenvalues are repeated according to their algebraic multiplicity, so there are as many eigenvalues as rows in the matrix.

 Example: 



```
MatrixXd ones = [MatrixXd::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)(3,3);
VectorXd eivals = ones.selfadjointView<[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>().[eigenvalues](classeigen_1_1selfadjointview#ad4f34424b4ea12de9bbc5623cb938b4f)();
cout << "The eigenvalues of the 3x3 matrix of ones are:" << endl << eivals << endl;
```

 Output: 



```
The eigenvalues of the 3x3 matrix of ones are:
-3.09e-16
        0
        3

```


See also

[SelfAdjointEigenSolver::eigenvalues()](classeigen_1_1selfadjointeigensolver#a3df8721abcc71132f7f02bf9dfe78e41 "Returns the eigenvalues of given matrix."), [MatrixBase::eigenvalues()](classeigen_1_1matrixbase#a30430fa3d5b4e74d312fd4f502ac984d "Computes the eigenvalues of a matrix.") 
    ldlt()
------

    template<typename MatrixType , unsigned int UpLo>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [LDLT](classeigen_1_1ldlt)< typename [SelfAdjointView](classeigen_1_1selfadjointview)< MatrixType, UpLo >::PlainObject, UpLo > [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< MatrixType, UpLo >::ldlt |

 | inline |

 
 This is defined in the Cholesky module.



```
#include <Eigen/Cholesky> 

```
 
Returns
the Cholesky decomposition with full pivoting without square root of `*this` 
 
See also

[MatrixBase::ldlt()](classeigen_1_1matrixbase#a0ecf058a0727a4cab8b42d79e95072e1) 
    llt()
-----

    template<typename MatrixType , unsigned int UpLo>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const [LLT](classeigen_1_1llt)< typename [SelfAdjointView](classeigen_1_1selfadjointview)< MatrixType, UpLo >::PlainObject, UpLo > [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< MatrixType, UpLo >::llt |

 | inline |

 
 This is defined in the Cholesky module.



```
#include <Eigen/Cholesky> 

```
 
Returns
the [LLT](classeigen_1_1llt "Standard Cholesky decomposition (LL^T) of a matrix and associated features.") decomposition of `*this` 
 
See also

[SelfAdjointView::llt()](classeigen_1_1selfadjointview#a405e810491642a7f7b785f2ad6f93619) 
    operator\*()
------------

    template<typename \_MatrixType , unsigned int UpLo>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Product](classeigen_1_1product)<[SelfAdjointView](classeigen_1_1selfadjointview),OtherDerived> [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< \_MatrixType, UpLo >::operator\*  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *rhs* | ) |  const |

 | inline |

 
 Efficient triangular matrix times vector/matrix product 

    operatorNorm()
--------------

    template<typename MatrixType , unsigned int UpLo>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| [SelfAdjointView](classeigen_1_1selfadjointview)< MatrixType, UpLo >::[RealScalar](classeigen_1_1selfadjointview#af9f0234ebeae4c4ca512bcd5fb5e8bb1) [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< MatrixType, UpLo >::operatorNorm |

 | inline |

 
 Computes the L2 operator norm. 

 
Returns
Operator norm of the matrix.
 This is defined in the Eigenvalues module.



```
#include <Eigen/Eigenvalues> 

```

 This function computes the L2 operator norm of a self-adjoint matrix. For a self-adjoint matrix, the operator norm is the largest eigenvalue.

 The current implementation uses the eigenvalues of the matrix, as computed by [eigenvalues()](classeigen_1_1selfadjointview#ad4f34424b4ea12de9bbc5623cb938b4f "Computes the eigenvalues of a matrix."), to compute the operator norm of the matrix.

 Example: 



```
MatrixXd ones = [MatrixXd::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)(3,3);
cout << "The operator norm of the 3x3 matrix of ones is "
     << ones.selfadjointView<[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>().[operatorNorm](classeigen_1_1selfadjointview#a12a7da482e31ec9c517dca92dd7bae61)() << endl;
```

 Output: 



```
The operator norm of the 3x3 matrix of ones is 3

```


See also

[eigenvalues()](classeigen_1_1selfadjointview#ad4f34424b4ea12de9bbc5623cb938b4f "Computes the eigenvalues of a matrix."), [MatrixBase::operatorNorm()](classeigen_1_1matrixbase#a0ff9bc0b9bea2d0822a2bf3192783102 "Computes the L2 operator norm.") 
    rankUpdate() [1/2]
------------------

    template<typename \_MatrixType , unsigned int UpLo>   template<typename DerivedU , typename DerivedV >  

|  |  |  |  |
| --- | --- | --- | --- |
| [SelfAdjointView](classeigen_1_1selfadjointview)& [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< \_MatrixType, UpLo >::rankUpdate  | ( | const [MatrixBase](classeigen_1_1matrixbase)< DerivedU > &  | *u*,  |
|  |  | const [MatrixBase](classeigen_1_1matrixbase)< DerivedV > &  | *v*,  |
|  |  | const [Scalar](classeigen_1_1selfadjointview#af52acc0942ece2de9b6db4a99cc6656e) &  | *alpha* = `[Scalar](classeigen_1_1selfadjointview#af52acc0942ece2de9b6db4a99cc6656e)(1)` |
|  | ) |  |  |

 
 Perform a symmetric rank 2 update of the selfadjoint matrix `*this`: \( this = this + \alpha u v^\* + conj(\alpha) v u^\* \) 



Returns
a reference to `*this` 
 The vectors *u* and `v` **must** be column vectors, however they can be a adjoint expression without any overhead. Only the meaningful triangular part of the matrix is updated, the rest is left unchanged.

 
See also
rankUpdate(const MatrixBase<DerivedU>&, Scalar) 
    rankUpdate() [2/2]
------------------

    template<typename \_MatrixType , unsigned int UpLo>   template<typename DerivedU >  

|  |  |  |  |
| --- | --- | --- | --- |
| [SelfAdjointView](classeigen_1_1selfadjointview)& [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< \_MatrixType, UpLo >::rankUpdate  | ( | const [MatrixBase](classeigen_1_1matrixbase)< DerivedU > &  | *u*,  |
|  |  | const [Scalar](classeigen_1_1selfadjointview#af52acc0942ece2de9b6db4a99cc6656e) &  | *alpha* = `[Scalar](classeigen_1_1selfadjointview#af52acc0942ece2de9b6db4a99cc6656e)(1)` |
|  | ) |  |  |

 
 Perform a symmetric rank K update of the selfadjoint matrix `*this`: \( this = this + \alpha ( u u^\* ) \) where *u* is a vector or matrix.

 
Returns
a reference to `*this` 
 Note that to perform \( this = this + \alpha ( u^\* u ) \) you can simply call this function with u.adjoint().

 
See also
rankUpdate(const MatrixBase<DerivedU>&, const MatrixBase<DerivedV>&, Scalar) 
    transpose() [1/2]
-----------------

    template<typename \_MatrixType , unsigned int UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [TransposeReturnType](classeigen_1_1selfadjointview) [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< \_MatrixType, UpLo >::transpose  | ( |  | ) |  |

 | inline |

 
 
See also

[MatrixBase::transpose()](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c) 
    transpose() [2/2]
-----------------

    template<typename \_MatrixType , unsigned int UpLo>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [ConstTransposeReturnType](classeigen_1_1selfadjointview) [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< \_MatrixType, UpLo >::transpose  | ( |  | ) |  const |

 | inline |

 
 
See also

[MatrixBase::transpose() const](classeigen_1_1densebase#a38c0b074cf93fc194bf91141287cee3f)  
    triangularView()
----------------

    template<typename \_MatrixType , unsigned int UpLo>   template<unsigned int TriMode>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::conditional<(TriMode&([Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)|[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)))==(UpLo&([Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)|[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749))), [TriangularView](classeigen_1_1triangularview)<MatrixType,TriMode>, [TriangularView](classeigen_1_1triangularview)<typename MatrixType::AdjointReturnType,TriMode> >::type [Eigen::SelfAdjointView](classeigen_1_1selfadjointview)< \_MatrixType, UpLo >::triangularView  | ( |  | ) |  const |

 | inline |

 
 
Returns
an expression of a triangular view extracted from the current selfadjoint view of a given triangular part
 The parameter *TriMode* can have the following values: `[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)`, `[StrictlyUpper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda7b37877e0b9b0df28c9c2b669a633265)`, `[UnitUpper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdadd28224d7ea92689930be73c1b50b0ad)`, `[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)`, `[StrictlyLower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda2424988b6fca98be70b595632753ba81)`, `[UnitLower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cda8f40b928c10a71ba03e5f75ad2a72fda)`.

 If `TriMode` references the same triangular part than `*this`, then this method simply return a `[TriangularView](classeigen_1_1triangularview "Expression of a triangular part in a matrix.")` of the nested expression, otherwise, the nested expression is first transposed, thus returning a `[TriangularView](classeigen_1_1triangularview "Expression of a triangular part in a matrix.")<Transpose<MatrixType>>` object.

 
See also
MatrixBase::triangularView(), class [TriangularView](classeigen_1_1triangularview "Expression of a triangular part in a matrix.") 
   

---

The documentation for this class was generated from the following files:* [SelfAdjointView.h](https://eigen.tuxfamily.org/dox/SelfAdjointView_8h_source.html)
* [LDLT.h](https://eigen.tuxfamily.org/dox/LDLT_8h_source.html)
* [LLT.h](https://eigen.tuxfamily.org/dox/LLT_8h_source.html)
* [MatrixBaseEigenvalues.h](https://eigen.tuxfamily.org/dox/MatrixBaseEigenvalues_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SelfAdjointView.html>

Eigen::SparseLU
===============

  
### template<typename \_MatrixType, typename \_OrderingType> class Eigen::SparseLU< \_MatrixType, \_OrderingType >

 [Sparse](structeigen_1_1sparse) supernodal LU factorization for general matrices. 

 This class implements the supernodal LU factorization for general matrices. It uses the main techniques from the sequential [SuperLU](classeigen_1_1superlu "A sparse direct LU factorization and solver based on the SuperLU library.") package (<http://crd-legacy.lbl.gov/~xiaoye/SuperLU/>). It handles transparently real and complex arithmetic with single and double precision, depending on the scalar type of your input matrix. The code has been optimized to provide BLAS-3 operations during supernode-panel updates. It benefits directly from the built-in high-performant [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") BLAS routines. Moreover, when the size of a supernode is very small, the BLAS calls are avoided to enable a better optimization from the compiler. For best performance, you should compile it with NDEBUG flag to avoid the numerous bounds checking on vectors.

 An important parameter of this class is the ordering method. It is used to reorder the columns (and eventually the rows) of the matrix to reduce the number of new elements that are created during numerical factorization. The cheapest method available is COLAMD. See [the OrderingMethods module](group__orderingmethods__module)  for the list of built-in and external ordering methods.

 Simple example with key steps 



```
VectorXd x(n), b(n);
SparseMatrix<double> A;
SparseLU<SparseMatrix<double>, COLAMDOrdering<int> >   solver;
// fill A and b;
// Compute the ordering permutation vector from the structural pattern of A
solver.analyzePattern(A); 
// Compute the numerical factorization 
solver.factorize(A); 
//Use the factors to solve the linear system 
x = solver.solve(b); 

```


Warning
The input matrix A should be in a **compressed** and **column-major** form. Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix.
 
Note
Unlike the initial [SuperLU](classeigen_1_1superlu "A sparse direct LU factorization and solver based on the SuperLU library.") implementation, there is no step to equilibrate the matrix. For badly scaled matrices, this step can be useful to reduce the pivoting during factorization. If this is the case for your matrices, you can try the basic scaling method at "unsupported/Eigen/src/IterativeSolvers/Scaling.h"
 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | The type of the sparse matrix. It must be a column-major SparseMatrix<>  |
| \_OrderingType | The ordering method to use, either AMD, COLAMD or METIS. Default is COLMAD |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 
See also

[Sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept)   [OrderingMethods module](group__orderingmethods__module) 
     ![Inheritance graph]      

|  |
| --- |
|  |
| Scalar  | [absDeterminant](classeigen_1_1sparselu#a06fa89424239fb169d408f08252426d0) () |
|  |
| const SparseLUTransposeView< true, [SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType > >  | [adjoint](classeigen_1_1sparselu#abfb5115138d22e69a13370d766ed2576) () |
|  |
| void  | [analyzePattern](classeigen_1_1sparselu#aa907ff958c4f4855145091d2686f3a8a) (const MatrixType &matrix) |
|  |
| const [PermutationType](classeigen_1_1permutationmatrix) &  | [colsPermutation](classeigen_1_1sparselu#ab7b0d15d0d9fd1faa164298f92ca59cd) () const |
|  |
| void  | [compute](classeigen_1_1sparselu#a96a8dcb02015ab9be5777d4ba9173266) (const MatrixType &matrix) |
|  |
| Scalar  | [determinant](classeigen_1_1sparselu#a02d63d242d27211b5c5827f5d4fd99ff) () |
|  |
| void  | [factorize](classeigen_1_1sparselu#a39858b0e72f2659d596364e252b34cbc) (const MatrixType &matrix) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1sparselu#ab0d0c1744ffd5a1dff578a44bcef2a3d) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1sparselu#ab0d0c1744ffd5a1dff578a44bcef2a3d) |
|  |
| void  | [isSymmetric](classeigen_1_1sparselu#afff3bd506cd78172e5219c707562729f) (bool sym) |
|  |
| std::string  | [lastErrorMessage](classeigen_1_1sparselu#a5458c4e851d7d75c8ca92c4fd02d2adb) () const |
|  |
| Scalar  | [logAbsDeterminant](classeigen_1_1sparselu#a89e30a7df205596784a5a73f4768eaec) () const |
|  |
| SparseLUMatrixLReturnType< SCMatrix >  | [matrixL](classeigen_1_1sparselu#a634abe55e5a076f2e10db78871105a8f) () const |
|  |
| SparseLUMatrixUReturnType< SCMatrix, [MappedSparseMatrix](classeigen_1_1mappedsparsematrix)< Scalar, [ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62), StorageIndex > >  | [matrixU](classeigen_1_1sparselu#aaf395a8fca527144215ff19cc7b8b637) () const |
|  |
| const [PermutationType](classeigen_1_1permutationmatrix) &  | [rowsPermutation](classeigen_1_1sparselu#a691295e65c06df599876d78ac2c7fada) () const |
|  |
| void  | [setPivotThreshold](classeigen_1_1sparselu#a94c726c9ebb71a60b529fe47d942ad57) (const RealScalar &thresh) |
|  |
| Scalar  | [signDeterminant](classeigen_1_1sparselu#a6651143e3b18fa90cfb3808b6fd23c4e) () |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< [SparseLU](classeigen_1_1sparselu), Rhs >  | [solve](classeigen_1_1sparselu#a0b10cb439f52ce1b85a371fca8c79b89) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &B) const |
|  |
| const SparseLUTransposeView< false, [SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType > >  | [transpose](classeigen_1_1sparselu#a9b2faf06fd28c92230e74d114cc3b80b) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< SparseLU< \_MatrixType, \_OrderingType > >](classeigen_1_1sparsesolverbase) |
| const [Solve](classeigen_1_1solve)< [SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| const [Solve](classeigen_1_1solve)< [SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

  absDeterminant()
----------------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar [Eigen::SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >::absDeterminant  | ( |  | ) |  |

 | inline |

 
 
Returns
the absolute value of the determinant of the matrix of which \*this is the QR decomposition.
 
Warning
a determinant can be very big or small, so for matrices of large enough dimension, there is a risk of overflow/underflow. One way to work around that is to use [logAbsDeterminant()](classeigen_1_1sparselu#a89e30a7df205596784a5a73f4768eaec) instead.
 
See also

[logAbsDeterminant()](classeigen_1_1sparselu#a89e30a7df205596784a5a73f4768eaec), [signDeterminant()](classeigen_1_1sparselu#a6651143e3b18fa90cfb3808b6fd23c4e) 
    adjoint()
---------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const SparseLUTransposeView<true, [SparseLU](classeigen_1_1sparselu)<\_MatrixType,\_OrderingType> > [Eigen::SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >::adjoint  | ( |  | ) |  |

 | inline |

 
 
Returns
an expression of the adjoint of the factored matrix
 A typical usage is to solve for the adjoint problem A' x = b: 



```
solver.compute(A);
x = solver.adjoint().solve(b);

```

For real scalar types, this function is equivalent to [transpose()](classeigen_1_1sparselu#a9b2faf06fd28c92230e74d114cc3b80b).

 
See also

[transpose()](classeigen_1_1sparselu#a9b2faf06fd28c92230e74d114cc3b80b), [solve()](classeigen_1_1sparselu#a0b10cb439f52ce1b85a371fca8c79b89) 
    analyzePattern()
----------------

    template<typename MatrixType , typename OrderingType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SparseLU](classeigen_1_1sparselu)< MatrixType, OrderingType >::analyzePattern  | ( | const MatrixType &  | *mat* | ) |  |

 
 Compute the column permutation to minimize the fill-in

 * Apply this permutation to the input matrix -
* Compute the column elimination tree on the permuted matrix
* Postorder the elimination tree and the column permutation

    colsPermutation()
-----------------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [PermutationType](classeigen_1_1permutationmatrix)& [Eigen::SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >::colsPermutation  | ( |  | ) |  const |

 | inline |

 
 
Returns
a reference to the column matrix permutation \( P\_c^T \) such that \(P\_r A P\_c^T = L U\) 
 
See also

[rowsPermutation()](classeigen_1_1sparselu#a691295e65c06df599876d78ac2c7fada) 
    compute()
---------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >::compute  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Compute the symbolic and numeric factorization of the input sparse matrix. The input matrix should be in column-major storage. 

    determinant()
-------------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar [Eigen::SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >::determinant  | ( |  | ) |  |

 | inline |

 
 
Returns
The determinant of the matrix.
 
See also

[absDeterminant()](classeigen_1_1sparselu#a06fa89424239fb169d408f08252426d0), [logAbsDeterminant()](classeigen_1_1sparselu#a89e30a7df205596784a5a73f4768eaec) 
    factorize()
-----------

    template<typename MatrixType , typename OrderingType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SparseLU](classeigen_1_1sparselu)< MatrixType, OrderingType >::factorize  | ( | const MatrixType &  | *matrix* | ) |  |

 
 * Numerical factorization
* Interleaved with the symbolic factorization On exit, info is

 = 0: successful factorization

 
>  0: if info = i, and i is 
> 
>  

 <= A->ncol: U(i,i) is exactly zero. The factorization has been completed, but the factor U is exactly singular, and division by zero will occur if it is used to solve a system of equations.

 > A->ncol: number of bytes allocated when memory allocation failure occurred, plus A->ncol. If lwork = -1, it is the estimated amount of space needed, plus A->ncol.   
 

    info()
------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether previous computation was successful. 

 
Returns

`Success` if computation was successful, `NumericalIssue` if the LU factorization reports a problem, zero diagonal for instance `InvalidInput` if the input matrix is invalid
 
See also
iparm()   
 
    isSymmetric()
-------------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >::isSymmetric  | ( | bool  | *sym* | ) |  |

 | inline |

 
 Indicate that the pattern of the input matrix is symmetric 

    lastErrorMessage()
------------------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| std::string [Eigen::SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >::lastErrorMessage  | ( |  | ) |  const |

 | inline |

 
 
Returns
A string describing the type of error 
    logAbsDeterminant()
-------------------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar [Eigen::SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >::logAbsDeterminant  | ( |  | ) |  const |

 | inline |

 
 
Returns
the natural log of the absolute value of the determinant of the matrix of which \*\*this is the QR decomposition
 
Note
This method is useful to work around the risk of overflow/underflow that's inherent to the determinant computation.
 
See also

[absDeterminant()](classeigen_1_1sparselu#a06fa89424239fb169d408f08252426d0), [signDeterminant()](classeigen_1_1sparselu#a6651143e3b18fa90cfb3808b6fd23c4e) 
    matrixL()
---------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| SparseLUMatrixLReturnType<SCMatrix> [Eigen::SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >::matrixL  | ( |  | ) |  const |

 | inline |

 
 
Returns
an expression of the matrix L, internally stored as supernodes The only operation available with this expression is the triangular solve 
```
y = b; [matrixL](classeigen_1_1sparselu#a634abe55e5a076f2e10db78871105a8f)().solveInPlace(y);
```
 
    matrixU()
---------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| SparseLUMatrixUReturnType<SCMatrix,[MappedSparseMatrix](classeigen_1_1mappedsparsematrix)<Scalar,[ColMajor](group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62),StorageIndex> > [Eigen::SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >::matrixU  | ( |  | ) |  const |

 | inline |

 
 
Returns
an expression of the matrix U, The only operation available with this expression is the triangular solve 
```
y = b; [matrixU](classeigen_1_1sparselu#aaf395a8fca527144215ff19cc7b8b637)().solveInPlace(y);
```
 
    rowsPermutation()
-----------------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [PermutationType](classeigen_1_1permutationmatrix)& [Eigen::SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >::rowsPermutation  | ( |  | ) |  const |

 | inline |

 
 
Returns
a reference to the row matrix permutation \( P\_r \) such that \(P\_r A P\_c^T = L U\) 
 
See also

[colsPermutation()](classeigen_1_1sparselu#ab7b0d15d0d9fd1faa164298f92ca59cd) 
    setPivotThreshold()
-------------------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >::setPivotThreshold  | ( | const RealScalar &  | *thresh* | ) |  |

 | inline |

 
 Set the threshold used for a diagonal entry to be an acceptable pivot. 

    signDeterminant()
-----------------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar [Eigen::SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >::signDeterminant  | ( |  | ) |  |

 | inline |

 
 
Returns
A number representing the sign of the determinant
 
See also

[absDeterminant()](classeigen_1_1sparselu#a06fa89424239fb169d408f08252426d0), [logAbsDeterminant()](classeigen_1_1sparselu#a89e30a7df205596784a5a73f4768eaec) 
    solve()
-------

    template<typename \_MatrixType , typename \_OrderingType >   template<typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Solve](classeigen_1_1solve)<[SparseLU](classeigen_1_1sparselu), Rhs> [Eigen::SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >::solve  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &  | *B* | ) |  const |

 | inline |

 
 
Returns
the solution X of \( A X = B \) using the current decomposition of A.
 
Warning
the destination matrix X in X = this->solve(B) must be colmun-major.
 
See also

[compute()](classeigen_1_1sparselu#a96a8dcb02015ab9be5777d4ba9173266) 
    transpose()
-----------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const SparseLUTransposeView<false,[SparseLU](classeigen_1_1sparselu)<\_MatrixType,\_OrderingType> > [Eigen::SparseLU](classeigen_1_1sparselu)< \_MatrixType, \_OrderingType >::transpose  | ( |  | ) |  |

 | inline |

 
 
Returns
an expression of the transposed of the factored matrix.
 A typical usage is to solve for the transposed problem A^T x = b: 



```
solver.compute(A);
x = solver.transpose().solve(b);

```


See also

[adjoint()](classeigen_1_1sparselu#abfb5115138d22e69a13370d766ed2576), [solve()](classeigen_1_1sparselu#a0b10cb439f52ce1b85a371fca8c79b89) 
   

---

The documentation for this class was generated from the following file:* [SparseLU.h](https://eigen.tuxfamily.org/dox/SparseLU_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SparseLU.html>

Eigen::SparseMatrixBase
=======================

  
### template<typename Derived> class Eigen::SparseMatrixBase< Derived >

 Base class of any sparse matrices or sparse expressions. 

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | is the derived type, e.g. a sparse matrix type, or an expression, etc. |

   This class can be extended with the help of the plugin mechanism described on the page [Extending MatrixBase (and other classes)](topiccustomizing_plugins) by defining the preprocessor symbol `EIGEN_SPARSEMATRIXBASE_PLUGIN`. 

     ![Inheritance graph]            

|  |
| --- |
|  |
| enum  | {  [RowsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a456cda7b9d938e57194036a41d634604) ,  [ColsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a27ba349f075d026c1f51d1ec69aa5b14) ,  [SizeAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5aa5022cfa2bb53129883e9b7b8abd3d68) ,  **MaxRowsAtCompileTime** ,  **MaxColsAtCompileTime** ,  **MaxSizeAtCompileTime** ,  [IsVectorAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a14a3f566ed2a074beddb8aef0223bfdf) ,  [NumDimensions](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a2366131ffcc38bff48a1c7572eb86dd3) ,  [Flags](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a2af043b36fe9e08df0107cf6de496165) ,  **IsRowMajor** ,  **InnerSizeAtCompileTime**  } |
|  |
| typedef internal::traits< Derived >::[StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) | [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) |
|  |
| typedef Scalar  | [value\_type](classeigen_1_1sparsematrixbase#ac254d3b61718ebc2136d27bac043dcb7) |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |




|  |
| --- |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1sparsematrixbase#aca7ce296424ef6e478ab0fb19547a7ee) () const |
|  |
| const internal::eval< Derived >::type  | [eval](classeigen_1_1sparsematrixbase#a761bd872a06b59632fcff7b7807a77ce) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1sparsematrixbase#a180fcba1ccf3cdf3252a263bc1de7a1d) () const |
|  |
| bool  | [isVector](classeigen_1_1sparsematrixbase#a7eedffa867031f649fd0fb9cc23ce4be) () const |
|  |
| template<typename OtherDerived >  |
| const [Product](classeigen_1_1product)< Derived, OtherDerived, AliasFreeProduct >  | [operator\*](classeigen_1_1sparsematrixbase#a9d4d71b3f34389e6fc01f2b86e43f7a4) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &other) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1sparsematrixbase#ac86cc88a4cfef21db6b64ec0ab4c8f0a) () const |
|  |
| const [SparseView](classeigen_1_1sparseview)< Derived >  | [pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d) (const Scalar &reference=Scalar(0), const RealScalar &epsilon=[NumTraits](structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1sparsematrixbase#a1944e9fa9ce7937bfc3a87b2cb94371f) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1sparsematrixbase#a124bc57921775eb9aa2dfd9727e23472) () const |
|  |
| SparseSymmetricPermutationProduct< Derived, [Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)|[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749) >  | [twistedBy](classeigen_1_1sparsematrixbase#a51d4898bd6a57cc3ba543a39b102423e) (const [PermutationMatrix](classeigen_1_1permutationmatrix)< [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) > &perm) const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |

  StorageIndex
------------

    template<typename Derived >  

|  |
| --- |
| typedef internal::traits<Derived>::[StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) [Eigen::SparseMatrixBase](classeigen_1_1sparsematrixbase)< Derived >::[StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) |

 
 The integer type used to **store** indices within a [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation."). For a `SparseMatrix<Scalar,Options,IndexType>` it an alias of the third template parameter `IndexType`. 

    value\_type
-----------

    template<typename Derived >  

|  |
| --- |
| typedef Scalar [Eigen::SparseMatrixBase](classeigen_1_1sparsematrixbase)< Derived >::[value\_type](classeigen_1_1sparsematrixbase#ac254d3b61718ebc2136d27bac043dcb7) |

 
 The numeric type of the expression' coefficients, e.g. float, double, int or std::complex<float>, etc.

 It is an alias for the Scalar type 

    anonymous enum
--------------

    template<typename Derived >  

|  |
| --- |
| anonymous enum |

 
 

| Enumerator |
| --- |
| RowsAtCompileTime  | The number of rows at compile-time. This is just a copy of the value provided by the *Derived* type. If a value is not known at compile-time, it is set to the *Dynamic* constant. 

See also

[MatrixBase::rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [MatrixBase::cols()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), [ColsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a27ba349f075d026c1f51d1ec69aa5b14), [SizeAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5aa5022cfa2bb53129883e9b7b8abd3d68) 
 |
| ColsAtCompileTime  | The number of columns at compile-time. This is just a copy of the value provided by the *Derived* type. If a value is not known at compile-time, it is set to the *Dynamic* constant. 

See also

[MatrixBase::rows()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [MatrixBase::cols()](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), [RowsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a456cda7b9d938e57194036a41d634604), [SizeAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5aa5022cfa2bb53129883e9b7b8abd3d68) 
 |
| SizeAtCompileTime  | This is equal to the number of coefficients, i.e. the number of rows times the number of columns, or to *Dynamic* if this is not known at compile-time. 

See also

[RowsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a456cda7b9d938e57194036a41d634604), [ColsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a27ba349f075d026c1f51d1ec69aa5b14) 
 |
| IsVectorAtCompileTime  | This is set to true if either the number of rows or the number of columns is known at compile-time to be equal to 1. Indeed, in that case, we are dealing with a column-vector (if there is only one column) or with a row-vector (if there is only one row).  |
| NumDimensions  | This value is equal to Tensor::NumDimensions, i.e. 0 for scalars, 1 for vectors, and 2 for matrices.  |
| Flags  | This stores expression [Flags](group__flags) flags which may or may not be inherited by new expressions constructed from this one. See the [list of flags](group__flags).  |

    cols()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::SparseMatrixBase](classeigen_1_1sparsematrixbase)< Derived >::cols  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
the number of columns. 
 
See also

[rows()](classeigen_1_1sparsematrixbase#a1944e9fa9ce7937bfc3a87b2cb94371f) 
    eval()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const internal::eval<Derived>::type [Eigen::SparseMatrixBase](classeigen_1_1sparsematrixbase)< Derived >::eval  | ( |  | ) |  const |

 | inline |

 
 
Returns
the matrix or vector obtained by evaluating this expression.
 Notice that in the case of a plain matrix or vector (not an expression) this function just returns a const reference, in order to avoid a useless copy. 

    innerSize()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::SparseMatrixBase](classeigen_1_1sparsematrixbase)< Derived >::innerSize  | ( |  | ) |  const |

 | inline |

 
 
Returns
the size of the inner dimension according to the storage order, i.e., the number of rows for a columns major matrix, and the number of cols otherwise 
    isVector()
----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::SparseMatrixBase](classeigen_1_1sparsematrixbase)< Derived >::isVector  | ( |  | ) |  const |

 | inline |

 
 
Returns
true if either the number of rows or the number of columns is equal to 1. In other words, this function returns 
```
[rows](classeigen_1_1sparsematrixbase#a1944e9fa9ce7937bfc3a87b2cb94371f)()==1 || [cols](classeigen_1_1sparsematrixbase#aca7ce296424ef6e478ab0fb19547a7ee)()==1 
```
 
 
See also

[rows()](classeigen_1_1sparsematrixbase#a1944e9fa9ce7937bfc3a87b2cb94371f), [cols()](classeigen_1_1sparsematrixbase#aca7ce296424ef6e478ab0fb19547a7ee), [IsVectorAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a14a3f566ed2a074beddb8aef0223bfdf). 
    operator\*()
------------

    template<typename Derived >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Product](classeigen_1_1product)< Derived, OtherDerived, AliasFreeProduct > [Eigen::SparseMatrixBase](classeigen_1_1sparsematrixbase)< Derived >::operator\*  | ( | const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &  | *other* | ) |  const |

 | inline |

 
 
Returns
an expression of the product of two sparse matrices. By default a conservative product preserving the symbolic non zeros is performed. The automatic pruning of the small values can be achieved by calling the [pruned()](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d) function in which case a totally different product algorithm is employed: 
```
C = (A*B).[pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d)();             // suppress numerical zeros (exact)
C = (A*B).[pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d)(ref);
C = (A*B).[pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d)(ref,epsilon);
```
 where `ref` is a meaningful non zero reference value. 
    outerSize()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::SparseMatrixBase](classeigen_1_1sparsematrixbase)< Derived >::outerSize  | ( |  | ) |  const |

 | inline |

 
 
Returns
the size of the storage major dimension, i.e., the number of columns for a columns major matrix, and the number of rows otherwise 
    pruned()
--------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [SparseView](classeigen_1_1sparseview)< Derived > [Eigen::SparseMatrixBase](classeigen_1_1sparsematrixbase)< Derived >::pruned  | ( | const Scalar &  | *reference* = `Scalar(0)`,  |
|  |  | const RealScalar &  | *epsilon* = `[NumTraits](structeigen_1_1numtraits)<Scalar>::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 
Returns
an expression of `*this` with values smaller than *reference* \* *epsilon* removed.
 This method is typically used in conjunction with the product of two sparse matrices to automatically prune the smallest values as follows: 



```
C = (A*B).[pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d)();             // suppress numerical zeros (exact)
C = (A*B).[pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d)(ref);
C = (A*B).[pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d)(ref,epsilon);

```

 where `ref` is a meaningful non zero reference value. 

    rows()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::SparseMatrixBase](classeigen_1_1sparsematrixbase)< Derived >::rows  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
the number of rows. 
 
See also

[cols()](classeigen_1_1sparsematrixbase#aca7ce296424ef6e478ab0fb19547a7ee) 
    size()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::SparseMatrixBase](classeigen_1_1sparsematrixbase)< Derived >::size  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of coefficients, which is *[rows()](classeigen_1_1sparsematrixbase#a1944e9fa9ce7937bfc3a87b2cb94371f)\*cols*(). 
 
See also

[rows()](classeigen_1_1sparsematrixbase#a1944e9fa9ce7937bfc3a87b2cb94371f), [cols()](classeigen_1_1sparsematrixbase#aca7ce296424ef6e478ab0fb19547a7ee). 
    twistedBy()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| SparseSymmetricPermutationProduct<Derived,[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)|[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)> [Eigen::SparseMatrixBase](classeigen_1_1sparsematrixbase)< Derived >::twistedBy  | ( | const [PermutationMatrix](classeigen_1_1permutationmatrix)< [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) > &  | *perm* | ) |  const |

 | inline |

 
 
Returns
an expression of P H P^-1 where H is the matrix represented by `*this` 
   

---

The documentation for this class was generated from the following files:* [SparseMatrixBase.h](https://eigen.tuxfamily.org/dox/SparseMatrixBase_8h_source.html)
* [SparseAssign.h](https://eigen.tuxfamily.org/dox/SparseAssign_8h_source.html)
* [SparseCwiseBinaryOp.h](https://eigen.tuxfamily.org/dox/SparseCwiseBinaryOp_8h_source.html)
* [SparseCwiseUnaryOp.h](https://eigen.tuxfamily.org/dox/SparseCwiseUnaryOp_8h_source.html)
* [SparseDot.h](https://eigen.tuxfamily.org/dox/SparseDot_8h_source.html)
* [SparseFuzzy.h](https://eigen.tuxfamily.org/dox/SparseFuzzy_8h_source.html)
* [SparseProduct.h](https://eigen.tuxfamily.org/dox/SparseProduct_8h_source.html)
* [SparseRedux.h](https://eigen.tuxfamily.org/dox/SparseRedux_8h_source.html)
* [SparseSelfAdjointView.h](https://eigen.tuxfamily.org/dox/SparseSelfAdjointView_8h_source.html)
* [SparseTriangularView.h](https://eigen.tuxfamily.org/dox/SparseTriangularView_8h_source.html)
* [SparseView.h](https://eigen.tuxfamily.org/dox/SparseView_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SparseMatrixBase.html>

Eigen::SparseQR
===============

  
### template<typename \_MatrixType, typename \_OrderingType> class Eigen::SparseQR< \_MatrixType, \_OrderingType >

 [Sparse](structeigen_1_1sparse) left-looking QR factorization with numerical column pivoting. 

 This class implements a left-looking QR decomposition of sparse matrices with numerical column pivoting. When a column has a norm less than a given tolerance it is implicitly permuted to the end. The QR factorization thus obtained is given by A\*P = Q\*R where R is upper triangular or trapezoidal.

 P is the column permutation which is the product of the fill-reducing and the numerical permutations. Use [colsPermutation()](classeigen_1_1sparseqr#a140930ebbf89dfd57a173761716db38f) to get it.

 Q is the orthogonal matrix represented as products of Householder reflectors. Use [matrixQ()](classeigen_1_1sparseqr#ae1cc0a836c177d4f42600f8639354be1) to get an expression and [matrixQ()](classeigen_1_1sparseqr#ae1cc0a836c177d4f42600f8639354be1).adjoint() to get the adjoint. You can then apply it to a vector.

 R is the sparse triangular or trapezoidal matrix. The later occurs when A is rank-deficient. [matrixR()](classeigen_1_1sparseqr#a564524ff13b2b6dd1e76127404f7b920).topLeftCorner([rank()](classeigen_1_1sparseqr#a70ec2b9e5cb62a41dc1ee2adfb54e9b0), [rank()](classeigen_1_1sparseqr#a70ec2b9e5cb62a41dc1ee2adfb54e9b0)) always returns a triangular factor of full rank.

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | The type of the sparse matrix A, must be a column-major SparseMatrix<>  |
| \_OrderingType | The fill-reducing ordering method. See the [OrderingMethods](group__orderingmethods__module)  module for the list of built-in and external ordering methods. |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 The numerical pivoting strategy and default threshold are the same as in SuiteSparse QR, and detailed in the following paper:  *Tim Davis, "Algorithm 915, SuiteSparseQR: Multifrontal Multithreaded Rank-Revealing [Sparse](structeigen_1_1sparse) QR Factorization, ACM Trans. on Math. Soft. 38(1), 2011.*  Even though it is qualified as "rank-revealing", this strategy might fail for some rank deficient problems. When this class is used to solve linear or least-square problems it is thus strongly recommended to check the accuracy of the computed solution. If it failed, it usually helps to increase the threshold with setPivotThreshold.

 
Warning
The input sparse matrix A must be in compressed mode (see [SparseMatrix::makeCompressed()](classeigen_1_1sparsematrix#a5ff54ffc10296f9466dc81fa888733fd)).   For complex matrices [matrixQ()](classeigen_1_1sparseqr#ae1cc0a836c177d4f42600f8639354be1).transpose() will actually return the adjoint matrix. 
     ![Inheritance graph]      

|  |
| --- |
|  |
| void  | [analyzePattern](classeigen_1_1sparseqr#a4b425ddb1358c914d764cde48853a4f6) (const MatrixType &mat) |
|  | Preprocessing step of a QR factorization. [More...](classeigen_1_1sparseqr#a4b425ddb1358c914d764cde48853a4f6) |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [cols](classeigen_1_1sparseqr#a57bedc9b1351c0995bae8ad0088a6fce) () const |
|  |
| const [PermutationType](classeigen_1_1permutationmatrix) &  | [colsPermutation](classeigen_1_1sparseqr#a140930ebbf89dfd57a173761716db38f) () const |
|  |
| void  | [compute](classeigen_1_1sparseqr#aedaf52b7543de4d55c58c8f830c2aeb7) (const MatrixType &mat) |
|  |
| void  | [factorize](classeigen_1_1sparseqr#a55a34bacf05bd30a1dacbccad9f03c6d) (const MatrixType &mat) |
|  | Performs the numerical QR factorization of the input matrix. [More...](classeigen_1_1sparseqr#a55a34bacf05bd30a1dacbccad9f03c6d) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1sparseqr#a234b0580aaf57237393f2e73a3d38690) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1sparseqr#a234b0580aaf57237393f2e73a3d38690) |
|  |
| std::string  | [lastErrorMessage](classeigen_1_1sparseqr#a1222e59649d77125d91f1368cf293c63) () const |
|  |
| SparseQRMatrixQReturnType< [SparseQR](classeigen_1_1sparseqr) >  | [matrixQ](classeigen_1_1sparseqr#ae1cc0a836c177d4f42600f8639354be1) () const |
|  |
| const [QRMatrixType](classeigen_1_1sparsematrix) &  | [matrixR](classeigen_1_1sparseqr#a564524ff13b2b6dd1e76127404f7b920) () const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [rank](classeigen_1_1sparseqr#a70ec2b9e5cb62a41dc1ee2adfb54e9b0) () const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [rows](classeigen_1_1sparseqr#ab9133b7ace1c19714df99f553666316d) () const |
|  |
| void  | [setPivotThreshold](classeigen_1_1sparseqr#adb7bfa65f99e3ef91ed58ea663a850a1) (const RealScalar &threshold) |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< [SparseQR](classeigen_1_1sparseqr), Rhs >  | [solve](classeigen_1_1sparseqr#aea13a2c6823cd8408ba49afde9b3d4e4) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &B) const |
|  |
|  | [SparseQR](classeigen_1_1sparseqr#ac50f705d686d4bc687ce6acbc76447d2) (const MatrixType &mat) |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< SparseQR< \_MatrixType, \_OrderingType > >](classeigen_1_1sparsesolverbase) |
| const [Solve](classeigen_1_1solve)< [SparseQR](classeigen_1_1sparseqr)< \_MatrixType, \_OrderingType >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| const [Solve](classeigen_1_1solve)< [SparseQR](classeigen_1_1sparseqr)< \_MatrixType, \_OrderingType >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

  SparseQR()
----------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::SparseQR](classeigen_1_1sparseqr)< \_MatrixType, \_OrderingType >::[SparseQR](classeigen_1_1sparseqr) | ( | const MatrixType &  | *mat* | ) |  |

 | inlineexplicit |

 
 Construct a QR factorization of the matrix *mat*.

 
Warning
The matrix *mat* must be in compressed mode (see [SparseMatrix::makeCompressed()](classeigen_1_1sparsematrix#a5ff54ffc10296f9466dc81fa888733fd)).
 
See also

[compute()](classeigen_1_1sparseqr#aedaf52b7543de4d55c58c8f830c2aeb7) 
    analyzePattern()
----------------

    template<typename MatrixType , typename OrderingType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SparseQR](classeigen_1_1sparseqr)< MatrixType, OrderingType >::analyzePattern  | ( | const MatrixType &  | *mat* | ) |  |

 
 Preprocessing step of a QR factorization. 

 
Warning
The matrix *mat* must be in compressed mode (see [SparseMatrix::makeCompressed()](classeigen_1_1sparsematrix#a5ff54ffc10296f9466dc81fa888733fd)).
 In this step, the fill-reducing permutation is computed and applied to the columns of A and the column elimination tree is computed as well. Only the sparsity pattern of *mat* is exploited.

 
Note
In this step it is assumed that there is no empty row in the matrix *mat*. 
    cols()
------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::SparseQR](classeigen_1_1sparseqr)< \_MatrixType, \_OrderingType >::cols  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
the number of columns of the represented matrix. 
    colsPermutation()
-----------------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [PermutationType](classeigen_1_1permutationmatrix)& [Eigen::SparseQR](classeigen_1_1sparseqr)< \_MatrixType, \_OrderingType >::colsPermutation  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const reference to the column permutation P that was applied to A such that A\*P = Q\*R It is the combination of the fill-in reducing permutation and numerical column pivoting. 
    compute()
---------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SparseQR](classeigen_1_1sparseqr)< \_MatrixType, \_OrderingType >::compute  | ( | const MatrixType &  | *mat* | ) |  |

 | inline |

 
 Computes the QR factorization of the sparse matrix *mat*.

 
Warning
The matrix *mat* must be in compressed mode (see [SparseMatrix::makeCompressed()](classeigen_1_1sparsematrix#a5ff54ffc10296f9466dc81fa888733fd)).
 
See also

[analyzePattern()](classeigen_1_1sparseqr#a4b425ddb1358c914d764cde48853a4f6 "Preprocessing step of a QR factorization."), [factorize()](classeigen_1_1sparseqr#a55a34bacf05bd30a1dacbccad9f03c6d "Performs the numerical QR factorization of the input matrix.") 
    factorize()
-----------

    template<typename MatrixType , typename OrderingType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SparseQR](classeigen_1_1sparseqr)< MatrixType, OrderingType >::factorize  | ( | const MatrixType &  | *mat* | ) |  |

 
 Performs the numerical QR factorization of the input matrix. 

 The function [SparseQR::analyzePattern(const MatrixType&)](classeigen_1_1sparseqr#a4b425ddb1358c914d764cde48853a4f6 "Preprocessing step of a QR factorization.") must have been called beforehand with a matrix having the same sparsity pattern than *mat*.

 
Parameters
 

|  |  |
| --- | --- |
| mat | The sparse column-major matrix  |

      info()
------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::SparseQR](classeigen_1_1sparseqr)< \_MatrixType, \_OrderingType >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether previous computation was successful. 

 
Returns

`Success` if computation was successful, `NumericalIssue` if the QR factorization reports a numerical problem `InvalidInput` if the input matrix is invalid
 
See also
iparm()   
 
    lastErrorMessage()
------------------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| std::string [Eigen::SparseQR](classeigen_1_1sparseqr)< \_MatrixType, \_OrderingType >::lastErrorMessage  | ( |  | ) |  const |

 | inline |

 
 
Returns
A string describing the type of error. This method is provided to ease debugging, not to handle errors. 
    matrixQ()
---------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| SparseQRMatrixQReturnType<[SparseQR](classeigen_1_1sparseqr)> [Eigen::SparseQR](classeigen_1_1sparseqr)< \_MatrixType, \_OrderingType >::matrixQ  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
an expression of the matrix Q as products of sparse Householder reflectors. The common usage of this function is to apply it to a dense matrix or vector 
```
VectorXd B1, B2;
// Initialize B1
B2 = [matrixQ](classeigen_1_1sparseqr#ae1cc0a836c177d4f42600f8639354be1)() * B1;
```


 To get a plain [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.") representation of Q: 



```
SparseMatrix<double> Q;
Q = SparseQR<SparseMatrix<double> >(A).[matrixQ](classeigen_1_1sparseqr#ae1cc0a836c177d4f42600f8639354be1)();

```

 Internally, this call simply performs a sparse product between the matrix Q and a sparse identity matrix. However, due to the fact that the sparse reflectors are stored unsorted, two transpositions are needed to sort them before performing the product. 

    matrixR()
---------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [QRMatrixType](classeigen_1_1sparsematrix)& [Eigen::SparseQR](classeigen_1_1sparseqr)< \_MatrixType, \_OrderingType >::matrixR  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const reference to the **sparse** upper triangular matrix R of the QR factorization. 
 
Warning
The entries of the returned matrix are not sorted. This means that using it in algorithms expecting sorted entries will fail. This include random coefficient accesses (SpaseMatrix::coeff()), and coefficient-wise operations. [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") products and triangular solves are fine though.
 To sort the entries, you can assign it to a row-major matrix, and if a column-major matrix is required, you can copy it again: 



```
SparseMatrix<double>          R  = qr.matrixR();  // column-major, not sorted!
SparseMatrix<double,RowMajor> Rr = qr.matrixR();  // row-major, sorted
SparseMatrix<double>          Rc = Rr;            // column-major, sorted

```
    rank()
------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::SparseQR](classeigen_1_1sparseqr)< \_MatrixType, \_OrderingType >::rank  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of non linearly dependent columns as determined by the pivoting threshold.
 
See also

[setPivotThreshold()](classeigen_1_1sparseqr#adb7bfa65f99e3ef91ed58ea663a850a1) 
    rows()
------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::SparseQR](classeigen_1_1sparseqr)< \_MatrixType, \_OrderingType >::rows  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
the number of rows of the represented matrix. 
    setPivotThreshold()
-------------------

    template<typename \_MatrixType , typename \_OrderingType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SparseQR](classeigen_1_1sparseqr)< \_MatrixType, \_OrderingType >::setPivotThreshold  | ( | const RealScalar &  | *threshold* | ) |  |

 | inline |

 
 Sets the threshold that is used to determine linearly dependent columns during the factorization.

 In practice, if during the factorization the norm of the column that has to be eliminated is below this threshold, then the entire column is treated as zero, and it is moved at the end. 

    solve()
-------

    template<typename \_MatrixType , typename \_OrderingType >   template<typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Solve](classeigen_1_1solve)<[SparseQR](classeigen_1_1sparseqr), Rhs> [Eigen::SparseQR](classeigen_1_1sparseqr)< \_MatrixType, \_OrderingType >::solve  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &  | *B* | ) |  const |

 | inline |

 
 
Returns
the solution X of \( A X = B \) using the current decomposition of A.
 
See also

[compute()](classeigen_1_1sparseqr#aedaf52b7543de4d55c58c8f830c2aeb7) 
   

---

The documentation for this class was generated from the following file:* [SparseQR.h](https://eigen.tuxfamily.org/dox/SparseQR_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SparseQR.html>

Eigen::SparseSelfAdjointView
============================

  
### template<typename MatrixType, unsigned int \_Mode> class Eigen::SparseSelfAdjointView< MatrixType, \_Mode >

 Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix. 

 
Parameters
 

|  |  |
| --- | --- |
| MatrixType | the type of the dense matrix storing the coefficients  |
| Mode | can be either `[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)` or `[Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)` |

   This class is an expression of a sefladjoint matrix from a triangular part of a matrix with given dense storage of the coefficients. It is the return type of MatrixBase::selfadjointView() and most of the time this is the only way that it is used.

 
See also
SparseMatrixBase::selfadjointView() 
     ![Inheritance graph]      

|  |
| --- |
|  |
| template<typename OtherDerived >  |
| [Product](classeigen_1_1product)< [SparseSelfAdjointView](classeigen_1_1sparseselfadjointview), OtherDerived >  | [operator\*](classeigen_1_1sparseselfadjointview#a887e3b5fa468af8413276141ddc8bb93) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &rhs) const |
|  |
| template<typename OtherDerived >  |
| [Product](classeigen_1_1product)< [SparseSelfAdjointView](classeigen_1_1sparseselfadjointview), OtherDerived >  | [operator\*](classeigen_1_1sparseselfadjointview#a9d1e5ef26775e3b43be08fd4ae191aa8) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &rhs) const |
|  |
| template<typename DerivedU >  |
| [SparseSelfAdjointView](classeigen_1_1sparseselfadjointview) &  | [rankUpdate](classeigen_1_1sparseselfadjointview#abe66734215f8d8220be0985d67901021) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< DerivedU > &u, const Scalar &alpha=Scalar(1)) |
|  |
| SparseSymmetricPermutationProduct< \_MatrixTypeNested, Mode >  | [twistedBy](classeigen_1_1sparseselfadjointview#acde15b45cf7b43520e1005ec65d55f3c) (const [PermutationMatrix](classeigen_1_1permutationmatrix)< [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), StorageIndex > &perm) const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< SparseSelfAdjointView< MatrixType, \_Mode > >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| [SparseSelfAdjointView](classeigen_1_1sparseselfadjointview)< MatrixType, \_Mode > &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const [SparseSelfAdjointView](classeigen_1_1sparseselfadjointview)< MatrixType, \_Mode > &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< SparseSelfAdjointView< MatrixType, \_Mode > >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  operator\*() [1/2]
------------------

    template<typename MatrixType , unsigned int \_Mode>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Product](classeigen_1_1product)<[SparseSelfAdjointView](classeigen_1_1sparseselfadjointview),OtherDerived> [Eigen::SparseSelfAdjointView](classeigen_1_1sparseselfadjointview)< MatrixType, \_Mode >::operator\*  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *rhs* | ) |  const |

 | inline |

 
 Efficient sparse self-adjoint matrix times dense vector/matrix product 

    operator\*() [2/2]
------------------

    template<typename MatrixType , unsigned int \_Mode>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Product](classeigen_1_1product)<[SparseSelfAdjointView](classeigen_1_1sparseselfadjointview), OtherDerived> [Eigen::SparseSelfAdjointView](classeigen_1_1sparseselfadjointview)< MatrixType, \_Mode >::operator\*  | ( | const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &  | *rhs* | ) |  const |

 | inline |

 
 
Returns
an expression of the matrix product between a sparse self-adjoint matrix `*this` and a sparse matrix *rhs*.
 Note that there is no algorithmic advantage of performing such a product compared to a general sparse-sparse matrix product. Indeed, the SparseSelfadjointView operand is first copied into a temporary [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.") before computing the product. 

    rankUpdate()
------------

    template<typename MatrixType , unsigned int \_Mode>   template<typename DerivedU >  

|  |  |  |  |
| --- | --- | --- | --- |
| [SparseSelfAdjointView](classeigen_1_1sparseselfadjointview)& [Eigen::SparseSelfAdjointView](classeigen_1_1sparseselfadjointview)< MatrixType, \_Mode >::rankUpdate  | ( | const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< DerivedU > &  | *u*,  |
|  |  | const Scalar &  | *alpha* = `Scalar(1)` |
|  | ) |  |  |

 
 Perform a symmetric rank K update of the selfadjoint matrix `*this`: \( this = this + \alpha ( u u^\* ) \) where *u* is a vector or matrix.

 
Returns
a reference to `*this` 
 To perform \( this = this + \alpha ( u^\* u ) \) you can simply call this function with u.adjoint(). 

    twistedBy()
-----------

    template<typename MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| SparseSymmetricPermutationProduct<\_MatrixTypeNested,Mode> [Eigen::SparseSelfAdjointView](classeigen_1_1sparseselfadjointview)< MatrixType, \_Mode >::twistedBy  | ( | const [PermutationMatrix](classeigen_1_1permutationmatrix)< [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), StorageIndex > &  | *perm* | ) |  const |

 | inline |

 
 
Returns
an expression of P H P^-1 
   

---

The documentation for this class was generated from the following file:* [SparseSelfAdjointView.h](https://eigen.tuxfamily.org/dox/SparseSelfAdjointView_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SparseSelfAdjointView.html>

Eigen::SparseSolverBase
=======================

  
### template<typename Derived> class Eigen::SparseSolverBase< Derived >

 A base class for sparse solvers. 

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | the actual type of the solver.  |

       ![Inheritance graph]                           

|  |
| --- |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

  SparseSolverBase()
------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::SparseSolverBase](classeigen_1_1sparsesolverbase)< Derived >::[SparseSolverBase](classeigen_1_1sparsesolverbase) | ( |  | ) |  |

 | inline |

 
 Default constructor 

    solve() [1/2]
-------------

    template<typename Derived >   template<typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Solve](classeigen_1_1solve)<Derived, Rhs> [Eigen::SparseSolverBase](classeigen_1_1sparsesolverbase)< Derived >::solve  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &  | *b* | ) |  const |

 | inline |

 
 
Returns
an expression of the solution x of \( A x = b \) using the current decomposition of A.
 
See also
compute() 
    solve() [2/2]
-------------

    template<typename Derived >   template<typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Solve](classeigen_1_1solve)<Derived, Rhs> [Eigen::SparseSolverBase](classeigen_1_1sparsesolverbase)< Derived >::solve  | ( | const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &  | *b* | ) |  const |

 | inline |

 
 
Returns
an expression of the solution x of \( A x = b \) using the current decomposition of A.
 
See also
compute() 
   

---

The documentation for this class was generated from the following file:* [SparseSolverBase.h](https://eigen.tuxfamily.org/dox/SparseSolverBase_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SparseSolverBase.html>

Eigen::SparseView
=================

  
### template<typename MatrixType> class Eigen::SparseView< MatrixType >

 Expression of a dense or sparse matrix with zero or too small values removed. 

 
Template Parameters
 

|  |  |
| --- | --- |
| MatrixType | the type of the object of which we are removing the small entries |

   This class represents an expression of a given dense or sparse matrix with entries smaller than `reference` \* `epsilon` are removed. It is the return type of [MatrixBase::sparseView()](group__sparsecore__module#ga320dd291cbf4339c6118c41521b75350) and [SparseMatrixBase::pruned()](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d) and most of the time this is the only way it is used.

 
See also

[MatrixBase::sparseView()](group__sparsecore__module#ga320dd291cbf4339c6118c41521b75350), [SparseMatrixBase::pruned()](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d) 
     ![Inheritance graph]       

|  |
| --- |
|  |
| const internal::remove\_all< MatrixTypeNested >::type &  | [nestedExpression](classeigen_1_1sparseview#a50f53a9405017012077ae907959aca14) () const |
|  |
| - Public Member Functions inherited from [Eigen::SparseMatrixBase< SparseView< MatrixType > >](classeigen_1_1sparsematrixbase) |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1sparsematrixbase#aca7ce296424ef6e478ab0fb19547a7ee) () const |
|  |
| const internal::eval< [SparseView](classeigen_1_1sparseview)< MatrixType > >::type  | [eval](classeigen_1_1sparsematrixbase#a761bd872a06b59632fcff7b7807a77ce) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1sparsematrixbase#a180fcba1ccf3cdf3252a263bc1de7a1d) () const |
|  |
| bool  | [isVector](classeigen_1_1sparsematrixbase#a7eedffa867031f649fd0fb9cc23ce4be) () const |
|  |
| const [Product](classeigen_1_1product)< [SparseView](classeigen_1_1sparseview)< MatrixType >, OtherDerived, AliasFreeProduct >  | [operator\*](classeigen_1_1sparsematrixbase#a9d4d71b3f34389e6fc01f2b86e43f7a4) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &other) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1sparsematrixbase#ac86cc88a4cfef21db6b64ec0ab4c8f0a) () const |
|  |
| const [SparseView](classeigen_1_1sparseview)< [SparseView](classeigen_1_1sparseview)< MatrixType > >  | [pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d) (const Scalar &reference=Scalar(0), const RealScalar &epsilon=[NumTraits](structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1sparsematrixbase#a1944e9fa9ce7937bfc3a87b2cb94371f) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1sparsematrixbase#a124bc57921775eb9aa2dfd9727e23472) () const |
|  |
| SparseSymmetricPermutationProduct< [SparseView](classeigen_1_1sparseview)< MatrixType >, Upper|Lower >  | [twistedBy](classeigen_1_1sparsematrixbase#a51d4898bd6a57cc3ba543a39b102423e) (const [PermutationMatrix](classeigen_1_1permutationmatrix)< Dynamic, Dynamic, [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) > &perm) const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< SparseView< MatrixType > >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| [SparseView](classeigen_1_1sparseview)< MatrixType > &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const [SparseView](classeigen_1_1sparseview)< MatrixType > &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::SparseMatrixBase< SparseView< MatrixType > >](classeigen_1_1sparsematrixbase) |
| typedef internal::traits< [SparseView](classeigen_1_1sparseview)< MatrixType > >::[StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) | [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) |
|  |
| typedef Scalar  | [value\_type](classeigen_1_1sparsematrixbase#ac254d3b61718ebc2136d27bac043dcb7) |
|  |
| - Public Types inherited from [Eigen::EigenBase< SparseView< MatrixType > >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  nestedExpression()
------------------

    template<typename MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const internal::remove\_all<MatrixTypeNested>::type& [Eigen::SparseView](classeigen_1_1sparseview)< MatrixType >::nestedExpression  | ( |  | ) |  const |

 | inline |

 
 
Returns
the nested expression 
   

---

The documentation for this class was generated from the following files:* [SparseUtil.h](https://eigen.tuxfamily.org/dox/SparseUtil_8h_source.html)
* [SparseView.h](https://eigen.tuxfamily.org/dox/SparseView_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SparseView.html>

Eigen::SPQR
===========

  
### template<typename \_MatrixType> class Eigen::SPQR< \_MatrixType >

 [Sparse](structeigen_1_1sparse) QR factorization based on SuiteSparseQR library. 

 This class is used to perform a multithreaded and multifrontal rank-revealing QR decomposition of sparse matrices. The result is then used to solve linear leasts\_square systems. Clearly, a QR factorization is returned such that A\*P = Q\*R where :

 P is the column permutation. Use [colsPermutation()](classeigen_1_1spqr#ab1b7f54ba1cd8d77506ae676fea4fec0 "Get the permutation that was applied to columns of A.") to get it.

 Q is the orthogonal matrix represented as Householder reflectors. Use [matrixQ()](classeigen_1_1spqr#a93dbf1b487e28948e1ca2a33a35b6a54 "Get an expression of the matrix Q.") to get an expression and [matrixQ()](classeigen_1_1spqr#a93dbf1b487e28948e1ca2a33a35b6a54 "Get an expression of the matrix Q.").transpose() to get the transpose. You can then apply it to a vector.

 R is the sparse triangular factor. Use matrixQR() to get it as [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation."). NOTE : The Index type of R is always SuiteSparse\_long. You can get it with SPQR::Index

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | The type of the sparse matrix A, must be a column-major SparseMatrix<> |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) . 

     ![Inheritance graph]      

|  |
| --- |
|  |
| cholmod\_common \*  | [cholmodCommon](classeigen_1_1spqr#a8c7d48d51a1fb08a3e27b8499e5c7f49) () const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [cols](classeigen_1_1spqr#aa006d40963b05c7525b5ca0b02364d84) () const |
|  |
|  [PermutationType](classeigen_1_1map) | [colsPermutation](classeigen_1_1spqr#ab1b7f54ba1cd8d77506ae676fea4fec0) () const |
|  | Get the permutation that was applied to columns of A.  |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1spqr#a3ab7bacba8d2be20adc10b4d5b6c071f) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1spqr#a3ab7bacba8d2be20adc10b4d5b6c071f) |
|  |
|  SPQRMatrixQReturnType< [SPQR](classeigen_1_1spqr) >  | [matrixQ](classeigen_1_1spqr#a93dbf1b487e28948e1ca2a33a35b6a54) () const |
|  | Get an expression of the matrix Q.  |
|  |
| const [MatrixType](classeigen_1_1sparsematrix) | [matrixR](classeigen_1_1spqr#ad51661be35674dd6a65e27699dbb3fb9) () const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [rank](classeigen_1_1spqr#a539b394ddb4894089e6634c744ea2ddc) () const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [rows](classeigen_1_1spqr#a775e28a44fd466638114edbcd17ea50a) () const |
|  |
|  void  | [setPivotThreshold](classeigen_1_1spqr#ab7b42b75f621b0d4b5b0e090e23e2ce6) (const RealScalar &tol) |
|  | Set the tolerance tol to treat columns with 2-norm < =tol as zero.  |
|  |
|  void  | [setSPQROrdering](classeigen_1_1spqr#afa0db7888d808b453c23f62d62a4ad22) (int ord) |
|  | Set the fill-reducing ordering method to be used.  |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< SPQR< \_MatrixType > >](classeigen_1_1sparsesolverbase) |
| const [Solve](classeigen_1_1solve)< [SPQR](classeigen_1_1spqr)< \_MatrixType >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| const [Solve](classeigen_1_1solve)< [SPQR](classeigen_1_1spqr)< \_MatrixType >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

  cholmodCommon()
---------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| cholmod\_common\* [Eigen::SPQR](classeigen_1_1spqr)< \_MatrixType >::cholmodCommon  | ( |  | ) |  const |

 | inline |

 
 
Returns
a pointer to the [SPQR](classeigen_1_1spqr "Sparse QR factorization based on SuiteSparseQR library.") workspace 
    cols()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::SPQR](classeigen_1_1spqr)< \_MatrixType >::cols  | ( | void  |  | ) |  const |

 | inline |

 
 Get the number of columns of the input matrix. 

    info()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::SPQR](classeigen_1_1spqr)< \_MatrixType >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether previous computation was successful. 

 
Returns

`Success` if computation was successful, `NumericalIssue` if the sparse QR can not be computed 
    matrixR()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [MatrixType](classeigen_1_1sparsematrix) [Eigen::SPQR](classeigen_1_1spqr)< \_MatrixType >::matrixR  | ( |  | ) |  const |

 | inline |

 
 
Returns
the sparse triangular factor R. It is a sparse matrix 
    rank()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::SPQR](classeigen_1_1spqr)< \_MatrixType >::rank  | ( |  | ) |  const |

 | inline |

 
 Gets the rank of the matrix. It should be equal to matrixQR().cols if the matrix is full-rank 

    rows()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::SPQR](classeigen_1_1spqr)< \_MatrixType >::rows  | ( | void  |  | ) |  const |

 | inline |

 
 Get the number of rows of the input matrix and the Q matrix 

   

---

The documentation for this class was generated from the following file:* [SuiteSparseQRSupport.h](https://eigen.tuxfamily.org/dox/SuiteSparseQRSupport_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SPQR.html>

Eigen::SuperILU
===============

  
### template<typename \_MatrixType> class Eigen::SuperILU< \_MatrixType >

 A sparse direct **incomplete** LU factorization and solver based on the [SuperLU](classeigen_1_1superlu "A sparse direct LU factorization and solver based on the SuperLU library.") library. 

 This class allows to solve for an approximate solution of A.X = B sparse linear problems via an incomplete LU factorization using the [SuperLU](classeigen_1_1superlu "A sparse direct LU factorization and solver based on the SuperLU library.") library. This class is aimed to be used as a preconditioner of the iterative linear solvers.

 
Warning
This class is only for the 4.x versions of [SuperLU](classeigen_1_1superlu "A sparse direct LU factorization and solver based on the SuperLU library."). The 3.x and 5.x versions are not supported.
 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<> |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 
See also

[Sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept), class [IncompleteLUT](classeigen_1_1incompletelut "Incomplete LU factorization with dual-threshold strategy."), class [ConjugateGradient](classeigen_1_1conjugategradient "A conjugate gradient solver for sparse (or dense) self-adjoint problems."), class [BiCGSTAB](classeigen_1_1bicgstab "A bi conjugate gradient stabilized solver for sparse square problems.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
| void  | [analyzePattern](classeigen_1_1superilu#a52aa43effc247084c91a5e73720a50f6) (const MatrixType &matrix) |
|  |
| void  | [factorize](classeigen_1_1superilu#a5669976899907fbe6bf1be620707e5f3) (const MatrixType &matrix) |
|  |
| - Public Member Functions inherited from [Eigen::SuperLUBase< \_MatrixType, SuperILU< \_MatrixType > >](classeigen_1_1superlubase) |
| void  | [analyzePattern](classeigen_1_1superlubase#a2d3f48425328d9b3cbdca369889007f3) (const MatrixType &) |
|  |
| void  | [compute](classeigen_1_1superlubase#a28cb3ef7914ecb6fdae1935b53f6be40) (const MatrixType &matrix) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1superlubase#aa67da5c8c24110931c949c5896c5ec03) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1superlubase#aa67da5c8c24110931c949c5896c5ec03) |
|  |
| superlu\_options\_t &  | [options](classeigen_1_1superlubase#a42d9d79073379f1e75b0f2c49879ed5b) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< Derived >](classeigen_1_1sparsesolverbase) |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

  analyzePattern()
----------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SuperILU](classeigen_1_1superilu)< \_MatrixType >::analyzePattern  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Performs a symbolic decomposition on the sparcity of *matrix*.

 This function is particularly useful when solving for several problems having the same structure.

 
See also

[factorize()](classeigen_1_1superilu#a5669976899907fbe6bf1be620707e5f3) 
    factorize()
-----------

    template<typename MatrixType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SuperILU](classeigen_1_1superilu)< MatrixType >::factorize  | ( | const MatrixType &  | *matrix* | ) |  |

 
 Performs a numeric decomposition of *matrix* 

 The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed.

 
See also

[analyzePattern()](classeigen_1_1superilu#a52aa43effc247084c91a5e73720a50f6) 
   

---

The documentation for this class was generated from the following file:* [SuperLUSupport.h](https://eigen.tuxfamily.org/dox/SuperLUSupport_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SuperILU.html>

Eigen::Transpose
================

  
### template<typename MatrixType> class Eigen::Transpose< MatrixType >

 Expression of the transpose of a matrix. 

 
Template Parameters
 

|  |  |
| --- | --- |
| MatrixType | the type of the object of which we are taking the transpose |

   This class represents an expression of the transpose of a matrix. It is the return type of [MatrixBase::transpose()](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c) and [MatrixBase::adjoint()](classeigen_1_1matrixbase#afacca1f88da57e5cd87dd07c8ff926bb) and most of the time this is the only way it is used.

 
See also

[MatrixBase::transpose()](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c), [MatrixBase::adjoint()](classeigen_1_1matrixbase#afacca1f88da57e5cd87dd07c8ff926bb) 
  Inherits Eigen::TransposeImpl< MatrixType, internal::traits< MatrixType >::StorageKind >.

 

|  |
| --- |
|  |
| internal::remove\_reference< MatrixTypeNested >::type &  | [nestedExpression](classeigen_1_1transpose#abf80ae3ec4c4fdee79ba5ef8fd0298d3) () |
|  |
| const internal::remove\_all< MatrixTypeNested >::type &  | [nestedExpression](classeigen_1_1transpose#a2c3b67044dd52dc3233494234899189f) () const |
|  |

  nestedExpression() [1/2]
------------------------

    template<typename MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| internal::remove\_reference<MatrixTypeNested>::type& [Eigen::Transpose](classeigen_1_1transpose)< MatrixType >::nestedExpression  | ( |  | ) |  |

 | inline |

 
 
Returns
the nested expression 
    nestedExpression() [2/2]
------------------------

    template<typename MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const internal::remove\_all<MatrixTypeNested>::type& [Eigen::Transpose](classeigen_1_1transpose)< MatrixType >::nestedExpression  | ( |  | ) |  const |

 | inline |

 
 
Returns
the nested expression 
   

---

The documentation for this class was generated from the following file:* [Transpose.h](https://eigen.tuxfamily.org/dox/Transpose_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Transpose.html>

Eigen::TranspositionsStorage
============================

  
The type used to identify a permutation storage. 

 


---

The documentation for this struct was generated from the following file:* [Constants.h](https://eigen.tuxfamily.org/dox/Constants_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/structEigen_1_1TranspositionsStorage.html>

Eigen::MatrixWrapper
====================

  
### template<typename ExpressionType> class Eigen::MatrixWrapper< ExpressionType >

 Expression of an array as a mathematical vector or matrix. 

 This class is the return type of [ArrayBase::matrix()](classeigen_1_1arraybase#af01e9ea8087e390af8af453bbe4c276c), and most of the time this is the only way it is use.

 
See also
MatrixBase::matrix(), class [ArrayWrapper](classeigen_1_1arraywrapper "Expression of a mathematical vector or matrix as an array object.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
| void  | [resize](classeigen_1_1matrixwrapper#a780b21d85415ae4849a914f522d531c4) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) newSize) |
|  |
| void  | [resize](classeigen_1_1matrixwrapper#a9579312bf37b956c95a56a47f1a0f5a0) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| - Public Member Functions inherited from [Eigen::MatrixBase< MatrixWrapper< ExpressionType > >](classeigen_1_1matrixbase) |
| const MatrixFunctionReturnValue< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [acosh](classeigen_1_1matrixbase#a765140ddee0c6b39bbfa3b8917de67be) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise inverse hyperbolic cosine use ArrayBase::acosh . [More...](classeigen_1_1matrixbase#a765140ddee0c6b39bbfa3b8917de67be) |
|  |
| const AdjointReturnType  | [adjoint](classeigen_1_1matrixbase#afacca1f88da57e5cd87dd07c8ff926bb) () const |
|  |
| void  | [adjointInPlace](classeigen_1_1matrixbase#a51c5982c1f64e45a939515b701fa6f4a) () |
|  |
| void  | [applyHouseholderOnTheLeft](classeigen_1_1matrixbase#a8f2c8059ef3f04cfa0c73b4c012db855) (const EssentialPart &essential, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &tau, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*workspace) |
|  |
| void  | [applyHouseholderOnTheRight](classeigen_1_1matrixbase#ab3e52262b41fa40e194dda245e0f9675) (const EssentialPart &essential, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &tau, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) \*workspace) |
|  |
| void  | [applyOnTheLeft](classeigen_1_1matrixbase#a3a08ad41e81d8ad4a37b5d5c7490e765) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| void  | [applyOnTheLeft](classeigen_1_1matrixbase#ae669131f6e18f7e8f06fae271754f435) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) p, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) q, const [JacobiRotation](classeigen_1_1jacobirotation)< OtherScalar > &j) |
|  |
| void  | [applyOnTheRight](classeigen_1_1matrixbase#a45d91752925d2757fc8058a293b15462) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| void  | [applyOnTheRight](group__jacobi__module#gaa07f741c86219601664433777827bf1c) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) p, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) q, const [JacobiRotation](classeigen_1_1jacobirotation)< OtherScalar > &j) |
|  |
| [ArrayWrapper](classeigen_1_1arraywrapper)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [array](classeigen_1_1matrixbase#a354c33eec32ceb4193d002f4d41c0497) () |
|  |
| const [ArrayWrapper](classeigen_1_1arraywrapper)< const [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [array](classeigen_1_1matrixbase#a72f287fe7b2a7e7a66d16cc88166d47f) () const |
|  |
| const [DiagonalWrapper](classeigen_1_1diagonalwrapper)< const [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [asDiagonal](classeigen_1_1matrixbase#a14235b62c90f93fe910070b4743782d0) () const |
|  |
| const MatrixFunctionReturnValue< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [asinh](classeigen_1_1matrixbase#a8efaf691d9c74b362a43b1b793706ea1) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise inverse hyperbolic sine use ArrayBase::asinh . [More...](classeigen_1_1matrixbase#a8efaf691d9c74b362a43b1b793706ea1) |
|  |
| const MatrixFunctionReturnValue< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [atanh](classeigen_1_1matrixbase#ab87d29c00e6d75aeab43eff53bf5164c) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise inverse hyperbolic cosine use ArrayBase::atanh . [More...](classeigen_1_1matrixbase#ab87d29c00e6d75aeab43eff53bf5164c) |
|  |
| [BDCSVD](classeigen_1_1bdcsvd)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [bdcSvd](classeigen_1_1matrixbase#ae171b74b5d530846ee0836135ffcf837) (unsigned int computationOptions=0) const |
|  |
| RealScalar  | [blueNorm](classeigen_1_1matrixbase#a3f3faa00163c16824ff03e58a210c74c) () const |
|  |
| const [ColPivHouseholderQR](classeigen_1_1colpivhouseholderqr)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [colPivHouseholderQr](classeigen_1_1matrixbase#adee8c19c833245bbb00a591dce68e8a4) () const |
|  |
| const [CompleteOrthogonalDecomposition](classeigen_1_1completeorthogonaldecomposition)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [completeOrthogonalDecomposition](classeigen_1_1matrixbase#ae90b6846f05bd30b8d52b66e427e3e09) () const |
|  |
| void  | [computeInverseAndDetWithCheck](classeigen_1_1matrixbase#a7baaf2fdec0191a2166cf9fd84a2dcb2) (ResultType &[inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf), typename ResultType::Scalar &[determinant](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061), bool &invertible, const RealScalar &absDeterminantThreshold=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| void  | [computeInverseWithCheck](classeigen_1_1matrixbase#a116f3b50d2af7dbdf7473e517a5b8b0f) (ResultType &[inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf), bool &invertible, const RealScalar &absDeterminantThreshold=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| const MatrixFunctionReturnValue< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [cos](classeigen_1_1matrixbase#a34d626eb756bbeb4069d1eb0e6494c65) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise cosine use ArrayBase::cos . [More...](classeigen_1_1matrixbase#a34d626eb756bbeb4069d1eb0e6494c65) |
|  |
| const MatrixFunctionReturnValue< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [cosh](classeigen_1_1matrixbase#a627e6f11bf5854ade9a5abfc344c0367) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise hyperbolic cosine use ArrayBase::cosh . [More...](classeigen_1_1matrixbase#a627e6f11bf5854ade9a5abfc344c0367) |
|  |
| [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [cross](group__geometry__module#ga0024b44eca99cb7135887c2aaf319d28) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [cross3](group__geometry__module#gabde56e2a0baba550815a0b05139e4d42) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [determinant](classeigen_1_1matrixbase#a7ad8f77004bb956b603bb43fd2e3c061) () const |
|  |
| [DiagonalReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3) () |
|  |
| [ConstDiagonalReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1matrixbase#aebdeedcf67e46d969c556c6c7d9780ee) () const |
|  |
| [DiagonalDynamicIndexReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1matrixbase#a8a13d4b8efbd7797ee8efd3dd988a7f7) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) index) |
|  |
| [ConstDiagonalDynamicIndexReturnType](classeigen_1_1diagonal) | [diagonal](classeigen_1_1matrixbase#aed11a711c0a3d5dbf8bc094008e29846) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) index) const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [diagonalSize](classeigen_1_1matrixbase#ab79e511b9322b8b801858e253fb257eb) () const |
|  |
| [ScalarBinaryOpTraits](structeigen_1_1scalarbinaryoptraits)< typename internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), typename internal::traits< OtherDerived >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::ReturnType  | [dot](classeigen_1_1matrixbase#adfd32bf5fcf6ee603c924dde9bf7bc39) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| EigenvaluesReturnType  | [eigenvalues](classeigen_1_1matrixbase#a30430fa3d5b4e74d312fd4f502ac984d) () const |
|  | Computes the eigenvalues of a matrix. [More...](classeigen_1_1matrixbase#a30430fa3d5b4e74d312fd4f502ac984d) |
|  |
| [Matrix](classeigen_1_1matrix)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), 3, 1 >  | [eulerAngles](group__geometry__module#ga17994d2e81b723295f5bc3b1f862ed3b) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) a0, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) a1, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) a2) const |
|  |
| const MatrixExponentialReturnValue< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [exp](classeigen_1_1matrixbase#a70901e189e876f64d7f3fee1dbe942cc) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise exponential use ArrayBase::exp . [More...](classeigen_1_1matrixbase#a70901e189e876f64d7f3fee1dbe942cc) |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [forceAlignedAccess](classeigen_1_1matrixbase#afdaf810ac1708ca6d6ecdcfac1e06699) () |
|  |
| const [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [forceAlignedAccess](classeigen_1_1matrixbase#ad2fdb842d9a715f8778d0b33c29cfe49) () const |
|  |
| internal::conditional< Enable, [ForceAlignedAccess](classeigen_1_1forcealignedaccess)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >, [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > & >::type  | [forceAlignedAccessIf](classeigen_1_1matrixbase#ae35213d1dd4dd13ebe9a7a762d6bb847) () |
|  |
| internal::add\_const\_on\_value\_type< typename internal::conditional< Enable, [ForceAlignedAccess](classeigen_1_1forcealignedaccess)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >, [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > & >::type >::type  | [forceAlignedAccessIf](classeigen_1_1matrixbase#af42d92f115d4b8fa3d5aa731ed496ed1) () const |
|  |
| const [FullPivHouseholderQR](classeigen_1_1fullpivhouseholderqr)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [fullPivHouseholderQr](classeigen_1_1matrixbase#a863bc0e06b641a089508eabec6835ab2) () const |
|  |
| const [FullPivLU](classeigen_1_1fullpivlu)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [fullPivLu](classeigen_1_1matrixbase#a25da97d31acab0ee5d9d13bdbb0569da) () const |
|  |
| const HNormalizedReturnType  | [hnormalized](group__geometry__module#gadc0e3dd3510cb5a6e70aca9aab1cbf19) () const |
|  | homogeneous normalization [More...](group__geometry__module#gadc0e3dd3510cb5a6e70aca9aab1cbf19) |
|  |
| [HomogeneousReturnType](classeigen_1_1homogeneous) | [homogeneous](group__geometry__module#gaf3229c2d3669e983075ab91f7f480cb1) () const |
|  |
| const [HouseholderQR](classeigen_1_1householderqr)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [householderQr](classeigen_1_1matrixbase#a9a9377aab1cea26db5f25bab7e682f8f) () const |
|  |
| RealScalar  | [hypotNorm](classeigen_1_1matrixbase#a32222d3b6677e6cdf0b801463f329b72) () const |
|  |
| const [Inverse](classeigen_1_1inverse)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [inverse](classeigen_1_1matrixbase#a7712eb69e8ea3c8f7b8da1c44dbdeebf) () const |
|  |
| bool  | [isDiagonal](classeigen_1_1matrixbase#a97027ea54c8cd1ddb1c578fee5cedc67) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isIdentity](classeigen_1_1matrixbase#a4ccbd8dfa06e9d47b9bf84711f8b9d40) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isLowerTriangular](classeigen_1_1matrixbase#a1e96c42d79a56f0a6ade30ce031e17eb) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isOrthogonal](classeigen_1_1matrixbase#aefdc8e4e4c156fdd79a21479e75dcd8a) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isUnitary](classeigen_1_1matrixbase#a8a7ee34ce202cac3eeea9cf20c9e4833) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isUpperTriangular](classeigen_1_1matrixbase#aae3ec1660bb4ac584220481c54ab4a64) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| [JacobiSVD](classeigen_1_1jacobisvd)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [jacobiSvd](classeigen_1_1matrixbase#a5745dca9c54390633b434e54a1d1eedd) (unsigned int computationOptions=0) const |
|  |
| const [Product](classeigen_1_1product)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType >, OtherDerived, LazyProduct >  | [lazyProduct](classeigen_1_1matrixbase#ae0c280b1066c14ed577021f38876527f) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| const [LDLT](classeigen_1_1ldlt)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [ldlt](classeigen_1_1matrixbase#a0ecf058a0727a4cab8b42d79e95072e1) () const |
|  |
| const [LLT](classeigen_1_1llt)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [llt](classeigen_1_1matrixbase#a90c45f7a30265df792d5aeaddead2635) () const |
|  |
| const MatrixLogarithmReturnValue< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [log](classeigen_1_1matrixbase#a4dc57b319fc1cf8c9035016e56602a7d) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise logarithm use ArrayBase::log . [More...](classeigen_1_1matrixbase#a4dc57b319fc1cf8c9035016e56602a7d) |
|  |
| RealScalar  | [lpNorm](classeigen_1_1matrixbase#a72586ab059e889e7d2894ff227747e35) () const |
|  |
| const [PartialPivLU](classeigen_1_1partialpivlu)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [lu](classeigen_1_1matrixbase#afb312afbfe960cbda67811552d876fae) () const |
|  |
| void  | [makeHouseholder](classeigen_1_1matrixbase#a13291e900f7e81ddc6e5b8802f82092b) (EssentialPart &essential, [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &tau, RealScalar &beta) const |
|  |
| void  | [makeHouseholderInPlace](classeigen_1_1matrixbase#aebf4bac7dffe2685ab93734fb776e817) ([Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &tau, RealScalar &beta) |
|  |
|  const MatrixFunctionReturnValue< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [matrixFunction](classeigen_1_1matrixbase#a1a6cc9f734eb175e785a1118305245fc) (StemFunction f) const |
|  | Helper function for the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module).  |
|  |
| [NoAlias](classeigen_1_1noalias)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType >, [Eigen::MatrixBase](classeigen_1_1matrixbase) >  | [noalias](classeigen_1_1matrixbase#a2c1085de7645f23f240876388457da0b) () |
|  |
| RealScalar  | [norm](classeigen_1_1matrixbase#a196c4ec3c8ffdf5bda45d0f617154975) () const |
|  |
| void  | [normalize](classeigen_1_1matrixbase#ad16303c47ba36f7a41ea264cb26bceb6) () |
|  |
| const [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [normalized](classeigen_1_1matrixbase#a5cf2fd4c57e59604fd4116158fd34308) () const |
|  |
| bool  | [operator!=](classeigen_1_1matrixbase#a028c7ac8094d610042fd0f9feca68f63) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| const [Product](classeigen_1_1product)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType >, DiagonalDerived, LazyProduct >  | [operator\*](classeigen_1_1matrixbase#a36fb95c37f0a454e0e2e5cb120b2df7f) (const DiagonalBase< DiagonalDerived > &[diagonal](classeigen_1_1matrixbase#ab5768147536273eb2dbdfa389cfd26a3)) const |
|  |
| const [Product](classeigen_1_1product)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType >, OtherDerived >  | [operator\*](classeigen_1_1matrixbase#ae2d220efbf7047f0894787888288cfcc) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [operator\*=](classeigen_1_1matrixbase#a3783b6168995ca117a1c19fea3630ac4) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [operator+=](classeigen_1_1matrixbase#a983cc3be0bbe11b3d041a415b76ce010) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [operator-=](classeigen_1_1matrixbase#a1042124b0ddee66e78ac7b0a9ac4cc9c) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [operator=](classeigen_1_1matrixbase#a373bf62ad398162df5a71963ed7cbeff) (const [MatrixBase](classeigen_1_1matrixbase) &other) |
|  |
| bool  | [operator==](classeigen_1_1matrixbase#a80e3e1e83fdf43f9f7fb6ff51836b24d) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| RealScalar  | [operatorNorm](classeigen_1_1matrixbase#a0ff9bc0b9bea2d0822a2bf3192783102) () const |
|  | Computes the L2 operator norm. [More...](classeigen_1_1matrixbase#a0ff9bc0b9bea2d0822a2bf3192783102) |
|  |
| const [PartialPivLU](classeigen_1_1partialpivlu)< [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [partialPivLu](classeigen_1_1matrixbase#a6199d8aaf26c1b8ac3097fdfa7733a1e) () const |
|  |
| const MatrixPowerReturnValue< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [pow](classeigen_1_1matrixbase#a7ae6c25e6a94a60e147741e76203a73b) (const RealScalar &p) const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise power to `p` use ArrayBase::pow . [More...](classeigen_1_1matrixbase#a7ae6c25e6a94a60e147741e76203a73b) |
|  |
| const MatrixComplexPowerReturnValue< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [pow](classeigen_1_1matrixbase#a91dcacf224bd8b18346914bdf7eefc31) (const std::complex< RealScalar > &p) const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise power to `p` use ArrayBase::pow . [More...](classeigen_1_1matrixbase#a91dcacf224bd8b18346914bdf7eefc31) |
|  |
| [MatrixBase](classeigen_1_1matrixbase)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::template SelfAdjointViewReturnType< UpLo >::Type  | [selfadjointView](classeigen_1_1matrixbase#ad446541377593656c1399862fe6a0f94) () |
|  |
| [MatrixBase](classeigen_1_1matrixbase)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::template ConstSelfAdjointViewReturnType< UpLo >::Type  | [selfadjointView](classeigen_1_1matrixbase#a67eb836f331d9b567e7f36ec0782fa07) () const |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [setIdentity](classeigen_1_1matrixbase#a18e969adfdf2db4ac44c47fbdc854683) () |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [setIdentity](classeigen_1_1matrixbase#a97dec020729928e328fe8ae9aad1e99e) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  | Resizes to the given size, and writes the identity expression (not necessarily square) into \*this. [More...](classeigen_1_1matrixbase#a97dec020729928e328fe8ae9aad1e99e) |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [setUnit](classeigen_1_1matrixbase#ac7cf3e0e69550d36de8778b09a645afd) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) i) |
|  | Set the coefficients of `*this` to the i-th unit (basis) vector. [More...](classeigen_1_1matrixbase#ac7cf3e0e69550d36de8778b09a645afd) |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [setUnit](classeigen_1_1matrixbase#a90bed3b6468a17a9054b07cde7a751a6) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) newSize, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) i) |
|  | Resizes to the given *newSize*, and writes the i-th unit (basis) vector into \*this. [More...](classeigen_1_1matrixbase#a90bed3b6468a17a9054b07cde7a751a6) |
|  |
| const MatrixFunctionReturnValue< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [sin](classeigen_1_1matrixbase#a02f4ff0fcbbae2f3ccaa5981e8ad5e34) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise sine use ArrayBase::sin . [More...](classeigen_1_1matrixbase#a02f4ff0fcbbae2f3ccaa5981e8ad5e34) |
|  |
| const MatrixFunctionReturnValue< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [sinh](classeigen_1_1matrixbase#a9c37eab2dc7baf83809269254c9129e0) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise hyperbolic sine use ArrayBase::sinh . [More...](classeigen_1_1matrixbase#a9c37eab2dc7baf83809269254c9129e0) |
|  |
| const [SparseView](classeigen_1_1sparseview)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [sparseView](group__sparsecore__module#ga320dd291cbf4339c6118c41521b75350) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &m\_reference=[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2)(0), const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real &m\_epsilon=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| const MatrixSquareRootReturnValue< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [sqrt](classeigen_1_1matrixbase#ad873dca860bd47baeeede8663e161b83) () const |
|  | This function requires the [unsupported MatrixFunctions module](unsupported/group__matrixfunctions__module). To compute the coefficient-wise square root use ArrayBase::sqrt . [More...](classeigen_1_1matrixbase#ad873dca860bd47baeeede8663e161b83) |
|  |
| RealScalar  | [squaredNorm](classeigen_1_1matrixbase#ac8da566526419f9742a6c471bbd87e0a) () const |
|  |
| RealScalar  | [stableNorm](classeigen_1_1matrixbase#ab84d3e64f855813b1eea4202c0697dc1) () const |
|  |
| void  | [stableNormalize](classeigen_1_1matrixbase#a0b1443fa322615379557ade3399a3c3c) () |
|  |
| const [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [stableNormalized](classeigen_1_1matrixbase#a399dca938633b9f8df5ec4beefeccec0) () const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [trace](classeigen_1_1matrixbase#a544b609f65eb2bd3e368b3fc2d79479e) () const |
|  |
| [MatrixBase](classeigen_1_1matrixbase)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::template TriangularViewReturnType< Mode >::Type  | [triangularView](classeigen_1_1matrixbase#a56665aa894f49f2765291fee0eaeb9c6) () |
|  |
| [MatrixBase](classeigen_1_1matrixbase)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::template ConstTriangularViewReturnType< Mode >::Type  | [triangularView](classeigen_1_1matrixbase#aa044521145e74117ad1df42460d7b520) () const |
|  |
| [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) | [unitOrthogonal](group__geometry__module#gaa0dc2c32a9379eeb2b4c4a05c1a6fe52) (void) const |
|  |
| - Public Member Functions inherited from [Eigen::DenseBase< MatrixWrapper< ExpressionType > >](classeigen_1_1densebase) |
| bool  | [all](classeigen_1_1densebase#ae42ab60296c120e9f45ce3b44e1761a4) () const |
|  |
| bool  | [allFinite](classeigen_1_1densebase#af1e669fd3aaae50a4870dc1b8f3b8884) () const |
|  |
| bool  | [any](classeigen_1_1densebase#abfbf4cb72dd577e62fbe035b1c53e695) () const |
|  |
| [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) | [begin](classeigen_1_1densebase#a57591454af931f9dffa71c9da28d5641) () |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [begin](classeigen_1_1densebase#ad9368ce70b06167ec5fc19398d329f5e) () const |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [cbegin](classeigen_1_1densebase#ae9a3dfd9b826ba3103de0128576fb15b) () const |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [cend](classeigen_1_1densebase#aeb3b76f02986c2af2521d07164b5ffde) () const |
|  |
| [ColwiseReturnType](classeigen_1_1vectorwiseop) | [colwise](classeigen_1_1densebase#a1c0e1b6067ec1de6cb8799da55aa7d30) () |
|  |
| [ConstColwiseReturnType](classeigen_1_1vectorwiseop) | [colwise](classeigen_1_1densebase#a58837c81de446efbdb58da07b73a63c1) () const |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [count](classeigen_1_1densebase#a229be090c665b9bf7d1fcdfd1ab6e0c1) () const |
|  |
| [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) | [end](classeigen_1_1densebase#ae71d079e16d91360d10066b316b48485) () |
|  |
| [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) | [end](classeigen_1_1densebase#ab34773522e43bfb02e9cf652d7b5dd60) () const |
|  |
| EvalReturnType  | [eval](classeigen_1_1densebase#aa73e57a2f0f7cfcb4ad4d55ea0b6414b) () const |
|  |
| void  | [fill](classeigen_1_1densebase#a9be169c308801411aa24be93d30930bf) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| EIGEN\_DEPRECATED const [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [flagged](classeigen_1_1densebase#a9b3f75f76ae40439be870258e80c7346) () const |
|  |
| const [WithFormat](classeigen_1_1withformat)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [format](classeigen_1_1densebase#ab231f1a6057f28d4244145e12c9fc0c7) (const [IOFormat](structeigen_1_1ioformat) &fmt) const |
|  |
| bool  | [hasNaN](classeigen_1_1densebase#ab13d158c900560d3e1b25d85d2d33dd6) () const |
|  |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [innerSize](classeigen_1_1densebase#a58ca41d9635a8ab3c5a268ef3f7f0d75) () const |
|  |
| bool  | [isApprox](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isApproxToConstant](classeigen_1_1densebase#af9b150d48bc5e4366887ccb466e40c6b) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isConstant](classeigen_1_1densebase#a1ca84e4179b3e5081ed11d89bbd9e74f) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isMuchSmallerThan](classeigen_1_1densebase#a3c4db0c6dd974fa88bbb58b2cf3d5664) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other, const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isMuchSmallerThan](classeigen_1_1densebase#adfca6ff4e473f68fbbeabbd03b7504a9) (const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::Real &other, const RealScalar &prec) const |
|  |
| bool  | [isOnes](classeigen_1_1densebase#aa56d6b4477cd3c92a9cf42f4b96e47c2) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| bool  | [isZero](classeigen_1_1densebase#af36014ec300f53a65083057ed4e89822) (const RealScalar &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) >::dummy\_precision()) const |
|  |
| EIGEN\_DEPRECATED [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [lazyAssign](classeigen_1_1densebase#a6bc6c096e3bfc726f28315daecd21b3f) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#a7e6987d106f1cca3ac6ab36d288cc8e1) () const |
|  |
| internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#aced8ffda52ff061b6586ace2657ebf30) (IndexType \*index) const |
|  |
| internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [maxCoeff](classeigen_1_1densebase#a3780b7a9cd184d0b4f3ea797eba9e2b3) (IndexType \*row, IndexType \*col) const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [mean](classeigen_1_1densebase#a21ac6c0419a72ad7a88ea0bc189017d7) () const |
|  |
| internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#a0739f9c868c331031c7810e21838dcb2) () const |
|  |
| internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#ac9265f4f91430b9cc75d63fb6865bb29) (IndexType \*index) const |
|  |
| internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [minCoeff](classeigen_1_1densebase#aa28152ba4a42b2d112e5fec5469ec4c1) (IndexType \*row, IndexType \*col) const |
|  |
| const [NestByValue](classeigen_1_1nestbyvalue)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [nestByValue](classeigen_1_1densebase#a3e2761e2b6da74dba1d17b40cc918bf7) () const |
|  |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [nonZeros](classeigen_1_1densebase#acb8d5574eff335381e7441ade87700a0) () const |
|  |
| [CommaInitializer](structeigen_1_1commainitializer)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [operator<<](classeigen_1_1densebase#a0f0e34696162b34762b2bf4bd948f90c) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| [CommaInitializer](structeigen_1_1commainitializer)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >  | [operator<<](classeigen_1_1densebase#a0e575eb0ba6cc6bc5f347872abd8509d) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &s) |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [operator=](classeigen_1_1densebase#a5281dadff89f46eef719b38e5d073a8f) (const [DenseBase](classeigen_1_1densebase) &other) |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [operator=](classeigen_1_1densebase#ab66155169d20c035e80d521a8b918e97) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [operator=](classeigen_1_1densebase#a58915510693d64164e567bd762e1032f) (const [EigenBase](structeigen_1_1eigenbase)< OtherDerived > &other) |
|  | Copies the generic expression *other* into \*this. [More...](classeigen_1_1densebase#a58915510693d64164e567bd762e1032f) |
|  |
| EIGEN\_CONSTEXPR [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [outerSize](classeigen_1_1densebase#a03f71699bc26ca2ee4e42ec4538862d7) () const |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [prod](classeigen_1_1densebase#af119d9a4efe5a15cd83c1ccdf01b3a4f) () const |
|  |
| internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [redux](classeigen_1_1densebase#a63ce1e4fab36bff43bbadcdd06a67724) (const Func &func) const |
|  |
| const [Replicate](classeigen_1_1replicate)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType >, RowFactor, ColFactor >  | [replicate](classeigen_1_1densebase#a60dadfe80b813d808e91e4521c722a8e) () const |
|  |
| const [Replicate](classeigen_1_1replicate)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType >, Dynamic, Dynamic >  | [replicate](classeigen_1_1densebase#afae2d5e36f1158d1b1681dac3cdbd58e) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rowFactor, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) colFactor) const |
|  |
| void  | [resize](classeigen_1_1densebase#a2ec5bac4e1ab95808808ef50ccf4cb39) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) newSize) |
|  |
| void  | [resize](classeigen_1_1densebase#a25e2b4887b47b1f2346857d1931efa0f) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| [ReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1densebase#a38ea394036d8b096abf322469c80198f) () |
|  |
| [ConstReverseReturnType](classeigen_1_1reverse) | [reverse](classeigen_1_1densebase#a9e2f3ac4019184abf95ca0e1a8d82866) () const |
|  |
| void  | [reverseInPlace](classeigen_1_1densebase#adb8045155ea45f7961fc2a5170e1d921) () |
|  |
| [RowwiseReturnType](classeigen_1_1vectorwiseop) | [rowwise](classeigen_1_1densebase#a6daa3a3156ca0e0722bf78638e1c7f28) () |
|  |
| [ConstRowwiseReturnType](classeigen_1_1vectorwiseop) | [rowwise](classeigen_1_1densebase#aa1cabd3404528fe8cec4bab43d74bffc) () const |
|  |
| const [Select](classeigen_1_1select)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType >, ThenDerived, ElseDerived >  | [select](classeigen_1_1densebase#a65e78cfcbc9852e6923bebff4323ddca) (const [DenseBase](classeigen_1_1densebase)< ThenDerived > &thenMatrix, const [DenseBase](classeigen_1_1densebase)< ElseDerived > &elseMatrix) const |
|  |
| const [Select](classeigen_1_1select)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType >, ThenDerived, typename ThenDerived::ConstantReturnType >  | [select](classeigen_1_1densebase#a57ef09a843004095f84c198dd145641b) (const [DenseBase](classeigen_1_1densebase)< ThenDerived > &thenMatrix, const typename ThenDerived::Scalar &elseScalar) const |
|  |
| const [Select](classeigen_1_1select)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType >, typename ElseDerived::ConstantReturnType, ElseDerived >  | [select](classeigen_1_1densebase#a9e8e78c75887d4539071a0b7a61ca103) (const typename ElseDerived::Scalar &thenScalar, const [DenseBase](classeigen_1_1densebase)< ElseDerived > &elseMatrix) const |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [setConstant](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [setLinSpaced](classeigen_1_1densebase#aeb023532476d3f14c457367e0eb5f3f1) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#aeb023532476d3f14c457367e0eb5f3f1) |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [setLinSpaced](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#a5d1ce9e801fa502e02b9b8cd9141ad0a) |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [setOnes](classeigen_1_1densebase#a250ef1b827e748f3f898fb2e55cb96e2) () |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [setRandom](classeigen_1_1densebase#ac476e5852129ba32beaa1a8a3d7ee0db) () |
|  |
| [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > &  | [setZero](classeigen_1_1densebase#af230a143de50695d2d1fae93db7e4dcb) () |
|  |
| [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [sum](classeigen_1_1densebase#addd7080d5c202795820e361768d0140c) () const |
|  |
| void  | [swap](classeigen_1_1densebase#af9e7e4305fdb7781f2b2f05fa801f21e) (const [DenseBase](classeigen_1_1densebase)< OtherDerived > &other) |
|  |
| void  | [swap](classeigen_1_1densebase#a44e25adc6da9cd1d79f4c5bd7c1819cb) ([PlainObjectBase](classeigen_1_1plainobjectbase)< OtherDerived > &other) |
|  |
| [TransposeReturnType](classeigen_1_1transpose) | [transpose](classeigen_1_1densebase#ac8952c19644a4ac7e41bea45c19b909c) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1densebase#a38c0b074cf93fc194bf91141287cee3f) () const |
|  |
| void  | [transposeInPlace](classeigen_1_1densebase#ac501bd942994af7a95d95bee7a16ad2a) () |
|  |
| CoeffReturnType  | [value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0) () const |
|  |
| void  | [visit](classeigen_1_1densebase#a4225b90fcc74f18dd479b401124b3841) (Visitor &func) const |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::DenseBase< MatrixWrapper< ExpressionType > >](classeigen_1_1densebase) |
| typedef random\_access\_iterator\_type  | [const\_iterator](classeigen_1_1densebase#a306d9418d4b34874e9005d961c490cd2) |
|  |
| typedef random\_access\_iterator\_type  | [iterator](classeigen_1_1densebase#af5130902770642a1a057a99c397d357d) |
|  |
| typedef [Array](classeigen_1_1array)< typename internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), AutoAlign|(internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) &RowMajorBit ? RowMajor :ColMajor), internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) >  | [PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb) |
|  |
| typedef [Matrix](classeigen_1_1matrix)< typename internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2), internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[RowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dadb37c78ebbf15aa20b65c3b70415a1ab), internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[ColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da787f85fd67ee5985917eb2cef6e70441), AutoAlign|(internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[Flags](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5da7392c9b2ad41ba3c16fdc5306c04d581) &RowMajorBit ? RowMajor :ColMajor), internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[MaxRowsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dad2baadea085372837b0e80dc93be1306), internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[MaxColsAtCompileTime](classeigen_1_1densebase#a0632b818dc6bddab3ed1dd0ff4ec4e5dacc3a41000cf1d29dd1a320b2a09d2a65) >  | [PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e) |
|  |
| typedef internal::conditional< internal::is\_same< typename internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::XprKind, [MatrixXpr](structeigen_1_1matrixxpr) >::[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0), [PlainMatrix](classeigen_1_1densebase#aa301ef39d63443e9ef0b84f47350116e), [PlainArray](classeigen_1_1densebase#a65328b7d6fc10a26ff6cd5801a6a44eb) >::type  | [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) |
|  | The plain matrix or array type corresponding to this expression. [More...](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) |
|  |
| typedef internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) |
|  |
| typedef internal::traits< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > >::[StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) | [StorageIndex](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) |
|  | The type used to store indices. [More...](classeigen_1_1densebase#a2d1aba3f6c414715d830f760913c7e00) |
|  |
| typedef [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) | [value\_type](classeigen_1_1densebase#a9276182dab8236c33f1e7abf491d504d) |
|  |
| - Static Public Member Functions inherited from [Eigen::MatrixBase< MatrixWrapper< ExpressionType > >](classeigen_1_1matrixbase) |
| static const IdentityReturnType  | [Identity](classeigen_1_1matrixbase#a98bb9a0f705c6dfde85b0bfff31bf88f) () |
|  |
| static const IdentityReturnType  | [Identity](classeigen_1_1matrixbase#acf33ce20ef03ead47cb3dbcd5f416ede) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| static const BasisReturnType  | [Unit](classeigen_1_1matrixbase#a9daf6d22d10ed8ae00432b0f641455df) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) i) |
|  |
| static const BasisReturnType  | [Unit](classeigen_1_1matrixbase#ac7a03a61014f37ddd2fe61ebac0c9539) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) i) |
|  |
| static const BasisReturnType  | [UnitW](classeigen_1_1matrixbase#af56ba94e5b0330827003eadd26cfadc2) () |
|  |
| static const BasisReturnType  | [UnitX](classeigen_1_1matrixbase#a8a555b7cf626cced54670b98668c4e6d) () |
|  |
| static const BasisReturnType  | [UnitY](classeigen_1_1matrixbase#a00850083489e20249b1d05b394fc5efc) () |
|  |
| static const BasisReturnType  | [UnitZ](classeigen_1_1matrixbase#aabdcdeff1c822a5465fcbe1f78e5afe0) () |
|  |
| - Static Public Member Functions inherited from [Eigen::DenseBase< MatrixWrapper< ExpressionType > >](classeigen_1_1densebase) |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#aed89b5cc6e3b7d9d5bd63aed245ccd6d) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#a68a7ece6c5629d1e9447a321fcb14ccd) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const ConstantReturnType  | [Constant](classeigen_1_1densebase#a1fdd3189ae3a41d250593334d82210cf) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &[value](classeigen_1_1densebase#a8515f719046aa4851e385661f45595b0)) |
|  |
| static const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#ad8098aa5971139a5585e623dddbea860) (const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| static const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  | Sets a linearly spaced vector. [More...](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768) |
|  |
| static EIGEN\_DEPRECATED const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#ac8cfbd436a8c9fc50defee5946451176) (Sequential\_t, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| static EIGEN\_DEPRECATED const RandomAccessLinSpacedReturnType  | [LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d) (Sequential\_t, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &low, const [Scalar](classeigen_1_1densebase#a5feed465b3a8e60c47e73ecce83e39a2) &high) |
|  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a5dc65501accd02c30f7c1840c2a30a41) (const CustomNullaryOp &func) |
|  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a3340c9b997f5b53a0131cf927f93b54c) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols, const CustomNullaryOp &func) |
|  |
| static const [CwiseNullaryOp](classeigen_1_1cwisenullaryop)< CustomNullaryOp, [PlainObject](classeigen_1_1densebase#aae45af9b5aca5a9caae98fd201f47cc4) >  | [NullaryExpr](classeigen_1_1densebase#a9752ee59976a4b4aad860ad1a9093e7f) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size, const CustomNullaryOp &func) |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101) () |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#a8b2a51018a73a766f5b91aef3487f013) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| static const ConstantReturnType  | [Ones](classeigen_1_1densebase#ab710a58e4a80fbcb2594242372c8fe56) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19) () |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#ae97f8d9d08f969c733c8144be6225756) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| static const [RandomReturnType](classeigen_1_1cwisenullaryop) | [Random](classeigen_1_1densebase#a7eb5f974a8f0b67eac7080db1da0e308) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761) () |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#ae41a9b5050ed27d9e93c82c9c8622cd3) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) rows, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) cols) |
|  |
| static const ConstantReturnType  | [Zero](classeigen_1_1densebase#ac22f79b812fa564061042407f2ba8f5b) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |
| - Protected Member Functions inherited from [Eigen::DenseBase< MatrixWrapper< ExpressionType > >](classeigen_1_1densebase) |
|  | [DenseBase](classeigen_1_1densebase#aa284042d0e1b0ad9b6a00db7fd2d9f7f) () |
|  |
| - Related Functions inherited from [Eigen::DenseBase< MatrixWrapper< ExpressionType > >](classeigen_1_1densebase) |
| std::ostream &  | [operator<<](classeigen_1_1densebase#a3806d3f42de165878dace160e6aba40a) (std::ostream &s, const [DenseBase](classeigen_1_1densebase)< [MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType > > &m) |
|  |

  resize() [1/2]
--------------

    template<typename ExpressionType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType >::resize  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *newSize* | ) |  |

 | inline |

 
 Forwards the resizing request to the nested expression 



See also

[DenseBase::resize(Index)](classeigen_1_1densebase#a2ec5bac4e1ab95808808ef50ccf4cb39)   
 
    resize() [2/2]
--------------

    template<typename ExpressionType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::MatrixWrapper](classeigen_1_1matrixwrapper)< ExpressionType >::resize  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *rows*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *cols* |
|  | ) |  |  |

 | inline |

 
 Forwards the resizing request to the nested expression 



See also

[DenseBase::resize(Index,Index)](classeigen_1_1densebase#a25e2b4887b47b1f2346857d1931efa0f) 
   

---

The documentation for this class was generated from the following files:* [ArrayBase.h](https://eigen.tuxfamily.org/dox/ArrayBase_8h_source.html)
* [ArrayWrapper.h](https://eigen.tuxfamily.org/dox/ArrayWrapper_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1MatrixWrapper.html>

Eigen::SparseCompressedBase
===========================

  
### template<typename Derived> class Eigen::SparseCompressedBase< Derived >

 Common base class for sparse [compressed]-{row|column}-storage format. 

 This class defines the common interface for all derived classes implementing the compressed sparse storage format, such as:


* [SparseMatrix](classeigen_1_1sparsematrix "A versatible sparse matrix representation.")
* [Ref<SparseMatrixType,Options>](classeigen_1_1ref_3_01sparsematrixtype_00_01options_01_4 "A sparse matrix expression referencing an existing sparse expression.")
* [Map<SparseMatrixType>](classeigen_1_1map_3_01sparsematrixtype_01_4 "Specialization of class Map for SparseMatrix-like storage.")

     ![Inheritance graph]            

|  |
| --- |
|  |
| [Map](classeigen_1_1map)< [Array](classeigen_1_1array)< Scalar, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 1 > >  | [coeffs](classeigen_1_1sparsecompressedbase#a7cf299e08d2a4f6d6869e631e51b12fe) () |
|  |
| const [Map](classeigen_1_1map)< const [Array](classeigen_1_1array)< Scalar, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 1 > >  | [coeffs](classeigen_1_1sparsecompressedbase#a101b155485ae59ea1261c4f6040f3dc4) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsecompressedbase#a197111c1289644f1ea38fe683ccdd82a) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsecompressedbase#aa64818e1aa43015dad01b114b2ab4687) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsecompressedbase#a411e972b097e6aef225415a4c2d0a0b5) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsecompressedbase#afc056a3895eae1a4c4767252ff04966a) () const |
|  |
| bool  | [isCompressed](classeigen_1_1sparsecompressedbase#a837934b33a80fe996ff20500373d3a61) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1sparsecompressedbase#a03de8b3da2c142ce8698a76123b3e7d3) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsecompressedbase#a53a82f962686e18c8dc07a4b9a85ed7b) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsecompressedbase#a2624d4c2661c582de168246c56e8d71e) () const |
|  |
| Scalar \*  | [valuePtr](classeigen_1_1sparsecompressedbase#a0f12f72d14b6c277d09be9f5ce2eab95) () |
|  |
| const Scalar \*  | [valuePtr](classeigen_1_1sparsecompressedbase#a0f44c739398794ea77f310b745cc5627) () const |
|  |
| - Public Member Functions inherited from [Eigen::SparseMatrixBase< Derived >](classeigen_1_1sparsematrixbase) |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1sparsematrixbase#aca7ce296424ef6e478ab0fb19547a7ee) () const |
|  |
| const internal::eval< Derived >::type  | [eval](classeigen_1_1sparsematrixbase#a761bd872a06b59632fcff7b7807a77ce) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1sparsematrixbase#a180fcba1ccf3cdf3252a263bc1de7a1d) () const |
|  |
| bool  | [isVector](classeigen_1_1sparsematrixbase#a7eedffa867031f649fd0fb9cc23ce4be) () const |
|  |
| template<typename OtherDerived >  |
| const [Product](classeigen_1_1product)< Derived, OtherDerived, AliasFreeProduct >  | [operator\*](classeigen_1_1sparsematrixbase#a9d4d71b3f34389e6fc01f2b86e43f7a4) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &other) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1sparsematrixbase#ac86cc88a4cfef21db6b64ec0ab4c8f0a) () const |
|  |
| const [SparseView](classeigen_1_1sparseview)< Derived >  | [pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d) (const Scalar &reference=Scalar(0), const RealScalar &epsilon=[NumTraits](structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1sparsematrixbase#a1944e9fa9ce7937bfc3a87b2cb94371f) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1sparsematrixbase#a124bc57921775eb9aa2dfd9727e23472) () const |
|  |
| SparseSymmetricPermutationProduct< Derived, [Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)|[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749) >  | [twistedBy](classeigen_1_1sparsematrixbase#a51d4898bd6a57cc3ba543a39b102423e) (const [PermutationMatrix](classeigen_1_1permutationmatrix)< [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) > &perm) const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
|  | [SparseCompressedBase](classeigen_1_1sparsecompressedbase#af79f020db965367d97eb954fc68d8f99) () |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::SparseMatrixBase< Derived >](classeigen_1_1sparsematrixbase) |
| enum  | {  [RowsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a456cda7b9d938e57194036a41d634604) ,  [ColsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a27ba349f075d026c1f51d1ec69aa5b14) ,  [SizeAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5aa5022cfa2bb53129883e9b7b8abd3d68) ,  **MaxRowsAtCompileTime** ,  **MaxColsAtCompileTime** ,  **MaxSizeAtCompileTime** ,  [IsVectorAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a14a3f566ed2a074beddb8aef0223bfdf) ,  [NumDimensions](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a2366131ffcc38bff48a1c7572eb86dd3) ,  [Flags](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a2af043b36fe9e08df0107cf6de496165) ,  **IsRowMajor** ,  **InnerSizeAtCompileTime**  } |
|  |
| typedef internal::traits< Derived >::[StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) | [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) |
|  |
| typedef Scalar  | [value\_type](classeigen_1_1sparsematrixbase#ac254d3b61718ebc2136d27bac043dcb7) |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  SparseCompressedBase()
----------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived >::[SparseCompressedBase](classeigen_1_1sparsecompressedbase) | ( |  | ) |  |

 | inlineprotected |

 
 Default constructor. Do nothing. 

    coeffs() [1/2]
--------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Map](classeigen_1_1map)<[Array](classeigen_1_1array)<Scalar,[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2),1> > [Eigen::SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived >::coeffs  | ( |  | ) |  |

 | inline |

 
 
Returns
a read-write view of the stored coefficients as a 1D array expression
 
Warning
this method is for **compressed** **storage** **only**, and it will trigger an assertion otherwise.
 Here is an example: 



```
SparseMatrix<double> A(3,3);
A.insert(1,2) = 0;
A.insert(0,1) = 1;
A.insert(2,0) = 2;
A.makeCompressed();
cout << "The matrix A is:" << endl << MatrixXd(A) << endl;
cout << "it has " << A.nonZeros() << " stored non zero coefficients that are: " << A.coeffs().transpose() << endl;
A.coeffs() += 10;
cout << "After adding 10 to every stored non zero coefficient, the matrix A is:" << endl << MatrixXd(A) << endl;

```

 and the output is: 



```
The matrix A is:
0 1 0
0 0 0
2 0 0
it has 3 stored non zero coefficients that are: 2 1 0
After adding 10 to every stored non zero coefficient, the matrix A is:
 0 11  0
 0  0 10
12  0  0

```


See also

[valuePtr()](classeigen_1_1sparsecompressedbase#a0f12f72d14b6c277d09be9f5ce2eab95), [isCompressed()](classeigen_1_1sparsecompressedbase#a837934b33a80fe996ff20500373d3a61) 
    coeffs() [2/2]
--------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [Map](classeigen_1_1map)<const [Array](classeigen_1_1array)<Scalar,[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2),1> > [Eigen::SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived >::coeffs  | ( |  | ) |  const |

 | inline |

 
 
Returns
a read-only view of the stored coefficients as a 1D array expression.
 
Warning
this method is for **compressed** **storage** **only**, and it will trigger an assertion otherwise.
 
See also

[valuePtr()](classeigen_1_1sparsecompressedbase#a0f12f72d14b6c277d09be9f5ce2eab95), [isCompressed()](classeigen_1_1sparsecompressedbase#a837934b33a80fe996ff20500373d3a61) 
    innerIndexPtr() [1/2]
---------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed)\* [Eigen::SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived >::innerIndexPtr  | ( |  | ) |  |

 | inline |

 
 
Returns
a non-const pointer to the array of inner indices. This function is aimed at interoperability with other libraries. 
 
See also

[valuePtr()](classeigen_1_1sparsecompressedbase#a0f12f72d14b6c277d09be9f5ce2eab95), [outerIndexPtr()](classeigen_1_1sparsecompressedbase#a53a82f962686e18c8dc07a4b9a85ed7b) 
    innerIndexPtr() [2/2]
---------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed)\* [Eigen::SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived >::innerIndexPtr  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const pointer to the array of inner indices. This function is aimed at interoperability with other libraries. 
 
See also

[valuePtr()](classeigen_1_1sparsecompressedbase#a0f12f72d14b6c277d09be9f5ce2eab95), [outerIndexPtr()](classeigen_1_1sparsecompressedbase#a53a82f962686e18c8dc07a4b9a85ed7b) 
    innerNonZeroPtr() [1/2]
-----------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed)\* [Eigen::SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived >::innerNonZeroPtr  | ( |  | ) |  |

 | inline |

 
 
Returns
a non-const pointer to the array of the number of non zeros of the inner vectors. This function is aimed at interoperability with other libraries. 
 
Warning
it returns the null pointer 0 in compressed mode 
    innerNonZeroPtr() [2/2]
-----------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed)\* [Eigen::SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived >::innerNonZeroPtr  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const pointer to the array of the number of non zeros of the inner vectors. This function is aimed at interoperability with other libraries. 
 
Warning
it returns the null pointer 0 in compressed mode 
    isCompressed()
--------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived >::isCompressed  | ( |  | ) |  const |

 | inline |

 
 
Returns
whether `*this` is in compressed form. 
    nonZeros()
----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived >::nonZeros  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of non zero coefficients 
    outerIndexPtr() [1/2]
---------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed)\* [Eigen::SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived >::outerIndexPtr  | ( |  | ) |  |

 | inline |

 
 
Returns
a non-const pointer to the array of the starting positions of the inner vectors. This function is aimed at interoperability with other libraries. 
 
Warning
it returns the null pointer 0 for [SparseVector](classeigen_1_1sparsevector "a sparse vector class") 
 
See also

[valuePtr()](classeigen_1_1sparsecompressedbase#a0f12f72d14b6c277d09be9f5ce2eab95), [innerIndexPtr()](classeigen_1_1sparsecompressedbase#a197111c1289644f1ea38fe683ccdd82a) 
    outerIndexPtr() [2/2]
---------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed)\* [Eigen::SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived >::outerIndexPtr  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const pointer to the array of the starting positions of the inner vectors. This function is aimed at interoperability with other libraries. 
 
Warning
it returns the null pointer 0 for [SparseVector](classeigen_1_1sparsevector "a sparse vector class") 
 
See also

[valuePtr()](classeigen_1_1sparsecompressedbase#a0f12f72d14b6c277d09be9f5ce2eab95), [innerIndexPtr()](classeigen_1_1sparsecompressedbase#a197111c1289644f1ea38fe683ccdd82a) 
    valuePtr() [1/2]
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar\* [Eigen::SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived >::valuePtr  | ( |  | ) |  |

 | inline |

 
 
Returns
a non-const pointer to the array of values. This function is aimed at interoperability with other libraries. 
 
See also

[innerIndexPtr()](classeigen_1_1sparsecompressedbase#a197111c1289644f1ea38fe683ccdd82a), [outerIndexPtr()](classeigen_1_1sparsecompressedbase#a53a82f962686e18c8dc07a4b9a85ed7b) 
    valuePtr() [2/2]
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const Scalar\* [Eigen::SparseCompressedBase](classeigen_1_1sparsecompressedbase)< Derived >::valuePtr  | ( |  | ) |  const |

 | inline |

 
 
Returns
a const pointer to the array of values. This function is aimed at interoperability with other libraries. 
 
See also

[innerIndexPtr()](classeigen_1_1sparsecompressedbase#a197111c1289644f1ea38fe683ccdd82a), [outerIndexPtr()](classeigen_1_1sparsecompressedbase#a53a82f962686e18c8dc07a4b9a85ed7b) 
   

---

The documentation for this class was generated from the following file:* [SparseCompressedBase.h](https://eigen.tuxfamily.org/dox/SparseCompressedBase_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SparseCompressedBase.html>

Eigen::SparseMapBase
====================

  
### template<typename Derived> class Eigen::SparseMapBase< Derived, ReadOnlyAccessors >

 Common base class for [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") and [Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.") instance of sparse matrix and vector. 

 class SparseMapBase 

     ![Inheritance graph]            

|  |
| --- |
|  |
| Scalar  | [coeff](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a195e66f79171f78cc22d91fff37e36e3) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a0fc44f3781a869a3a410edd6691fd899) () const |
|  |
| const StorageIndex \*  | [innerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#ab044564756f472877b2c1a5706e540e2) () const |
|  |
| const StorageIndex \*  | [innerNonZeroPtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a2b35a1d701d6c6ea36b2d9f19660a68c) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a0df6dba8d71e0fb15b2995510853f83e) () const |
|  |
| bool  | [isCompressed](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#aafab4afa7ab2ff89eff049d4c71e2ce4) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a753e975b7b3643d821dc061141786870) () const |
|  |
| const StorageIndex \*  | [outerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a24c55dd8de4aca30e7c90b69aa5dca6b) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a3d6ede19db6d42074ae063bc876231b1) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a3cdd6cab0abd7ac01925a695fc315d34) () const |
|  |
| const Scalar \*  | [valuePtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a574ea9371c22eabebdda21c0787312dc) () const |
|  |
|  | [~SparseMapBase](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#ab375aedf824909a7f1a6af24ee60d70f) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseCompressedBase< Derived >](classeigen_1_1sparsecompressedbase) |
| [Map](classeigen_1_1map)< [Array](classeigen_1_1array)< Scalar, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 1 > >  | [coeffs](classeigen_1_1sparsecompressedbase#a7cf299e08d2a4f6d6869e631e51b12fe) () |
|  |
| const [Map](classeigen_1_1map)< const [Array](classeigen_1_1array)< Scalar, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 1 > >  | [coeffs](classeigen_1_1sparsecompressedbase#a101b155485ae59ea1261c4f6040f3dc4) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsecompressedbase#a197111c1289644f1ea38fe683ccdd82a) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsecompressedbase#aa64818e1aa43015dad01b114b2ab4687) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsecompressedbase#a411e972b097e6aef225415a4c2d0a0b5) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsecompressedbase#afc056a3895eae1a4c4767252ff04966a) () const |
|  |
| bool  | [isCompressed](classeigen_1_1sparsecompressedbase#a837934b33a80fe996ff20500373d3a61) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1sparsecompressedbase#a03de8b3da2c142ce8698a76123b3e7d3) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsecompressedbase#a53a82f962686e18c8dc07a4b9a85ed7b) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsecompressedbase#a2624d4c2661c582de168246c56e8d71e) () const |
|  |
| Scalar \*  | [valuePtr](classeigen_1_1sparsecompressedbase#a0f12f72d14b6c277d09be9f5ce2eab95) () |
|  |
| const Scalar \*  | [valuePtr](classeigen_1_1sparsecompressedbase#a0f44c739398794ea77f310b745cc5627) () const |
|  |
| - Public Member Functions inherited from [Eigen::SparseMatrixBase< Derived >](classeigen_1_1sparsematrixbase) |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1sparsematrixbase#aca7ce296424ef6e478ab0fb19547a7ee) () const |
|  |
| const internal::eval< Derived >::type  | [eval](classeigen_1_1sparsematrixbase#a761bd872a06b59632fcff7b7807a77ce) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1sparsematrixbase#a180fcba1ccf3cdf3252a263bc1de7a1d) () const |
|  |
| bool  | [isVector](classeigen_1_1sparsematrixbase#a7eedffa867031f649fd0fb9cc23ce4be) () const |
|  |
| template<typename OtherDerived >  |
| const [Product](classeigen_1_1product)< Derived, OtherDerived, AliasFreeProduct >  | [operator\*](classeigen_1_1sparsematrixbase#a9d4d71b3f34389e6fc01f2b86e43f7a4) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &other) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1sparsematrixbase#ac86cc88a4cfef21db6b64ec0ab4c8f0a) () const |
|  |
| const [SparseView](classeigen_1_1sparseview)< Derived >  | [pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d) (const Scalar &reference=Scalar(0), const RealScalar &epsilon=[NumTraits](structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1sparsematrixbase#a1944e9fa9ce7937bfc3a87b2cb94371f) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1sparsematrixbase#a124bc57921775eb9aa2dfd9727e23472) () const |
|  |
| SparseSymmetricPermutationProduct< Derived, [Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)|[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749) >  | [twistedBy](classeigen_1_1sparsematrixbase#a51d4898bd6a57cc3ba543a39b102423e) (const [PermutationMatrix](classeigen_1_1permutationmatrix)< [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) > &perm) const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::SparseMatrixBase< Derived >](classeigen_1_1sparsematrixbase) |
| enum  | {  [RowsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a456cda7b9d938e57194036a41d634604) ,  [ColsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a27ba349f075d026c1f51d1ec69aa5b14) ,  [SizeAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5aa5022cfa2bb53129883e9b7b8abd3d68) ,  **MaxRowsAtCompileTime** ,  **MaxColsAtCompileTime** ,  **MaxSizeAtCompileTime** ,  [IsVectorAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a14a3f566ed2a074beddb8aef0223bfdf) ,  [NumDimensions](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a2366131ffcc38bff48a1c7572eb86dd3) ,  [Flags](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a2af043b36fe9e08df0107cf6de496165) ,  **IsRowMajor** ,  **InnerSizeAtCompileTime**  } |
|  |
| typedef internal::traits< Derived >::[StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) | [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) |
|  |
| typedef Scalar  | [value\_type](classeigen_1_1sparsematrixbase#ac254d3b61718ebc2136d27bac043dcb7) |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |
| - Protected Member Functions inherited from [Eigen::SparseCompressedBase< Derived >](classeigen_1_1sparsecompressedbase) |
|  | [SparseCompressedBase](classeigen_1_1sparsecompressedbase#af79f020db965367d97eb954fc68d8f99) () |
|  |

  ~SparseMapBase()
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Eigen::SparseMapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::~SparseMapBase  | ( |  | ) |  |

 | inline |

 
 Empty destructor 

    coeff()
-------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Scalar Eigen::SparseMapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::coeff  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *row*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *col* |
|  | ) |  |  const |

 | inline |

 
  
Returns
the value of the matrix at position *i*, *j* This function returns Scalar(0) if the element is an explicit *zero* 
    cols()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) Eigen::SparseMapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::cols  | ( | void  |  | ) |  const |

 | inline |

 
  
Returns
the number of columns. 
 
See also

[rows()](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a3cdd6cab0abd7ac01925a695fc315d34) 
    innerIndexPtr()
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const StorageIndex\* Eigen::SparseMapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::innerIndexPtr  | ( |  | ) |  const |

 | inline |

 
  
Returns
a const pointer to the array of inner indices. This function is aimed at interoperability with other libraries. 
 
See also

[valuePtr()](classeigen_1_1sparsecompressedbase#a0f12f72d14b6c277d09be9f5ce2eab95), [outerIndexPtr()](classeigen_1_1sparsecompressedbase#a53a82f962686e18c8dc07a4b9a85ed7b) 
    innerNonZeroPtr()
-----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const StorageIndex\* Eigen::SparseMapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::innerNonZeroPtr  | ( |  | ) |  const |

 | inline |

 
  
Returns
a const pointer to the array of the number of non zeros of the inner vectors. This function is aimed at interoperability with other libraries. 
 
Warning
it returns the null pointer 0 in compressed mode 
    innerSize()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) Eigen::SparseMapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::innerSize  | ( |  | ) |  const |

 | inline |

 
  
Returns
the size of the inner dimension according to the storage order, i.e., the number of rows for a columns major matrix, and the number of cols otherwise 
    isCompressed()
--------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool Eigen::SparseMapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::isCompressed  | ( |  | ) |  const |

 | inline |

 
  
Returns
whether `*this` is in compressed form. 
    nonZeros()
----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) Eigen::SparseMapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::nonZeros  | ( |  | ) |  const |

 | inline |

 
  
Returns
the number of non zero coefficients 
    outerIndexPtr()
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const StorageIndex\* Eigen::SparseMapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::outerIndexPtr  | ( |  | ) |  const |

 | inline |

 
  
Returns
a const pointer to the array of the starting positions of the inner vectors. This function is aimed at interoperability with other libraries. 
 
See also

[valuePtr()](classeigen_1_1sparsecompressedbase#a0f12f72d14b6c277d09be9f5ce2eab95), [innerIndexPtr()](classeigen_1_1sparsecompressedbase#a197111c1289644f1ea38fe683ccdd82a) 
    outerSize()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) Eigen::SparseMapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::outerSize  | ( |  | ) |  const |

 | inline |

 
  
Returns
the size of the storage major dimension, i.e., the number of columns for a columns major matrix, and the number of rows otherwise 
    rows()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) Eigen::SparseMapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::rows  | ( | void  |  | ) |  const |

 | inline |

 
  
Returns
the number of rows. 
 
See also

[cols()](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a0fc44f3781a869a3a410edd6691fd899) 
    valuePtr()
----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const Scalar\* Eigen::SparseMapBase< Derived, [ReadOnlyAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5daa1f2b0e6a668b11f2958940965d2b572) >::valuePtr  | ( |  | ) |  const |

 | inline |

 
  
Returns
a const pointer to the array of values. This function is aimed at interoperability with other libraries. 
 
See also

[innerIndexPtr()](classeigen_1_1sparsecompressedbase#a197111c1289644f1ea38fe683ccdd82a), [outerIndexPtr()](classeigen_1_1sparsecompressedbase#a53a82f962686e18c8dc07a4b9a85ed7b) 
   

---

The documentation for this class was generated from the following file:* [SparseMap.h](https://eigen.tuxfamily.org/dox/SparseMap_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SparseMapBase_3_01Derived_00_01ReadOnlyAccessors_01_4.html>

Eigen::SparseMapBase
====================

  
### template<typename Derived> class Eigen::SparseMapBase< Derived, WriteAccessors >

 Common base class for writable [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.") and [Ref](classeigen_1_1ref "A matrix or vector expression mapping an existing expression.") instance of sparse matrix and vector. 

 class SparseMapBase 

     ![Inheritance graph]            

|  |
| --- |
|  |
| Scalar &  | [coeffRef](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#aa9c42d48b9dd6f947ce3c257fe4bf2ca) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| StorageIndex \*  | [innerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af5cd1f13dde8578eb9891a4ac4a11977) () |
|  |
| StorageIndex \*  | [innerNonZeroPtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af877ea4e285a4497f80987fea66f7459) () |
|  |
| StorageIndex \*  | [outerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#a3b74af754254837fc591cd9936688b95) () |
|  |
| Scalar \*  | [valuePtr](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af91648a18729ae8ff29cb1d8751c5655) () |
|  |
|  | [~SparseMapBase](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#a4dfbcf3ac411885b1710ad04892c984d) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseMapBase< Derived, ReadOnlyAccessors >](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4) |
| Scalar  | [coeff](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a195e66f79171f78cc22d91fff37e36e3) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a0fc44f3781a869a3a410edd6691fd899) () const |
|  |
| const StorageIndex \*  | [innerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#ab044564756f472877b2c1a5706e540e2) () const |
|  |
| const StorageIndex \*  | [innerNonZeroPtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a2b35a1d701d6c6ea36b2d9f19660a68c) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a0df6dba8d71e0fb15b2995510853f83e) () const |
|  |
| bool  | [isCompressed](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#aafab4afa7ab2ff89eff049d4c71e2ce4) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a753e975b7b3643d821dc061141786870) () const |
|  |
| const StorageIndex \*  | [outerIndexPtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a24c55dd8de4aca30e7c90b69aa5dca6b) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a3d6ede19db6d42074ae063bc876231b1) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a3cdd6cab0abd7ac01925a695fc315d34) () const |
|  |
| const Scalar \*  | [valuePtr](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#a574ea9371c22eabebdda21c0787312dc) () const |
|  |
|  | [~SparseMapBase](classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4#ab375aedf824909a7f1a6af24ee60d70f) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseCompressedBase< Derived >](classeigen_1_1sparsecompressedbase) |
| [Map](classeigen_1_1map)< [Array](classeigen_1_1array)< Scalar, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 1 > >  | [coeffs](classeigen_1_1sparsecompressedbase#a7cf299e08d2a4f6d6869e631e51b12fe) () |
|  |
| const [Map](classeigen_1_1map)< const [Array](classeigen_1_1array)< Scalar, [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), 1 > >  | [coeffs](classeigen_1_1sparsecompressedbase#a101b155485ae59ea1261c4f6040f3dc4) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsecompressedbase#a197111c1289644f1ea38fe683ccdd82a) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerIndexPtr](classeigen_1_1sparsecompressedbase#aa64818e1aa43015dad01b114b2ab4687) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsecompressedbase#a411e972b097e6aef225415a4c2d0a0b5) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [innerNonZeroPtr](classeigen_1_1sparsecompressedbase#afc056a3895eae1a4c4767252ff04966a) () const |
|  |
| bool  | [isCompressed](classeigen_1_1sparsecompressedbase#a837934b33a80fe996ff20500373d3a61) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1sparsecompressedbase#a03de8b3da2c142ce8698a76123b3e7d3) () const |
|  |
| [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsecompressedbase#a53a82f962686e18c8dc07a4b9a85ed7b) () |
|  |
| const [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) \*  | [outerIndexPtr](classeigen_1_1sparsecompressedbase#a2624d4c2661c582de168246c56e8d71e) () const |
|  |
| Scalar \*  | [valuePtr](classeigen_1_1sparsecompressedbase#a0f12f72d14b6c277d09be9f5ce2eab95) () |
|  |
| const Scalar \*  | [valuePtr](classeigen_1_1sparsecompressedbase#a0f44c739398794ea77f310b745cc5627) () const |
|  |
| - Public Member Functions inherited from [Eigen::SparseMatrixBase< Derived >](classeigen_1_1sparsematrixbase) |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1sparsematrixbase#aca7ce296424ef6e478ab0fb19547a7ee) () const |
|  |
| const internal::eval< Derived >::type  | [eval](classeigen_1_1sparsematrixbase#a761bd872a06b59632fcff7b7807a77ce) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1sparsematrixbase#a180fcba1ccf3cdf3252a263bc1de7a1d) () const |
|  |
| bool  | [isVector](classeigen_1_1sparsematrixbase#a7eedffa867031f649fd0fb9cc23ce4be) () const |
|  |
| template<typename OtherDerived >  |
| const [Product](classeigen_1_1product)< Derived, OtherDerived, AliasFreeProduct >  | [operator\*](classeigen_1_1sparsematrixbase#a9d4d71b3f34389e6fc01f2b86e43f7a4) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &other) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1sparsematrixbase#ac86cc88a4cfef21db6b64ec0ab4c8f0a) () const |
|  |
| const [SparseView](classeigen_1_1sparseview)< Derived >  | [pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d) (const Scalar &reference=Scalar(0), const RealScalar &epsilon=[NumTraits](structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1sparsematrixbase#a1944e9fa9ce7937bfc3a87b2cb94371f) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1sparsematrixbase#a124bc57921775eb9aa2dfd9727e23472) () const |
|  |
| SparseSymmetricPermutationProduct< Derived, [Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)|[Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749) >  | [twistedBy](classeigen_1_1sparsematrixbase#a51d4898bd6a57cc3ba543a39b102423e) (const [PermutationMatrix](classeigen_1_1permutationmatrix)< [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) > &perm) const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::SparseMatrixBase< Derived >](classeigen_1_1sparsematrixbase) |
| enum  | {  [RowsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a456cda7b9d938e57194036a41d634604) ,  [ColsAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a27ba349f075d026c1f51d1ec69aa5b14) ,  [SizeAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5aa5022cfa2bb53129883e9b7b8abd3d68) ,  **MaxRowsAtCompileTime** ,  **MaxColsAtCompileTime** ,  **MaxSizeAtCompileTime** ,  [IsVectorAtCompileTime](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a14a3f566ed2a074beddb8aef0223bfdf) ,  [NumDimensions](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a2366131ffcc38bff48a1c7572eb86dd3) ,  [Flags](classeigen_1_1sparsematrixbase#aa4d1477f2022b209706daba8722556b5a2af043b36fe9e08df0107cf6de496165) ,  **IsRowMajor** ,  **InnerSizeAtCompileTime**  } |
|  |
| typedef internal::traits< Derived >::[StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) | [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) |
|  |
| typedef Scalar  | [value\_type](classeigen_1_1sparsematrixbase#ac254d3b61718ebc2136d27bac043dcb7) |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |
| - Protected Member Functions inherited from [Eigen::SparseCompressedBase< Derived >](classeigen_1_1sparsecompressedbase) |
|  | [SparseCompressedBase](classeigen_1_1sparsecompressedbase#af79f020db965367d97eb954fc68d8f99) () |
|  |

  ~SparseMapBase()
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Eigen::SparseMapBase< Derived, [WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) >::~SparseMapBase  | ( |  | ) |  |

 | inline |

 
 Empty destructor 

    coeffRef()
----------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Scalar& Eigen::SparseMapBase< Derived, [WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) >::coeffRef  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *row*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *col* |
|  | ) |  |  |

 | inline |

 
  
Returns
a non-const reference to the value of the matrix at position *i*, *j* 
 If the element does not exist then it is inserted via the insert(Index,Index) function which itself turns the matrix into a non compressed form if that was not the case.

 This is a O(log(nnz\_j)) operation (binary search) plus the cost of insert(Index,Index) function if the element does not already exist. 

    innerIndexPtr()
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| StorageIndex\* Eigen::SparseMapBase< Derived, [WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) >::innerIndexPtr  | ( |  | ) |  |

 | inline |

 
  
Returns
a const pointer to the array of inner indices. This function is aimed at interoperability with other libraries. 
 
See also

[valuePtr()](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af91648a18729ae8ff29cb1d8751c5655), [outerIndexPtr()](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#a3b74af754254837fc591cd9936688b95) 
    innerNonZeroPtr()
-----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| StorageIndex\* Eigen::SparseMapBase< Derived, [WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) >::innerNonZeroPtr  | ( |  | ) |  |

 | inline |

 
  
Returns
a const pointer to the array of the number of non zeros of the inner vectors. This function is aimed at interoperability with other libraries. 
 
Warning
it returns the null pointer 0 in compressed mode 
    outerIndexPtr()
---------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| StorageIndex\* Eigen::SparseMapBase< Derived, [WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) >::outerIndexPtr  | ( |  | ) |  |

 | inline |

 
  
Returns
a const pointer to the array of the starting positions of the inner vectors. This function is aimed at interoperability with other libraries. 
 
See also

[valuePtr()](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af91648a18729ae8ff29cb1d8751c5655), [innerIndexPtr()](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af5cd1f13dde8578eb9891a4ac4a11977) 
    valuePtr()
----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar\* Eigen::SparseMapBase< Derived, [WriteAccessors](group__enums#gga9f93eac38eb83deb0e8dbd42ddf11d5dabcadf08230fb1a5ef7b3195745d3a458) >::valuePtr  | ( |  | ) |  |

 | inline |

 
  
Returns
a const pointer to the array of values. This function is aimed at interoperability with other libraries. 
 
See also

[innerIndexPtr()](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#af5cd1f13dde8578eb9891a4ac4a11977), [outerIndexPtr()](classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4#a3b74af754254837fc591cd9936688b95) 
   

---

The documentation for this class was generated from the following file:* [SparseMap.h](https://eigen.tuxfamily.org/dox/SparseMap_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SparseMapBase_3_01Derived_00_01WriteAccessors_01_4.html>

Eigen::SuperLU
==============

  
### template<typename \_MatrixType> class Eigen::SuperLU< \_MatrixType >

 A sparse direct LU factorization and solver based on the [SuperLU](classeigen_1_1superlu "A sparse direct LU factorization and solver based on the SuperLU library.") library. 

 This class allows to solve for A.X = B sparse linear problems via a direct LU factorization using the [SuperLU](classeigen_1_1superlu "A sparse direct LU factorization and solver based on the SuperLU library.") library. The sparse matrix A must be squared and invertible. The vectors or matrices X and B can be either dense or sparse.

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<> |

   
Warning
This class is only for the 4.x versions of [SuperLU](classeigen_1_1superlu "A sparse direct LU factorization and solver based on the SuperLU library."). The 3.x and 5.x versions are not supported.
 This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 
See also

[Sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept), class [SparseLU](classeigen_1_1sparselu "Sparse supernodal LU factorization for general matrices.") 
     ![Inheritance graph]       

|  |
| --- |
|  |
| void  | [analyzePattern](classeigen_1_1superlu#a493cdfada27415a6037b004ff974eace) (const MatrixType &matrix) |
|  |
| void  | [factorize](classeigen_1_1superlu#a0b5a5fbda1a1f368003c7c01021a4636) (const MatrixType &matrix) |
|  |
| - Public Member Functions inherited from [Eigen::SuperLUBase< \_MatrixType, SuperLU< \_MatrixType > >](classeigen_1_1superlubase) |
| void  | [analyzePattern](classeigen_1_1superlubase#a2d3f48425328d9b3cbdca369889007f3) (const MatrixType &) |
|  |
| void  | [compute](classeigen_1_1superlubase#a28cb3ef7914ecb6fdae1935b53f6be40) (const MatrixType &matrix) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1superlubase#aa67da5c8c24110931c949c5896c5ec03) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1superlubase#aa67da5c8c24110931c949c5896c5ec03) |
|  |
| superlu\_options\_t &  | [options](classeigen_1_1superlubase#a42d9d79073379f1e75b0f2c49879ed5b) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< Derived >](classeigen_1_1sparsesolverbase) |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

  analyzePattern()
----------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SuperLU](classeigen_1_1superlu)< \_MatrixType >::analyzePattern  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Performs a symbolic decomposition on the sparcity of *matrix*.

 This function is particularly useful when solving for several problems having the same structure.

 
See also

[factorize()](classeigen_1_1superlu#a0b5a5fbda1a1f368003c7c01021a4636) 
    factorize()
-----------

    template<typename MatrixType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SuperLU](classeigen_1_1superlu)< MatrixType >::factorize  | ( | const MatrixType &  | *matrix* | ) |  |

 
 Performs a numeric decomposition of *matrix* 

 The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed.

 
See also

[analyzePattern()](classeigen_1_1superlu#a493cdfada27415a6037b004ff974eace) 
   

---

The documentation for this class was generated from the following file:* [SuperLUSupport.h](https://eigen.tuxfamily.org/dox/SuperLUSupport_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SuperLU.html>

Eigen::SuperLUBase
==================

  
### template<typename \_MatrixType, typename Derived> class Eigen::SuperLUBase< \_MatrixType, Derived >

 The base class for the direct and incomplete LU factorization of [SuperLU](classeigen_1_1superlu "A sparse direct LU factorization and solver based on the SuperLU library."). 

     ![Inheritance graph]      

|  |
| --- |
|  |
| void  | [analyzePattern](classeigen_1_1superlubase#a2d3f48425328d9b3cbdca369889007f3) (const MatrixType &) |
|  |
| void  | [compute](classeigen_1_1superlubase#a28cb3ef7914ecb6fdae1935b53f6be40) (const MatrixType &matrix) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1superlubase#aa67da5c8c24110931c949c5896c5ec03) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1superlubase#aa67da5c8c24110931c949c5896c5ec03) |
|  |
| superlu\_options\_t &  | [options](classeigen_1_1superlubase#a42d9d79073379f1e75b0f2c49879ed5b) () |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< Derived >](classeigen_1_1sparsesolverbase) |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

  analyzePattern()
----------------

    template<typename \_MatrixType , typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SuperLUBase](classeigen_1_1superlubase)< \_MatrixType, Derived >::analyzePattern  | ( | const MatrixType &  |  | ) |  |

 | inline |

 
 Performs a symbolic decomposition on the sparcity of *matrix*.

 This function is particularly useful when solving for several problems having the same structure.

 
See also
factorize() 
    compute()
---------

    template<typename \_MatrixType , typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SuperLUBase](classeigen_1_1superlubase)< \_MatrixType, Derived >::compute  | ( | const MatrixType &  | *matrix* | ) |  |

 | inline |

 
 Computes the sparse Cholesky decomposition of *matrix* 

    info()
------

    template<typename \_MatrixType , typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::SuperLUBase](classeigen_1_1superlubase)< \_MatrixType, Derived >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether previous computation was successful. 

 
Returns

`Success` if computation was successful, `NumericalIssue` if the matrix.appears to be negative. 
    options()
---------

    template<typename \_MatrixType , typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| superlu\_options\_t& [Eigen::SuperLUBase](classeigen_1_1superlubase)< \_MatrixType, Derived >::options  | ( |  | ) |  |

 | inline |

 
 
Returns
a reference to the Super LU option object to configure the Super LU algorithms. 
   

---

The documentation for this class was generated from the following file:* [SuperLUSupport.h](https://eigen.tuxfamily.org/dox/SuperLUSupport_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SuperLUBase.html>

Eigen::Transpositions
=====================

  
### template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename \_StorageIndex> class Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >

 Represents a sequence of transpositions (row/column interchange) 

 
Template Parameters
 

|  |  |
| --- | --- |
| SizeAtCompileTime | the number of transpositions, or Dynamic  |
| MaxSizeAtCompileTime | the maximum number of transpositions, or Dynamic. This optional parameter defaults to SizeAtCompileTime. Most of the time, you should not have to specify it. |

   This class represents a permutation transformation as a sequence of *n* transpositions \([T\_{n-1} \ldots T\_{i} \ldots T\_{0}]\). It is internally stored as a vector of integers `indices`. Each transposition \( T\_{i} \) applied on the left of a matrix ( \( T\_{i} M\)) interchanges the rows `i` and `indices`[i] of the matrix `M`. A transposition applied on the right (e.g., \( M T\_{i}\)) yields a column interchange.

 Compared to the class [PermutationMatrix](classeigen_1_1permutationmatrix "Permutation matrix."), such a sequence of transpositions is what is computed during a decomposition with pivoting, and it is faster when applying the permutation in-place.

 To apply a sequence of transpositions to a matrix, simply use the operator \* as in the following example: 



```
Transpositions tr;
MatrixXf mat;
mat = tr * mat;

```

 In this example, we detect that the matrix appears on both side, and so the transpositions are applied in-place without any temporary or extra copy.

 
See also
class [PermutationMatrix](classeigen_1_1permutationmatrix "Permutation matrix.") 
  Inherits Eigen::TranspositionsBase< Derived >.

 

|  |
| --- |
|  |
| IndicesType &  | [indices](classeigen_1_1transpositions#a678dfbd513871473bcd36bbc453eed8c) () |
|  |
| const IndicesType &  | [indices](classeigen_1_1transpositions#a786fd676c156124025aaf446d811d14f) () const |
|  |
| template<typename OtherDerived >  |
| [Transpositions](classeigen_1_1transpositions) &  | [operator=](classeigen_1_1transpositions#a991cbd0dcd647b414bbfdbacb642dbbd) (const TranspositionsBase< OtherDerived > &other) |
|  |
| template<typename Other >  |
|  | [Transpositions](classeigen_1_1transpositions#a415e07d885093f3f256394f59d4986f4) (const [MatrixBase](classeigen_1_1matrixbase)< Other > &[indices](classeigen_1_1transpositions#a786fd676c156124025aaf446d811d14f)) |
|  |
| template<typename OtherDerived >  |
|  | [Transpositions](classeigen_1_1transpositions#aae3eb58072f5b26f3851925eec5a006f) (const TranspositionsBase< OtherDerived > &other) |
|  |
|  | [Transpositions](classeigen_1_1transpositions#a6a02dae883f9bc072de3268e1696d0ba) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |

  Transpositions() [1/3]
----------------------

    template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename \_StorageIndex >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Transpositions](classeigen_1_1transpositions)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >::[Transpositions](classeigen_1_1transpositions) | ( | const TranspositionsBase< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Copy constructor. 

    Transpositions() [2/3]
----------------------

    template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename \_StorageIndex >   template<typename Other >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Transpositions](classeigen_1_1transpositions)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >::[Transpositions](classeigen_1_1transpositions) | ( | const [MatrixBase](classeigen_1_1matrixbase)< Other > &  | *indices* | ) |  |

 | inlineexplicit |

 
 Generic constructor from expression of the transposition indices. 

    Transpositions() [3/3]
----------------------

    template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Transpositions](classeigen_1_1transpositions)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >::[Transpositions](classeigen_1_1transpositions) | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size* | ) |  |

 | inline |

 
 Constructs an uninitialized permutation matrix of given size. 

    indices() [1/2]
---------------

    template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| IndicesType& [Eigen::Transpositions](classeigen_1_1transpositions)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >::indices  | ( |  | ) |  |

 | inline |

 
 
Returns
a reference to the stored array representing the transpositions. 
    indices() [2/2]
---------------

    template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const IndicesType& [Eigen::Transpositions](classeigen_1_1transpositions)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >::indices  | ( |  | ) |  const |

 | inline |

 
 const version of [indices()](classeigen_1_1transpositions#a678dfbd513871473bcd36bbc453eed8c). 

    operator=()
-----------

    template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename \_StorageIndex >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Transpositions](classeigen_1_1transpositions)& [Eigen::Transpositions](classeigen_1_1transpositions)< SizeAtCompileTime, MaxSizeAtCompileTime, \_StorageIndex >::operator=  | ( | const TranspositionsBase< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Copies the *other* transpositions into `*this` 

   

---

The documentation for this class was generated from the following file:* [Transpositions.h](https://eigen.tuxfamily.org/dox/Transpositions_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Transpositions.html>

Eigen::TriangularBase
=====================

  
### template<typename Derived> class Eigen::TriangularBase< Derived >

 Base class for triangular part in a matrix. 

     ![Inheritance graph]      

|  |
| --- |
|  |
| enum  | { } |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |




|  |
| --- |
|  |
| template<typename Other >  |
| void  | [copyCoeff](classeigen_1_1triangularbase#a0abe130a9130ac6df16f3c8c55490b43) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col, Other &other) |
|  |
| template<typename DenseDerived >  |
| void  | [evalTo](classeigen_1_1triangularbase#a604d4f76a376ced36f8b9c3374c76c3e) ([MatrixBase](classeigen_1_1matrixbase)< DenseDerived > &other) const |
|  |
| template<typename DenseDerived >  |
| void  | [evalToLazy](classeigen_1_1triangularbase#ab8db3e55eee50cdc56650b3498e235eb) ([MatrixBase](classeigen_1_1matrixbase)< DenseDerived > &other) const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |

  anonymous enum
--------------

    template<typename Derived >  

|  |
| --- |
| anonymous enum |

 
 

| Enumerator |
| --- |
| SizeAtCompileTime  | This is equal to the number of coefficients, i.e. the number of rows times the number of columns, or to *Dynamic* if this is not known at compile-time. 

See also
RowsAtCompileTime, ColsAtCompileTime 
 |

    copyCoeff()
-----------

    template<typename Derived >   template<typename Other >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::TriangularBase](classeigen_1_1triangularbase)< Derived >::copyCoeff  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *row*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *col*,  |
|  |  | Other &  | *other* |
|  | ) |  |  |

 | inline |

 
 
See also
MatrixBase::copyCoeff(row,col) 
    evalTo()
--------

    template<typename Derived >   template<typename DenseDerived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::TriangularBase](classeigen_1_1triangularbase)< Derived >::evalTo  | ( | [MatrixBase](classeigen_1_1matrixbase)< DenseDerived > &  | *other* | ) |  const |

 
 Assigns a triangular or selfadjoint matrix to a dense matrix. If the matrix is triangular, the opposite part is set to zero. 

    evalToLazy()
------------

    template<typename Derived >   template<typename DenseDerived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::TriangularBase](classeigen_1_1triangularbase)< Derived >::evalToLazy  | ( | [MatrixBase](classeigen_1_1matrixbase)< DenseDerived > &  | *other* | ) |  const |

 
 Assigns a triangular or selfadjoint matrix to a dense matrix. If the matrix is triangular, the opposite part is set to zero. 

   

---

The documentation for this class was generated from the following file:* [TriangularMatrix.h](https://eigen.tuxfamily.org/dox/TriangularMatrix_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1TriangularBase.html>

Eigen::SVDBase
==============

  
### template<typename Derived> class Eigen::SVDBase< Derived >

 Base class of SVD algorithms. 

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | the type of the actual SVD decomposition |

   SVD decomposition consists in decomposing any n-by-p matrix *A* as a product 


 \[ A = U S V^\* \] 

  where *U* is a n-by-n unitary, *V* is a p-by-p unitary, and *S* is a n-by-p real positive matrix which is zero outside of its main diagonal; the diagonal entries of S are known as the *singular* *values* of *A* and the columns of *U* and *V* are known as the left and right *singular* *vectors* of *A* respectively.

 Singular values are always sorted in decreasing order.

 You can ask for only *thin* *U* or *V* to be computed, meaning the following. In case of a rectangular n-by-p matrix, letting *m* be the smaller value among *n* and *p*, there are only *m* singular vectors; the remaining columns of *U* and *V* do not correspond to actual singular vectors. Asking for *thin* *U* or *V* means asking for only their *m* first columns to be formed. So *U* is then a n-by-m matrix, and *V* is then a p-by-m matrix. Notice that thin *U* and *V* are all you need for (least squares) solving.

 The status of the computation can be retrived using the *[info()](classeigen_1_1svdbase#a06c311bc452dc1ca5abce2f640e15292 "Reports whether previous computation was successful.")* method. Unless *[info()](classeigen_1_1svdbase#a06c311bc452dc1ca5abce2f640e15292 "Reports whether previous computation was successful.")* returns *Success*, the results should be not considered well defined.

 If the input matrix has inf or nan coefficients, the result of the computation is undefined, and *[info()](classeigen_1_1svdbase#a06c311bc452dc1ca5abce2f640e15292 "Reports whether previous computation was successful.")* will return *InvalidInput*, but the computation is guaranteed to terminate in finite (and reasonable) time. 



See also
class [BDCSVD](classeigen_1_1bdcsvd "class Bidiagonal Divide and Conquer SVD"), class [JacobiSVD](classeigen_1_1jacobisvd "Two-sided Jacobi SVD decomposition of a rectangular matrix.") 
     ![Inheritance graph](https://eigen.tuxfamily.org/dox/classEigen_1_1SVDBase__inherit__graph.png)       

|  |
| --- |
|  |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1svdbase#a6229a37997eca1072b52cca5ee7a2bec) |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |




|  |
| --- |
|  |
| bool  | [computeU](classeigen_1_1svdbase#a705a7c2709e1624ccc19aa748a78d473) () const |
|  |
| bool  | [computeV](classeigen_1_1svdbase#a5f12efcb791eb007d4a4890ac5255ac4) () const |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1svdbase#a06c311bc452dc1ca5abce2f640e15292) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1svdbase#a06c311bc452dc1ca5abce2f640e15292) |
|  |
| const [MatrixUType](classeigen_1_1matrix) &  | [matrixU](classeigen_1_1svdbase#afc7fe1546b0f6e1801b86f22f5664cb8) () const |
|  |
| const [MatrixVType](classeigen_1_1matrix) &  | [matrixV](classeigen_1_1svdbase#a245a453b5e7347f737295c23133238c4) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonzeroSingularValues](classeigen_1_1svdbase#afe8a555f38393a319a71ec0f0331c9ef) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rank](classeigen_1_1svdbase#a30b89e24f42f1692079eea31b361d26a) () const |
|  |
| Derived &  | [setThreshold](classeigen_1_1svdbase#a1c95d05398fc15e410a28560ef70a5a6) (const RealScalar &[threshold](classeigen_1_1svdbase#a98b2ee98690358951807353812a05c69)) |
|  |
| Derived &  | [setThreshold](classeigen_1_1svdbase#a27586b69dbfb63f714d1d45fd6304f97) (Default\_t) |
|  |
| const SingularValuesType &  | [singularValues](classeigen_1_1svdbase#a4e7bac123570c348f7ed6be909e1e474) () const |
|  |
| template<typename Rhs >  |
| const [Solve](classeigen_1_1solve)< Derived, Rhs >  | [solve](classeigen_1_1svdbase#ab28499936c0764fe5b56b9f4de701e26) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| RealScalar  | [threshold](classeigen_1_1svdbase#a98b2ee98690358951807353812a05c69) () const |
|  |
| - Public Member Functions inherited from [Eigen::SolverBase< SVDBase< Derived > >](classeigen_1_1solverbase) |
| AdjointReturnType  | [adjoint](classeigen_1_1solverbase#a05a3686a89888681c8e0c2bcab6d1ce5) () const |
|  |
| [SVDBase](classeigen_1_1svdbase)< Derived > &  | [derived](classeigen_1_1solverbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const [SVDBase](classeigen_1_1svdbase)< Derived > &  | [derived](classeigen_1_1solverbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| const [Solve](classeigen_1_1solve)< [SVDBase](classeigen_1_1svdbase)< Derived >, Rhs >  | [solve](classeigen_1_1solverbase#a7fd647d110487799205df6f99547879d) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
|  | [SolverBase](classeigen_1_1solverbase#a4d5e5baddfba3790ab1a5f247dcc4dc1) () |
|  |
| [ConstTransposeReturnType](classeigen_1_1diagonal) | [transpose](classeigen_1_1solverbase#a732e75b5132bb4db3775916927b0e86c) () const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
|  | [SVDBase](classeigen_1_1svdbase#abed06fc6f4b743e1f76a7b317539da87) () |
|  | Default Constructor. [More...](classeigen_1_1svdbase#abed06fc6f4b743e1f76a7b317539da87) |
|  |

  Index
-----

    template<typename Derived >  

|  |
| --- |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::SVDBase](classeigen_1_1svdbase)< Derived >::[Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |

 
 
**[Deprecated:](deprecated#_deprecated000034)**
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3 
    SVDBase()
---------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::SVDBase](classeigen_1_1svdbase)< Derived >::[SVDBase](classeigen_1_1svdbase) | ( |  | ) |  |

 | inlineprotected |

 
 Default Constructor. 

 Default constructor of [SVDBase](classeigen_1_1svdbase "Base class of SVD algorithms.") 

    computeU()
----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::SVDBase](classeigen_1_1svdbase)< Derived >::computeU  | ( |  | ) |  const |

 | inline |

 
 
Returns
true if *U* (full or thin) is asked for in this SVD decomposition 
    computeV()
----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| bool [Eigen::SVDBase](classeigen_1_1svdbase)< Derived >::computeV  | ( |  | ) |  const |

 | inline |

 
 
Returns
true if *V* (full or thin) is asked for in this SVD decomposition 
    info()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::SVDBase](classeigen_1_1svdbase)< Derived >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether previous computation was successful. 

 
Returns

`Success` if computation was successful. 
    matrixU()
---------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [MatrixUType](classeigen_1_1matrix)& [Eigen::SVDBase](classeigen_1_1svdbase)< Derived >::matrixU  | ( |  | ) |  const |

 | inline |

 
 
Returns
the *U* matrix.
 For the SVD decomposition of a n-by-p matrix, letting *m* be the minimum of *n* and *p*, the U matrix is n-by-n if you asked for [ComputeFullU](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a9fa9302d510cee20c26311154937e23f) , and is n-by-m if you asked for [ComputeThinU](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9aa7fb4e98834788d0b1b0f2b8467d2527) .

 The *m* first columns of *U* are the left singular vectors of the matrix being decomposed.

 This method asserts that you asked for *U* to be computed. 

    matrixV()
---------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [MatrixVType](classeigen_1_1matrix)& [Eigen::SVDBase](classeigen_1_1svdbase)< Derived >::matrixV  | ( |  | ) |  const |

 | inline |

 
 
Returns
the *V* matrix.
 For the SVD decomposition of a n-by-p matrix, letting *m* be the minimum of *n* and *p*, the V matrix is p-by-p if you asked for [ComputeFullV](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a36581f7c662f7def31efd500c284f930) , and is p-by-m if you asked for [ComputeThinV](group__enums#ggae3e239fb70022eb8747994cf5d68b4a9a540036417bfecf2e791a70948c227f47) .

 The *m* first columns of *V* are the right singular vectors of the matrix being decomposed.

 This method asserts that you asked for *V* to be computed. 

    nonzeroSingularValues()
-----------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::SVDBase](classeigen_1_1svdbase)< Derived >::nonzeroSingularValues  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of singular values that are not exactly 0 
    rank()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::SVDBase](classeigen_1_1svdbase)< Derived >::rank  | ( |  | ) |  const |

 | inline |

 
 
Returns
the rank of the matrix of which `*this` is the SVD.
 
Note
This method has to determine which singular values should be considered nonzero. For that, it uses the threshold value that you can control by calling [setThreshold(const RealScalar&)](classeigen_1_1svdbase#a1c95d05398fc15e410a28560ef70a5a6). 
    setThreshold() [1/2]
--------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::SVDBase](classeigen_1_1svdbase)< Derived >::setThreshold  | ( | const RealScalar &  | *threshold* | ) |  |

 | inline |

 
 Allows to prescribe a threshold to be used by certain methods, such as [rank()](classeigen_1_1svdbase#a30b89e24f42f1692079eea31b361d26a) and [solve()](classeigen_1_1svdbase#ab28499936c0764fe5b56b9f4de701e26), which need to determine when singular values are to be considered nonzero. This is not used for the SVD decomposition itself.

 When it needs to get the threshold value, [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") calls [threshold()](classeigen_1_1svdbase#a98b2ee98690358951807353812a05c69). The default is `NumTraits<Scalar>::epsilon()` 

 
Parameters
 

|  |  |
| --- | --- |
| threshold | The new value to use as the threshold. |

   A singular value will be considered nonzero if its value is strictly greater than \( \vert singular value \vert \leqslant threshold \times \vert max singular value \vert \).

 If you want to come back to the default behavior, call [setThreshold(Default\_t)](classeigen_1_1svdbase#a27586b69dbfb63f714d1d45fd6304f97) 

    setThreshold() [2/2]
--------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Derived& [Eigen::SVDBase](classeigen_1_1svdbase)< Derived >::setThreshold  | ( | Default\_t  |  | ) |  |

 | inline |

 
 Allows to come back to the default behavior, letting [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") use its default formula for determining the threshold.

 You should pass the special object Eigen::Default as parameter here. 



```
svd.setThreshold(Eigen::Default); 

```

See the documentation of [setThreshold(const RealScalar&)](classeigen_1_1svdbase#a1c95d05398fc15e410a28560ef70a5a6). 

    singularValues()
----------------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const SingularValuesType& [Eigen::SVDBase](classeigen_1_1svdbase)< Derived >::singularValues  | ( |  | ) |  const |

 | inline |

 
 
Returns
the vector of singular values.
 For the SVD decomposition of a n-by-p matrix, letting *m* be the minimum of *n* and *p*, the returned vector has size *m*. Singular values are always sorted in decreasing order. 

    solve()
-------

    template<typename Derived >   template<typename Rhs >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Solve](classeigen_1_1solve)<Derived, Rhs> [Eigen::SVDBase](classeigen_1_1svdbase)< Derived >::solve  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &  | *b* | ) |  const |

 | inline |

 
 
Returns
a (least squares) solution of \( A x = b \) using the current SVD decomposition of A.
 
Parameters
 

|  |  |
| --- | --- |
| b | the right-hand-side of the equation to solve. |

   
Note
Solving requires both U and V to be computed. Thin U and V are enough, there is no need for full U or V.  SVD solving is implicitly least-squares. Thus, this method serves both purposes of exact solving and least-squares solving. In other words, the returned solution is guaranteed to minimize the Euclidean norm \( \Vert A x - b \Vert \). 
    threshold()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::SVDBase](classeigen_1_1svdbase)< Derived >::threshold  | ( |  | ) |  const |

 | inline |

 
 Returns the threshold that will be used by certain methods such as [rank()](classeigen_1_1svdbase#a30b89e24f42f1692079eea31b361d26a).

 See the documentation of [setThreshold(const RealScalar&)](classeigen_1_1svdbase#a1c95d05398fc15e410a28560ef70a5a6). 

   

---

The documentation for this class was generated from the following file:* [SVDBase.h](https://eigen.tuxfamily.org/dox/SVDBase_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1SVDBase.html>

Eigen::Triplet
==============

  
### template<typename Scalar, typename StorageIndex = typename SparseMatrix<Scalar>::StorageIndex> class Eigen::Triplet< Scalar, StorageIndex >

 A small structure to hold a non zero as a triplet (i,j,value). 

 
See also

[SparseMatrix::setFromTriplets()](classeigen_1_1sparsematrix#acc35051d698e3973f1de5b9b78dbe345) 
 


|  |
| --- |
|  |
| const StorageIndex &  | [col](classeigen_1_1triplet#a3531e3e2098507a069a368d72d46471e) () const |
|  |
| const StorageIndex &  | [row](classeigen_1_1triplet#ae88b0ad6d31daa53e298b9cc4201fdee) () const |
|  |
| const Scalar &  | [value](classeigen_1_1triplet#a003ea53c6559b106406f7916d6610547) () const |
|  |

  col()
-----

    template<typename Scalar , typename StorageIndex = typename SparseMatrix<Scalar>::StorageIndex>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const StorageIndex& [Eigen::Triplet](classeigen_1_1triplet)< Scalar, StorageIndex >::col  | ( |  | ) |  const |

 | inline |

 
 
Returns
the column index of the element 
    row()
-----

    template<typename Scalar , typename StorageIndex = typename SparseMatrix<Scalar>::StorageIndex>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const StorageIndex& [Eigen::Triplet](classeigen_1_1triplet)< Scalar, StorageIndex >::row  | ( |  | ) |  const |

 | inline |

 
 
Returns
the row index of the element 
    value()
-------

    template<typename Scalar , typename StorageIndex = typename SparseMatrix<Scalar>::StorageIndex>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const Scalar& [Eigen::Triplet](classeigen_1_1triplet)< Scalar, StorageIndex >::value  | ( |  | ) |  const |

 | inline |

 
 
Returns
the value of the element 
   

---

The documentation for this class was generated from the following file:* [SparseUtil.h](https://eigen.tuxfamily.org/dox/SparseUtil_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Triplet.html>

Eigen::WithFormat
=================

  
### template<typename ExpressionType> class Eigen::WithFormat< ExpressionType >

 Pseudo expression providing matrix output with given format. 

 
Template Parameters
 

|  |  |
| --- | --- |
| ExpressionType | the type of the object on which IO stream operations are performed |

   This class represents an expression with stream operators controlled by a given [IOFormat](structeigen_1_1ioformat "Stores a set of parameters controlling the way matrices are printed."). It is the return type of [DenseBase::format()](classeigen_1_1densebase#ab231f1a6057f28d4244145e12c9fc0c7) and most of the time this is the only way it is used.

 See class [IOFormat](structeigen_1_1ioformat "Stores a set of parameters controlling the way matrices are printed.") for some examples.

 
See also

[DenseBase::format()](classeigen_1_1densebase#ab231f1a6057f28d4244145e12c9fc0c7), class [IOFormat](structeigen_1_1ioformat "Stores a set of parameters controlling the way matrices are printed.") 
 


---

The documentation for this class was generated from the following file:* [IO.h](https://eigen.tuxfamily.org/dox/IO_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1WithFormat.html>

Eigen::symbolic::SymbolExpr
===========================

  
### template<typename tag> class Eigen::symbolic::SymbolExpr< tag >

 Expression of a symbol uniquely identified by the template parameter type `tag` 

     ![Inheritance graph](https://eigen.tuxfamily.org/dox/classEigen_1_1symbolic_1_1SymbolExpr__inherit__graph.png)      

|  |
| --- |
|  |
| typedef tag  | [Tag](classeigen_1_1symbolic_1_1symbolexpr#af2c04ad1ee1251a2d540f0d804da4c68) |
|  |




|  |
| --- |
|  |
| [SymbolValue](classeigen_1_1symbolic_1_1symbolvalue)< [Tag](classeigen_1_1symbolic_1_1symbolexpr#af2c04ad1ee1251a2d540f0d804da4c68) >  | [operator=](classeigen_1_1symbolic_1_1symbolexpr#a0bd43167911dc398fba4e3f0f142a64d) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) val) const |
|  |
| - Public Member Functions inherited from [Eigen::symbolic::BaseExpr< SymbolExpr< tag > >](classeigen_1_1symbolic_1_1baseexpr) |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [eval](classeigen_1_1symbolic_1_1baseexpr#a4149f50157823063e59c18ce04ed2496) (const T &values) const |
|  |

  Tag
---

    template<typename tag >  

|  |
| --- |
| typedef tag [Eigen::symbolic::SymbolExpr](classeigen_1_1symbolic_1_1symbolexpr)< tag >::[Tag](classeigen_1_1symbolic_1_1symbolexpr#af2c04ad1ee1251a2d540f0d804da4c68) |

 
 Alias to the template parameter `tag` 

    operator=()
-----------

    template<typename tag >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [SymbolValue](classeigen_1_1symbolic_1_1symbolvalue)<[Tag](classeigen_1_1symbolic_1_1symbolexpr#af2c04ad1ee1251a2d540f0d804da4c68)> [Eigen::symbolic::SymbolExpr](classeigen_1_1symbolic_1_1symbolexpr)< tag >::operator=  | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *val* | ) |  const |

 | inline |

 
 Associate the value *val* to the given symbol `*this`, uniquely identified by its `Tag`.

 The returned object should be passed to ExprBase::eval() to evaluate a given expression with this specified runtime-time value. 

   

---

The documentation for this class was generated from the following file:* [SymbolicIndex.h](https://eigen.tuxfamily.org/dox/SymbolicIndex_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1symbolic_1_1SymbolExpr.html>

Eigen::TriangularViewImpl
=========================

  
### template<typename MatrixType, unsigned int Mode> class Eigen::TriangularViewImpl< MatrixType, Mode, Sparse >

 Base class for a triangular part in a **sparse** matrix. 

 This class is an abstract base class of class [TriangularView](classeigen_1_1triangularview "Expression of a triangular part in a matrix."), and objects of type TriangularViewImpl cannot be instantiated. It extends class [TriangularView](classeigen_1_1triangularview "Expression of a triangular part in a matrix.") with additional methods which are available for sparse expressions only.

 
See also
class [TriangularView](classeigen_1_1triangularview "Expression of a triangular part in a matrix."), SparseMatrixBase::triangularView() 
     ![Inheritance graph]       

|  |
| --- |
|  |
| template<typename OtherDerived >  |
| void  | [solveInPlace](classeigen_1_1triangularviewimpl_3_01matrixtype_00_01mode_00_01sparse_01_4#a3f3385e827fcc0bf27d1ec21c80740bc) ([MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| template<typename OtherDerived >  |
| void  | [solveInPlace](classeigen_1_1triangularviewimpl_3_01matrixtype_00_01mode_00_01sparse_01_4#a70190d4105e1fd4f27abbf73365dfa0c) ([SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &other) const |
|  |
| - Public Member Functions inherited from [Eigen::SparseMatrixBase< TriangularView< MatrixType, Mode > >](classeigen_1_1sparsematrixbase) |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1sparsematrixbase#aca7ce296424ef6e478ab0fb19547a7ee) () const |
|  |
| const internal::eval< [TriangularView](classeigen_1_1triangularview)< MatrixType, Mode > >::type  | [eval](classeigen_1_1sparsematrixbase#a761bd872a06b59632fcff7b7807a77ce) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1sparsematrixbase#a180fcba1ccf3cdf3252a263bc1de7a1d) () const |
|  |
| bool  | [isVector](classeigen_1_1sparsematrixbase#a7eedffa867031f649fd0fb9cc23ce4be) () const |
|  |
| const [Product](classeigen_1_1product)< [TriangularView](classeigen_1_1triangularview)< MatrixType, Mode >, OtherDerived, AliasFreeProduct >  | [operator\*](classeigen_1_1sparsematrixbase#a9d4d71b3f34389e6fc01f2b86e43f7a4) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &other) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1sparsematrixbase#ac86cc88a4cfef21db6b64ec0ab4c8f0a) () const |
|  |
| const [SparseView](classeigen_1_1sparseview)< [TriangularView](classeigen_1_1triangularview)< MatrixType, Mode > >  | [pruned](classeigen_1_1sparsematrixbase#ac8d0414b56d9d620ce9a698c1b281e5d) (const Scalar &reference=Scalar(0), const RealScalar &epsilon=[NumTraits](structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1sparsematrixbase#a1944e9fa9ce7937bfc3a87b2cb94371f) () const |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1sparsematrixbase#a124bc57921775eb9aa2dfd9727e23472) () const |
|  |
| SparseSymmetricPermutationProduct< [TriangularView](classeigen_1_1triangularview)< MatrixType, Mode >, Upper|Lower >  | [twistedBy](classeigen_1_1sparsematrixbase#a51d4898bd6a57cc3ba543a39b102423e) (const [PermutationMatrix](classeigen_1_1permutationmatrix)< Dynamic, Dynamic, [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) > &perm) const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< TriangularView< MatrixType, Mode > >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| [TriangularView](classeigen_1_1triangularview)< MatrixType, Mode > &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const [TriangularView](classeigen_1_1triangularview)< MatrixType, Mode > &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::SparseMatrixBase< TriangularView< MatrixType, Mode > >](classeigen_1_1sparsematrixbase) |
| typedef internal::traits< [TriangularView](classeigen_1_1triangularview)< MatrixType, Mode > >::[StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) | [StorageIndex](classeigen_1_1sparsematrixbase#a0b540ba724726ebe953f8c0df06081ed) |
|  |
| typedef Scalar  | [value\_type](classeigen_1_1sparsematrixbase#ac254d3b61718ebc2136d27bac043dcb7) |
|  |
| - Public Types inherited from [Eigen::EigenBase< TriangularView< MatrixType, Mode > >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  solveInPlace() [1/2]
--------------------

    template<typename MatrixType , unsigned int Mode>   template<typename OtherDerived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void Eigen::TriangularViewImpl< MatrixType, Mode, [Sparse](structeigen_1_1sparse) >::solveInPlace  | ( | [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  const |

 
 Applies the inverse of `*this` to the dense vector or matrix *other*, "in-place" 

    solveInPlace() [2/2]
--------------------

    template<typename MatrixType , unsigned int Mode>   template<typename OtherDerived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void Eigen::TriangularViewImpl< MatrixType, Mode, [Sparse](structeigen_1_1sparse) >::solveInPlace  | ( | [SparseMatrixBase](classeigen_1_1sparsematrixbase)< OtherDerived > &  | *other* | ) |  const |

 
 Applies the inverse of `*this` to the sparse vector or matrix *other*, "in-place" 

   

---

The documentation for this class was generated from the following file:* [SparseTriangularView.h](https://eigen.tuxfamily.org/dox/SparseTriangularView_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1TriangularViewImpl_3_01MatrixType_00_01Mode_00_01Sparse_01_4.html>

Eigen::UmfPackLU
================

  
### template<typename \_MatrixType> class Eigen::UmfPackLU< \_MatrixType >

 A sparse LU factorization and solver based on UmfPack. 

 This class allows to solve for A.X = B sparse linear problems via a LU factorization using the UmfPack library. The sparse matrix A must be squared and full rank. The vectors or matrices X and B can be either dense or sparse.

 
Warning
The input matrix A should be in a **compressed** and **column-major** form. Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix. 
 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<> |

   This class follows the [sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept) .

 
See also

[Sparse solver concept](group__topicsparsesystems#TutorialSparseSolverConcept), class [SparseLU](classeigen_1_1sparselu "Sparse supernodal LU factorization for general matrices.") 
     ![Inheritance graph]      

|  |
| --- |
|  |
| template<typename InputMatrixType >  |
| void  | [analyzePattern](classeigen_1_1umfpacklu#ac7ea28b2017d6b26b7b08497f294e5e6) (const InputMatrixType &matrix) |
|  |
| template<typename InputMatrixType >  |
| void  | [compute](classeigen_1_1umfpacklu#a05fb2b5717ebd67e46b83439721ceee7) (const InputMatrixType &matrix) |
|  |
| template<typename InputMatrixType >  |
| void  | [factorize](classeigen_1_1umfpacklu#a1471bf890503e743c45d75cc02a5345d) (const InputMatrixType &matrix) |
|  |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1umfpacklu#a68738a0d99c67316877706f98b033402) () const |
|  | Reports whether previous computation was successful. [More...](classeigen_1_1umfpacklu#a68738a0d99c67316877706f98b033402) |
|  |
| void  | [printUmfpackControl](classeigen_1_1umfpacklu#a1e3543c0e6ae499e3d25f5a8a8f50623) () |
|  |
| void  | [printUmfpackInfo](classeigen_1_1umfpacklu#a9b42dd0135fc9bcffec37f043022f135) () |
|  |
| void  | [printUmfpackStatus](classeigen_1_1umfpacklu#aea06a54a1e4e8fc1ec522103825cc7b6) () |
|  |
| [UmfpackControl](classeigen_1_1array) &  | [umfpackControl](classeigen_1_1umfpacklu#a679bd267a0407d4ca985d97f0b864101) () |
|  |
| const [UmfpackControl](classeigen_1_1array) &  | [umfpackControl](classeigen_1_1umfpacklu#ae83d178202f3d44c1789c1c93842bf2e) () const |
|  |
| int  | [umfpackFactorizeReturncode](classeigen_1_1umfpacklu#a822fa9d82754269c379dc4ce17920b0a) () const |
|  |
| - Public Member Functions inherited from [Eigen::SparseSolverBase< UmfPackLU< \_MatrixType > >](classeigen_1_1sparsesolverbase) |
| const [Solve](classeigen_1_1solve)< [UmfPackLU](classeigen_1_1umfpacklu)< \_MatrixType >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a4a66e9498b06e3ec4ec36f06b26d4e8f) (const [MatrixBase](classeigen_1_1matrixbase)< Rhs > &b) const |
|  |
| const [Solve](classeigen_1_1solve)< [UmfPackLU](classeigen_1_1umfpacklu)< \_MatrixType >, Rhs >  | [solve](classeigen_1_1sparsesolverbase#a3a8d97173b6e2630f484589b3471cfc7) (const [SparseMatrixBase](classeigen_1_1sparsematrixbase)< Rhs > &b) const |
|  |
|  | [SparseSolverBase](classeigen_1_1sparsesolverbase#aacd99fa17db475e74d3834767f392f33) () |
|  |

  analyzePattern()
----------------

    template<typename \_MatrixType >   template<typename InputMatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::UmfPackLU](classeigen_1_1umfpacklu)< \_MatrixType >::analyzePattern  | ( | const InputMatrixType &  | *matrix* | ) |  |

 | inline |

 
 Performs a symbolic decomposition on the sparcity of *matrix*.

 This function is particularly useful when solving for several problems having the same structure.

 
See also

[factorize()](classeigen_1_1umfpacklu#a1471bf890503e743c45d75cc02a5345d), [compute()](classeigen_1_1umfpacklu#a05fb2b5717ebd67e46b83439721ceee7) 
    compute()
---------

    template<typename \_MatrixType >   template<typename InputMatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::UmfPackLU](classeigen_1_1umfpacklu)< \_MatrixType >::compute  | ( | const InputMatrixType &  | *matrix* | ) |  |

 | inline |

 
 Computes the sparse Cholesky decomposition of *matrix* Note that the matrix should be column-major, and in compressed format for best performance. 



See also

[SparseMatrix::makeCompressed()](classeigen_1_1sparsematrix#a5ff54ffc10296f9466dc81fa888733fd). 
    factorize()
-----------

    template<typename \_MatrixType >   template<typename InputMatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::UmfPackLU](classeigen_1_1umfpacklu)< \_MatrixType >::factorize  | ( | const InputMatrixType &  | *matrix* | ) |  |

 | inline |

 
 Performs a numeric decomposition of *matrix* 

 The given matrix must has the same sparcity than the matrix on which the pattern anylysis has been performed.

 
See also

[analyzePattern()](classeigen_1_1umfpacklu#ac7ea28b2017d6b26b7b08497f294e5e6), [compute()](classeigen_1_1umfpacklu#a05fb2b5717ebd67e46b83439721ceee7) 
    info()
------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::UmfPackLU](classeigen_1_1umfpacklu)< \_MatrixType >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether previous computation was successful. 

 
Returns

`Success` if computation was successful, `NumericalIssue` if the matrix.appears to be negative. 
    printUmfpackControl()
---------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::UmfPackLU](classeigen_1_1umfpacklu)< \_MatrixType >::printUmfpackControl  | ( |  | ) |  |

 | inline |

 
 Prints the current UmfPack control settings.

 
See also

[umfpackControl()](classeigen_1_1umfpacklu#a679bd267a0407d4ca985d97f0b864101) 
    printUmfpackInfo()
------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::UmfPackLU](classeigen_1_1umfpacklu)< \_MatrixType >::printUmfpackInfo  | ( |  | ) |  |

 | inline |

 
 Prints statistics collected by UmfPack.

 
See also

[analyzePattern()](classeigen_1_1umfpacklu#ac7ea28b2017d6b26b7b08497f294e5e6), [compute()](classeigen_1_1umfpacklu#a05fb2b5717ebd67e46b83439721ceee7) 
    printUmfpackStatus()
--------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::UmfPackLU](classeigen_1_1umfpacklu)< \_MatrixType >::printUmfpackStatus  | ( |  | ) |  |

 | inline |

 
 Prints the status of the previous factorization operation performed by UmfPack (symbolic or numerical factorization).

 
See also

[analyzePattern()](classeigen_1_1umfpacklu#ac7ea28b2017d6b26b7b08497f294e5e6), [compute()](classeigen_1_1umfpacklu#a05fb2b5717ebd67e46b83439721ceee7) 
    umfpackControl() [1/2]
----------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [UmfpackControl](classeigen_1_1array)& [Eigen::UmfPackLU](classeigen_1_1umfpacklu)< \_MatrixType >::umfpackControl  | ( |  | ) |  |

 | inline |

 
 Provides access to the control settings array used by UmfPack.

 If this array contains NaN's, the default values are used.

 See UMFPACK documentation for details. 

    umfpackControl() [2/2]
----------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [UmfpackControl](classeigen_1_1array)& [Eigen::UmfPackLU](classeigen_1_1umfpacklu)< \_MatrixType >::umfpackControl  | ( |  | ) |  const |

 | inline |

 
 Provides access to the control settings array used by UmfPack.

 If this array contains NaN's, the default values are used.

 See UMFPACK documentation for details. 

    umfpackFactorizeReturncode()
----------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| int [Eigen::UmfPackLU](classeigen_1_1umfpacklu)< \_MatrixType >::umfpackFactorizeReturncode  | ( |  | ) |  const |

 | inline |

 
 Provides the return status code returned by UmfPack during the numeric factorization.

 
See also

[factorize()](classeigen_1_1umfpacklu#a1471bf890503e743c45d75cc02a5345d), [compute()](classeigen_1_1umfpacklu#a05fb2b5717ebd67e46b83439721ceee7) 
   

---

The documentation for this class was generated from the following file:* [UmfPackSupport.h](https://eigen.tuxfamily.org/dox/UmfPackSupport_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1UmfPackLU.html>

Eigen::UniformScaling
=====================

  
### template<typename \_Scalar> class Eigen::UniformScaling< \_Scalar >

 Represents a generic uniform scaling transformation. 

 This is defined in the Geometry module.



```
#include <Eigen/Geometry> 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the scalar type, i.e., the type of the coefficients. |

   This class represent a uniform scaling transformation. It is the return type of Scaling(Scalar), and most of the time this is the only way it is used. In particular, this class is not aimed to be used to store a scaling transformation, but rather to make easier the constructions and updates of [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") objects.

 To represent an axis aligned scaling, use the [DiagonalMatrix](classeigen_1_1diagonalmatrix "Represents a diagonal matrix with its storage.") class.

 
See also

[Scaling()](namespaceeigen#a02918175ff75e5df9fd291cf5fc3fd1b), class [DiagonalMatrix](classeigen_1_1diagonalmatrix "Represents a diagonal matrix with its storage."), [MatrixBase::asDiagonal()](classeigen_1_1matrixbase#a14235b62c90f93fe910070b4743782d0), class [Translation](classeigen_1_1translation "Represents a translation transformation."), class [Transform](classeigen_1_1transform "Represents an homogeneous transformation in a N dimensional space.") 
 


|  |
| --- |
|  |
| typedef \_Scalar  | [Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283) |
|  |




|  |
| --- |
|  |
| template<typename NewScalarType >  |
| [UniformScaling](classeigen_1_1uniformscaling)< NewScalarType >  | [cast](classeigen_1_1uniformscaling#af93a9ee1d6efc102b65a197f3ea3d4cd) () const |
|  |
| [UniformScaling](classeigen_1_1uniformscaling) | [inverse](classeigen_1_1uniformscaling#a60dba22bebe9e2c97cfbc76f85eb1b78) () const |
|  |
| bool  | [isApprox](classeigen_1_1uniformscaling#a7f736fdbe43f7bce3d277312efdc315e) (const [UniformScaling](classeigen_1_1uniformscaling) &other, const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283) >::Real &prec=[NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283) >::dummy\_precision()) const |
|  |
| template<typename Derived >  |
| Eigen::internal::plain\_matrix\_type< Derived >::type  | [operator\*](classeigen_1_1uniformscaling#a8abd57298d10bd620bdfc459d22e8add) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &other) const |
|  |
| template<int Dim, int Mode, int Options>  |
| internal::uniformscaling\_times\_affine\_returntype< [Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283), Dim, Mode >::type  | [operator\*](classeigen_1_1uniformscaling#ad8c9401526e9ade727036b6d255fbdc0) (const [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283), Dim, Mode, Options > &t) const |
|  |
| template<int Dim>  |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283), Dim, [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb) >  | [operator\*](classeigen_1_1uniformscaling#a19c405341f2c861eb0ddfc4f760fecf8) (const [Translation](classeigen_1_1translation)< [Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283), Dim > &t) const |
|  |
| [UniformScaling](classeigen_1_1uniformscaling) | [operator\*](classeigen_1_1uniformscaling#af3044cffe5703a1946c33a953b0f9bb6) (const [UniformScaling](classeigen_1_1uniformscaling) &other) const |
|  |
|  | [UniformScaling](classeigen_1_1uniformscaling#ab17e233af501c69ff47c0dd16f43cc39) () |
|  |
|  | [UniformScaling](classeigen_1_1uniformscaling#a3a3e2fa318eb29c2c4f87e23a8a75144) (const [Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283) &s) |
|  |
| template<typename OtherScalarType >  |
|  | [UniformScaling](classeigen_1_1uniformscaling#a898cc0c97625ce671d7ea951f6eb2fc4) (const [UniformScaling](classeigen_1_1uniformscaling)< OtherScalarType > &other) |
|  |




|  |
| --- |
|  |
| (Note that these are not member functions.)  |
| template<typename Derived , typename Scalar >  |
|  | [operator\*](classeigen_1_1uniformscaling#a8f79e131479dbe709ee1173b1be9a8f0) (const [MatrixBase](classeigen_1_1matrixbase)< Derived > &matrix, const [UniformScaling](classeigen_1_1uniformscaling)< [Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283) > &s) |
|  |

  Scalar
------

    template<typename \_Scalar >  

|  |
| --- |
| typedef \_Scalar [Eigen::UniformScaling](classeigen_1_1uniformscaling)< \_Scalar >::[Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283) |

 
 the scalar type of the coefficients 

    UniformScaling() [1/3]
----------------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::UniformScaling](classeigen_1_1uniformscaling)< \_Scalar >::[UniformScaling](classeigen_1_1uniformscaling) | ( |  | ) |  |

 | inline |

 
 Default constructor without initialization. 

    UniformScaling() [2/3]
----------------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::UniformScaling](classeigen_1_1uniformscaling)< \_Scalar >::[UniformScaling](classeigen_1_1uniformscaling) | ( | const [Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283) &  | *s* | ) |  |

 | inlineexplicit |

 
 Constructs and initialize a uniform scaling transformation 

    UniformScaling() [3/3]
----------------------

    template<typename \_Scalar >   template<typename OtherScalarType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::UniformScaling](classeigen_1_1uniformscaling)< \_Scalar >::[UniformScaling](classeigen_1_1uniformscaling) | ( | const [UniformScaling](classeigen_1_1uniformscaling)< OtherScalarType > &  | *other* | ) |  |

 | inlineexplicit |

 
 Copy constructor with scalar type conversion 

    cast()
------

    template<typename \_Scalar >   template<typename NewScalarType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [UniformScaling](classeigen_1_1uniformscaling)<NewScalarType> [Eigen::UniformScaling](classeigen_1_1uniformscaling)< \_Scalar >::cast  | ( |  | ) |  const |

 | inline |

 
 
Returns

`*this` with scalar type casted to *NewScalarType* 
 Note that if *NewScalarType* is equal to the current scalar type of `*this` then this function smartly returns a const reference to `*this`. 

    inverse()
---------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [UniformScaling](classeigen_1_1uniformscaling) [Eigen::UniformScaling](classeigen_1_1uniformscaling)< \_Scalar >::inverse  | ( |  | ) |  const |

 | inline |

 
 
Returns
the inverse scaling 
    isApprox()
----------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::UniformScaling](classeigen_1_1uniformscaling)< \_Scalar >::isApprox  | ( | const [UniformScaling](classeigen_1_1uniformscaling)< \_Scalar > &  | *other*,  |
|  |  | const typename [NumTraits](structeigen_1_1numtraits)< [Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283) >::Real &  | *prec* = `[NumTraits](structeigen_1_1numtraits)<[Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283)>::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 
Returns

`true` if `*this` is approximately equal to *other*, within the precision determined by *prec*.
 
See also

[MatrixBase::isApprox()](classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) 
    operator\*() [1/4]
------------------

    template<typename \_Scalar >   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Eigen::internal::plain\_matrix\_type<Derived>::type [Eigen::UniformScaling](classeigen_1_1uniformscaling)< \_Scalar >::operator\*  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *other* | ) |  const |

 | inline |

 
 Concatenates a uniform scaling and a linear transformation matrix 

    operator\*() [2/4]
------------------

    template<typename \_Scalar >   template<int Dim, int Mode, int Options>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| internal::uniformscaling\_times\_affine\_returntype<[Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283),Dim,Mode>::type [Eigen::UniformScaling](classeigen_1_1uniformscaling)< \_Scalar >::operator\*  | ( | const [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283), Dim, Mode, Options > &  | *t* | ) |  const |

 | inline |

 
 Concatenates a uniform scaling and an affine transformation 

    operator\*() [3/4]
------------------

    template<typename Scalar >   template<int Dim>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Transform](classeigen_1_1transform)< [Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283), Dim, [Affine](group__enums#ggaee59a86102f150923b0cac6d4ff05107a0872f0a82453aaae40339c33acbb31fb) > [Eigen::UniformScaling](classeigen_1_1uniformscaling)< [Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283) >::operator\*  | ( | const [Translation](classeigen_1_1translation)< [Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283), Dim > &  | *t* | ) |  const |

 | inline |

 
 Concatenates a uniform scaling and a translation 

    operator\*() [4/4]
------------------

    template<typename \_Scalar >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [UniformScaling](classeigen_1_1uniformscaling) [Eigen::UniformScaling](classeigen_1_1uniformscaling)< \_Scalar >::operator\*  | ( | const [UniformScaling](classeigen_1_1uniformscaling)< \_Scalar > &  | *other* | ) |  const |

 | inline |

 
 Concatenates two uniform scaling 

    operator\*()
------------

    template<typename Derived , typename Scalar >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| operator\*  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Derived > &  | *matrix*,  |
|  |  | const [UniformScaling](classeigen_1_1uniformscaling)< [Scalar](classeigen_1_1uniformscaling#a04c4339f58f1210c5d4d34b1bd7ae283) > &  | *s* |
|  | ) |  |  |

 | related |

 
 Concatenates a linear transformation matrix and a uniform scaling 

   

---

The documentation for this class was generated from the following file:* [Scaling.h](https://eigen.tuxfamily.org/dox/Scaling_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1UniformScaling.html>

Eigen::VectorBlock
==================

  
### template<typename VectorType, int Size> class Eigen::VectorBlock< VectorType, Size >

 Expression of a fixed-size or dynamic-size sub-vector. 

 
Template Parameters
 

|  |  |
| --- | --- |
| VectorType | the type of the object in which we are taking a sub-vector  |
| Size | size of the sub-vector we are taking at compile time (optional) |

   This class represents an expression of either a fixed-size or dynamic-size sub-vector. It is the return type of DenseBase::segment(Index,Index) and DenseBase::segment<int>(Index) and most of the time this is the only way it is used.

 However, if you want to directly manipulate sub-vector expressions, for instance if you want to write a function returning such an expression, you will need to use this class.

 Here is an example illustrating the dynamic case: 



```
#include <Eigen/Core>
#include <iostream>
using namespace [Eigen](namespaceeigen);
using namespace std;
 
template<typename Derived>
[Eigen::VectorBlock<Derived>](classeigen_1_1vectorblock)
segmentFromRange(MatrixBase<Derived>& v, int start, int end)
{
  return [Eigen::VectorBlock<Derived>](classeigen_1_1vectorblock)(v.derived(), start, end-start);
}
 
template<typename Derived>
const [Eigen::VectorBlock<const Derived>](classeigen_1_1vectorblock)
segmentFromRange(const MatrixBase<Derived>& v, int start, int end)
{
  return [Eigen::VectorBlock<const Derived>](classeigen_1_1vectorblock)(v.derived(), start, end-start);
}
 
int main(int, char**)
{
  Matrix<int,1,6> v; v << 1,2,3,4,5,6;
  cout << segmentFromRange(2*v, 2, 4) << endl; // calls the const version
  segmentFromRange(v, 1, 3) *= 5;              // calls the non-const version
  cout << "Now the vector v is:" << endl << v << endl;
  return 0;
}
```

 Output: 



```
6 8
Now the vector v is:
 1 10 15  4  5  6

```


Note
Even though this expression has dynamic size, in the case where *VectorType* has fixed size, this expression inherits a fixed maximal size which means that evaluating it does not cause a dynamic memory allocation.
 Here is an example illustrating the fixed-size case: 



```
#include <Eigen/Core>
#include <iostream>
using namespace [Eigen](namespaceeigen);
using namespace std;
 
template<typename Derived>
[Eigen::VectorBlock<Derived, 2>](classeigen_1_1vectorblock)
firstTwo(MatrixBase<Derived>& v)
{
  return [Eigen::VectorBlock<Derived, 2>](classeigen_1_1vectorblock)(v.derived(), 0);
}
 
template<typename Derived>
const [Eigen::VectorBlock<const Derived, 2>](classeigen_1_1vectorblock)
firstTwo(const MatrixBase<Derived>& v)
{
  return [Eigen::VectorBlock<const Derived, 2>](classeigen_1_1vectorblock)(v.derived(), 0);
}
 
int main(int, char**)
{
  Matrix<int,1,6> v; v << 1,2,3,4,5,6;
  cout << firstTwo(4*v) << endl; // calls the const version
  firstTwo(v) *= 2;              // calls the non-const version
  cout << "Now the vector v is:" << endl << v << endl;
  return 0;
}

```

 Output: 



```
4 8
Now the vector v is:
2 4 3 4 5 6

```


See also
class [Block](classeigen_1_1block "Expression of a fixed-size or dynamic-size block."), DenseBase::segment(Index,Index,Index,Index), DenseBase::segment(Index,Index) 
     ![Inheritance graph]      

|  |
| --- |
|  |
|  | [VectorBlock](classeigen_1_1vectorblock#a2364b6e64015c451ed93b68d39eaeffd) (VectorType &vector, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) start) |
|  |
|  | [VectorBlock](classeigen_1_1vectorblock#a11a5f0478de60b9cd8c15faf6dbc5baf) (VectorType &vector, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) start, [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) size) |
|  |

  VectorBlock() [1/2]
-------------------

    template<typename VectorType , int Size>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::VectorBlock](classeigen_1_1vectorblock)< VectorType, Size >::[VectorBlock](classeigen_1_1vectorblock) | ( | VectorType &  | *vector*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *start*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *size* |
|  | ) |  |  |

 | inline |

 
 Dynamic-size constructor 

    VectorBlock() [2/2]
-------------------

    template<typename VectorType , int Size>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::VectorBlock](classeigen_1_1vectorblock)< VectorType, Size >::[VectorBlock](classeigen_1_1vectorblock) | ( | VectorType &  | *vector*,  |
|  |  | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *start* |
|  | ) |  |  |

 | inline |

 
 Fixed-size constructor 

   

---

The documentation for this class was generated from the following file:* [VectorBlock.h](https://eigen.tuxfamily.org/dox/VectorBlock_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1VectorBlock.html>

Deprecated List
===============

   
 Member [Eigen::Aligned](group__enums#gga45fe06e29902b7a2773de05ba27b47a1ae12d0f8f869c40c76128260af2242bc8)  
Synonym for Aligned16.  Member [Eigen::AlignedBit](group__flags#gac5795adacd266512a26890973503ed88)  
  Member [Eigen::AlignedBox< \_Scalar, \_AmbientDim >::Index](classeigen_1_1alignedbox#a774ef355da13d6bee6a6e7244c15231a)  
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3  Member [Eigen::AlignedBox< \_Scalar, \_AmbientDim >::isNull](classeigen_1_1alignedbox#a37b401dd265c942c9ef2db1e2b1e56e5) () const 
use [isEmpty()](classeigen_1_1alignedbox#a2d994551368f0d06876a31dccb26de59)  Member [Eigen::AlignedBox< \_Scalar, \_AmbientDim >::setNull](classeigen_1_1alignedbox#a2399d72bf7dbd9f3589c69f32cbec306) () 
use [setEmpty()](classeigen_1_1alignedbox#a16bc3e6779107a091f08e4cb7e36e793)  Member [Eigen::AlignedScaling2d](namespaceeigen#af8975289b8134a5021e806029516e82c)  
  Member [Eigen::AlignedScaling2f](namespaceeigen#af2440178a1f5f6abef6ee0231bc49184)  
  Member [Eigen::AlignedScaling3d](namespaceeigen#a0aff001d5740f13797c9acd4e3276673)  
  Member [Eigen::AlignedScaling3f](namespaceeigen#a45caf8b0e6da378885f4ae3f06c5cde3)  
  Member [Eigen::ComplexEigenSolver< \_MatrixType >::Index](classeigen_1_1complexeigensolver#abc0218d8b902af0d6c759bfc0a8a8d74)  
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3  Member [Eigen::ComplexSchur< \_MatrixType >::Index](classeigen_1_1complexschur#a652104d13723a5b1db2937866a034557)  
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3  Member [Eigen::DenseBase< Derived >::flagged](classeigen_1_1densebase#a9b3f75f76ae40439be870258e80c7346) () const 
it now returns `*this`  Member [Eigen::DenseBase< Derived >::lazyAssign](classeigen_1_1densebase#a6bc6c096e3bfc726f28315daecd21b3f) (const DenseBase< OtherDerived > &other) 
  Member [Eigen::DenseBase< Derived >::LinSpaced](classeigen_1_1densebase#ac8cfbd436a8c9fc50defee5946451176) (Sequential\_t, const Scalar &low, const Scalar &high) 
because of accuracy loss. In [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3, it is an alias for [LinSpaced(const Scalar&,const Scalar&)](classeigen_1_1densebase#ad8098aa5971139a5585e623dddbea860 "Sets a linearly spaced vector.")  Member [Eigen::DenseBase< Derived >::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d) (Sequential\_t, Index size, const Scalar &low, const Scalar &high) 
because of accuracy loss. In [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3, it is an alias for [LinSpaced(Index,const Scalar&,const Scalar&)](classeigen_1_1densebase#aaef589c1dbd7fad93f97bd3fa1b1e768 "Sets a linearly spaced vector.")  Member [Eigen::EigenSolver< \_MatrixType >::Index](classeigen_1_1eigensolver#a5bff6a6bc0efac67d52c60c2c3deb9ee)  
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3  Member [Eigen::EvalBeforeAssigningBit](group__flags#ga0972b20dc004d13984e642b3bd12532e)  
 means the expression should be evaluated before any assignment  Member [Eigen::GeneralizedEigenSolver< \_MatrixType >::Index](classeigen_1_1generalizedeigensolver#a46a0ff3841059479ec314e56a5645302)  
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3  Member [Eigen::HessenbergDecomposition< \_MatrixType >::Index](classeigen_1_1hessenbergdecomposition#a8e287ac222f53e2c8ce82faa43e95ac6)  
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3  Member [Eigen::Hyperplane< \_Scalar, \_AmbientDim, \_Options >::Index](classeigen_1_1hyperplane#a58d2307d16128a0026021374e9e10465)  
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3  Class [Eigen::MappedSparseMatrix< \_Scalar, \_Flags, \_StorageIndex >](classeigen_1_1mappedsparsematrix)  
Use [Map](classeigen_1_1map "A matrix or vector expression mapping an existing array of data.")<SparseMatrix<> >  Member [Eigen::ParametrizedLine< \_Scalar, \_AmbientDim, \_Options >::Index](classeigen_1_1parametrizedline#a3c9f84dd8608940282b16652a296c764)  
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3  Member [Eigen::ParametrizedLine< \_Scalar, \_AmbientDim, \_Options >::intersection](classeigen_1_1parametrizedline#a980dc8dc59ea6de2fb496055181a1d08) (const Hyperplane< \_Scalar, \_AmbientDim, OtherOptions > &hyperplane) const 
use intersectionParameter()  Member [Eigen::RealQZ< \_MatrixType >::Index](classeigen_1_1realqz#a6201e534e901b5f4e66f72c176b534a3)  
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3  Member [Eigen::RealSchur< \_MatrixType >::Index](classeigen_1_1realschur#a8bd4653e2d9569a44ecc95e746422d3f)  
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3  Member [Eigen::SelfAdjointEigenSolver< \_MatrixType >::Index](classeigen_1_1selfadjointeigensolver#a8a59ab7734b6eae2754fd78bc7c3a360)  
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3  Class [Eigen::SimplicialCholesky< \_MatrixType, \_UpLo, \_Ordering >](classeigen_1_1simplicialcholesky)  
use [SimplicialLDLT](classeigen_1_1simplicialldlt "A direct sparse LDLT Cholesky factorizations without square root.") or class [SimplicialLLT](classeigen_1_1simplicialllt "A direct sparse LLT Cholesky factorizations.")

   Member [Eigen::Stride< \_OuterStrideAtCompileTime, \_InnerStrideAtCompileTime >::Index](classeigen_1_1stride#a96c2dfb0ce43fd8e19adcdf6094f5f63)  
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3  Member [Eigen::SVDBase< Derived >::Index](classeigen_1_1svdbase#a6229a37997eca1072b52cca5ee7a2bec)  
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3  Member [Eigen::Transform< \_Scalar, \_Dim, \_Mode, \_Options >::Index](classeigen_1_1transform#a49df3689ac2b736bcb564dec47d6486c)  
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3  Member [Eigen::TriangularViewImpl< \_MatrixType, \_Mode, Dense >::swap](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#a0c1ece2f97341c7c7e698d67343421a5) (MatrixBase< OtherDerived > const &other) 
  Member [Eigen::Tridiagonalization< \_MatrixType >::Index](classeigen_1_1tridiagonalization#a7bd1f9fccec1e93b77a2214b2d30aae9)  
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3  Member [Eigen::VectorwiseOp< ExpressionType, Direction >::Index](classeigen_1_1vectorwiseop#a4907c654e5810edd98e4162093b19532)  
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3   
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/deprecated.html>

TutorialSparse\_example\_details
================================

 
 

```
#include <Eigen/Sparse>
#include <vector>
#include <QImage>
 
typedef [Eigen::SparseMatrix<double>](classeigen_1_1sparsematrix) SpMat; // declares a column-major sparse matrix type of double
typedef [Eigen::Triplet<double>](classeigen_1_1triplet) T;
 
void insertCoefficient(int id, int i, int j, double w, std::vector<T>& coeffs,
                       [Eigen::VectorXd](classeigen_1_1matrix)& b, const [Eigen::VectorXd](classeigen_1_1matrix)& boundary)
{
  int n = int(boundary.[size](classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ae106171b6fefd3f7af108a8283de36c9)());
  int id1 = i+j*n;
 
        if(i==-1 || i==n) b(id) -= w * boundary(j); // constrained coefficient
  else  if(j==-1 || j==n) b(id) -= w * boundary(i); // constrained coefficient
  else  coeffs.push_back(T(id,id1,w));              // unknown coefficient
}
 
void buildProblem(std::vector<T>& coefficients, [Eigen::VectorXd](classeigen_1_1matrix)& b, int n)
{
  b.[setZero](classeigen_1_1plainobjectbase#acc39eaf7ba22b725c86f1b9b8bb57c3c)();
  [Eigen::ArrayXd](classeigen_1_1array) boundary = [Eigen::ArrayXd::LinSpaced](classeigen_1_1densebase#a1c6d1dbfeb9f6491173a83eb44e14c1d)(n, 0,M_PI).sin().pow(2);
  for(int j=0; j<n; ++j)
  {
    for(int i=0; i<n; ++i)
    {
      int id = i+j*n;
      insertCoefficient(id, i-1,j, -1, coefficients, b, boundary);
      insertCoefficient(id, i+1,j, -1, coefficients, b, boundary);
      insertCoefficient(id, i,j-1, -1, coefficients, b, boundary);
      insertCoefficient(id, i,j+1, -1, coefficients, b, boundary);
      insertCoefficient(id, i,j,    4, coefficients, b, boundary);
    }
  }
}
 
void saveAsBitmap(const [Eigen::VectorXd](classeigen_1_1matrix)& x, int n, const char* filename)
{
  [Eigen::Array<unsigned char,Eigen::Dynamic,Eigen::Dynamic>](classeigen_1_1array) bits = (x*255).cast<unsigned char>();
  QImage img(bits.[data](classeigen_1_1plainobjectbase#ac54123f62de4c46a9107ff53890b6116)(), n,n,QImage::Format_Indexed8);
  img.setColorCount(256);
  for(int i=0;i<256;i++) img.setColor(i,qRgb(i,i,i));
  img.save(filename);
}
```
 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/TutorialSparse_example_details.html>

Eigen::symbolic::BaseExpr
=========================

  
### template<typename Derived> class Eigen::symbolic::BaseExpr< Derived >

 Common base class of any symbolic expressions 

 


|  |
| --- |
|  |
| template<typename T >  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [eval](classeigen_1_1symbolic_1_1baseexpr#a4149f50157823063e59c18ce04ed2496) (const T &values) const |
|  |

  eval()
------

    template<typename Derived >   template<typename T >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::symbolic::BaseExpr](classeigen_1_1symbolic_1_1baseexpr)< Derived >::eval  | ( | const T &  | *values* | ) |  const |

 | inline |

 
 Evaluate the expression given the *values* of the symbols.

 
Parameters
 

|  |  |
| --- | --- |
| values | defines the values of the symbols, it can either be a [SymbolValue](classeigen_1_1symbolic_1_1symbolvalue) or a std::tuple of [SymbolValue](classeigen_1_1symbolic_1_1symbolvalue) as constructed by [SymbolExpr::operator=](classeigen_1_1symbolic_1_1symbolexpr#a0bd43167911dc398fba4e3f0f142a64d) operator.  |

     

---

The documentation for this class was generated from the following file:* [SymbolicIndex.h](https://eigen.tuxfamily.org/dox/SymbolicIndex_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1symbolic_1_1BaseExpr.html>

Eigen::symbolic::SymbolValue
============================

  
### template<typename Tag> class Eigen::symbolic::SymbolValue< Tag >

 Represents the actual value of a symbol identified by its tag

 It is the return type of SymbolValue::operator=, and most of the time this is only way it is used. 

 


|  |
| --- |
|  |
|  | [SymbolValue](classeigen_1_1symbolic_1_1symbolvalue#a2db2a280f108f3253e4f21858a2d14ca) ([Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) val) |
|  |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [value](classeigen_1_1symbolic_1_1symbolvalue#a8f87badf23a7d5e32145c9ea08aaa300) () const |
|  |

  SymbolValue()
-------------

    template<typename Tag >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::symbolic::SymbolValue](classeigen_1_1symbolic_1_1symbolvalue)< Tag >::[SymbolValue](classeigen_1_1symbolic_1_1symbolvalue) | ( | [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *val* | ) |  |

 | inline |

 
 Default constructor from the value *val* 

    value()
-------

    template<typename Tag >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::symbolic::SymbolValue](classeigen_1_1symbolic_1_1symbolvalue)< Tag >::value  | ( |  | ) |  const |

 | inline |

 
 
Returns
the stored value of the symbol 
   

---

The documentation for this class was generated from the following file:* [SymbolicIndex.h](https://eigen.tuxfamily.org/dox/SymbolicIndex_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1symbolic_1_1SymbolValue.html>

Eigen::IncompleteLUT
====================

  
### template<typename \_Scalar, typename \_StorageIndex = int> struct Eigen::IncompleteLUT< \_Scalar, \_StorageIndex >::keep\_diag

 keeps off-diagonal entries; drops diagonal entries 

 


---

The documentation for this struct was generated from the following file:* [IncompleteLUT.h](https://eigen.tuxfamily.org/dox/IncompleteLUT_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/structEigen_1_1IncompleteLUT_1_1keep__diag.html>

Eigen::SimplicialCholeskyBase
=============================

  
### template<typename Derived> struct Eigen::SimplicialCholeskyBase< Derived >::keep\_diag

 keeps off-diagonal entries; drops diagonal entries 

 


---

The documentation for this struct was generated from the following file:* [SimplicialCholesky.h](https://eigen.tuxfamily.org/dox/SimplicialCholesky_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/structEigen_1_1SimplicialCholeskyBase_1_1keep__diag.html>

Eigen::TriangularViewImpl
=========================

  
### template<typename \_MatrixType, unsigned int \_Mode> class Eigen::TriangularViewImpl< \_MatrixType, \_Mode, Dense >

 Base class for a triangular part in a **dense** matrix. 

 This class is an abstract base class of class [TriangularView](classeigen_1_1triangularview "Expression of a triangular part in a matrix."), and objects of type TriangularViewImpl cannot be instantiated. It extends class [TriangularView](classeigen_1_1triangularview "Expression of a triangular part in a matrix.") with additional methods which available for dense expressions only.

 
See also
class [TriangularView](classeigen_1_1triangularview "Expression of a triangular part in a matrix."), MatrixBase::triangularView() 
     ![Inheritance graph]       

|  |
| --- |
|  |
| Scalar  | [coeff](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#a51093bbf9d6c6bad6a8afee9c93d4b3f) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| Scalar &  | [coeffRef](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#afb8cc8b16f27fa263757506e818f3e7f) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| template<typename DenseDerived >  |
| void  | [evalToLazy](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#ab8db3e55eee50cdc56650b3498e235eb) ([MatrixBase](classeigen_1_1matrixbase)< DenseDerived > &other) const |
|  |
| void  | [fill](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#ab1086025ddef904f5fae0282de474d24) (const Scalar &value) |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerStride](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#ad3252106d7e004d3410238cab92e3258) () const |
|  |
| template<typename OtherDerived >  |
| const [Product](classeigen_1_1product)< [TriangularViewType](classeigen_1_1triangularview), OtherDerived >  | [operator\*](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#ad21c964c4d5dff8aa496558ef74731f1) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &rhs) const |
|  |
| [TriangularViewType](classeigen_1_1triangularview) &  | [operator\*=](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#adb13b29d664962dc3f62551644f11e87) (const typename internal::traits< MatrixType >::Scalar &other) |
|  |
| template<typename Other >  |
| [TriangularViewType](classeigen_1_1triangularview) &  | [operator+=](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#a1d2edf8ab80733b8b2620d8c2a3100d3) (const [DenseBase](classeigen_1_1densebase)< Other > &other) |
|  |
| template<typename Other >  |
| [TriangularViewType](classeigen_1_1triangularview) &  | [operator-=](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#a79ff0326cd78da5bb2bdc4a88f5428c9) (const [DenseBase](classeigen_1_1densebase)< Other > &other) |
|  |
| [TriangularViewType](classeigen_1_1triangularview) &  | [operator/=](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#af1b9165f5ab6b57a8305c0dc359adf7c) (const typename internal::traits< MatrixType >::Scalar &other) |
|  |
| template<typename OtherDerived >  |
| [TriangularViewType](classeigen_1_1triangularview) &  | [operator=](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#a09db8ccbd4b2da7c7e8d520458166cc1) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) |
|  |
| template<typename OtherDerived >  |
| [TriangularViewType](classeigen_1_1triangularview) &  | [operator=](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#a556c7e90c64e86a3a8e722989dda1bc6) (const [TriangularBase](classeigen_1_1triangularbase)< OtherDerived > &other) |
|  |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerStride](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#afe47788156e483b9025ab320cc7f925e) () const |
|  |
| [TriangularViewType](classeigen_1_1triangularview) &  | [setConstant](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#a02574e5085e789ff9840d2b708e0126f) (const Scalar &value) |
|  |
| [TriangularViewType](classeigen_1_1triangularview) &  | [setOnes](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#a4e6b3b2af8d0d6d06d14ec3c7092cffc) () |
|  |
| [TriangularViewType](classeigen_1_1triangularview) &  | [setZero](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#a7530e86074859407aaec5132549b40ee) () |
|  |
| template<int Side, typename Other >  |
| const internal::triangular\_solve\_retval< Side, [TriangularViewType](classeigen_1_1triangularview), Other >  | [solve](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#a911664ccf5522c778ffc5405247e8a59) (const [MatrixBase](classeigen_1_1matrixbase)< Other > &other) const |
|  |
| template<int Side, typename OtherDerived >  |
| void  | [solveInPlace](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#a43bae99c287250d6092c8f8d1ba90e91) (const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &other) const |
|  |
| template<typename OtherDerived >  |
| EIGEN\_DEPRECATED void  | [swap](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#a0c1ece2f97341c7c7e698d67343421a5) ([MatrixBase](classeigen_1_1matrixbase)< OtherDerived > const &other) |
|  |
| template<typename OtherDerived >  |
| void  | [swap](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#a4e16e0824796bfa218cc91da98fe05b1) ([TriangularBase](classeigen_1_1triangularbase)< OtherDerived > &other) |
|  |
| - Public Member Functions inherited from [Eigen::TriangularBase< TriangularView< \_MatrixType, \_Mode > >](classeigen_1_1triangularbase) |
| void  | [copyCoeff](classeigen_1_1triangularbase#a0abe130a9130ac6df16f3c8c55490b43) ([Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col, Other &other) |
|  |
| void  | [evalTo](classeigen_1_1triangularbase#a604d4f76a376ced36f8b9c3374c76c3e) ([MatrixBase](classeigen_1_1matrixbase)< DenseDerived > &other) const |
|  |
| void  | [evalToLazy](classeigen_1_1triangularbase#ab8db3e55eee50cdc56650b3498e235eb) ([MatrixBase](classeigen_1_1matrixbase)< DenseDerived > &other) const |
|  |
| - Public Member Functions inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](structeigen_1_1eigenbase#a2d768a9877f5f69f49432d447b552bfe) () const EIGEN\_NOEXCEPT |
|  |
| Derived &  | [derived](structeigen_1_1eigenbase#a1fbabe7f12bcbfba3b9a448b1f5e46fa) () |
|  |
| const Derived &  | [derived](structeigen_1_1eigenbase#afd4f3f1c57b7594b96a7e30f2974ea2e) () const |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](structeigen_1_1eigenbase#ac22eb0695d00edd7d4a3b2d0a98b81c2) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](structeigen_1_1eigenbase#ae106171b6fefd3f7af108a8283de36c9) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |
| - Public Types inherited from [Eigen::EigenBase< Derived >](structeigen_1_1eigenbase) |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  | The interface type of indices. [More...](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |
|  |

  coeff()
-------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Scalar Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::coeff  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *row*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *col* |
|  | ) |  |  const |

 | inline |

 
 
See also

[MatrixBase::coeff()](classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4#af51b00cc45490ad698239ab6a8b94393) 
 
Warning
the coordinates must fit into the referenced triangular part 
    coeffRef()
----------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Scalar& Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::coeffRef  | ( | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *row*,  |
|  |  | [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *col* |
|  | ) |  |  |

 | inline |

 
 
See also
MatrixBase::coeffRef() 
 
Warning
the coordinates must fit into the referenced triangular part 
    evalToLazy()
------------

    template<typename \_MatrixType , unsigned int \_Mode>   template<typename DenseDerived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::TriangularBase](classeigen_1_1triangularbase)< Derived >::evalToLazy  | ( | typename DenseDerived  |  | ) |  |

 
 Assigns a triangular or selfadjoint matrix to a dense matrix. If the matrix is triangular, the opposite part is set to zero. 

    fill()
------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::fill  | ( | const Scalar &  | *value* | ) |  |

 | inline |

 
 
See also

[MatrixBase::fill()](classeigen_1_1densebase#a9be169c308801411aa24be93d30930bf) 
    innerStride()
-------------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::innerStride  | ( |  | ) |  const |

 | inline |

 
 
Returns
the inner-stride of the underlying dense matrix 
 
See also
DenseCoeffsBase::innerStride() 
    operator\*()
------------

    template<typename \_MatrixType , unsigned int \_Mode>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Product](classeigen_1_1product)<[TriangularViewType](classeigen_1_1triangularview),OtherDerived> Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::operator\*  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *rhs* | ) |  const |

 | inline |

 
 Efficient triangular matrix times vector/matrix product 

    operator\*=()
-------------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [TriangularViewType](classeigen_1_1triangularview)& Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::operator\*=  | ( | const typename internal::traits< MatrixType >::Scalar &  | *other* | ) |  |

 | inline |

 
 
See also

[MatrixBase::operator\*=()](classeigen_1_1matrixbase#a3783b6168995ca117a1c19fea3630ac4) 
    operator+=()
------------

    template<typename \_MatrixType , unsigned int \_Mode>   template<typename Other >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [TriangularViewType](classeigen_1_1triangularview)& Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::operator+=  | ( | const [DenseBase](classeigen_1_1densebase)< Other > &  | *other* | ) |  |

 | inline |

 
 
See also

[MatrixBase::operator+=()](classeigen_1_1matrixbase#a983cc3be0bbe11b3d041a415b76ce010) 
    operator-=()
------------

    template<typename \_MatrixType , unsigned int \_Mode>   template<typename Other >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [TriangularViewType](classeigen_1_1triangularview)& Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::operator-=  | ( | const [DenseBase](classeigen_1_1densebase)< Other > &  | *other* | ) |  |

 | inline |

 
 
See also

[MatrixBase::operator-=()](classeigen_1_1matrixbase#a1042124b0ddee66e78ac7b0a9ac4cc9c) 
    operator/=()
------------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [TriangularViewType](classeigen_1_1triangularview)& Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::operator/=  | ( | const typename internal::traits< MatrixType >::Scalar &  | *other* | ) |  |

 | inline |

 
 
See also
DenseBase::operator/=() 
    operator=() [1/2]
-----------------

    template<typename \_MatrixType , unsigned int \_Mode>   template<typename OtherDerived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [TriangularViewType](classeigen_1_1triangularview)& Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::operator=  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  |

 
 Shortcut for



```
*this = other.other.triangularView<(*this)::Mode>() 

```
    operator=() [2/2]
-----------------

    template<typename \_MatrixType , unsigned int \_Mode>   template<typename OtherDerived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [TriangularViewType](classeigen_1_1triangularview)& Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::operator=  | ( | const [TriangularBase](classeigen_1_1triangularbase)< OtherDerived > &  | *other* | ) |  |

 
 Assigns a triangular matrix to a triangular part of a dense matrix 

    outerStride()
-------------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::outerStride  | ( |  | ) |  const |

 | inline |

 
 
Returns
the outer-stride of the underlying dense matrix 
 
See also
DenseCoeffsBase::outerStride() 
    setConstant()
-------------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [TriangularViewType](classeigen_1_1triangularview)& Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::setConstant  | ( | const Scalar &  | *value* | ) |  |

 | inline |

 
 
See also

[MatrixBase::setConstant()](classeigen_1_1densebase#ac2f1e50d1f567da38da1d2f07c5ab559) 
    setOnes()
---------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [TriangularViewType](classeigen_1_1triangularview)& Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::setOnes  | ( |  | ) |  |

 | inline |

 
 
See also

[MatrixBase::setOnes()](classeigen_1_1densebase#a250ef1b827e748f3f898fb2e55cb96e2) 
    setZero()
---------

    template<typename \_MatrixType , unsigned int \_Mode>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [TriangularViewType](classeigen_1_1triangularview)& Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::setZero  | ( |  | ) |  |

 | inline |

 
 
See also

[MatrixBase::setZero()](classeigen_1_1densebase#af230a143de50695d2d1fae93db7e4dcb) 
    solve()
-------

    template<typename \_MatrixType , unsigned int \_Mode>   template<int Side, typename Other >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const internal::triangular\_solve\_retval<Side,[TriangularViewType](classeigen_1_1triangularview), Other> Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::solve  | ( | const [MatrixBase](classeigen_1_1matrixbase)< Other > &  | *other* | ) |  const |

 | inline |

 
 
Returns
the product of the inverse of `*this` with *other*, *\*this* being triangular.
 This function computes the inverse-matrix matrix product inverse(`*this`) \* *other* if *Side==OnTheLeft* (the default), or the right-inverse-multiply *other* \* inverse(`*this`) if *Side==OnTheRight*.

 Note that the template parameter `Side` can be omitted, in which case `Side==OnTheLeft` 

 The matrix `*this` must be triangular and invertible (i.e., all the coefficients of the diagonal must be non zero). It works as a forward (resp. backward) substitution if `*this` is an upper (resp. lower) triangular matrix.

 Example: 



```
Matrix3d m = [Matrix3d::Zero](classeigen_1_1densebase#a422ddeef58bedc7bddb1d4357688d761)();
m.triangularView<[Eigen::Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>().[setOnes](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#a4e6b3b2af8d0d6d06d14ec3c7092cffc)();
cout << "Here is the matrix m:\n" << m << endl;
Matrix3d n = [Matrix3d::Ones](classeigen_1_1densebase#a2755cb4023f7376880523626a8e05101)();
n.triangularView<[Eigen::Lower](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749)>() *= 2;
cout << "Here is the matrix n:\n" << n << endl;
cout << "And now here is m.inverse()\*n, taking advantage of the fact that"
        " m is upper-triangular:\n"
     << m.triangularView<[Eigen::Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>().[solve](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#a911664ccf5522c778ffc5405247e8a59)(n) << endl;
cout << "And this is n\*m.inverse():\n"
     << m.triangularView<[Eigen::Upper](group__enums#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1)>().solve<Eigen::OnTheRight>(n);
```

 Output: 



```
Here is the matrix m:
1 1 1
0 1 1
0 0 1
Here is the matrix n:
2 1 1
2 2 1
2 2 2
And now here is m.inverse()*n, taking advantage of the fact that m is upper-triangular:
 0 -1  0
 0  0 -1
 2  2  2
And this is n*m.inverse():
 2 -1  0
 2  0 -1
 2  0  0
```

This function returns an expression of the inverse-multiply and can works in-place if it is assigned to the same matrix or vector *other*.

 For users coming from BLAS, this function (and more specifically [solveInPlace()](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#a43bae99c287250d6092c8f8d1ba90e91)) offer all the operations supported by the `*TRSV` and `*TRSM` BLAS routines.

 
See also
TriangularView::solveInPlace() 
    solveInPlace()
--------------

    template<typename \_MatrixType , unsigned int \_Mode>   template<int Side, typename OtherDerived >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::solveInPlace  | ( | const [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > &  | *other* | ) |  const |

 
 "in-place" version of TriangularView::solve() where the result is written in *other* 

 
Warning
The parameter is only marked 'const' to make the C++ compiler accept a temporary expression here. This function will const\_cast it, so constness isn't honored here.
 Note that the template parameter `Side` can be omitted, in which case `Side==OnTheLeft` 

 See [TriangularView](classeigen_1_1triangularview "Expression of a triangular part in a matrix."):[solve()](classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4#a911664ccf5522c778ffc5405247e8a59) for the details. 

    swap() [1/2]
------------

    template<typename \_MatrixType , unsigned int \_Mode>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_DEPRECATED void Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::swap  | ( | [MatrixBase](classeigen_1_1matrixbase)< OtherDerived > const &  | *other* | ) |  |

 | inline |

 
 Shortcut for



```
(*this).swap(other.triangularView<(*this)::Mode>()) 

```
 
**[Deprecated:](deprecated#_deprecated000007)**

    swap() [2/2]
------------

    template<typename \_MatrixType , unsigned int \_Mode>   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void Eigen::TriangularViewImpl< \_MatrixType, \_Mode, [Dense](structeigen_1_1dense) >::swap  | ( | [TriangularBase](classeigen_1_1triangularbase)< OtherDerived > &  | *other* | ) |  |

 | inline |

 
 Swaps the coefficients of the common triangular parts of two matrices 

   

---

The documentation for this class was generated from the following file:* [TriangularMatrix.h](https://eigen.tuxfamily.org/dox/TriangularMatrix_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1TriangularViewImpl_3_01__MatrixType_00_01__Mode_00_01Dense_01_4.html>

Eigen::Tridiagonalization
=========================

  
### template<typename \_MatrixType> class Eigen::Tridiagonalization< \_MatrixType >

 Tridiagonal decomposition of a selfadjoint matrix. 

 This is defined in the Eigenvalues module.



```
#include <Eigen/Eigenvalues> 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix of which we are computing the tridiagonal decomposition; this is expected to be an instantiation of the [Matrix](classeigen_1_1matrix "The matrix class, also used for vectors and row-vectors.") class template. |

   This class performs a tridiagonal decomposition of a selfadjoint matrix \( A \) such that: \( A = Q T Q^\* \) where \( Q \) is unitary and \( T \) a real symmetric tridiagonal matrix.

 A tridiagonal matrix is a matrix which has nonzero elements only on the main diagonal and the first diagonal below and above it. The Hessenberg decomposition of a selfadjoint matrix is in fact a tridiagonal decomposition. This class is used in [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver "Computes eigenvalues and eigenvectors of selfadjoint matrices.") to compute the eigenvalues and eigenvectors of a selfadjoint matrix.

 Call the function [compute()](classeigen_1_1tridiagonalization#acd288abb081d3b40b87e4b98cd8f6ee9 "Computes tridiagonal decomposition of given matrix.") to compute the tridiagonal decomposition of a given matrix. Alternatively, you can use the Tridiagonalization(const MatrixType&) constructor which computes the tridiagonal Schur decomposition at construction time. Once the decomposition is computed, you can use the [matrixQ()](classeigen_1_1tridiagonalization#a000f7392eda930576ffd2af1fae54af2 "Returns the unitary matrix Q in the decomposition.") and [matrixT()](classeigen_1_1tridiagonalization#a6eb5ef94b8b9bb013c0e69b6df56d0df "Returns an expression of the tridiagonal matrix T in the decomposition.") functions to retrieve the matrices Q and T in the decomposition.

 The documentation of Tridiagonalization(const MatrixType&) contains an example of the typical use of this class.

 
See also
class [HessenbergDecomposition](classeigen_1_1hessenbergdecomposition "Reduces a square matrix to Hessenberg form by an orthogonal similarity transformation."), class [SelfAdjointEigenSolver](classeigen_1_1selfadjointeigensolver "Computes eigenvalues and eigenvectors of selfadjoint matrices.") 
 


|  |
| --- |
|  |
|  typedef [HouseholderSequence](classeigen_1_1householdersequence)< [MatrixType](classeigen_1_1tridiagonalization#add0f4b2216d0ea8ee0f7d8525deaf0a9), typename internal::remove\_all< typename CoeffVectorType::ConjugateReturnType >::type >  | [HouseholderSequenceType](classeigen_1_1tridiagonalization#af322315c8bea9990152c9d09bfa2a69f) |
|  | Return type of [matrixQ()](classeigen_1_1tridiagonalization#a000f7392eda930576ffd2af1fae54af2 "Returns the unitary matrix Q in the decomposition.")  |
|  |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [Index](classeigen_1_1tridiagonalization#a7bd1f9fccec1e93b77a2214b2d30aae9) |
|  |
|  typedef \_MatrixType  | [MatrixType](classeigen_1_1tridiagonalization#add0f4b2216d0ea8ee0f7d8525deaf0a9) |
|  | Synonym for the template parameter `_MatrixType`.  |
|  |




|  |
| --- |
|  |
| template<typename InputType >  |
| [Tridiagonalization](classeigen_1_1tridiagonalization) &  | [compute](classeigen_1_1tridiagonalization#acd288abb081d3b40b87e4b98cd8f6ee9) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  | Computes tridiagonal decomposition of given matrix. [More...](classeigen_1_1tridiagonalization#acd288abb081d3b40b87e4b98cd8f6ee9) |
|  |
| DiagonalReturnType  | [diagonal](classeigen_1_1tridiagonalization#a0b7ff4860aa6f7c0761b1059c012fd8e) () const |
|  | Returns the diagonal of the tridiagonal matrix T in the decomposition. [More...](classeigen_1_1tridiagonalization#a0b7ff4860aa6f7c0761b1059c012fd8e) |
|  |
| [CoeffVectorType](classeigen_1_1matrix) | [householderCoefficients](classeigen_1_1tridiagonalization#ac95b4e43dcf6c3c5074b8bea4fc67887) () const |
|  | Returns the Householder coefficients. [More...](classeigen_1_1tridiagonalization#ac95b4e43dcf6c3c5074b8bea4fc67887) |
|  |
| [HouseholderSequenceType](classeigen_1_1tridiagonalization#af322315c8bea9990152c9d09bfa2a69f) | [matrixQ](classeigen_1_1tridiagonalization#a000f7392eda930576ffd2af1fae54af2) () const |
|  | Returns the unitary matrix Q in the decomposition. [More...](classeigen_1_1tridiagonalization#a000f7392eda930576ffd2af1fae54af2) |
|  |
| MatrixTReturnType  | [matrixT](classeigen_1_1tridiagonalization#a6eb5ef94b8b9bb013c0e69b6df56d0df) () const |
|  | Returns an expression of the tridiagonal matrix T in the decomposition. [More...](classeigen_1_1tridiagonalization#a6eb5ef94b8b9bb013c0e69b6df56d0df) |
|  |
| const [MatrixType](classeigen_1_1tridiagonalization#add0f4b2216d0ea8ee0f7d8525deaf0a9) &  | [packedMatrix](classeigen_1_1tridiagonalization#a47858b3895e64acafb1bb2e97f98a154) () const |
|  | Returns the internal representation of the decomposition. [More...](classeigen_1_1tridiagonalization#a47858b3895e64acafb1bb2e97f98a154) |
|  |
| SubDiagonalReturnType  | [subDiagonal](classeigen_1_1tridiagonalization#ac423dbb91157c159bdcb4b5a8371232e) () const |
|  | Returns the subdiagonal of the tridiagonal matrix T in the decomposition. [More...](classeigen_1_1tridiagonalization#ac423dbb91157c159bdcb4b5a8371232e) |
|  |
| template<typename InputType >  |
|  | [Tridiagonalization](classeigen_1_1tridiagonalization#a05406b7df9a92fdcba72d31443f67a98) (const [EigenBase](structeigen_1_1eigenbase)< InputType > &matrix) |
|  | Constructor; computes tridiagonal decomposition of given matrix. [More...](classeigen_1_1tridiagonalization#a05406b7df9a92fdcba72d31443f67a98) |
|  |
|  | [Tridiagonalization](classeigen_1_1tridiagonalization#a9ea2e6154bf35494ee68e037f0867cbd) ([Index](classeigen_1_1tridiagonalization#a7bd1f9fccec1e93b77a2214b2d30aae9) size=Size==[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) ? 2 :Size) |
|  | Default constructor. [More...](classeigen_1_1tridiagonalization#a9ea2e6154bf35494ee68e037f0867cbd) |
|  |

  Index
-----

    template<typename \_MatrixType >  

|  |
| --- |
| typedef [Eigen::Index](namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::Tridiagonalization](classeigen_1_1tridiagonalization)< \_MatrixType >::[Index](classeigen_1_1tridiagonalization#a7bd1f9fccec1e93b77a2214b2d30aae9) |

 
 
**[Deprecated:](deprecated#_deprecated000020)**
since [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") 3.3 
    Tridiagonalization() [1/2]
--------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Tridiagonalization](classeigen_1_1tridiagonalization)< \_MatrixType >::[Tridiagonalization](classeigen_1_1tridiagonalization) | ( | [Index](classeigen_1_1tridiagonalization#a7bd1f9fccec1e93b77a2214b2d30aae9) | *size* = `Size==[Dynamic](namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) ? 2 : Size` | ) |  |

 | inlineexplicit |

 
 Default constructor. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | size | Positive integer, size of the matrix whose tridiagonal decomposition will be computed. |

   The default constructor is useful in cases in which the user intends to perform decompositions via [compute()](classeigen_1_1tridiagonalization#acd288abb081d3b40b87e4b98cd8f6ee9 "Computes tridiagonal decomposition of given matrix."). The `size` parameter is only used as a hint. It is not an error to give a wrong `size`, but it may impair performance.

 
See also

[compute()](classeigen_1_1tridiagonalization#acd288abb081d3b40b87e4b98cd8f6ee9 "Computes tridiagonal decomposition of given matrix.") for an example. 
    Tridiagonalization() [2/2]
--------------------------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Tridiagonalization](classeigen_1_1tridiagonalization)< \_MatrixType >::[Tridiagonalization](classeigen_1_1tridiagonalization) | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | inlineexplicit |

 
 Constructor; computes tridiagonal decomposition of given matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matrix | Selfadjoint matrix whose tridiagonal decomposition is to be computed. |

   This constructor calls [compute()](classeigen_1_1tridiagonalization#acd288abb081d3b40b87e4b98cd8f6ee9 "Computes tridiagonal decomposition of given matrix.") to compute the tridiagonal decomposition.

 Example: 



```
MatrixXd X = [MatrixXd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(5,5);
MatrixXd A = X + X.transpose();
cout << "Here is a random symmetric 5x5 matrix:" << endl << A << endl << endl;
Tridiagonalization<MatrixXd> triOfA(A);
MatrixXd Q = triOfA.matrixQ();
cout << "The orthogonal matrix Q is:" << endl << Q << endl;
MatrixXd T = triOfA.matrixT();
cout << "The tridiagonal matrix T is:" << endl << T << endl << endl;
cout << "Q \* T \* Q^T = " << endl << Q * T * Q.transpose() << endl;
```

 Output: 



```
Here is a random symmetric 5x5 matrix:
  1.36 -0.816  0.521   1.43 -0.144
-0.816 -0.659  0.794 -0.173 -0.406
 0.521  0.794 -0.541  0.461  0.179
  1.43 -0.173  0.461  -1.43  0.822
-0.144 -0.406  0.179  0.822  -1.37

The orthogonal matrix Q is:
       1        0        0        0        0
       0   -0.471    0.127   -0.671   -0.558
       0    0.301   -0.195    0.437   -0.825
       0    0.825   0.0459   -0.563 -0.00872
       0  -0.0832   -0.971   -0.202   0.0922
The tridiagonal matrix T is:
  1.36   1.73      0      0      0
  1.73   -1.2 -0.966      0      0
     0 -0.966  -1.28  0.214      0
     0      0  0.214  -1.69  0.345
     0      0      0  0.345  0.164

Q * T * Q^T = 
  1.36 -0.816  0.521   1.43 -0.144
-0.816 -0.659  0.794 -0.173 -0.406
 0.521  0.794 -0.541  0.461  0.179
  1.43 -0.173  0.461  -1.43  0.822
-0.144 -0.406  0.179  0.822  -1.37

```
    compute()
---------

    template<typename \_MatrixType >   template<typename InputType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Tridiagonalization](classeigen_1_1tridiagonalization)& [Eigen::Tridiagonalization](classeigen_1_1tridiagonalization)< \_MatrixType >::compute  | ( | const [EigenBase](structeigen_1_1eigenbase)< InputType > &  | *matrix* | ) |  |

 | inline |

 
 Computes tridiagonal decomposition of given matrix. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | matrix | Selfadjoint matrix whose tridiagonal decomposition is to be computed.  |

   
Returns
Reference to `*this` 
 The tridiagonal decomposition is computed by bringing the columns of the matrix successively in the required form using Householder reflections. The cost is \( 4n^3/3 \) flops, where \( n \) denotes the size of the given matrix.

 This method reuses of the allocated data in the [Tridiagonalization](classeigen_1_1tridiagonalization "Tridiagonal decomposition of a selfadjoint matrix.") object, if the size of the matrix does not change.

 Example: 



```
Tridiagonalization<MatrixXf> tri;
MatrixXf X = [MatrixXf::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
MatrixXf A = X + X.transpose();
tri.compute(A);
cout << "The matrix T in the tridiagonal decomposition of A is: " << endl;
cout << tri.matrixT() << endl;
tri.compute(2*A); // re-use tri to compute eigenvalues of 2A
cout << "The matrix T in the tridiagonal decomposition of 2A is: " << endl;
cout << tri.matrixT() << endl;

```

 Output: 



```
The matrix T in the tridiagonal decomposition of A is: 
  1.36 -0.704      0      0
-0.704 0.0147   1.71      0
     0   1.71  0.856  0.641
     0      0  0.641 -0.506
The matrix T in the tridiagonal decomposition of 2A is: 
  2.72  -1.41      0      0
 -1.41 0.0294   3.43      0
     0   3.43   1.71   1.28
     0      0   1.28  -1.01

```
    diagonal()
----------

    template<typename MatrixType >  

|  |
| --- |
| [Tridiagonalization](classeigen_1_1tridiagonalization)< [MatrixType](classeigen_1_1tridiagonalization#add0f4b2216d0ea8ee0f7d8525deaf0a9) >::DiagonalReturnType [Eigen::Tridiagonalization](classeigen_1_1tridiagonalization)< [MatrixType](classeigen_1_1tridiagonalization#add0f4b2216d0ea8ee0f7d8525deaf0a9) >::diagonal |

 
 Returns the diagonal of the tridiagonal matrix T in the decomposition. 

 
Returns
expression representing the diagonal of T
 
Precondition
Either the constructor Tridiagonalization(const MatrixType&) or the member function compute(const MatrixType&) has been called before to compute the tridiagonal decomposition of a matrix.
 Example: 



```
MatrixXcd X = [MatrixXcd::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
MatrixXcd A = X + X.adjoint();
cout << "Here is a random self-adjoint 4x4 matrix:" << endl << A << endl << endl;
 
Tridiagonalization<MatrixXcd> triOfA(A);
MatrixXd T = triOfA.matrixT();
cout << "The tridiagonal matrix T is:" << endl << T << endl << endl;
 
cout << "We can also extract the diagonals of T directly ..." << endl;
VectorXd diag = triOfA.diagonal();
cout << "The diagonal is:" << endl << diag << endl; 
VectorXd subdiag = triOfA.subDiagonal();
cout << "The subdiagonal is:" << endl << subdiag << endl;

```

 Output: 



```
Here is a random self-adjoint 4x4 matrix:
    (-0.422,0)  (0.705,-1.01) (-0.17,-0.552) (0.338,-0.357)
  (0.705,1.01)      (0.515,0) (0.241,-0.446)   (0.05,-1.64)
 (-0.17,0.552)  (0.241,0.446)      (-1.03,0)  (0.0449,1.72)
 (0.338,0.357)    (0.05,1.64) (0.0449,-1.72)       (1.36,0)

The tridiagonal matrix T is:
-0.422  -1.45      0      0
 -1.45   1.01  -1.42      0
     0  -1.42    1.8   -1.2
     0      0   -1.2  -1.96

We can also extract the diagonals of T directly ...
The diagonal is:
-0.422
  1.01
   1.8
 -1.96
The subdiagonal is:
-1.45
-1.42
 -1.2

```


See also

[matrixT()](classeigen_1_1tridiagonalization#a6eb5ef94b8b9bb013c0e69b6df56d0df "Returns an expression of the tridiagonal matrix T in the decomposition."), [subDiagonal()](classeigen_1_1tridiagonalization#ac423dbb91157c159bdcb4b5a8371232e "Returns the subdiagonal of the tridiagonal matrix T in the decomposition.") 
    householderCoefficients()
-------------------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [CoeffVectorType](classeigen_1_1matrix) [Eigen::Tridiagonalization](classeigen_1_1tridiagonalization)< \_MatrixType >::householderCoefficients  | ( |  | ) |  const |

 | inline |

 
 Returns the Householder coefficients. 

 
Returns
a const reference to the vector of Householder coefficients
 
Precondition
Either the constructor Tridiagonalization(const MatrixType&) or the member function compute(const MatrixType&) has been called before to compute the tridiagonal decomposition of a matrix.
 The Householder coefficients allow the reconstruction of the matrix \( Q \) in the tridiagonal decomposition from the packed data.

 Example: 



```
Matrix4d X = [Matrix4d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
Matrix4d A = X + X.transpose();
cout << "Here is a random symmetric 4x4 matrix:" << endl << A << endl;
Tridiagonalization<Matrix4d> triOfA(A);
Vector3d hc = triOfA.householderCoefficients();
cout << "The vector of Householder coefficients is:" << endl << hc << endl;

```

 Output: 



```
Here is a random symmetric 4x4 matrix:
   1.36   0.612   0.122   0.326
  0.612   -1.21  -0.222   0.563
  0.122  -0.222 -0.0904    1.16
  0.326   0.563    1.16    1.66
The vector of Householder coefficients is:
1.87
1.24
   0

```


See also

[packedMatrix()](classeigen_1_1tridiagonalization#a47858b3895e64acafb1bb2e97f98a154 "Returns the internal representation of the decomposition."), [Householder module](group__householder__module) 
    matrixQ()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [HouseholderSequenceType](classeigen_1_1tridiagonalization#af322315c8bea9990152c9d09bfa2a69f) [Eigen::Tridiagonalization](classeigen_1_1tridiagonalization)< \_MatrixType >::matrixQ  | ( |  | ) |  const |

 | inline |

 
 Returns the unitary matrix Q in the decomposition. 

 
Returns
object representing the matrix Q
 
Precondition
Either the constructor Tridiagonalization(const MatrixType&) or the member function compute(const MatrixType&) has been called before to compute the tridiagonal decomposition of a matrix.
 This function returns a light-weight object of template class [HouseholderSequence](classeigen_1_1householdersequence "Sequence of Householder reflections acting on subspaces with decreasing size."). You can either apply it directly to a matrix or you can convert it to a matrix of type [MatrixType](classeigen_1_1tridiagonalization#add0f4b2216d0ea8ee0f7d8525deaf0a9 "Synonym for the template parameter _MatrixType.").

 
See also
Tridiagonalization(const MatrixType&) for an example, [matrixT()](classeigen_1_1tridiagonalization#a6eb5ef94b8b9bb013c0e69b6df56d0df "Returns an expression of the tridiagonal matrix T in the decomposition."), class [HouseholderSequence](classeigen_1_1householdersequence "Sequence of Householder reflections acting on subspaces with decreasing size.") 
    matrixT()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| MatrixTReturnType [Eigen::Tridiagonalization](classeigen_1_1tridiagonalization)< \_MatrixType >::matrixT  | ( |  | ) |  const |

 | inline |

 
 Returns an expression of the tridiagonal matrix T in the decomposition. 

 
Returns
expression object representing the matrix T
 
Precondition
Either the constructor Tridiagonalization(const MatrixType&) or the member function compute(const MatrixType&) has been called before to compute the tridiagonal decomposition of a matrix.
 Currently, this function can be used to extract the matrix T from internal data and copy it to a dense matrix object. In most cases, it may be sufficient to directly use the packed matrix or the vector expressions returned by [diagonal()](classeigen_1_1tridiagonalization#a0b7ff4860aa6f7c0761b1059c012fd8e "Returns the diagonal of the tridiagonal matrix T in the decomposition.") and [subDiagonal()](classeigen_1_1tridiagonalization#ac423dbb91157c159bdcb4b5a8371232e "Returns the subdiagonal of the tridiagonal matrix T in the decomposition.") instead of creating a new dense copy matrix with this function.

 
See also
Tridiagonalization(const MatrixType&) for an example, [matrixQ()](classeigen_1_1tridiagonalization#a000f7392eda930576ffd2af1fae54af2 "Returns the unitary matrix Q in the decomposition."), [packedMatrix()](classeigen_1_1tridiagonalization#a47858b3895e64acafb1bb2e97f98a154 "Returns the internal representation of the decomposition."), [diagonal()](classeigen_1_1tridiagonalization#a0b7ff4860aa6f7c0761b1059c012fd8e "Returns the diagonal of the tridiagonal matrix T in the decomposition."), [subDiagonal()](classeigen_1_1tridiagonalization#ac423dbb91157c159bdcb4b5a8371232e "Returns the subdiagonal of the tridiagonal matrix T in the decomposition.") 
    packedMatrix()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [MatrixType](classeigen_1_1tridiagonalization#add0f4b2216d0ea8ee0f7d8525deaf0a9)& [Eigen::Tridiagonalization](classeigen_1_1tridiagonalization)< \_MatrixType >::packedMatrix  | ( |  | ) |  const |

 | inline |

 
 Returns the internal representation of the decomposition. 

 
Returns
a const reference to a matrix with the internal representation of the decomposition.
 
Precondition
Either the constructor Tridiagonalization(const MatrixType&) or the member function compute(const MatrixType&) has been called before to compute the tridiagonal decomposition of a matrix.
 The returned matrix contains the following information:


* the strict upper triangular part is equal to the input matrix A.
* the diagonal and lower sub-diagonal represent the real tridiagonal symmetric matrix T.
* the rest of the lower part contains the Householder vectors that, combined with Householder coefficients returned by [householderCoefficients()](classeigen_1_1tridiagonalization#ac95b4e43dcf6c3c5074b8bea4fc67887 "Returns the Householder coefficients."), allows to reconstruct the matrix Q as \( Q = H\_{N-1} \ldots H\_1 H\_0 \). Here, the matrices \( H\_i \) are the Householder transformations \( H\_i = (I - h\_i v\_i v\_i^T) \) where \( h\_i \) is the \( i \)th Householder coefficient and \( v\_i \) is the Householder vector defined by \( v\_i = [ 0, \ldots, 0, 1, M(i+2,i), \ldots, M(N-1,i) ]^T \) with M the matrix returned by this function.

 See LAPACK for further details on this packed storage.

 Example: 



```
Matrix4d X = [Matrix4d::Random](classeigen_1_1densebase#ae814abb451b48ed872819192dc188c19)(4,4);
Matrix4d A = X + X.transpose();
cout << "Here is a random symmetric 4x4 matrix:" << endl << A << endl;
Tridiagonalization<Matrix4d> triOfA(A);
Matrix4d pm = triOfA.packedMatrix();
cout << "The packed matrix M is:" << endl << pm << endl;
cout << "The diagonal and subdiagonal corresponds to the matrix T, which is:" 
     << endl << triOfA.matrixT() << endl;

```

 Output: 



```
Here is a random symmetric 4x4 matrix:
   1.36   0.612   0.122   0.326
  0.612   -1.21  -0.222   0.563
  0.122  -0.222 -0.0904    1.16
  0.326   0.563    1.16    1.66
The packed matrix M is:
  1.36  0.612  0.122  0.326
-0.704 0.0147 -0.222  0.563
0.0925   1.71  0.856   1.16
 0.248  0.785  0.641 -0.506
The diagonal and subdiagonal corresponds to the matrix T, which is:
  1.36 -0.704      0      0
-0.704 0.0147   1.71      0
     0   1.71  0.856  0.641
     0      0  0.641 -0.506

```


See also

[householderCoefficients()](classeigen_1_1tridiagonalization#ac95b4e43dcf6c3c5074b8bea4fc67887 "Returns the Householder coefficients.") 
    subDiagonal()
-------------

    template<typename MatrixType >  

|  |
| --- |
| [Tridiagonalization](classeigen_1_1tridiagonalization)< [MatrixType](classeigen_1_1tridiagonalization#add0f4b2216d0ea8ee0f7d8525deaf0a9) >::SubDiagonalReturnType [Eigen::Tridiagonalization](classeigen_1_1tridiagonalization)< [MatrixType](classeigen_1_1tridiagonalization#add0f4b2216d0ea8ee0f7d8525deaf0a9) >::subDiagonal |

 
 Returns the subdiagonal of the tridiagonal matrix T in the decomposition. 

 
Returns
expression representing the subdiagonal of T
 
Precondition
Either the constructor Tridiagonalization(const MatrixType&) or the member function compute(const MatrixType&) has been called before to compute the tridiagonal decomposition of a matrix.
 
See also

[diagonal()](classeigen_1_1tridiagonalization#a0b7ff4860aa6f7c0761b1059c012fd8e "Returns the diagonal of the tridiagonal matrix T in the decomposition.") for an example, [matrixT()](classeigen_1_1tridiagonalization#a6eb5ef94b8b9bb013c0e69b6df56d0df "Returns an expression of the tridiagonal matrix T in the decomposition.") 
   

---

The documentation for this class was generated from the following file:* [Tridiagonalization.h](https://eigen.tuxfamily.org/dox/Tridiagonalization_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/classEigen_1_1Tridiagonalization.html>

Matrix functions module
=======================

  This module aims to provide various methods for the computation of matrix functions. 

 To use this module, add 



```
#include <unsupported/Eigen/MatrixFunctions>

```

 at the start of your source file.

 This module defines the following MatrixBase methods.


* [MatrixBase::cos()](group__matrixfunctions__module#matrixbase_cos), for computing the matrix cosine
* [MatrixBase::cosh()](group__matrixfunctions__module#matrixbase_cosh), for computing the matrix hyperbolic cosine
* [MatrixBase::exp()](group__matrixfunctions__module#matrixbase_exp), for computing the matrix exponential
* [MatrixBase::log()](group__matrixfunctions__module#matrixbase_log), for computing the matrix logarithm
* [MatrixBase::pow()](group__matrixfunctions__module#matrixbase_pow), for computing the matrix power
* [MatrixBase::matrixFunction()](group__matrixfunctions__module#matrixbase_matrixfunction), for computing general matrix functions
* [MatrixBase::sin()](group__matrixfunctions__module#matrixbase_sin), for computing the matrix sine
* [MatrixBase::sinh()](group__matrixfunctions__module#matrixbase_sinh), for computing the matrix hyperbolic sine
* [MatrixBase::sqrt()](group__matrixfunctions__module#matrixbase_sqrt), for computing the matrix square root

 These methods are the main entry points to this module.

 Matrix functions are defined as follows. Suppose that \( f \) is an entire function (that is, a function on the complex plane that is everywhere complex differentiable). Then its Taylor series 


 \[ f(0) + f'(0) x + \frac{f''(0)}{2} x^2 + \frac{f'''(0)}{3!} x^3 + \cdots \] 

  converges to \( f(x) \). In this case, we can define the matrix function by the same series: 


 \[ f(M) = f(0) + f'(0) M + \frac{f''(0)}{2} M^2 + \frac{f'''(0)}{3!} M^3 + \cdots \] 

 

|  |
| --- |
|  |
| class  | [Eigen::MatrixComplexPowerReturnValue< Derived >](classeigen_1_1matrixcomplexpowerreturnvalue) |
|  | Proxy for the matrix power of some matrix (expression). [More...](classeigen_1_1matrixcomplexpowerreturnvalue#details) |
|  |
| struct  | [Eigen::MatrixExponentialReturnValue< Derived >](structeigen_1_1matrixexponentialreturnvalue) |
|  | Proxy for the matrix exponential of some matrix (expression). [More...](structeigen_1_1matrixexponentialreturnvalue#details) |
|  |
| class  | [Eigen::MatrixFunctionReturnValue< Derived >](classeigen_1_1matrixfunctionreturnvalue) |
|  | Proxy for the matrix function of some matrix (expression). [More...](classeigen_1_1matrixfunctionreturnvalue#details) |
|  |
| class  | [Eigen::MatrixLogarithmReturnValue< Derived >](classeigen_1_1matrixlogarithmreturnvalue) |
|  | Proxy for the matrix logarithm of some matrix (expression). [More...](classeigen_1_1matrixlogarithmreturnvalue#details) |
|  |
| class  | [Eigen::MatrixPower< MatrixType >](classeigen_1_1matrixpower) |
|  | Class for computing matrix powers. [More...](classeigen_1_1matrixpower#details) |
|  |
| class  | [Eigen::MatrixPowerAtomic< MatrixType >](classeigen_1_1matrixpoweratomic) |
|  | Class for computing matrix powers. [More...](classeigen_1_1matrixpoweratomic#details) |
|  |
| class  | [Eigen::MatrixPowerParenthesesReturnValue< MatrixType >](classeigen_1_1matrixpowerparenthesesreturnvalue) |
|  | Proxy for the matrix power of some matrix. [More...](classeigen_1_1matrixpowerparenthesesreturnvalue#details) |
|  |
| class  | [Eigen::MatrixPowerReturnValue< Derived >](classeigen_1_1matrixpowerreturnvalue) |
|  | Proxy for the matrix power of some matrix (expression). [More...](classeigen_1_1matrixpowerreturnvalue#details) |
|  |
| class  | [Eigen::MatrixSquareRootReturnValue< Derived >](classeigen_1_1matrixsquarerootreturnvalue) |
|  | Proxy for the matrix square root of some matrix (expression). [More...](classeigen_1_1matrixsquarerootreturnvalue#details) |
|  |




|  |
| --- |
|  |
| template<typename MatrixType , typename ResultType >  |
| void  | [Eigen::matrix\_sqrt\_quasi\_triangular](group__matrixfunctions__module#ga2f490197e16df831683018e383e29346) (const MatrixType &[arg](../namespaceeigen#aa539408a09481d35961e11ee78793db1), ResultType &result) |
|  | Compute matrix square root of quasi-triangular matrix. [More...](group__matrixfunctions__module#ga2f490197e16df831683018e383e29346) |
|  |
| template<typename MatrixType , typename ResultType >  |
| void  | [Eigen::matrix\_sqrt\_triangular](group__matrixfunctions__module#gae51c91f920f6ea4a7f6f72caa1e8249f) (const MatrixType &[arg](../namespaceeigen#aa539408a09481d35961e11ee78793db1), ResultType &result) |
|  | Compute matrix square root of triangular matrix. [More...](group__matrixfunctions__module#gae51c91f920f6ea4a7f6f72caa1e8249f) |
|  |

 

 MatrixBase methods defined in the MatrixFunctions module
==========================================================

 The remainder of the page documents the following MatrixBase methods which are defined in the MatrixFunctions module.

 
 MatrixBase::cos()
-------------------

 Compute the matrix cosine.

 
```
const MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::cos() const

```


Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | M | a square matrix.  |

   
Returns
expression representing \( \cos(M) \).
 This function computes the matrix cosine. Use ArrayBase::cos() for computing the entry-wise cosine.

 The implementation calls [matrixFunction()](group__matrixfunctions__module#matrixbase_matrixfunction) with StdStemFunctions::cos().

 
See also

[sin()](group__matrixfunctions__module#matrixbase_sin) for an example.
 
 MatrixBase::cosh()
--------------------

 Compute the matrix hyberbolic cosine.

 
```
const MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::cosh() const

```


Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | M | a square matrix.  |

   
Returns
expression representing \( \cosh(M) \)
 This function calls [matrixFunction()](group__matrixfunctions__module#matrixbase_matrixfunction) with StdStemFunctions::cosh().

 
See also

[sinh()](group__matrixfunctions__module#matrixbase_sinh) for an example.
 
 MatrixBase::exp()
-------------------

 Compute the matrix exponential.

 
```
const MatrixExponentialReturnValue<Derived> MatrixBase<Derived>::exp() const

```


Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | M | matrix whose exponential is to be computed.  |

   
Returns
expression representing the matrix exponential of `M`.
 The matrix exponential of \( M \) is defined by 


 \[ \exp(M) = \sum\_{k=0}^\infty \frac{M^k}{k!}. \] 

  The matrix exponential can be used to solve linear ordinary differential equations: the solution of \( y' = My \) with the initial condition \( y(0) = y\_0 \) is given by \( y(t) = \exp(M) y\_0 \).

 The matrix exponential is different from applying the exp function to all the entries in the matrix. Use ArrayBase::exp() if you want to do the latter.

 The cost of the computation is approximately \( 20 n^3 \) for matrices of size \( n \). The number 20 depends weakly on the norm of the matrix.

 The matrix exponential is computed using the scaling-and-squaring method combined with Padé approximation. The matrix is first rescaled, then the exponential of the reduced matrix is computed approximant, and then the rescaling is undone by repeated squaring. The degree of the Padé approximant is chosen such that the approximation error is less than the round-off error. However, errors may accumulate during the squaring phase.

 Details of the algorithm can be found in: Nicholas J. Higham, "The scaling and squaring method for the matrix exponential revisited," *SIAM J. Matrix Anal. Applic.*, **26**:1179–1193, 2005.

 Example: The following program checks that 


 \[ \exp \left[ \begin{array}{ccc} 0 & \frac14\pi & 0 \\ -\frac14\pi & 0 & 0 \\ 0 & 0 & 0 \end{array} \right] = \left[ \begin{array}{ccc} \frac12\sqrt2 & -\frac12\sqrt2 & 0 \\ \frac12\sqrt2 & \frac12\sqrt2 & 0 \\ 0 & 0 & 1 \end{array} \right]. \] 

  This corresponds to a rotation of \( \frac14\pi \) radians around the z-axis.

 
```
#include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
 
int main()
{
  const double pi = std::acos(-1.0);
 
  MatrixXd A(3,3);
  A << 0,    -pi/4, 0,
       pi/4, 0,     0,
       0,    0,     0;
  std::cout << "The matrix A is:\n" << A << "\n\n";
  std::cout << "The matrix exponential of A is:\n" << A.exp() << "\n\n";
}
```

 Output: 



```
The matrix A is:
        0 -0.785398         0
 0.785398         0         0
        0         0         0

The matrix exponential of A is:
 0.707107 -0.707107         0
 0.707107  0.707107         0
        0         0         1


```


Note

`M` has to be a matrix of `float`, `double`, `long double` `complex<float>`, `complex<double>`, or `complex<long double>` .
 
 MatrixBase::log()
-------------------

 Compute the matrix logarithm.

 
```
const MatrixLogarithmReturnValue<Derived> MatrixBase<Derived>::log() const

```


Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | M | invertible matrix whose logarithm is to be computed.  |

   
Returns
expression representing the matrix logarithm root of `M`.
 The matrix logarithm of \( M \) is a matrix \( X \) such that \( \exp(X) = M \) where exp denotes the matrix exponential. As for the scalar logarithm, the equation \( \exp(X) = M \) may have multiple solutions; this function returns a matrix whose eigenvalues have imaginary part in the interval \( (-\pi,\pi] \).

 The matrix logarithm is different from applying the log function to all the entries in the matrix. Use ArrayBase::log() if you want to do the latter.

 In the real case, the matrix \( M \) should be invertible and it should have no eigenvalues which are real and negative (pairs of complex conjugate eigenvalues are allowed). In the complex case, it only needs to be invertible.

 This function computes the matrix logarithm using the Schur-Parlett algorithm as implemented by MatrixBase::matrixFunction(). The logarithm of an atomic block is computed by MatrixLogarithmAtomic, which uses direct computation for 1-by-1 and 2-by-2 blocks and an inverse scaling-and-squaring algorithm for bigger blocks, with the square roots computed by MatrixBase::sqrt().

 Details of the algorithm can be found in Section 11.6.2 of: Nicholas J. Higham, *Functions of Matrices: Theory and Computation*, SIAM 2008. ISBN 978-0-898716-46-7.

 Example: The following program checks that 


 \[ \log \left[ \begin{array}{ccc} \frac12\sqrt2 & -\frac12\sqrt2 & 0 \\ \frac12\sqrt2 & \frac12\sqrt2 & 0 \\ 0 & 0 & 1 \end{array} \right] = \left[ \begin{array}{ccc} 0 & \frac14\pi & 0 \\ -\frac14\pi & 0 & 0 \\ 0 & 0 & 0 \end{array} \right]. \] 

  This corresponds to a rotation of \( \frac14\pi \) radians around the z-axis. This is the inverse of the example used in the documentation of [exp()](group__matrixfunctions__module#matrixbase_exp).

 
```
#include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
 
int main()
{
  using std::sqrt;
  MatrixXd A(3,3);
  A << 0.5*[sqrt](../namespaceeigen#af4f536e8ea56702e63088efb3706d1f0)(2), -0.5*[sqrt](../namespaceeigen#af4f536e8ea56702e63088efb3706d1f0)(2), 0,
       0.5*[sqrt](../namespaceeigen#af4f536e8ea56702e63088efb3706d1f0)(2),  0.5*[sqrt](../namespaceeigen#af4f536e8ea56702e63088efb3706d1f0)(2), 0,
       0,            0,           1;
  std::cout << "The matrix A is:\n" << A << "\n\n";
  std::cout << "The matrix logarithm of A is:\n" << A.log() << "\n";
}
```

 Output: 



```
The matrix A is:
 0.707107 -0.707107         0
 0.707107  0.707107         0
        0         0         1

The matrix logarithm of A is:
-8.86512e-17    -0.785398            0
    0.785398 -8.86512e-17            0
           0            0            0

```


Note

`M` has to be a matrix of `float`, `double`, `long double`, `complex<float>`, `complex<double>`, or `complex<long double>`.
 
See also
MatrixBase::exp(), MatrixBase::matrixFunction(), class MatrixLogarithmAtomic, MatrixBase::sqrt().
 
 MatrixBase::pow()
-------------------

 Compute the matrix raised to arbitrary real power.

 
```
const MatrixPowerReturnValue<Derived> MatrixBase<Derived>::pow(RealScalar p) const

```


Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | M | base of the matrix power, should be a square matrix.  |
| [in] | p | exponent of the matrix power. |

   The matrix power \( M^p \) is defined as \( \exp(p \log(M)) \), where exp denotes the matrix exponential, and log denotes the matrix logarithm. This is different from raising all the entries in the matrix to the p-th power. Use ArrayBase::pow() if you want to do the latter.

 If `p` is complex, the scalar type of `M` should be the type of `p` . \( M^p \) simply evaluates into \( \exp(p \log(M)) \). Therefore, the matrix \( M \) should meet the conditions to be an argument of matrix logarithm.

 If `p` is real, it is casted into the real scalar type of `M`. Then this function computes the matrix power using the Schur-Padé algorithm as implemented by class MatrixPower. The exponent is split into integral part and fractional part, where the fractional part is in the interval \( (-1, 1) \). The main diagonal and the first super-diagonal is directly computed.

 If `M` is singular with a semisimple zero eigenvalue and `p` is positive, the Schur factor \( T \) is reordered with Givens rotations, i.e.

  \[ T = \left[ \begin{array}{cc} T\_1 & T\_2 \\ 0 & 0 \end{array} \right] \] 

 where \( T\_1 \) is invertible. Then \( T^p \) is given by

  \[ T^p = \left[ \begin{array}{cc} T\_1^p & T\_1^{-1} T\_1^p T\_2 \\ 0 & 0 \end{array}. \right] \] 

 
Warning
Fractional power of a matrix with a non-semisimple zero eigenvalue is not well-defined. We introduce an assertion failure against inaccurate result, e.g.
```
#include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
 
int main()
{
  Eigen::Matrix4d A;
  A << 0, 0, 2, 3,
       0, 0, 4, 5,
       0, 0, 6, 7,
       0, 0, 8, 9;
  std::cout << A.pow(0.37) << std::endl;
  
  // The 1 makes eigenvalue 0 non-semisimple.
  A.coeffRef(0, 1) = 1;
 
  // This fails if EIGEN\_NO\_DEBUG is undefined.
  std::cout << A.pow(0.37) << std::endl;
 
  return 0;
}

```


 Details of the algorithm can be found in: Nicholas J. Higham and Lijing Lin, "A Schur-Pad&eacute; algorithm for fractional powers of a matrix," *SIAM J. Matrix Anal. Applic.*, **32(3)**:1056–1078, 2011.

 Example: The following program checks that 


 \[ \left[ \begin{array}{ccc} \cos1 & -\sin1 & 0 \\ \sin1 & \cos1 & 0 \\ 0 & 0 & 1 \end{array} \right]^{\frac14\pi} = \left[ \begin{array}{ccc} \frac12\sqrt2 & -\frac12\sqrt2 & 0 \\ \frac12\sqrt2 & \frac12\sqrt2 & 0 \\ 0 & 0 & 1 \end{array} \right]. \] 

  This corresponds to \( \frac14\pi \) rotations of 1 radian around the z-axis.

 
```
#include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
 
int main()
{
  const double pi = std::acos(-1.0);
  Matrix3d A;
  A << [cos](../namespaceeigen#ad01d50a42869218f1d54af13f71517a6)(1), -[sin](../namespaceeigen#ae6e8ad270ff41c088d7651567594f796)(1), 0,
       [sin](../namespaceeigen#ae6e8ad270ff41c088d7651567594f796)(1),  [cos](../namespaceeigen#ad01d50a42869218f1d54af13f71517a6)(1), 0,
           0 ,      0 , 1;
  std::cout << "The matrix A is:\n" << A << "\n\n"
               "The matrix power A^(pi/4) is:\n" << A.pow(pi/4) << std::endl;
  return 0;
}
```

 Output: 



```
The matrix A is:
 0.540302 -0.841471         0
 0.841471  0.540302         0
        0         0         1

The matrix power A^(pi/4) is:
 0.707107 -0.707107         0
 0.707107  0.707107         0
        0         0         1

```

MatrixBase::pow() is user-friendly. However, there are some circumstances under which you should use class MatrixPower directly. MatrixPower can save the result of Schur decomposition, so it's better for computing various powers for the same matrix.

 Example: 



```
#include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
 
int main()
{
  Matrix4cd A = Matrix4cd::Random();
  MatrixPower<Matrix4cd> Apow(A);
 
  std::cout << "The matrix A is:\n" << A << "\n\n"
               "A^3.1 is:\n" << Apow(3.1) << "\n\n"
               "A^3.3 is:\n" << Apow(3.3) << "\n\n"
               "A^3.7 is:\n" << Apow(3.7) << "\n\n"
               "A^3.9 is:\n" << Apow(3.9) << std::endl;
  return 0;
}

```

 Output: 



```
The matrix A is:
 (-0.211234,0.680375)   (0.10794,-0.444451)   (0.434594,0.271423) (-0.198111,-0.686642)
   (0.59688,0.566198) (0.257742,-0.0452059)  (0.213938,-0.716795) (-0.782382,-0.740419)
 (-0.604897,0.823295) (0.0268018,-0.270431) (-0.514226,-0.967399)  (-0.563486,0.997849)
 (0.536459,-0.329554)    (0.83239,0.904459)  (0.608354,-0.725537)  (0.678224,0.0258648)

A^3.1 is:
   (2.80575,-0.607662) (-1.16847,-0.00660555)    (-0.760385,1.01461)   (-0.38073,-0.106512)
     (1.4041,-3.61891)     (1.00481,0.186263)   (-0.163888,0.449419)   (-0.388981,-1.22629)
   (-2.07957,-1.58136)     (0.825866,2.25962)     (5.09383,0.155736)    (0.394308,-1.63034)
  (-0.818997,0.671026)  (2.11069,-0.00768024)    (-1.37876,0.140165)    (2.50512,-0.854429)

A^3.3 is:
  (2.83571,-0.238717) (-1.48174,-0.0615217)  (-0.0544396,1.68092) (-0.292699,-0.621726)
    (2.0521,-3.58316)    (0.87894,0.400548)  (0.738072,-0.121242)   (-1.07957,-1.63492)
  (-3.00106,-1.10558)     (1.52205,1.92407)    (5.29759,-1.83562)  (-0.532038,-1.50253)
  (-0.491353,-0.4145)     (2.5761,0.481286)  (-1.21994,0.0367069)    (2.67112,-1.06331)

A^3.7 is:
     (1.42126,0.33362)   (-1.39486,-0.560486)      (1.44968,2.47066)   (-0.324079,-1.75879)
    (2.65301,-1.82427)   (0.357333,-0.192429)      (2.01017,-1.4791)    (-2.71518,-2.35892)
   (-3.98544,0.964861)     (2.26033,0.554254)     (3.18211,-5.94352)    (-2.22888,0.128951)
   (0.944969,-2.14683)      (3.31345,1.66075) (-0.0623743,-0.848324)        (2.3897,-1.863)

A^3.9 is:
 (0.0720766,0.378685) (-0.931961,-0.978624)      (1.9855,2.34105)  (-0.530547,-2.17664)
  (2.40934,-0.265286)  (0.0299975,-1.08827)    (1.98974,-2.05886)   (-3.45767,-2.50235)
    (-3.71666,2.3874)        (2.054,-0.303)   (0.844348,-7.29588)    (-2.59136,1.57689)
   (1.87645,-2.38798)     (3.52111,2.10508)    (0.799055,-1.6122)    (1.93452,-2.44408)

```


Note

`M` has to be a matrix of `float`, `double`, `long double`, `complex<float>`, `complex<double>`, or `complex<long double>` .
 
See also
MatrixBase::exp(), MatrixBase::log(), class MatrixPower.
 
 MatrixBase::matrixFunction()
------------------------------

 Compute a matrix function.

 
```
const MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::matrixFunction(typename internal::stem_function<typename internal::traits<Derived>::Scalar>::type f) const

```


Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | M | argument of matrix function, should be a square matrix.  |
| [in] | f | an entire function; `f(x,n)` should compute the n-th derivative of f at x.  |

   
Returns
expression representing `f` applied to `M`.
 Suppose that `M` is a matrix whose entries have type `Scalar`. Then, the second argument, `f`, should be a function with prototype 



```
ComplexScalar f(ComplexScalar, int) 

```

 where `ComplexScalar` = `std::complex<Scalar>` if `Scalar` is real (e.g., `float` or `double`) and `ComplexScalar` = `Scalar` if `Scalar` is complex. The return value of `f(x,n)` should be \( f^{(n)}(x) \), the n-th derivative of f at x.

 This routine uses the algorithm described in: Philip Davies and Nicholas J. Higham, "A Schur-Parlett algorithm for computing matrix functions", *SIAM J. Matrix Anal. Applic.*, **25**:464–485, 2003.

 The actual work is done by the MatrixFunction class.

 Example: The following program checks that 


 \[ \exp \left[ \begin{array}{ccc} 0 & \frac14\pi & 0 \\ -\frac14\pi & 0 & 0 \\ 0 & 0 & 0 \end{array} \right] = \left[ \begin{array}{ccc} \frac12\sqrt2 & -\frac12\sqrt2 & 0 \\ \frac12\sqrt2 & \frac12\sqrt2 & 0 \\ 0 & 0 & 1 \end{array} \right]. \] 

  This corresponds to a rotation of \( \frac14\pi \) radians around the z-axis. This is the same example as used in the documentation of [exp()](group__matrixfunctions__module#matrixbase_exp).

 
```
#include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
 
std::complex<double> expfn(std::complex<double> x, int)
{
  return std::exp(x);
}
 
int main()
{
  const double pi = std::acos(-1.0);
 
  MatrixXd A(3,3);
  A << 0,    -pi/4, 0,
       pi/4, 0,     0,
       0,    0,     0;
 
  std::cout << "The matrix A is:\n" << A << "\n\n";
  std::cout << "The matrix exponential of A is:\n" 
            << A.matrixFunction(expfn) << "\n\n";
}

```

 Output: 



```
The matrix A is:
        0 -0.785398         0
 0.785398         0         0
        0         0         0

The matrix exponential of A is:
 0.707107 -0.707107         0
 0.707107  0.707107         0
        0         0         1


```

Note that the function `expfn` is defined for complex numbers `x`, even though the matrix `A` is over the reals. Instead of `expfn`, we could also have used StdStemFunctions::exp: 



```
A.matrixFunction(StdStemFunctions<std::complex<double> >::exp, &B);

```


 MatrixBase::sin()
-------------------

 Compute the matrix sine.

 
```
const MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::sin() const

```


Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | M | a square matrix.  |

   
Returns
expression representing \( \sin(M) \).
 This function computes the matrix sine. Use ArrayBase::sin() for computing the entry-wise sine.

 The implementation calls [matrixFunction()](group__matrixfunctions__module#matrixbase_matrixfunction) with StdStemFunctions::sin().

 Example: 



```
#include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
 
int main()
{
  MatrixXd A = MatrixXd::Random(3,3);
  std::cout << "A = \n" << A << "\n\n";
 
  MatrixXd sinA = A.sin();
  std::cout << "sin(A) = \n" << sinA << "\n\n";
 
  MatrixXd cosA = A.cos();
  std::cout << "cos(A) = \n" << cosA << "\n\n";
  
  // The matrix functions satisfy sin^2(A) + cos^2(A) = I, 
  // like the scalar functions.
  std::cout << "sin^2(A) + cos^2(A) = \n" << sinA*sinA + cosA*cosA << "\n\n";
}

```

 Output: 



```
A = 
 0.680375   0.59688 -0.329554
-0.211234  0.823295  0.536459
 0.566198 -0.604897 -0.444451

sin(A) = 
 0.679919    0.4579 -0.400612
-0.227278  0.821913    0.5358
 0.570141 -0.676728 -0.462398

cos(A) = 
  0.927728  -0.530361  -0.110482
0.00969246   0.889022  -0.137604
 -0.132574   -0.04289    1.16475

sin^2(A) + cos^2(A) = 
           1 -7.77156e-16  4.71845e-16
-5.55112e-17            1  2.77556e-16
 1.66533e-16 -2.08167e-16            1


```


 MatrixBase::sinh()
--------------------

 Compute the matrix hyperbolic sine.

 
```
MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::sinh() const

```


Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | M | a square matrix.  |

   
Returns
expression representing \( \sinh(M) \)
 This function calls [matrixFunction()](group__matrixfunctions__module#matrixbase_matrixfunction) with StdStemFunctions::sinh().

 Example: 



```
#include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
 
int main()
{
  MatrixXf A = MatrixXf::Random(3,3);
  std::cout << "A = \n" << A << "\n\n";
 
  MatrixXf sinhA = A.sinh();
  std::cout << "sinh(A) = \n" << sinhA << "\n\n";
 
  MatrixXf coshA = A.cosh();
  std::cout << "cosh(A) = \n" << coshA << "\n\n";
  
  // The matrix functions satisfy cosh^2(A) - sinh^2(A) = I, 
  // like the scalar functions.
  std::cout << "cosh^2(A) - sinh^2(A) = \n" << coshA*coshA - sinhA*sinhA << "\n\n";
}

```

 Output: 



```
A = 
 0.680375   0.59688 -0.329554
-0.211234  0.823295  0.536459
 0.566198 -0.604897 -0.444451

sinh(A) = 
 0.682534  0.739988 -0.256871
-0.194928  0.826512  0.537546
 0.562584  -0.53163 -0.425199

cosh(A) = 
  1.07817  0.567068  0.132125
-0.004186   1.11649  0.135361
 0.128891  0.065999  0.851201

cosh^2(A) - sinh^2(A) = 
          1 1.19209e-07           0
2.10479e-07           1 1.78814e-07
1.19209e-07 2.38419e-07           1


```


 MatrixBase::sqrt()
--------------------

 Compute the matrix square root.

 
```
const MatrixSquareRootReturnValue<Derived> MatrixBase<Derived>::sqrt() const

```


Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | M | invertible matrix whose square root is to be computed.  |

   
Returns
expression representing the matrix square root of `M`.
 The matrix square root of \( M \) is the matrix \( M^{1/2} \) whose square is the original matrix; so if \( S = M^{1/2} \) then \( S^2 = M \). This is different from taking the square root of all the entries in the matrix; use ArrayBase::sqrt() if you want to do the latter.

 In the **real case**, the matrix \( M \) should be invertible and it should have no eigenvalues which are real and negative (pairs of complex conjugate eigenvalues are allowed). In that case, the matrix has a square root which is also real, and this is the square root computed by this function.

 The matrix square root is computed by first reducing the matrix to quasi-triangular form with the real Schur decomposition. The square root of the quasi-triangular matrix can then be computed directly. The cost is approximately \( 25 n^3 \) real flops for the real Schur decomposition and \( 3\frac13 n^3 \) real flops for the remainder (though the computation time in practice is likely more than this indicates).

 Details of the algorithm can be found in: Nicholas J. Highan, "Computing real square roots of a real matrix", *Linear Algebra Appl.*, 88/89:405–430, 1987.

 If the matrix is **positive-definite symmetric**, then the square root is also positive-definite symmetric. In this case, it is best to use SelfAdjointEigenSolver::operatorSqrt() to compute it.

 In the **complex case**, the matrix \( M \) should be invertible; this is a restriction of the algorithm. The square root computed by this algorithm is the one whose eigenvalues have an argument in the interval \( (-\frac12\pi, \frac12\pi] \). This is the usual branch cut.

 The computation is the same as in the real case, except that the complex Schur decomposition is used to reduce the matrix to a triangular matrix. The theoretical cost is the same. Details are in: Åke Björck and Sven Hammarling, "A Schur method for the square root of a matrix", *Linear Algebra Appl.*, 52/53:127–140, 1983.

 Example: The following program checks that the square root of 


 \[ \left[ \begin{array}{cc} \cos(\frac13\pi) & -\sin(\frac13\pi) \\ \sin(\frac13\pi) & \cos(\frac13\pi) \end{array} \right], \] 

  corresponding to a rotation over 60 degrees, is a rotation over 30 degrees: 


 \[ \left[ \begin{array}{cc} \cos(\frac16\pi) & -\sin(\frac16\pi) \\ \sin(\frac16\pi) & \cos(\frac16\pi) \end{array} \right]. \] 

 
```
#include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
 
int main()
{
  const double pi = std::acos(-1.0);
 
  MatrixXd A(2,2);
  A << [cos](../namespaceeigen#ad01d50a42869218f1d54af13f71517a6)(pi/3), -[sin](../namespaceeigen#ae6e8ad270ff41c088d7651567594f796)(pi/3), 
       [sin](../namespaceeigen#ae6e8ad270ff41c088d7651567594f796)(pi/3),  [cos](../namespaceeigen#ad01d50a42869218f1d54af13f71517a6)(pi/3);
  std::cout << "The matrix A is:\n" << A << "\n\n";
  std::cout << "The matrix square root of A is:\n" << A.sqrt() << "\n\n";
  std::cout << "The square of the last matrix is:\n" << A.sqrt() * A.sqrt() << "\n";
}

```

 Output: 



```
The matrix A is:
      0.5 -0.866025
 0.866025       0.5

The matrix square root of A is:
0.866025     -0.5
     0.5 0.866025

The square of the last matrix is:
      0.5 -0.866025
 0.866025       0.5

```


See also
class RealSchur, class ComplexSchur, class MatrixSquareRoot, SelfAdjointEigenSolver::operatorSqrt(). 
   matrix\_sqrt\_quasi\_triangular()
---------------------------------

    template<typename MatrixType , typename ResultType >  

|  |  |  |  |
| --- | --- | --- | --- |
| void Eigen::matrix\_sqrt\_quasi\_triangular  | ( | const MatrixType &  | *arg*,  |
|  |  | ResultType &  | *result* |
|  | ) |  |  |

 
 Compute matrix square root of quasi-triangular matrix. 

 
Template Parameters
 

|  |  |
| --- | --- |
| MatrixType | type of `arg`, the argument of matrix square root, expected to be an instantiation of the [Matrix](../classeigen_1_1matrix) class template.  |
| ResultType | type of `result`, where result is to be stored.  |

   
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | arg | argument of matrix square root.  |
| [out] | result | matrix square root of upper Hessenberg part of `arg`. |

   This function computes the square root of the upper quasi-triangular matrix stored in the upper Hessenberg part of `arg`. Only the upper Hessenberg part of `result` is updated, the rest is not touched. See [MatrixBase::sqrt()](../classeigen_1_1matrixbase#ad873dca860bd47baeeede8663e161b83) for details on how this computation is implemented.

 
See also
MatrixSquareRoot, MatrixSquareRootQuasiTriangular 
    matrix\_sqrt\_triangular()
--------------------------

    template<typename MatrixType , typename ResultType >  

|  |  |  |  |
| --- | --- | --- | --- |
| void Eigen::matrix\_sqrt\_triangular  | ( | const MatrixType &  | *arg*,  |
|  |  | ResultType &  | *result* |
|  | ) |  |  |

 
 Compute matrix square root of triangular matrix. 

 
Template Parameters
 

|  |  |
| --- | --- |
| MatrixType | type of `arg`, the argument of matrix square root, expected to be an instantiation of the [Matrix](../classeigen_1_1matrix) class template.  |
| ResultType | type of `result`, where result is to be stored.  |

   
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | arg | argument of matrix square root.  |
| [out] | result | matrix square root of upper triangular part of `arg`. |

   Only the upper triangular part (including the diagonal) of `result` is updated, the rest is not touched. See [MatrixBase::sqrt()](../classeigen_1_1matrixbase#ad873dca860bd47baeeede8663e161b83) for details on how this computation is implemented.

 
See also
MatrixSquareRoot, MatrixSquareRootQuasiTriangular 
    

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/group__MatrixFunctions__Module.html>

Eigen
=====

  Namespace containing all symbols from the Eigen library. [More...](namespaceeigen#details)

 

|  |
| --- |
|  |
| class  | [aligned\_allocator](../classeigen_1_1aligned__allocator) |
|  |
| class  | [AlignedBox](../classeigen_1_1alignedbox) |
|  |
| class  | [AlignedVector3](classeigen_1_1alignedvector3) |
|  | A vectorization friendly 3D vector. [More...](classeigen_1_1alignedvector3#details) |
|  |
| class  | [AMDOrdering](../classeigen_1_1amdordering) |
|  |
| class  | [AngleAxis](../classeigen_1_1angleaxis) |
|  |
| class  | [ArithmeticSequence](../classeigen_1_1arithmeticsequence) |
|  |
| class  | [Array](../classeigen_1_1array) |
|  |
| class  | [ArrayBase](../classeigen_1_1arraybase) |
|  |
| class  | [ArrayWrapper](../classeigen_1_1arraywrapper) |
|  |
| struct  | [ArrayXpr](../structeigen_1_1arrayxpr) |
|  |
| class  | [AutoDiffScalar](classeigen_1_1autodiffscalar) |
|  | A scalar type replacement with automatic differentiation capability. [More...](classeigen_1_1autodiffscalar#details) |
|  |
| class  | [BDCSVD](../classeigen_1_1bdcsvd) |
|  |
| class  | [BiCGSTAB](../classeigen_1_1bicgstab) |
|  |
| class  | [Block](../classeigen_1_1block) |
|  |
| class  | [BlockImpl< XprType, BlockRows, BlockCols, InnerPanel, Sparse >](../classeigen_1_1blockimpl_3_01xprtype_00_01blockrows_00_01blockcols_00_01innerpanel_00_01sparse_01_4) |
|  |
| class  | [BlockSparseMatrix](classeigen_1_1blocksparsematrix) |
|  | A versatile sparse matrix representation where each element is a block. [More...](classeigen_1_1blocksparsematrix#details) |
|  |
| class  | [CholmodBase](../classeigen_1_1cholmodbase) |
|  |
| class  | [CholmodDecomposition](../classeigen_1_1cholmoddecomposition) |
|  |
| class  | [CholmodSimplicialLDLT](../classeigen_1_1cholmodsimplicialldlt) |
|  |
| class  | [CholmodSimplicialLLT](../classeigen_1_1cholmodsimplicialllt) |
|  |
| class  | [CholmodSupernodalLLT](../classeigen_1_1cholmodsupernodalllt) |
|  |
| class  | [COLAMDOrdering](../classeigen_1_1colamdordering) |
|  |
| class  | [ColPivHouseholderQR](../classeigen_1_1colpivhouseholderqr) |
|  |
| class  | [CommaInitializer](../structeigen_1_1commainitializer) |
|  |
| class  | [CompleteOrthogonalDecomposition](../classeigen_1_1completeorthogonaldecomposition) |
|  |
| class  | [ComplexEigenSolver](../classeigen_1_1complexeigensolver) |
|  |
| class  | [ComplexSchur](../classeigen_1_1complexschur) |
|  |
| class  | [ConjugateGradient](../classeigen_1_1conjugategradient) |
|  |
| class  | [CwiseBinaryOp](../classeigen_1_1cwisebinaryop) |
|  |
| class  | [CwiseNullaryOp](../classeigen_1_1cwisenullaryop) |
|  |
| class  | [CwiseTernaryOp](../classeigen_1_1cwiseternaryop) |
|  |
| class  | [CwiseUnaryOp](../classeigen_1_1cwiseunaryop) |
|  |
| class  | [CwiseUnaryView](../classeigen_1_1cwiseunaryview) |
|  |
| struct  | [Dense](../structeigen_1_1dense) |
|  |
| class  | [DenseBase](../classeigen_1_1densebase) |
|  |
| class  | [DenseCoeffsBase< Derived, DirectAccessors >](../classeigen_1_1densecoeffsbase_3_01derived_00_01directaccessors_01_4) |
|  |
| class  | [DenseCoeffsBase< Derived, DirectWriteAccessors >](../classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4) |
|  |
| class  | [DenseCoeffsBase< Derived, ReadOnlyAccessors >](../classeigen_1_1densecoeffsbase_3_01derived_00_01readonlyaccessors_01_4) |
|  |
| class  | [DenseCoeffsBase< Derived, WriteAccessors >](../classeigen_1_1densecoeffsbase_3_01derived_00_01writeaccessors_01_4) |
|  |
| class  | [DGMRES](classeigen_1_1dgmres) |
|  | A Restarted [GMRES](classeigen_1_1gmres "A GMRES solver for sparse square problems.") with deflation. This class implements a modification of the [GMRES](classeigen_1_1gmres "A GMRES solver for sparse square problems.") solver for sparse linear systems. The basis is built with modified Gram-Schmidt. At each restart, a few approximated eigenvectors corresponding to the smallest eigenvalues are used to build a preconditioner for the next cycle. This preconditioner for deflation can be combined with any other preconditioner, the [IncompleteLUT](../classeigen_1_1incompletelut) for instance. The preconditioner is applied at right of the matrix and the combination is multiplicative. [More...](classeigen_1_1dgmres#details) |
|  |
| class  | [Diagonal](../classeigen_1_1diagonal) |
|  |
| class  | [DiagonalMatrix](../classeigen_1_1diagonalmatrix) |
|  |
| class  | [DiagonalPreconditioner](../classeigen_1_1diagonalpreconditioner) |
|  |
| class  | [DiagonalWrapper](../classeigen_1_1diagonalwrapper) |
|  |
| class  | [DynamicSGroup](classeigen_1_1dynamicsgroup) |
|  | Dynamic symmetry group. [More...](classeigen_1_1dynamicsgroup#details) |
|  |
| class  | [DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix) |
|  | A sparse matrix class designed for matrix assembly purpose. [More...](classeigen_1_1dynamicsparsematrix#details) |
|  |
| class  | [EigenBase](../structeigen_1_1eigenbase) |
|  |
| class  | [EigenSolver](../classeigen_1_1eigensolver) |
|  |
| class  | [EulerAngles](classeigen_1_1eulerangles) |
|  | Represents a rotation in a 3 dimensional space as three Euler angles. [More...](classeigen_1_1eulerangles#details) |
|  |
| class  | [EulerSystem](classeigen_1_1eulersystem) |
|  | Represents a fixed Euler rotation system. [More...](classeigen_1_1eulersystem#details) |
|  |
| class  | [ForceAlignedAccess](../classeigen_1_1forcealignedaccess) |
|  |
| class  | [FullPivHouseholderQR](../classeigen_1_1fullpivhouseholderqr) |
|  |
| class  | [FullPivLU](../classeigen_1_1fullpivlu) |
|  |
| class  | [GeneralizedEigenSolver](../classeigen_1_1generalizedeigensolver) |
|  |
| class  | [GeneralizedSelfAdjointEigenSolver](../classeigen_1_1generalizedselfadjointeigensolver) |
|  |
| class  | [GMRES](classeigen_1_1gmres) |
|  | A [GMRES](classeigen_1_1gmres "A GMRES solver for sparse square problems.") solver for sparse square problems. [More...](classeigen_1_1gmres#details) |
|  |
| class  | [HessenbergDecomposition](../classeigen_1_1hessenbergdecomposition) |
|  |
| class  | [Homogeneous](../classeigen_1_1homogeneous) |
|  |
| class  | [HouseholderQR](../classeigen_1_1householderqr) |
|  |
| class  | [HouseholderSequence](../classeigen_1_1householdersequence) |
|  |
| class  | [HybridNonLinearSolver](classeigen_1_1hybridnonlinearsolver) |
|  | Finds a zero of a system of n nonlinear functions in n variables by a modification of the Powell hybrid method ("dogleg"). [More...](classeigen_1_1hybridnonlinearsolver#details) |
|  |
| class  | [Hyperplane](../classeigen_1_1hyperplane) |
|  |
| class  | [IdentityPreconditioner](../classeigen_1_1identitypreconditioner) |
|  |
| class  | [IDRS](classeigen_1_1idrs) |
|  | The Induced Dimension Reduction method (IDR(s)) is a short-recurrences Krylov method for sparse square problems. [More...](classeigen_1_1idrs#details) |
|  |
| class  | [IncompleteCholesky](../classeigen_1_1incompletecholesky) |
|  |
| class  | [IncompleteLUT](../classeigen_1_1incompletelut) |
|  |
| class  | [IndexedView](../classeigen_1_1indexedview) |
|  |
| class  | [InnerStride](../classeigen_1_1innerstride) |
|  |
| class  | [Inverse](../classeigen_1_1inverse) |
|  |
| class  | [IOFormat](../structeigen_1_1ioformat) |
|  |
| class  | [IterationController](classeigen_1_1iterationcontroller) |
|  | Controls the iterations of the iterative solvers. [More...](classeigen_1_1iterationcontroller#details) |
|  |
| class  | [IterativeSolverBase](../classeigen_1_1iterativesolverbase) |
|  |
| class  | [IterScaling](classeigen_1_1iterscaling) |
|  | iterative scaling algorithm to equilibrate rows and column norms in matrices [More...](classeigen_1_1iterscaling#details) |
|  |
| class  | [JacobiRotation](../classeigen_1_1jacobirotation) |
|  |
| class  | [JacobiSVD](../classeigen_1_1jacobisvd) |
|  |
| class  | [KdBVH](classeigen_1_1kdbvh) |
|  | A simple bounding volume hierarchy based on [AlignedBox](../classeigen_1_1alignedbox). [More...](classeigen_1_1kdbvh#details) |
|  |
| class  | [KroneckerProduct](classeigen_1_1kroneckerproduct) |
|  | Kronecker tensor product helper class for dense matrices. [More...](classeigen_1_1kroneckerproduct#details) |
|  |
| class  | [KroneckerProductBase](classeigen_1_1kroneckerproductbase) |
|  | The base class of dense and sparse Kronecker product. [More...](classeigen_1_1kroneckerproductbase#details) |
|  |
| class  | [KroneckerProductSparse](classeigen_1_1kroneckerproductsparse) |
|  | Kronecker tensor product helper class for sparse matrices. [More...](classeigen_1_1kroneckerproductsparse#details) |
|  |
| class  | [LDLT](../classeigen_1_1ldlt) |
|  |
| class  | [LeastSquareDiagonalPreconditioner](../classeigen_1_1leastsquarediagonalpreconditioner) |
|  |
| class  | [LeastSquaresConjugateGradient](../classeigen_1_1leastsquaresconjugategradient) |
|  |
| class  | [LevenbergMarquardt](classeigen_1_1levenbergmarquardt) |
|  | Performs non linear optimization over a non-linear function, using a variant of the Levenberg Marquardt algorithm. [More...](classeigen_1_1levenbergmarquardt#details) |
|  |
| class  | [LLT](../classeigen_1_1llt) |
|  |
| class  | [Map](../classeigen_1_1map) |
|  |
| class  | [Map< const Quaternion< \_Scalar >, \_Options >](../classeigen_1_1map_3_01const_01quaternion_3_01__scalar_01_4_00_01__options_01_4) |
|  |
| class  | [Map< Quaternion< \_Scalar >, \_Options >](../classeigen_1_1map_3_01quaternion_3_01__scalar_01_4_00_01__options_01_4) |
|  |
| class  | [Map< SparseMatrixType >](../classeigen_1_1map_3_01sparsematrixtype_01_4) |
|  |
| class  | [MapBase< Derived, ReadOnlyAccessors >](../classeigen_1_1mapbase_3_01derived_00_01readonlyaccessors_01_4) |
|  |
| class  | [MapBase< Derived, WriteAccessors >](../classeigen_1_1mapbase_3_01derived_00_01writeaccessors_01_4) |
|  |
| class  | [MappedSparseMatrix](../classeigen_1_1mappedsparsematrix) |
|  |
| class  | [Matrix](../classeigen_1_1matrix) |
|  |
| class  | [MatrixBase](../classeigen_1_1matrixbase) |
|  |
| class  | [MatrixComplexPowerReturnValue](classeigen_1_1matrixcomplexpowerreturnvalue) |
|  | Proxy for the matrix power of some matrix (expression). [More...](classeigen_1_1matrixcomplexpowerreturnvalue#details) |
|  |
| struct  | [MatrixExponentialReturnValue](structeigen_1_1matrixexponentialreturnvalue) |
|  | Proxy for the matrix exponential of some matrix (expression). [More...](structeigen_1_1matrixexponentialreturnvalue#details) |
|  |
| class  | [MatrixFunctionReturnValue](classeigen_1_1matrixfunctionreturnvalue) |
|  | Proxy for the matrix function of some matrix (expression). [More...](classeigen_1_1matrixfunctionreturnvalue#details) |
|  |
| class  | [MatrixLogarithmReturnValue](classeigen_1_1matrixlogarithmreturnvalue) |
|  | Proxy for the matrix logarithm of some matrix (expression). [More...](classeigen_1_1matrixlogarithmreturnvalue#details) |
|  |
| class  | [MatrixMarketIterator](classeigen_1_1matrixmarketiterator) |
|  | Iterator to browse matrices from a specified folder. [More...](classeigen_1_1matrixmarketiterator#details) |
|  |
| class  | [MatrixPower](classeigen_1_1matrixpower) |
|  | Class for computing matrix powers. [More...](classeigen_1_1matrixpower#details) |
|  |
| class  | [MatrixPowerAtomic](classeigen_1_1matrixpoweratomic) |
|  | Class for computing matrix powers. [More...](classeigen_1_1matrixpoweratomic#details) |
|  |
| class  | [MatrixPowerParenthesesReturnValue](classeigen_1_1matrixpowerparenthesesreturnvalue) |
|  | Proxy for the matrix power of some matrix. [More...](classeigen_1_1matrixpowerparenthesesreturnvalue#details) |
|  |
| class  | [MatrixPowerReturnValue](classeigen_1_1matrixpowerreturnvalue) |
|  | Proxy for the matrix power of some matrix (expression). [More...](classeigen_1_1matrixpowerreturnvalue#details) |
|  |
| class  | [MatrixSquareRootReturnValue](classeigen_1_1matrixsquarerootreturnvalue) |
|  | Proxy for the matrix square root of some matrix (expression). [More...](classeigen_1_1matrixsquarerootreturnvalue#details) |
|  |
| class  | [MatrixWrapper](../classeigen_1_1matrixwrapper) |
|  |
| struct  | [MatrixXpr](../structeigen_1_1matrixxpr) |
|  |
| class  | [MaxSizeVector](classeigen_1_1maxsizevector) |
|  | The [MaxSizeVector](classeigen_1_1maxsizevector "The MaxSizeVector class.") class. [More...](classeigen_1_1maxsizevector#details) |
|  |
| class  | [MetisOrdering](../classeigen_1_1metisordering) |
|  |
| class  | [MINRES](classeigen_1_1minres) |
|  | A minimal residual solver for sparse symmetric problems. [More...](classeigen_1_1minres#details) |
|  |
| class  | [NaturalOrdering](../classeigen_1_1naturalordering) |
|  |
| class  | [NestByValue](../classeigen_1_1nestbyvalue) |
|  |
| class  | [NoAlias](../classeigen_1_1noalias) |
|  |
| class  | [NumericalDiff](classeigen_1_1numericaldiff) |
|  |
| class  | [NumTraits](../structeigen_1_1numtraits) |
|  |
| struct  | [NumTraits< mpfr::mpreal >](structeigen_1_1numtraits_3_01mpfr_1_1mpreal_01_4) |
|  |
| class  | [OuterStride](../classeigen_1_1outerstride) |
|  |
| class  | [ParametrizedLine](../classeigen_1_1parametrizedline) |
|  |
| class  | [PardisoLDLT](../classeigen_1_1pardisoldlt) |
|  |
| class  | [PardisoLLT](../classeigen_1_1pardisollt) |
|  |
| class  | [PardisoLU](../classeigen_1_1pardisolu) |
|  |
| class  | [PartialPivLU](../classeigen_1_1partialpivlu) |
|  |
| class  | [PartialReduxExpr](../classeigen_1_1partialreduxexpr) |
|  |
| class  | [PastixLDLT](../classeigen_1_1pastixldlt) |
|  |
| class  | [PastixLLT](../classeigen_1_1pastixllt) |
|  |
| class  | [PastixLU](../classeigen_1_1pastixlu) |
|  |
| class  | [PermutationBase](../classeigen_1_1permutationbase) |
|  |
| class  | [PermutationMatrix](../classeigen_1_1permutationmatrix) |
|  |
| struct  | [PermutationStorage](../structeigen_1_1permutationstorage) |
|  |
| class  | [PermutationWrapper](../classeigen_1_1permutationwrapper) |
|  |
| class  | [PlainObjectBase](../classeigen_1_1plainobjectbase) |
|  |
| class  | [PolynomialSolver](classeigen_1_1polynomialsolver) |
|  | A polynomial solver. [More...](classeigen_1_1polynomialsolver#details) |
|  |
| class  | [PolynomialSolverBase](classeigen_1_1polynomialsolverbase) |
|  | Defined to be inherited by polynomial solvers: it provides convenient methods such as. [More...](classeigen_1_1polynomialsolverbase#details) |
|  |
| class  | [Product](../classeigen_1_1product) |
|  |
| class  | [Quaternion](../classeigen_1_1quaternion) |
|  |
| class  | [QuaternionBase](../classeigen_1_1quaternionbase) |
|  |
| class  | [RandomSetter](classeigen_1_1randomsetter) |
|  | The [RandomSetter](classeigen_1_1randomsetter "The RandomSetter is a wrapper object allowing to set/update a sparse matrix with random access.") is a wrapper object allowing to set/update a sparse matrix with random access. [More...](classeigen_1_1randomsetter#details) |
|  |
| class  | [RealQZ](../classeigen_1_1realqz) |
|  |
| class  | [RealSchur](../classeigen_1_1realschur) |
|  |
| class  | [Ref](../classeigen_1_1ref) |
|  |
| class  | [Ref< SparseMatrixType, Options >](../classeigen_1_1ref_3_01sparsematrixtype_00_01options_01_4) |
|  |
| class  | [Ref< SparseVectorType >](../classeigen_1_1ref_3_01sparsevectortype_01_4) |
|  |
| class  | [Replicate](../classeigen_1_1replicate) |
|  |
| class  | [Reshaped](../classeigen_1_1reshaped) |
|  |
| class  | [Reverse](../classeigen_1_1reverse) |
|  |
| class  | [Rotation2D](../classeigen_1_1rotation2d) |
|  |
| class  | [RotationBase](../classeigen_1_1rotationbase) |
|  |
| class  | [ScalarBinaryOpTraits](../structeigen_1_1scalarbinaryoptraits) |
|  |
| class  | [Select](../classeigen_1_1select) |
|  |
| class  | [SelfAdjointEigenSolver](../classeigen_1_1selfadjointeigensolver) |
|  |
| class  | [SelfAdjointView](../classeigen_1_1selfadjointview) |
|  |
| class  | [SGroup](classeigen_1_1sgroup) |
|  | Symmetry group, initialized from template arguments. [More...](classeigen_1_1sgroup#details) |
|  |
| class  | [SimplicialCholesky](../classeigen_1_1simplicialcholesky) |
|  |
| class  | [SimplicialCholeskyBase](../classeigen_1_1simplicialcholeskybase) |
|  |
| class  | [SimplicialLDLT](../classeigen_1_1simplicialldlt) |
|  |
| class  | [SimplicialLLT](../classeigen_1_1simplicialllt) |
|  |
| class  | [SkylineInplaceLU](classeigen_1_1skylineinplacelu) |
|  | Inplace LU decomposition of a skyline matrix and associated features. [More...](classeigen_1_1skylineinplacelu#details) |
|  |
| class  | [SkylineMatrix](classeigen_1_1skylinematrix) |
|  | The main skyline matrix class. [More...](classeigen_1_1skylinematrix#details) |
|  |
| class  | [SkylineMatrixBase](classeigen_1_1skylinematrixbase) |
|  | Base class of any skyline matrices or skyline expressions. [More...](classeigen_1_1skylinematrixbase#details) |
|  |
| class  | [SkylineStorage](classeigen_1_1skylinestorage) |
|  |
| class  | [Solve](../classeigen_1_1solve) |
|  |
| class  | [SolverBase](../classeigen_1_1solverbase) |
|  |
| struct  | [SolverStorage](../structeigen_1_1solverstorage) |
|  |
| class  | [SolveWithGuess](../classeigen_1_1solvewithguess) |
|  |
| struct  | [Sparse](../structeigen_1_1sparse) |
|  |
| class  | [SparseCompressedBase](../classeigen_1_1sparsecompressedbase) |
|  |
| class  | [SparseLU](../classeigen_1_1sparselu) |
|  |
| class  | [SparseMapBase< Derived, ReadOnlyAccessors >](../classeigen_1_1sparsemapbase_3_01derived_00_01readonlyaccessors_01_4) |
|  |
| class  | [SparseMapBase< Derived, WriteAccessors >](../classeigen_1_1sparsemapbase_3_01derived_00_01writeaccessors_01_4) |
|  |
| class  | [SparseMatrix](../classeigen_1_1sparsematrix) |
|  |
| class  | [SparseMatrixBase](../classeigen_1_1sparsematrixbase) |
|  |
| class  | [SparseQR](../classeigen_1_1sparseqr) |
|  |
| class  | [SparseSelfAdjointView](../classeigen_1_1sparseselfadjointview) |
|  |
| class  | [SparseSolverBase](../classeigen_1_1sparsesolverbase) |
|  |
| class  | [SparseVector](../classeigen_1_1sparsevector) |
|  |
| class  | [SparseView](../classeigen_1_1sparseview) |
|  |
| class  | [Spline](classeigen_1_1spline) |
|  | A class representing multi-dimensional spline curves. [More...](classeigen_1_1spline#details) |
|  |
| struct  | [SplineFitting](structeigen_1_1splinefitting) |
|  | [Spline](classeigen_1_1spline "A class representing multi-dimensional spline curves.") fitting methods. [More...](structeigen_1_1splinefitting#details) |
|  |
| struct  | [SplineTraits< Spline< \_Scalar, \_Dim, \_Degree >, \_DerivativeOrder >](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01__derivativeorder_01_4) |
|  | Compile-time attributes of the [Spline](classeigen_1_1spline "A class representing multi-dimensional spline curves.") class for fixed degree. [More...](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01__derivativeorder_01_4#details) |
|  |
| struct  | [SplineTraits< Spline< \_Scalar, \_Dim, \_Degree >, Dynamic >](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4) |
|  | Compile-time attributes of the [Spline](classeigen_1_1spline "A class representing multi-dimensional spline curves.") class for Dynamic degree. [More...](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#details) |
|  |
| class  | [SPQR](../classeigen_1_1spqr) |
|  |
| class  | [StaticSGroup](classeigen_1_1staticsgroup) |
|  | Static symmetry group. [More...](classeigen_1_1staticsgroup#details) |
|  |
| struct  | [StdMapTraits](structeigen_1_1stdmaptraits) |
|  |
| class  | [Stride](../classeigen_1_1stride) |
|  |
| class  | [SuperILU](../classeigen_1_1superilu) |
|  |
| class  | [SuperLU](../classeigen_1_1superlu) |
|  |
| class  | [SuperLUBase](../classeigen_1_1superlubase) |
|  |
| class  | [SVDBase](../classeigen_1_1svdbase) |
|  |
| class  | [Tensor](classeigen_1_1tensor) |
|  | The tensor class. [More...](classeigen_1_1tensor#details) |
|  |
| class  | [TensorAsyncDevice](classeigen_1_1tensorasyncdevice) |
|  | Pseudo expression providing an operator = that will evaluate its argument asynchronously on the specified device. Currently only ThreadPoolDevice implements proper asynchronous execution, while the default and GPU devices just run the expression synchronously and call m\_done() on completion.. [More...](classeigen_1_1tensorasyncdevice#details) |
|  |
| class  | [TensorBase](classeigen_1_1tensorbase) |
|  | The tensor base class. [More...](classeigen_1_1tensorbase#details) |
|  |
| class  | [TensorConcatenationOp](classeigen_1_1tensorconcatenationop) |
|  | [Tensor](classeigen_1_1tensor "The tensor class.") concatenation class. [More...](classeigen_1_1tensorconcatenationop#details) |
|  |
| class  | [TensorConversionOp](classeigen_1_1tensorconversionop) |
|  | [Tensor](classeigen_1_1tensor "The tensor class.") conversion class. This class makes it possible to vectorize type casting operations when the number of scalars per packet in the source and the destination type differ. [More...](classeigen_1_1tensorconversionop#details) |
|  |
| class  | [TensorCustomBinaryOp](classeigen_1_1tensorcustombinaryop) |
|  | [Tensor](classeigen_1_1tensor "The tensor class.") custom class. [More...](classeigen_1_1tensorcustombinaryop#details) |
|  |
| class  | [TensorCustomUnaryOp](classeigen_1_1tensorcustomunaryop) |
|  | [Tensor](classeigen_1_1tensor "The tensor class.") custom class. [More...](classeigen_1_1tensorcustomunaryop#details) |
|  |
| class  | [TensorDevice](classeigen_1_1tensordevice) |
|  | Pseudo expression providing an operator = that will evaluate its argument on the specified computing 'device' (GPU, thread pool, ...) [More...](classeigen_1_1tensordevice#details) |
|  |
| class  | [TensorEvaluator](structeigen_1_1tensorevaluator) |
|  | A cost model used to limit the number of threads used for evaluating tensor expression. [More...](structeigen_1_1tensorevaluator#details) |
|  |
| class  | [TensorFixedSize](classeigen_1_1tensorfixedsize) |
|  | The fixed sized version of the tensor class. [More...](classeigen_1_1tensorfixedsize#details) |
|  |
| class  | [TensorGeneratorOp](classeigen_1_1tensorgeneratorop) |
|  | [Tensor](classeigen_1_1tensor "The tensor class.") generator class. [More...](classeigen_1_1tensorgeneratorop#details) |
|  |
| class  | [TensorMap](classeigen_1_1tensormap) |
|  | A tensor expression mapping an existing array of data. [More...](classeigen_1_1tensormap#details) |
|  |
| class  | [TensorRef](classeigen_1_1tensorref) |
|  | A reference to a tensor expression The expression will be evaluated lazily (as much as possible). [More...](classeigen_1_1tensorref#details) |
|  |
| class  | [Transform](../classeigen_1_1transform) |
|  |
| class  | [Translation](../classeigen_1_1translation) |
|  |
| class  | [Transpose](../classeigen_1_1transpose) |
|  |
| class  | [Transpositions](../classeigen_1_1transpositions) |
|  |
| struct  | [TranspositionsStorage](../structeigen_1_1transpositionsstorage) |
|  |
| class  | [TriangularBase](../classeigen_1_1triangularbase) |
|  |
| class  | [TriangularView](../classeigen_1_1triangularview) |
|  |
| class  | [TriangularViewImpl< \_MatrixType, \_Mode, Dense >](../classeigen_1_1triangularviewimpl_3_01__matrixtype_00_01__mode_00_01dense_01_4) |
|  |
| class  | [TriangularViewImpl< MatrixType, Mode, Sparse >](../classeigen_1_1triangularviewimpl_3_01matrixtype_00_01mode_00_01sparse_01_4) |
|  |
| class  | [Tridiagonalization](../classeigen_1_1tridiagonalization) |
|  |
| class  | [Triplet](../classeigen_1_1triplet) |
|  |
| class  | [UmfPackLU](../classeigen_1_1umfpacklu) |
|  |
| class  | [UniformScaling](../classeigen_1_1uniformscaling) |
|  |
| class  | [VectorBlock](../classeigen_1_1vectorblock) |
|  |
| class  | [VectorwiseOp](../classeigen_1_1vectorwiseop) |
|  |
| class  | [WithFormat](../classeigen_1_1withformat) |
|  |




|  |
| --- |
|  |
|  typedef [Spline](classeigen_1_1spline)< double, 2 >  | [Spline2d](namespaceeigen#aa04df76fa4fc7d93538c28bbbd838507) |
|  | 2D double B-spline with dynamic degree.  |
|  |
|  typedef [Spline](classeigen_1_1spline)< float, 2 >  | [Spline2f](namespaceeigen#a1709ceddcb1e899317ac4bdb9682807f) |
|  | 2D float B-spline with dynamic degree.  |
|  |
|  typedef [Spline](classeigen_1_1spline)< double, 3 >  | [Spline3d](namespaceeigen#a34dfede40d5b8f3b2443ff20d891f455) |
|  | 3D double B-spline with dynamic degree.  |
|  |
|  typedef [Spline](classeigen_1_1spline)< float, 3 >  | [Spline3f](namespaceeigen#a612e989f65acc6abc1593909f901e455) |
|  | 3D float B-spline with dynamic degree.  |
|  |




|  |
| --- |
|  |
| enum  | [EulerAxis](group__eulerangles__module#gae614aa7cdd687fb5c421a54f2ce5c361) {  [EULER\_X](group__eulerangles__module#ggae614aa7cdd687fb5c421a54f2ce5c361a11e1ea88cbe04a6fc077475d515d0b38) ,  [EULER\_Y](group__eulerangles__module#ggae614aa7cdd687fb5c421a54f2ce5c361aee756a2b63043248f3d83541386c266b) ,  [EULER\_Z](group__eulerangles__module#ggae614aa7cdd687fb5c421a54f2ce5c361a95187b9943820cca5edc4bc96b3c08be)  } |
|  | Representation of a fixed signed rotation axis for EulerSystem. [More...](group__eulerangles__module#gae614aa7cdd687fb5c421a54f2ce5c361) |
|  |




|  |
| --- |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_i0\_op< typename Derived::Scalar >, const Derived >  | [bessel\_i0](namespaceeigen#ab0c429bb38ce58964b561fb9d6c9377a) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_i0e\_op< typename Derived::Scalar >, const Derived >  | [bessel\_i0e](namespaceeigen#aef13ab56dea757bfb7bd3e220ac478d5) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_i1\_op< typename Derived::Scalar >, const Derived >  | [bessel\_i1](namespaceeigen#ae35e1cabdc81f3783219186a7e658a2b) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_i1e\_op< typename Derived::Scalar >, const Derived >  | [bessel\_i1e](namespaceeigen#ae52c524c4108c6265e9543468da42e28) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_j0\_op< typename Derived::Scalar >, const Derived >  | [bessel\_j0](namespaceeigen#a65acfc33a2b6140a09af67e45928e037) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_j1\_op< typename Derived::Scalar >, const Derived >  | [bessel\_j1](namespaceeigen#a4079ddbfe44e3a865cdb600353f371ab) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_k0\_op< typename Derived::Scalar >, const Derived >  | [bessel\_k0](namespaceeigen#a4664123a5ae23d981410d7dc5cd86970) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_k0e\_op< typename Derived::Scalar >, const Derived >  | [bessel\_k0e](namespaceeigen#a9cc57448af6eda4fa72f34be7cc72da5) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_k1\_op< typename Derived::Scalar >, const Derived >  | [bessel\_k1](namespaceeigen#a76e76fa84ed24785bf32665a48157bf1) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_k1e\_op< typename Derived::Scalar >, const Derived >  | [bessel\_k1e](namespaceeigen#af9e044c2baa913adea597c4d497a3315) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_y0\_op< typename Derived::Scalar >, const Derived >  | [bessel\_y0](namespaceeigen#aad0c42bfd8d5b4169a542206b460b2d0) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename Derived >  |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_y1\_op< typename Derived::Scalar >, const Derived >  | [bessel\_y1](namespaceeigen#a60d76185793d52703fa01d83d5b46615) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &x) |
|  |
| template<typename ADerived , typename BDerived , typename XDerived >  |
| const TensorCwiseTernaryOp< internal::scalar\_betainc\_op< typename XDerived::Scalar >, const ADerived, const BDerived, const XDerived >  | [betainc](namespaceeigen#a6d7e9b581a1fc3ca3c8aff6a0a69f523) (const ADerived &a, const BDerived &b, const XDerived &x) |
|  |
| template<typename ArgADerived , typename ArgBDerived , typename ArgXDerived >  |
| const [Eigen::CwiseTernaryOp](../classeigen_1_1cwiseternaryop)< Eigen::internal::scalar\_betainc\_op< typename ArgXDerived::Scalar >, const ArgADerived, const ArgBDerived, const ArgXDerived >  | [betainc](namespaceeigen#ac58db11132cd34e57ad819f3e77ff60c) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< ArgADerived > &a, const [Eigen::ArrayBase](../classeigen_1_1arraybase)< ArgBDerived > &b, const [Eigen::ArrayBase](../classeigen_1_1arraybase)< ArgXDerived > &x) |
|  |
| template<typename BVH , typename Intersector >  |
| void  | [BVIntersect](namespaceeigen#a07d8e283f082c972338f3fc4f644b2a9) (const BVH &tree, Intersector &intersector) |
|  |
| template<typename BVH1 , typename BVH2 , typename Intersector >  |
| void  | [BVIntersect](namespaceeigen#ac3b8047a3ee05b5e6fec4668197a9a43) (const BVH1 &tree1, const BVH2 &tree2, Intersector &intersector) |
|  |
| template<typename BVH , typename Minimizer >  |
| Minimizer::Scalar  | [BVMinimize](namespaceeigen#adcbe73ac1482eacab0e18ee32c25508e) (const BVH &tree, Minimizer &minimizer) |
|  |
| template<typename BVH1 , typename BVH2 , typename Minimizer >  |
| Minimizer::Scalar  | [BVMinimize](namespaceeigen#a915f6adc8b195c94a83c35de6a842556) (const BVH1 &tree1, const BVH2 &tree2, Minimizer &minimizer) |
|  |
| template<typename Polynomial >  |
| [NumTraits](../structeigen_1_1numtraits)< typename Polynomial::Scalar >::Real  | [cauchy\_max\_bound](group__polynomials__module#ga375e3ea1f370fb76dfe0f43a89b95926) (const Polynomial &poly) |
|  |
| template<typename Polynomial >  |
| [NumTraits](../structeigen_1_1numtraits)< typename Polynomial::Scalar >::Real  | [cauchy\_min\_bound](group__polynomials__module#gab076afbdba0e9298a541cc4e8cc7506b) (const Polynomial &poly) |
|  |
| template<typename PointArrayType , typename KnotVectorType >  |
| void  | [ChordLengths](group__splines__module#ga1b4cbde5d98411405871accf877552d2) (const PointArrayType &pts, KnotVectorType &chord\_lengths) |
|  | Computes chord length parameters which are required for spline interpolation. [More...](group__splines__module#ga1b4cbde5d98411405871accf877552d2) |
|  |
| template<typename AlphaDerived , typename SampleDerived >  |
| const [Eigen::CwiseBinaryOp](../classeigen_1_1cwisebinaryop)< Eigen::internal::scalar\_gamma\_sample\_der\_alpha\_op< typename AlphaDerived::Scalar >, const AlphaDerived, const SampleDerived >  | [gamma\_sample\_der\_alpha](namespaceeigen#afd81653604859fe8e5b09552a7a800c9) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< AlphaDerived > &alpha, const [Eigen::ArrayBase](../classeigen_1_1arraybase)< SampleDerived > &sample) |
|  |
| template<typename Derived , typename ExponentDerived >  |
| const [Eigen::CwiseBinaryOp](../classeigen_1_1cwisebinaryop)< Eigen::internal::scalar\_igamma\_op< typename Derived::Scalar >, const Derived, const ExponentDerived >  | [igamma](namespaceeigen#a6e89509c5ff1af076baea462520f231c) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &a, const [Eigen::ArrayBase](../classeigen_1_1arraybase)< ExponentDerived > &x) |
|  |
| template<typename Derived , typename ExponentDerived >  |
| const [Eigen::CwiseBinaryOp](../classeigen_1_1cwisebinaryop)< Eigen::internal::scalar\_igamma\_der\_a\_op< typename Derived::Scalar >, const Derived, const ExponentDerived >  | [igamma\_der\_a](namespaceeigen#ad0b09518c9ef2376690af1b346f77ff1) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &a, const [Eigen::ArrayBase](../classeigen_1_1arraybase)< ExponentDerived > &x) |
|  |
| template<typename Derived , typename ExponentDerived >  |
| const [Eigen::CwiseBinaryOp](../classeigen_1_1cwisebinaryop)< Eigen::internal::scalar\_igammac\_op< typename Derived::Scalar >, const Derived, const ExponentDerived >  | [igammac](namespaceeigen#a2b1593c0c3f9d1673ae5980ae03e75f1) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &a, const [Eigen::ArrayBase](../classeigen_1_1arraybase)< ExponentDerived > &x) |
|  |
| template<typename KnotVectorType >  |
| void  | [KnotAveraging](group__splines__module#ga9474da5ed68bbd9a6788a999330416d6) (const KnotVectorType &parameters, DenseIndex degree, KnotVectorType &knots) |
|  | Computes knot averages. [More...](group__splines__module#ga9474da5ed68bbd9a6788a999330416d6) |
|  |
| template<typename KnotVectorType , typename ParameterVectorType , typename IndexArray >  |
| void  | [KnotAveragingWithDerivatives](group__splines__module#gae10a6f9b6ab7fb400a2526b6382c533b) (const ParameterVectorType &parameters, const unsigned int degree, const IndexArray &derivativeIndices, KnotVectorType &knots) |
|  | Computes knot averages when derivative constraints are present. Note that this is a technical interpretation of the referenced article since the algorithm contained therein is incorrect as written. [More...](group__splines__module#gae10a6f9b6ab7fb400a2526b6382c533b) |
|  |
| template<typename A , typename B >  |
| [KroneckerProductSparse](classeigen_1_1kroneckerproductsparse)< A, B >  | [kroneckerProduct](group__kroneckerproduct__module#gaca497f43cc92bcbf6eaff64984a266cc) (const [EigenBase](../structeigen_1_1eigenbase)< A > &a, const [EigenBase](../structeigen_1_1eigenbase)< B > &b) |
|  |
| template<typename A , typename B >  |
| [KroneckerProduct](classeigen_1_1kroneckerproduct)< A, B >  | [kroneckerProduct](group__kroneckerproduct__module#gaa8924dffc6cee7aa1e908dc395a7a167) (const [MatrixBase](../classeigen_1_1matrixbase)< A > &a, const [MatrixBase](../classeigen_1_1matrixbase)< B > &b) |
|  |
| template<typename MatrixType , typename ResultType >  |
| void  | [matrix\_sqrt\_quasi\_triangular](group__matrixfunctions__module#ga2f490197e16df831683018e383e29346) (const MatrixType &[arg](../namespaceeigen#aa539408a09481d35961e11ee78793db1), ResultType &result) |
|  | Compute matrix square root of quasi-triangular matrix. [More...](group__matrixfunctions__module#ga2f490197e16df831683018e383e29346) |
|  |
| template<typename MatrixType , typename ResultType >  |
| void  | [matrix\_sqrt\_triangular](group__matrixfunctions__module#gae51c91f920f6ea4a7f6f72caa1e8249f) (const MatrixType &[arg](../namespaceeigen#aa539408a09481d35961e11ee78793db1), ResultType &result) |
|  | Compute matrix square root of triangular matrix. [More...](group__matrixfunctions__module#gae51c91f920f6ea4a7f6f72caa1e8249f) |
|  |
| template<typename Polynomials , typename T >  |
| T  | [poly\_eval](group__polynomials__module#gadb64ffddaa9e83634e3ab0e3fd3664f5) (const Polynomials &poly, const T &x) |
|  |
| template<typename Polynomials , typename T >  |
| T  | [poly\_eval\_horner](group__polynomials__module#gaadbf059bc28ce1cf94c57c1454633d40) (const Polynomials &poly, const T &x) |
|  |
| template<typename DerivedN , typename DerivedX >  |
| const [Eigen::CwiseBinaryOp](../classeigen_1_1cwisebinaryop)< Eigen::internal::scalar\_polygamma\_op< typename DerivedX::Scalar >, const DerivedN, const DerivedX >  | [polygamma](namespaceeigen#a7ec2455c3a3bb4b0c1401b25a8480361) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< DerivedN > &n, const [Eigen::ArrayBase](../classeigen_1_1arraybase)< DerivedX > &x) |
|  |
| template<typename RootVector , typename Polynomial >  |
| void  | [roots\_to\_monicPolynomial](group__polynomials__module#gafbc3648f7ef67db3d5d04454fc1257fd) (const RootVector &rv, Polynomial &poly) |
|  |
| template<typename DerivedX , typename DerivedQ >  |
| const [Eigen::CwiseBinaryOp](../classeigen_1_1cwisebinaryop)< Eigen::internal::scalar\_zeta\_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ >  | [zeta](namespaceeigen#ade7c45ba55113cf0c89e33972f3da434) (const [Eigen::ArrayBase](../classeigen_1_1arraybase)< DerivedX > &x, const [Eigen::ArrayBase](../classeigen_1_1arraybase)< DerivedQ > &q) |
|  |

 
Namespace containing all symbols from the Eigen library. 

   bessel\_i0()
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_i0\_op<typename Derived::Scalar>, const Derived> Eigen::bessel\_i0  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise i0(*x*) to the given arrays.
 It returns the modified Bessel function of the first kind of order zero.

 
Parameters
 

|  |  |
| --- | --- |
| x | is the argument |

   
Note
This function supports only float and double scalar types. To support other scalar types, the user has to provide implementations of i0(T) for any scalar type T to be supported.
 
See also
ArrayBase::bessel\_i0() 
    bessel\_i0e()
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_i0e\_op<typename Derived::Scalar>, const Derived> Eigen::bessel\_i0e  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise i0e(*x*) to the given arrays.
 It returns the exponentially scaled modified Bessel function of the first kind of order zero.

 
Parameters
 

|  |  |
| --- | --- |
| x | is the argument |

   
Note
This function supports only float and double scalar types. To support other scalar types, the user has to provide implementations of i0e(T) for any scalar type T to be supported.
 
See also
ArrayBase::bessel\_i0e() 
    bessel\_i1()
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_i1\_op<typename Derived::Scalar>, const Derived> Eigen::bessel\_i1  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise i1(*x*) to the given arrays.
 It returns the modified Bessel function of the first kind of order one.

 
Parameters
 

|  |  |
| --- | --- |
| x | is the argument |

   
Note
This function supports only float and double scalar types. To support other scalar types, the user has to provide implementations of i1(T) for any scalar type T to be supported.
 
See also
ArrayBase::bessel\_i1() 
    bessel\_i1e()
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_i1e\_op<typename Derived::Scalar>, const Derived> Eigen::bessel\_i1e  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise i1e(*x*) to the given arrays.
 It returns the exponentially scaled modified Bessel function of the first kind of order one.

 
Parameters
 

|  |  |
| --- | --- |
| x | is the argument |

   
Note
This function supports only float and double scalar types. To support other scalar types, the user has to provide implementations of i1e(T) for any scalar type T to be supported.
 
See also
ArrayBase::bessel\_i1e() 
    bessel\_j0()
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_j0\_op<typename Derived::Scalar>, const Derived> Eigen::bessel\_j0  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise j0(*x*) to the given arrays.
 It returns the Bessel function of the first kind of order zero.

 
Parameters
 

|  |  |
| --- | --- |
| x | is the argument |

   
Note
This function supports only float and double scalar types. To support other scalar types, the user has to provide implementations of j0(T) for any scalar type T to be supported.
 
See also
ArrayBase::bessel\_j0() 
    bessel\_j1()
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_j1\_op<typename Derived::Scalar>, const Derived> Eigen::bessel\_j1  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise j1(*x*) to the given arrays.
 It returns the modified Bessel function of the first kind of order one.

 
Parameters
 

|  |  |
| --- | --- |
| x | is the argument |

   
Note
This function supports only float and double scalar types. To support other scalar types, the user has to provide implementations of j1(T) for any scalar type T to be supported.
 
See also
ArrayBase::bessel\_j1() 
    bessel\_k0()
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_k0\_op<typename Derived::Scalar>, const Derived> Eigen::bessel\_k0  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise k0(*x*) to the given arrays.
 It returns the modified Bessel function of the second kind of order zero.

 
Parameters
 

|  |  |
| --- | --- |
| x | is the argument |

   
Note
This function supports only float and double scalar types. To support other scalar types, the user has to provide implementations of k0(T) for any scalar type T to be supported.
 
See also
ArrayBase::bessel\_k0() 
    bessel\_k0e()
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_k0e\_op<typename Derived::Scalar>, const Derived> Eigen::bessel\_k0e  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise k0e(*x*) to the given arrays.
 It returns the exponentially scaled modified Bessel function of the second kind of order zero.

 
Parameters
 

|  |  |
| --- | --- |
| x | is the argument |

   
Note
This function supports only float and double scalar types. To support other scalar types, the user has to provide implementations of k0e(T) for any scalar type T to be supported.
 
See also
ArrayBase::bessel\_k0e() 
    bessel\_k1()
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_k1\_op<typename Derived::Scalar>, const Derived> Eigen::bessel\_k1  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise k1(*x*) to the given arrays.
 It returns the modified Bessel function of the second kind of order one.

 
Parameters
 

|  |  |
| --- | --- |
| x | is the argument |

   
Note
This function supports only float and double scalar types. To support other scalar types, the user has to provide implementations of k1(T) for any scalar type T to be supported.
 
See also
ArrayBase::bessel\_k1() 
    bessel\_k1e()
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_k1e\_op<typename Derived::Scalar>, const Derived> Eigen::bessel\_k1e  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise k1e(*x*) to the given arrays.
 It returns the exponentially scaled modified Bessel function of the second kind of order one.

 
Parameters
 

|  |  |
| --- | --- |
| x | is the argument |

   
Note
This function supports only float and double scalar types. To support other scalar types, the user has to provide implementations of k1e(T) for any scalar type T to be supported.
 
See also
ArrayBase::bessel\_k1e() 
    bessel\_y0()
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_y0\_op<typename Derived::Scalar>, const Derived> Eigen::bessel\_y0  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise y0(*x*) to the given arrays.
 It returns the Bessel function of the second kind of order zero.

 
Parameters
 

|  |  |
| --- | --- |
| x | is the argument |

   
Note
This function supports only float and double scalar types. To support other scalar types, the user has to provide implementations of y0(T) for any scalar type T to be supported.
 
See also
ArrayBase::bessel\_y0() 
    bessel\_y1()
------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Eigen::CwiseUnaryOp](../classeigen_1_1cwiseunaryop)< Eigen::internal::scalar\_bessel\_y1\_op<typename Derived::Scalar>, const Derived> Eigen::bessel\_y1  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &  | *x* | ) |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise y1(*x*) to the given arrays.
 It returns the Bessel function of the second kind of order one.

 
Parameters
 

|  |  |
| --- | --- |
| x | is the argument |

   
Note
This function supports only float and double scalar types. To support other scalar types, the user has to provide implementations of y1(T) for any scalar type T to be supported.
 
See also
ArrayBase::bessel\_y1() 
    betainc() [1/2]
---------------

    template<typename ADerived , typename BDerived , typename XDerived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const TensorCwiseTernaryOp<internal::scalar\_betainc\_op<typename XDerived::Scalar>, const ADerived, const BDerived, const XDerived> Eigen::betainc  | ( | const ADerived &  | *a*,  |
|  |  | const BDerived &  | *b*,  |
|  |  | const XDerived &  | *x* |
|  | ) |  |  |

 | inline |

 
 [c++11] 



Returns
an expression of the coefficient-wise betainc(*x*, *a*, *b*) to the given tensors.
 This function computes the regularized incomplete beta function (integral). 

    betainc() [2/2]
---------------

    template<typename ArgADerived , typename ArgBDerived , typename ArgXDerived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [Eigen::CwiseTernaryOp](../classeigen_1_1cwiseternaryop)<Eigen::internal::scalar\_betainc\_op<typename ArgXDerived::Scalar>, const ArgADerived, const ArgBDerived, const ArgXDerived> Eigen::betainc  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< ArgADerived > &  | *a*,  |
|  |  | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< ArgBDerived > &  | *b*,  |
|  |  | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< ArgXDerived > &  | *x* |
|  | ) |  |  |

 | inline |

 
 [c++11] 



Returns
an expression of the coefficient-wise betainc(*x*, *a*, *b*) to the given arrays.
 This function computes the regularized incomplete beta function (integral).

 
Note
This function supports only float and double scalar types in c++11 mode. To support other scalar types, or float/double in non c++11 mode, the user has to provide implementations of betainc(T,T,T) for any scalar type T to be supported.
 
See also

[Eigen::betainc()](namespaceeigen#a6d7e9b581a1fc3ca3c8aff6a0a69f523), [Eigen::lgamma()](../namespaceeigen#ac2e6331628bb1989b7be6d7e42827649) 
    BVIntersect() [1/2]
-------------------

    template<typename BVH , typename Intersector >  

|  |  |  |  |
| --- | --- | --- | --- |
| void Eigen::BVIntersect  | ( | const BVH &  | *tree*,  |
|  |  | Intersector &  | *intersector* |
|  | ) |  |  |

 
 Given a BVH, runs the query encapsulated by *intersector*. The Intersector type must provide the following members:



```
bool intersectVolume(const BVH::Volume &volume) //returns true if volume intersects the query
bool intersectObject(const BVH::Object &object) //returns true if the search should terminate immediately

```
    BVIntersect() [2/2]
-------------------

    template<typename BVH1 , typename BVH2 , typename Intersector >  

|  |  |  |  |
| --- | --- | --- | --- |
| void Eigen::BVIntersect  | ( | const BVH1 &  | *tree1*,  |
|  |  | const BVH2 &  | *tree2*,  |
|  |  | Intersector &  | *intersector* |
|  | ) |  |  |

 
 Given two BVH's, runs the query on their Cartesian product encapsulated by *intersector*. The Intersector type must provide the following members:



```
bool intersectVolumeVolume(const BVH1::Volume &v1, const BVH2::Volume &v2) //returns true if product of volumes intersects the query
bool intersectVolumeObject(const BVH1::Volume &v1, const BVH2::Object &o2) //returns true if the volume-object product intersects the query
bool intersectObjectVolume(const BVH1::Object &o1, const BVH2::Volume &v2) //returns true if the volume-object product intersects the query
bool intersectObjectObject(const BVH1::Object &o1, const BVH2::Object &o2) //returns true if the search should terminate immediately

```
    BVMinimize() [1/2]
------------------

    template<typename BVH , typename Minimizer >  

|  |  |  |  |
| --- | --- | --- | --- |
| Minimizer::Scalar Eigen::BVMinimize  | ( | const BVH &  | *tree*,  |
|  |  | Minimizer &  | *minimizer* |
|  | ) |  |  |

 
 Given a BVH, runs the query encapsulated by *minimizer*. 



Returns
the minimum value. The Minimizer type must provide the following members:
```
typedef Scalar //the numeric type of what is being minimized--not necessarily the Scalar type of the BVH (if it has one)
Scalar minimumOnVolume(const BVH::Volume &volume)
Scalar minimumOnObject(const BVH::Object &object)

```
 
    BVMinimize() [2/2]
------------------

    template<typename BVH1 , typename BVH2 , typename Minimizer >  

|  |  |  |  |
| --- | --- | --- | --- |
| Minimizer::Scalar Eigen::BVMinimize  | ( | const BVH1 &  | *tree1*,  |
|  |  | const BVH2 &  | *tree2*,  |
|  |  | Minimizer &  | *minimizer* |
|  | ) |  |  |

 
 Given two BVH's, runs the query on their cartesian product encapsulated by *minimizer*. 



Returns
the minimum value. The Minimizer type must provide the following members:
```
typedef Scalar //the numeric type of what is being minimized--not necessarily the Scalar type of the BVH (if it has one)
Scalar minimumOnVolumeVolume(const BVH1::Volume &v1, const BVH2::Volume &v2)
Scalar minimumOnVolumeObject(const BVH1::Volume &v1, const BVH2::Object &o2)
Scalar minimumOnObjectVolume(const BVH1::Object &o1, const BVH2::Volume &v2)
Scalar minimumOnObjectObject(const BVH1::Object &o1, const BVH2::Object &o2)

```
 
    gamma\_sample\_der\_alpha()
---------------------------

    template<typename AlphaDerived , typename SampleDerived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [Eigen::CwiseBinaryOp](../classeigen_1_1cwisebinaryop)<Eigen::internal::scalar\_gamma\_sample\_der\_alpha\_op<typename AlphaDerived::Scalar>, const AlphaDerived, const SampleDerived> Eigen::gamma\_sample\_der\_alpha  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< AlphaDerived > &  | *alpha*,  |
|  |  | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< SampleDerived > &  | *sample* |
|  | ) |  |  |

 | inline |

 
 [c++11] 



Returns
an expression of the coefficient-wise gamma\_sample\_der\_alpha(*alpha*, *sample*) to the given arrays.
 This function computes the coefficient-wise derivative of the sample of a Gamma(alpha, 1) random variable with respect to the parameter alpha.

 
Note
This function supports only float and double scalar types in c++11 mode. To support other scalar types, or float/double in non c++11 mode, the user has to provide implementations of gamma\_sample\_der\_alpha(T,T) for any scalar type T to be supported.
 
See also

[Eigen::igamma()](namespaceeigen#a6e89509c5ff1af076baea462520f231c), [Eigen::lgamma()](../namespaceeigen#ac2e6331628bb1989b7be6d7e42827649) 
    igamma()
--------

    template<typename Derived , typename ExponentDerived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [Eigen::CwiseBinaryOp](../classeigen_1_1cwisebinaryop)<Eigen::internal::scalar\_igamma\_op<typename Derived::Scalar>, const Derived, const ExponentDerived> Eigen::igamma  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &  | *a*,  |
|  |  | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< ExponentDerived > &  | *x* |
|  | ) |  |  |

 | inline |

 
 [c++11] 



Returns
an expression of the coefficient-wise igamma(*a*, *x*) to the given arrays.
 This function computes the coefficient-wise incomplete gamma function.

 
Note
This function supports only float and double scalar types in c++11 mode. To support other scalar types, or float/double in non c++11 mode, the user has to provide implementations of igammac(T,T) for any scalar type T to be supported.
 
See also

[Eigen::igammac()](namespaceeigen#a2b1593c0c3f9d1673ae5980ae03e75f1), [Eigen::lgamma()](../namespaceeigen#ac2e6331628bb1989b7be6d7e42827649) 
    igamma\_der\_a()
----------------

    template<typename Derived , typename ExponentDerived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [Eigen::CwiseBinaryOp](../classeigen_1_1cwisebinaryop)<Eigen::internal::scalar\_igamma\_der\_a\_op<typename Derived::Scalar>, const Derived, const ExponentDerived> Eigen::igamma\_der\_a  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &  | *a*,  |
|  |  | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< ExponentDerived > &  | *x* |
|  | ) |  |  |

 | inline |

 
 [c++11] 



Returns
an expression of the coefficient-wise igamma\_der\_a(*a*, *x*) to the given arrays.
 This function computes the coefficient-wise derivative of the incomplete gamma function with respect to the parameter a.

 
Note
This function supports only float and double scalar types in c++11 mode. To support other scalar types, or float/double in non c++11 mode, the user has to provide implementations of igamma\_der\_a(T,T) for any scalar type T to be supported.
 
See also

[Eigen::igamma()](namespaceeigen#a6e89509c5ff1af076baea462520f231c), [Eigen::lgamma()](../namespaceeigen#ac2e6331628bb1989b7be6d7e42827649) 
    igammac()
---------

    template<typename Derived , typename ExponentDerived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [Eigen::CwiseBinaryOp](../classeigen_1_1cwisebinaryop)<Eigen::internal::scalar\_igammac\_op<typename Derived::Scalar>, const Derived, const ExponentDerived> Eigen::igammac  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< Derived > &  | *a*,  |
|  |  | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< ExponentDerived > &  | *x* |
|  | ) |  |  |

 | inline |

 
 [c++11] 



Returns
an expression of the coefficient-wise igammac(*a*, *x*) to the given arrays.
 This function computes the coefficient-wise complementary incomplete gamma function.

 
Note
This function supports only float and double scalar types in c++11 mode. To support other scalar types, or float/double in non c++11 mode, the user has to provide implementations of igammac(T,T) for any scalar type T to be supported.
 
See also

[Eigen::igamma()](namespaceeigen#a6e89509c5ff1af076baea462520f231c), [Eigen::lgamma()](../namespaceeigen#ac2e6331628bb1989b7be6d7e42827649) 
    polygamma()
-----------

    template<typename DerivedN , typename DerivedX >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [Eigen::CwiseBinaryOp](../classeigen_1_1cwisebinaryop)<Eigen::internal::scalar\_polygamma\_op<typename DerivedX::Scalar>, const DerivedN, const DerivedX> Eigen::polygamma  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< DerivedN > &  | *n*,  |
|  |  | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< DerivedX > &  | *x* |
|  | ) |  |  |

 | inline |

 
 [c++11] 



Returns
an expression of the coefficient-wise polygamma(*n*, *x*) to the given arrays.
 It returns the *n* -th derivative of the digamma(psi) evaluated at `x`.

 
Note
This function supports only float and double scalar types in c++11 mode. To support other scalar types, or float/double in non c++11 mode, the user has to provide implementations of polygamma(T,T) for any scalar type T to be supported.
 
See also

[Eigen::digamma()](../namespaceeigen#af40db84b3db19fe25fe2f77c429420e5) 
    zeta()
------

    template<typename DerivedX , typename DerivedQ >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const [Eigen::CwiseBinaryOp](../classeigen_1_1cwisebinaryop)<Eigen::internal::scalar\_zeta\_op<typename DerivedX::Scalar>, const DerivedX, const DerivedQ> Eigen::zeta  | ( | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< DerivedX > &  | *x*,  |
|  |  | const [Eigen::ArrayBase](../classeigen_1_1arraybase)< DerivedQ > &  | *q* |
|  | ) |  |  |

 | inline |

 
 
Returns
an expression of the coefficient-wise zeta(*x*, *q*) to the given arrays.
 It returns the Riemann zeta function of two arguments *x* and *q:* 

 
Parameters
 

|  |  |
| --- | --- |
| x | is the exponent, it must be > 1  |
| q | is the shift, it must be > 0 |

   
Note
This function supports only float and double scalar types. To support other scalar types, the user has to provide implementations of zeta(T,T) for any scalar type T to be supported.
 
See also
ArrayBase::zeta() 
    

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/namespaceEigen.html>

Eigen::MatrixComplexPowerReturnValue
====================================

  
### template<typename Derived> class Eigen::MatrixComplexPowerReturnValue< Derived >

 Proxy for the matrix power of some matrix (expression). 

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | type of the base, a matrix (expression). |

   This class holds the arguments to the matrix power until it is assigned or evaluated for some other reason (so the argument should not be changed in the meantime). It is the return type of [MatrixBase::pow()](../classeigen_1_1matrixbase#a7ae6c25e6a94a60e147741e76203a73b) and related functions and most of the time this is the only way it is used. 

  Inherits ReturnByValue< MatrixComplexPowerReturnValue< Derived > >.

 

|  |
| --- |
|  |
| template<typename ResultType >  |
| void  | [evalTo](classeigen_1_1matrixcomplexpowerreturnvalue#ac7a7947bc6cad6554d31b08b847bc6dd) (ResultType &result) const |
|  | Compute the matrix power. [More...](classeigen_1_1matrixcomplexpowerreturnvalue#ac7a7947bc6cad6554d31b08b847bc6dd) |
|  |
|  | [MatrixComplexPowerReturnValue](classeigen_1_1matrixcomplexpowerreturnvalue#a3e5903e22f70e9deb07c3967ae52fd54) (const Derived &A, const ComplexScalar &p) |
|  | Constructor. [More...](classeigen_1_1matrixcomplexpowerreturnvalue#a3e5903e22f70e9deb07c3967ae52fd54) |
|  |

  MatrixComplexPowerReturnValue()
-------------------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::MatrixComplexPowerReturnValue](classeigen_1_1matrixcomplexpowerreturnvalue)< Derived >::[MatrixComplexPowerReturnValue](classeigen_1_1matrixcomplexpowerreturnvalue) | ( | const Derived &  | *A*,  |
|  |  | const ComplexScalar &  | *p* |
|  | ) |  |  |

 | inline |

 
 Constructor. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | A | Matrix (expression), the base of the matrix power.  |
| [in] | p | complex scalar, the exponent of the matrix power.  |

      evalTo()
--------

    template<typename Derived >   template<typename ResultType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::MatrixComplexPowerReturnValue](classeigen_1_1matrixcomplexpowerreturnvalue)< Derived >::evalTo  | ( | ResultType &  | *result* | ) |  const |

 | inline |

 
 Compute the matrix power. 

 Because `p` is complex, \( A^p \) is simply evaluated as \( \exp(p \log(A)) \).

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [out] | result | \( A^p \) where `A` and `p` are as in the constructor.  |

     

---

The documentation for this class was generated from the following file:* [MatrixPower.h](https://eigen.tuxfamily.org/dox/unsupported/MatrixPower_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1MatrixComplexPowerReturnValue.html>

Eigen::MatrixExponentialReturnValue
===================================

  
### template<typename Derived> struct Eigen::MatrixExponentialReturnValue< Derived >

 Proxy for the matrix exponential of some matrix (expression). 

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | Type of the argument to the matrix exponential. |

   This class holds the argument to the matrix exponential until it is assigned or evaluated for some other reason (so the argument should not be changed in the meantime). It is the return type of [MatrixBase::exp()](../classeigen_1_1matrixbase#a70901e189e876f64d7f3fee1dbe942cc) and most of the time this is the only way it is used. 

  Inherits ReturnByValue< MatrixExponentialReturnValue< Derived > >.

 

|  |
| --- |
|  |
| template<typename ResultType >  |
| void  | [evalTo](structeigen_1_1matrixexponentialreturnvalue#a3dd2c65c7c6cdc41ab17415ee11899a0) (ResultType &result) const |
|  | Compute the matrix exponential. [More...](structeigen_1_1matrixexponentialreturnvalue#a3dd2c65c7c6cdc41ab17415ee11899a0) |
|  |
|  | [MatrixExponentialReturnValue](structeigen_1_1matrixexponentialreturnvalue#a4048419b1ee2befc51564703ba11acab) (const Derived &src) |
|  | Constructor. [More...](structeigen_1_1matrixexponentialreturnvalue#a4048419b1ee2befc51564703ba11acab) |
|  |

  MatrixExponentialReturnValue()
------------------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::MatrixExponentialReturnValue](structeigen_1_1matrixexponentialreturnvalue)< Derived >::[MatrixExponentialReturnValue](structeigen_1_1matrixexponentialreturnvalue) | ( | const Derived &  | *src* | ) |  |

 | inline |

 
 Constructor. 

 
Parameters
 

|  |  |
| --- | --- |
| src | Matrix (expression) forming the argument of the matrix exponential.  |

      evalTo()
--------

    template<typename Derived >   template<typename ResultType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::MatrixExponentialReturnValue](structeigen_1_1matrixexponentialreturnvalue)< Derived >::evalTo  | ( | ResultType &  | *result* | ) |  const |

 | inline |

 
 Compute the matrix exponential. 

 
Parameters
 

|  |  |
| --- | --- |
| result | the matrix exponential of `src` in the constructor.  |

     

---

The documentation for this struct was generated from the following file:* [MatrixExponential.h](https://eigen.tuxfamily.org/dox/unsupported/MatrixExponential_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/structEigen_1_1MatrixExponentialReturnValue.html>

Eigen::MatrixFunctionReturnValue
================================

  
### template<typename Derived> class Eigen::MatrixFunctionReturnValue< Derived >

 Proxy for the matrix function of some matrix (expression). 

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | Type of the argument to the matrix function. |

   This class holds the argument to the matrix function until it is assigned or evaluated for some other reason (so the argument should not be changed in the meantime). It is the return type of matrixBase::matrixFunction() and related functions and most of the time this is the only way it is used. 

  Inherits ReturnByValue< MatrixFunctionReturnValue< Derived > >.

 

|  |
| --- |
|  |
| template<typename ResultType >  |
| void  | [evalTo](classeigen_1_1matrixfunctionreturnvalue#a202d594ae254e3ea5420ff95d9f03a67) (ResultType &result) const |
|  | Compute the matrix function. [More...](classeigen_1_1matrixfunctionreturnvalue#a202d594ae254e3ea5420ff95d9f03a67) |
|  |
|  | [MatrixFunctionReturnValue](classeigen_1_1matrixfunctionreturnvalue#af193d7a3e1b4e65dc70e64eb4bc8e17f) (const Derived &A, StemFunction f) |
|  | Constructor. [More...](classeigen_1_1matrixfunctionreturnvalue#af193d7a3e1b4e65dc70e64eb4bc8e17f) |
|  |

  MatrixFunctionReturnValue()
---------------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::MatrixFunctionReturnValue](classeigen_1_1matrixfunctionreturnvalue)< Derived >::[MatrixFunctionReturnValue](classeigen_1_1matrixfunctionreturnvalue) | ( | const Derived &  | *A*,  |
|  |  | StemFunction  | *f* |
|  | ) |  |  |

 | inline |

 
 Constructor. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | A | Matrix (expression) forming the argument of the matrix function.  |
| [in] | f | Stem function for matrix function under consideration.  |

      evalTo()
--------

    template<typename Derived >   template<typename ResultType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::MatrixFunctionReturnValue](classeigen_1_1matrixfunctionreturnvalue)< Derived >::evalTo  | ( | ResultType &  | *result* | ) |  const |

 | inline |

 
 Compute the matrix function. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [out] | result | `f` applied to `A`, where `f` and `A` are as in the constructor.  |

     

---

The documentation for this class was generated from the following file:* [MatrixFunction.h](https://eigen.tuxfamily.org/dox/unsupported/MatrixFunction_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1MatrixFunctionReturnValue.html>

Eigen::MatrixLogarithmReturnValue
=================================

  
### template<typename Derived> class Eigen::MatrixLogarithmReturnValue< Derived >

 Proxy for the matrix logarithm of some matrix (expression). 

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | Type of the argument to the matrix function. |

   This class holds the argument to the matrix function until it is assigned or evaluated for some other reason (so the argument should not be changed in the meantime). It is the return type of [MatrixBase::log()](../classeigen_1_1matrixbase#a4dc57b319fc1cf8c9035016e56602a7d) and most of the time this is the only way it is used. 

  Inherits ReturnByValue< MatrixLogarithmReturnValue< Derived > >.

 

|  |
| --- |
|  |
| template<typename ResultType >  |
| void  | [evalTo](classeigen_1_1matrixlogarithmreturnvalue#ac17537a51ce53a44746fabd7a83d29d3) (ResultType &result) const |
|  | Compute the matrix logarithm. [More...](classeigen_1_1matrixlogarithmreturnvalue#ac17537a51ce53a44746fabd7a83d29d3) |
|  |
|  | [MatrixLogarithmReturnValue](classeigen_1_1matrixlogarithmreturnvalue#adfd2417a3d6f671e156b4ab1b92f1837) (const Derived &A) |
|  | Constructor. [More...](classeigen_1_1matrixlogarithmreturnvalue#adfd2417a3d6f671e156b4ab1b92f1837) |
|  |

  MatrixLogarithmReturnValue()
----------------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::MatrixLogarithmReturnValue](classeigen_1_1matrixlogarithmreturnvalue)< Derived >::[MatrixLogarithmReturnValue](classeigen_1_1matrixlogarithmreturnvalue) | ( | const Derived &  | *A* | ) |  |

 | inlineexplicit |

 
 Constructor. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | A | Matrix (expression) forming the argument of the matrix logarithm.  |

      evalTo()
--------

    template<typename Derived >   template<typename ResultType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::MatrixLogarithmReturnValue](classeigen_1_1matrixlogarithmreturnvalue)< Derived >::evalTo  | ( | ResultType &  | *result* | ) |  const |

 | inline |

 
 Compute the matrix logarithm. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [out] | result | Logarithm of `A`, where `A` is as specified in the constructor.  |

     

---

The documentation for this class was generated from the following file:* [MatrixLogarithm.h](https://eigen.tuxfamily.org/dox/unsupported/MatrixLogarithm_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1MatrixLogarithmReturnValue.html>

Eigen::MatrixPowerAtomic
========================

  
### template<typename MatrixType> class Eigen::MatrixPowerAtomic< MatrixType >

 Class for computing matrix powers. 

 
Template Parameters
 

|  |  |
| --- | --- |
| MatrixType | type of the base, expected to be an instantiation of the [Matrix](../classeigen_1_1matrix) class template. |

   This class is capable of computing triangular real/complex matrices raised to a power in the interval \( (-1, 1) \).

 
Note
Currently this class is only used by [MatrixPower](classeigen_1_1matrixpower "Class for computing matrix powers."). One may insist that this be nested into [MatrixPower](classeigen_1_1matrixpower "Class for computing matrix powers."). This class is here to facilitate future development of triangular matrix functions. 
  Inherits internal::noncopyable.

 

|  |
| --- |
|  |
| void  | [compute](classeigen_1_1matrixpoweratomic#ac3cdfb54a5b60079d068784534cbc174) ([ResultType](../classeigen_1_1block) &res) const |
|  | Compute the matrix power. [More...](classeigen_1_1matrixpoweratomic#ac3cdfb54a5b60079d068784534cbc174) |
|  |
|  | [MatrixPowerAtomic](classeigen_1_1matrixpoweratomic#ac0ec5f8d6c203cd9b53e2c95e01037d4) (const MatrixType &T, RealScalar p) |
|  | Constructor. [More...](classeigen_1_1matrixpoweratomic#ac0ec5f8d6c203cd9b53e2c95e01037d4) |
|  |

  MatrixPowerAtomic()
-------------------

    template<typename MatrixType >  

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::MatrixPowerAtomic](classeigen_1_1matrixpoweratomic)< MatrixType >::[MatrixPowerAtomic](classeigen_1_1matrixpoweratomic) | ( | const MatrixType &  | *T*,  |
|  |  | RealScalar  | *p* |
|  | ) |  |  |

 
 Constructor. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | T | the base of the matrix power.  |
| [in] | p | the exponent of the matrix power, should be in \( (-1, 1) \). |

   The class stores a reference to T, so it should not be changed (or destroyed) before evaluation. Only the upper triangular part of T is read. 

    compute()
---------

    template<typename MatrixType >  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::MatrixPowerAtomic](classeigen_1_1matrixpoweratomic)< MatrixType >::compute  | ( | [ResultType](../classeigen_1_1block) &  | *res* | ) |  const |

 
 Compute the matrix power. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [out] | res | \( A^p \) where A and p are specified in the constructor.  |

     

---

The documentation for this class was generated from the following file:* [MatrixPower.h](https://eigen.tuxfamily.org/dox/unsupported/MatrixPower_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1MatrixPowerAtomic.html>

Eigen::MatrixPowerParenthesesReturnValue
========================================

  
### template<typename MatrixType> class Eigen::MatrixPowerParenthesesReturnValue< MatrixType >

 Proxy for the matrix power of some matrix. 

 
Template Parameters
 

|  |  |
| --- | --- |
| MatrixType | type of the base, a matrix. |

   This class holds the arguments to the matrix power until it is assigned or evaluated for some other reason (so the argument should not be changed in the meantime). It is the return type of MatrixPower::operator() and related functions and most of the time this is the only way it is used. 

  Inherits ReturnByValue< MatrixPowerParenthesesReturnValue< MatrixType > >.

 

|  |
| --- |
|  |
| template<typename ResultType >  |
| void  | [evalTo](classeigen_1_1matrixpowerparenthesesreturnvalue#af91430ff248b714158cfba4301cc0e2b) (ResultType &result) const |
|  | Compute the matrix power. [More...](classeigen_1_1matrixpowerparenthesesreturnvalue#af91430ff248b714158cfba4301cc0e2b) |
|  |
|  | [MatrixPowerParenthesesReturnValue](classeigen_1_1matrixpowerparenthesesreturnvalue#ae3a02d943a31427a6dc8c1f60f3367d7) ([MatrixPower](classeigen_1_1matrixpower)< MatrixType > &pow, RealScalar p) |
|  | Constructor. [More...](classeigen_1_1matrixpowerparenthesesreturnvalue#ae3a02d943a31427a6dc8c1f60f3367d7) |
|  |

  MatrixPowerParenthesesReturnValue()
-----------------------------------

    template<typename MatrixType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::MatrixPowerParenthesesReturnValue](classeigen_1_1matrixpowerparenthesesreturnvalue)< MatrixType >::[MatrixPowerParenthesesReturnValue](classeigen_1_1matrixpowerparenthesesreturnvalue) | ( | [MatrixPower](classeigen_1_1matrixpower)< MatrixType > &  | *pow*,  |
|  |  | RealScalar  | *p* |
|  | ) |  |  |

 | inline |

 
 Constructor. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | pow | MatrixPower storing the base.  |
| [in] | p | scalar, the exponent of the matrix power.  |

      evalTo()
--------

    template<typename MatrixType >   template<typename ResultType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::MatrixPowerParenthesesReturnValue](classeigen_1_1matrixpowerparenthesesreturnvalue)< MatrixType >::evalTo  | ( | ResultType &  | *result* | ) |  const |

 | inline |

 
 Compute the matrix power. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [out] | result |  |

     

---

The documentation for this class was generated from the following file:* [MatrixPower.h](https://eigen.tuxfamily.org/dox/unsupported/MatrixPower_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1MatrixPowerParenthesesReturnValue.html>

Eigen::MatrixPowerReturnValue
=============================

  
### template<typename Derived> class Eigen::MatrixPowerReturnValue< Derived >

 Proxy for the matrix power of some matrix (expression). 

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | type of the base, a matrix (expression). |

   This class holds the arguments to the matrix power until it is assigned or evaluated for some other reason (so the argument should not be changed in the meantime). It is the return type of [MatrixBase::pow()](../classeigen_1_1matrixbase#a7ae6c25e6a94a60e147741e76203a73b) and related functions and most of the time this is the only way it is used. 

  Inherits ReturnByValue< MatrixPowerReturnValue< Derived > >.

 

|  |
| --- |
|  |
| template<typename ResultType >  |
| void  | [evalTo](classeigen_1_1matrixpowerreturnvalue#a5f15ad16576debad4d4cc0798ff63172) (ResultType &result) const |
|  | Compute the matrix power. [More...](classeigen_1_1matrixpowerreturnvalue#a5f15ad16576debad4d4cc0798ff63172) |
|  |
|  | [MatrixPowerReturnValue](classeigen_1_1matrixpowerreturnvalue#a3067e09b352f967a23bb2a9c50afee88) (const Derived &A, RealScalar p) |
|  | Constructor. [More...](classeigen_1_1matrixpowerreturnvalue#a3067e09b352f967a23bb2a9c50afee88) |
|  |

  MatrixPowerReturnValue()
------------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::MatrixPowerReturnValue](classeigen_1_1matrixpowerreturnvalue)< Derived >::[MatrixPowerReturnValue](classeigen_1_1matrixpowerreturnvalue) | ( | const Derived &  | *A*,  |
|  |  | RealScalar  | *p* |
|  | ) |  |  |

 | inline |

 
 Constructor. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | A | Matrix (expression), the base of the matrix power.  |
| [in] | p | real scalar, the exponent of the matrix power.  |

      evalTo()
--------

    template<typename Derived >   template<typename ResultType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::MatrixPowerReturnValue](classeigen_1_1matrixpowerreturnvalue)< Derived >::evalTo  | ( | ResultType &  | *result* | ) |  const |

 | inline |

 
 Compute the matrix power. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [out] | result | \( A^p \) where `A` and `p` are as in the constructor.  |

     

---

The documentation for this class was generated from the following file:* [MatrixPower.h](https://eigen.tuxfamily.org/dox/unsupported/MatrixPower_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1MatrixPowerReturnValue.html>

Eigen::MatrixSquareRootReturnValue
==================================

  
### template<typename Derived> class Eigen::MatrixSquareRootReturnValue< Derived >

 Proxy for the matrix square root of some matrix (expression). 

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | Type of the argument to the matrix square root. |

   This class holds the argument to the matrix square root until it is assigned or evaluated for some other reason (so the argument should not be changed in the meantime). It is the return type of [MatrixBase::sqrt()](../classeigen_1_1matrixbase#ad873dca860bd47baeeede8663e161b83) and most of the time this is the only way it is used. 

  Inherits ReturnByValue< MatrixSquareRootReturnValue< Derived > >.

 

|  |
| --- |
|  |
| template<typename ResultType >  |
| void  | [evalTo](classeigen_1_1matrixsquarerootreturnvalue#a97577165569edcf19429c7748b670e51) (ResultType &result) const |
|  | Compute the matrix square root. [More...](classeigen_1_1matrixsquarerootreturnvalue#a97577165569edcf19429c7748b670e51) |
|  |
|  | [MatrixSquareRootReturnValue](classeigen_1_1matrixsquarerootreturnvalue#aa27fd0e59ff1711a55ee8a4342c035d5) (const Derived &src) |
|  | Constructor. [More...](classeigen_1_1matrixsquarerootreturnvalue#aa27fd0e59ff1711a55ee8a4342c035d5) |
|  |

  MatrixSquareRootReturnValue()
-----------------------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::MatrixSquareRootReturnValue](classeigen_1_1matrixsquarerootreturnvalue)< Derived >::[MatrixSquareRootReturnValue](classeigen_1_1matrixsquarerootreturnvalue) | ( | const Derived &  | *src* | ) |  |

 | inlineexplicit |

 
 Constructor. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | src | Matrix (expression) forming the argument of the matrix square root.  |

      evalTo()
--------

    template<typename Derived >   template<typename ResultType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::MatrixSquareRootReturnValue](classeigen_1_1matrixsquarerootreturnvalue)< Derived >::evalTo  | ( | ResultType &  | *result* | ) |  const |

 | inline |

 
 Compute the matrix square root. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [out] | result | the matrix square root of `src` in the constructor.  |

     

---

The documentation for this class was generated from the following file:* [MatrixSquareRoot.h](https://eigen.tuxfamily.org/dox/unsupported/MatrixSquareRoot_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1MatrixSquareRootReturnValue.html>

Eigen::MatrixPower
==================

  
### template<typename MatrixType> class Eigen::MatrixPower< MatrixType >

 Class for computing matrix powers. 

 
Template Parameters
 

|  |  |
| --- | --- |
| MatrixType | type of the base, expected to be an instantiation of the [Matrix](../classeigen_1_1matrix) class template. |

   This class is capable of computing real/complex matrices raised to an arbitrary real power. Meanwhile, it saves the result of Schur decomposition if an non-integral power has even been calculated. Therefore, if you want to compute multiple (>= 2) matrix powers for the same matrix, using the class directly is more efficient than calling [MatrixBase::pow()](../classeigen_1_1matrixbase#a7ae6c25e6a94a60e147741e76203a73b).

 Example: 



```
#include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
 
int main()
{
  Matrix4cd A = Matrix4cd::Random();
  MatrixPower<Matrix4cd> Apow(A);
 
  std::cout << "The matrix A is:\n" << A << "\n\n"
               "A^3.1 is:\n" << Apow(3.1) << "\n\n"
               "A^3.3 is:\n" << Apow(3.3) << "\n\n"
               "A^3.7 is:\n" << Apow(3.7) << "\n\n"
               "A^3.9 is:\n" << Apow(3.9) << std::endl;
  return 0;
}
```

 Output: 



```
The matrix A is:
 (-0.211234,0.680375)   (0.10794,-0.444451)   (0.434594,0.271423) (-0.198111,-0.686642)
   (0.59688,0.566198) (0.257742,-0.0452059)  (0.213938,-0.716795) (-0.782382,-0.740419)
 (-0.604897,0.823295) (0.0268018,-0.270431) (-0.514226,-0.967399)  (-0.563486,0.997849)
 (0.536459,-0.329554)    (0.83239,0.904459)  (0.608354,-0.725537)  (0.678224,0.0258648)

A^3.1 is:
   (2.80575,-0.607662) (-1.16847,-0.00660555)    (-0.760385,1.01461)   (-0.38073,-0.106512)
     (1.4041,-3.61891)     (1.00481,0.186263)   (-0.163888,0.449419)   (-0.388981,-1.22629)
   (-2.07957,-1.58136)     (0.825866,2.25962)     (5.09383,0.155736)    (0.394308,-1.63034)
  (-0.818997,0.671026)  (2.11069,-0.00768024)    (-1.37876,0.140165)    (2.50512,-0.854429)

A^3.3 is:
  (2.83571,-0.238717) (-1.48174,-0.0615217)  (-0.0544396,1.68092) (-0.292699,-0.621726)
    (2.0521,-3.58316)    (0.87894,0.400548)  (0.738072,-0.121242)   (-1.07957,-1.63492)
  (-3.00106,-1.10558)     (1.52205,1.92407)    (5.29759,-1.83562)  (-0.532038,-1.50253)
  (-0.491353,-0.4145)     (2.5761,0.481286)  (-1.21994,0.0367069)    (2.67112,-1.06331)

A^3.7 is:
     (1.42126,0.33362)   (-1.39486,-0.560486)      (1.44968,2.47066)   (-0.324079,-1.75879)
    (2.65301,-1.82427)   (0.357333,-0.192429)      (2.01017,-1.4791)    (-2.71518,-2.35892)
   (-3.98544,0.964861)     (2.26033,0.554254)     (3.18211,-5.94352)    (-2.22888,0.128951)
   (0.944969,-2.14683)      (3.31345,1.66075) (-0.0623743,-0.848324)        (2.3897,-1.863)

A^3.9 is:
 (0.0720766,0.378685) (-0.931961,-0.978624)      (1.9855,2.34105)  (-0.530547,-2.17664)
  (2.40934,-0.265286)  (0.0299975,-1.08827)    (1.98974,-2.05886)   (-3.45767,-2.50235)
    (-3.71666,2.3874)        (2.054,-0.303)   (0.844348,-7.29588)    (-2.59136,1.57689)
   (1.87645,-2.38798)     (3.52111,2.10508)    (0.799055,-1.6122)    (1.93452,-2.44408)

```
  Inherits internal::noncopyable.

 

|  |
| --- |
|  |
| template<typename ResultType >  |
| void  | [compute](classeigen_1_1matrixpower#aa1258393dc13acd6e401e000f99b915f) (ResultType &res, RealScalar p) |
|  | Compute the matrix power. [More...](classeigen_1_1matrixpower#aa1258393dc13acd6e401e000f99b915f) |
|  |
|  | [MatrixPower](classeigen_1_1matrixpower#a5eb445525601510413b53cd347c44716) (const MatrixType &A) |
|  | Constructor. [More...](classeigen_1_1matrixpower#a5eb445525601510413b53cd347c44716) |
|  |
| const [MatrixPowerParenthesesReturnValue](classeigen_1_1matrixpowerparenthesesreturnvalue)< MatrixType >  | [operator()](classeigen_1_1matrixpower#a2ad22d156b1a7ff12d6c40a093cd95eb) (RealScalar p) |
|  | Returns the matrix power. [More...](classeigen_1_1matrixpower#a2ad22d156b1a7ff12d6c40a093cd95eb) |
|  |

  MatrixPower()
-------------

    template<typename MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::MatrixPower](classeigen_1_1matrixpower)< MatrixType >::[MatrixPower](classeigen_1_1matrixpower) | ( | const MatrixType &  | *A* | ) |  |

 | inlineexplicit |

 
 Constructor. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | A | the base of the matrix power. |

   The class stores a reference to A, so it should not be changed (or destroyed) before evaluation. 

    compute()
---------

    template<typename MatrixType >   template<typename ResultType >  

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::MatrixPower](classeigen_1_1matrixpower)< MatrixType >::compute  | ( | ResultType &  | *res*,  |
|  |  | RealScalar  | *p* |
|  | ) |  |  |

 
 Compute the matrix power. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | p | exponent, a real scalar.  |
| [out] | res | \( A^p \) where A is specified in the constructor.  |

      operator()()
------------

    template<typename MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [MatrixPowerParenthesesReturnValue](classeigen_1_1matrixpowerparenthesesreturnvalue)<MatrixType> [Eigen::MatrixPower](classeigen_1_1matrixpower)< MatrixType >::operator()  | ( | RealScalar  | *p* | ) |  |

 | inline |

 
 Returns the matrix power. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | p | exponent, a real scalar.  |

   
Returns
The expression \( A^p \), where A is specified in the constructor. 
   

---

The documentation for this class was generated from the following file:* [MatrixPower.h](https://eigen.tuxfamily.org/dox/unsupported/MatrixPower_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1MatrixPower.html>

Eigen::AlignedVector3
=====================

  
### template<typename \_Scalar> class Eigen::AlignedVector3< \_Scalar >

 A vectorization friendly 3D vector. 

 This class represents a 3D vector internally using a 4D vector such that vectorization can be seamlessly enabled. Of course, the same result can be achieved by directly using a 4D vector. This class makes this process simpler. 

     ![Inheritance graph]           

---

The documentation for this class was generated from the following file:* AlignedVector3

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1AlignedVector3.html>

Eigen::AutoDiffScalar
=====================

  
### template<typename DerivativeType> class Eigen::AutoDiffScalar< DerivativeType >

 A scalar type replacement with automatic differentiation capability. 

 
Parameters
 

|  |  |
| --- | --- |
| DerivativeType | the vector type used to store/represent the derivatives. The base scalar type as well as the number of derivatives to compute are determined from this type. Typical choices include, e.g., `Vector4f` for 4 derivatives, or `VectorXf` if the number of derivatives is not known at compile time, and/or, the number of derivatives is large. Note that DerivativeType can also be a reference (e.g., `VectorXf&`) to wrap a existing vector into an [AutoDiffScalar](classeigen_1_1autodiffscalar "A scalar type replacement with automatic differentiation capability."). Finally, DerivativeType can also be any [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") compatible expression. |

   This class represents a scalar value while tracking its respective derivatives using [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.")'s expression template mechanism.

 It supports the following list of global math function:


* std::abs, std::sqrt, std::pow, std::exp, std::log, std::sin, std::cos,
* internal::abs, internal::sqrt, numext::pow, internal::exp, internal::log, internal::sin, internal::cos,
* internal::conj, internal::real, internal::imag, numext::abs2.

 [AutoDiffScalar](classeigen_1_1autodiffscalar "A scalar type replacement with automatic differentiation capability.") can be used as the scalar type of an [Eigen::Matrix](../classeigen_1_1matrix) object. However, in that case, the expression template mechanism only occurs at the top [Matrix](../classeigen_1_1matrix) level, while derivatives are computed right away. 

  Inherits Eigen::internal::auto\_diff\_special\_op< DerivativeType, !internal::is\_same< internal::traits< internal::remove\_all< DerivativeType >::type >::Scalar, NumTraits< internal::traits< internal::remove\_all< DerivativeType >::type >::Scalar >::Real >::value >.

 

|  |
| --- |
|  |
|  | [AutoDiffScalar](classeigen_1_1autodiffscalar#a0c41ac30584453395197d74637919aef) () |
|  |
|  | [AutoDiffScalar](classeigen_1_1autodiffscalar#adbf812d694d82049f27b55fbd6c1fb50) (const Real &value) |
|  |
|  | [AutoDiffScalar](classeigen_1_1autodiffscalar#ae6483e33249241b62b9f2506faaf8bbf) (const Scalar &value, const DerType &der) |
|  |
|  | [AutoDiffScalar](classeigen_1_1autodiffscalar#ac495df4f841747d994c15970804b0f55) (const Scalar &value, int nbDer, int derNumber) |
|  |

  AutoDiffScalar() [1/4]
----------------------

    template<typename DerivativeType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::AutoDiffScalar](classeigen_1_1autodiffscalar)< DerivativeType >::[AutoDiffScalar](classeigen_1_1autodiffscalar) | ( |  | ) |  |

 | inline |

 
 Default constructor without any initialization. 

    AutoDiffScalar() [2/4]
----------------------

    template<typename DerivativeType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::AutoDiffScalar](classeigen_1_1autodiffscalar)< DerivativeType >::[AutoDiffScalar](classeigen_1_1autodiffscalar) | ( | const Scalar &  | *value*,  |
|  |  | int  | *nbDer*,  |
|  |  | int  | *derNumber* |
|  | ) |  |  |

 | inline |

 
 Constructs an active scalar from its *value*, and initializes the *nbDer* derivatives such that it corresponds to the *derNumber* -th variable 

    AutoDiffScalar() [3/4]
----------------------

    template<typename DerivativeType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::AutoDiffScalar](classeigen_1_1autodiffscalar)< DerivativeType >::[AutoDiffScalar](classeigen_1_1autodiffscalar) | ( | const Real &  | *value* | ) |  |

 | inline |

 
 Conversion from a scalar constant to an active scalar. The derivatives are set to zero. 

    AutoDiffScalar() [4/4]
----------------------

    template<typename DerivativeType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::AutoDiffScalar](classeigen_1_1autodiffscalar)< DerivativeType >::[AutoDiffScalar](classeigen_1_1autodiffscalar) | ( | const Scalar &  | *value*,  |
|  |  | const DerType &  | *der* |
|  | ) |  |  |

 | inline |

 
 Constructs an active scalar from its *value* and derivatives *der* 

   

---

The documentation for this class was generated from the following file:* [AutoDiffScalar.h](https://eigen.tuxfamily.org/dox/unsupported/AutoDiffScalar_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1AutoDiffScalar.html>

Eigen::DynamicSGroup
====================

  
Dynamic symmetry group. 

 The DynamicSGroup class represents a symmetry group that need not be known at compile time. It is useful if one wants to support arbitrary run-time defineable symmetries for tensors, but it is also instantiated if a symmetry group is defined at compile time that would be either too large for the compiler to reasonably generate (using templates to calculate this at compile time is very inefficient) or that the compiler could generate the group but that it wouldn't make sense to unroll the loop for setting coefficients anymore. 

  Inherited by Eigen::DynamicSGroupFromTemplateArgs< Gen >.

 

---

The documentation for this class was generated from the following file:* [DynamicSymmetry.h](https://eigen.tuxfamily.org/dox/unsupported/DynamicSymmetry_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1DynamicSGroup.html>

Eigen::HybridNonLinearSolver
============================

  
### template<typename FunctorType, typename Scalar = double> class Eigen::HybridNonLinearSolver< FunctorType, Scalar >

 Finds a zero of a system of n nonlinear functions in n variables by a modification of the Powell hybrid method ("dogleg"). 

 The user must provide a subroutine which calculates the functions. The Jacobian is either provided by the user, or approximated using a forward-difference method. 

 


---

The documentation for this class was generated from the following file:* [HybridNonLinearSolver.h](https://eigen.tuxfamily.org/dox/unsupported/HybridNonLinearSolver_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1HybridNonLinearSolver.html>

Eigen::IterationController
==========================

  
Controls the iterations of the iterative solvers. 

 This class has been adapted from the iteration class of GMM++ and ITL libraries. 

 


|  |
| --- |
|  |
|  size\_t  | [m\_maxiter](classeigen_1_1iterationcontroller#a42f72b0f3d490a6ceaa7bc76a51c1471) |
|  | Max. number of iterations.  |
|  |
|  size\_t  | [m\_nit](classeigen_1_1iterationcontroller#ac9d122615471416cc827a3d8e8ea15f2) |
|  | iteration number  |
|  |
|  int  | [m\_noise](classeigen_1_1iterationcontroller#afcff4288066c186967f15defcd833f5d) |
|  | if noise > 0 iterations are printed  |
|  |
|  double  | [m\_res](classeigen_1_1iterationcontroller#af60d33d2bdd09f3d00fd73ddc91fc1e6) |
|  | last computed residual  |
|  |
|  double  | [m\_resmax](classeigen_1_1iterationcontroller#a5342235a082ee820516fd593ee1efeac) |
|  | maximum residual  |
|  |
|  double  | [m\_rhsn](classeigen_1_1iterationcontroller#a43364d62c43861aff44cb0a86c4615a6) |
|  | Right hand side norm.  |
|  |

 

---

The documentation for this class was generated from the following file:* [IterationController.h](https://eigen.tuxfamily.org/dox/unsupported/IterationController_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1IterationController.html>

Eigen::IterScaling
==================

  
### template<typename \_MatrixType> class Eigen::IterScaling< \_MatrixType >

 iterative scaling algorithm to equilibrate rows and column norms in matrices 

 This class can be used as a preprocessing tool to accelerate the convergence of iterative methods

 This feature is useful to limit the pivoting amount during LU/ILU factorization The scaling strategy as presented here preserves the symmetry of the problem NOTE It is assumed that the matrix does not have empty row or column,

 Example with key steps 



```
VectorXd x(n), b(n);
SparseMatrix<double> A;
// fill A and b;
IterScaling<SparseMatrix<double> > scal; 
// Compute the left and right scaling vectors. The matrix is equilibrated at output
scal.computeRef(A); 
// Scale the right hand side
b = scal.LeftScaling().cwiseProduct(b); 
// Now, solve the equilibrated linear system with any available solver
 
// Scale back the computed solution
x = scal.RightScaling().cwiseProduct(x); 

```


Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the matrix. It should be a real square sparsematrix |

   References : D. Ruiz and B. Ucar, A Symmetry Preserving Algorithm for [Matrix](../classeigen_1_1matrix) Scaling, INRIA Research report RR-7552

 
See also

[IncompleteLUT](../classeigen_1_1incompletelut) 
 


|  |
| --- |
|  |
| void  | [compute](classeigen_1_1iterscaling#a6a76754399fd004b3ac6011e272ffb71) (const MatrixType &mat) |
|  |
| void  | [computeRef](classeigen_1_1iterscaling#aeff5ccef2ccb32c6f472a190f8a511af) (MatrixType &mat) |
|  |
| VectorXd &  | [LeftScaling](classeigen_1_1iterscaling#ab88d288be912d90a1e597e5dab0bd47b) () |
|  |
| VectorXd &  | [RightScaling](classeigen_1_1iterscaling#a617229454935a6a4fda76b8af56c52ea) () |
|  |
| void  | [setTolerance](classeigen_1_1iterscaling#acbca5170d8043f40e387bcb6a42f8b71) (double tol) |
|  |

  compute()
---------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::IterScaling](classeigen_1_1iterscaling)< \_MatrixType >::compute  | ( | const MatrixType &  | *mat* | ) |  |

 | inline |

 
 Compute the left and right diagonal matrices to scale the input matrix `mat` 

 FIXME This algorithm will be modified such that the diagonal elements are permuted on the diagonal.

 
See also

[LeftScaling()](classeigen_1_1iterscaling#ab88d288be912d90a1e597e5dab0bd47b) [RightScaling()](classeigen_1_1iterscaling#a617229454935a6a4fda76b8af56c52ea) 
    computeRef()
------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::IterScaling](classeigen_1_1iterscaling)< \_MatrixType >::computeRef  | ( | MatrixType &  | *mat* | ) |  |

 | inline |

 
 Compute the left and right vectors to scale the vectors the input matrix is scaled with the computed vectors at output

 
See also

[compute()](classeigen_1_1iterscaling#a6a76754399fd004b3ac6011e272ffb71) 
    LeftScaling()
-------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| VectorXd& [Eigen::IterScaling](classeigen_1_1iterscaling)< \_MatrixType >::LeftScaling  | ( |  | ) |  |

 | inline |

 
 Get the vector to scale the rows of the matrix 

    RightScaling()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| VectorXd& [Eigen::IterScaling](classeigen_1_1iterscaling)< \_MatrixType >::RightScaling  | ( |  | ) |  |

 | inline |

 
 Get the vector to scale the columns of the matrix 

    setTolerance()
--------------

    template<typename \_MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::IterScaling](classeigen_1_1iterscaling)< \_MatrixType >::setTolerance  | ( | double  | *tol* | ) |  |

 | inline |

 
 Set the tolerance for the convergence of the iterative scaling algorithm 

   

---

The documentation for this class was generated from the following file:* [Scaling.h](https://eigen.tuxfamily.org/dox/unsupported/Scaling_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1IterScaling.html>

Eigen::KroneckerProduct
=======================

  
### template<typename Lhs, typename Rhs> class Eigen::KroneckerProduct< Lhs, Rhs >

 Kronecker tensor product helper class for dense matrices. 

 This class is the return value of kroneckerProduct([MatrixBase](../classeigen_1_1matrixbase), [MatrixBase](../classeigen_1_1matrixbase)). Use the function rather than construct this class directly to avoid specifying template prarameters.

 
Template Parameters
 

|  |  |
| --- | --- |
| Lhs | Type of the left-hand side, a matrix expression.  |
| Rhs | Type of the rignt-hand side, a matrix expression.  |

       ![Inheritance graph]      

|  |
| --- |
|  |
|  template<typename Dest >  |
| void  | [evalTo](classeigen_1_1kroneckerproduct#a10f65aca36ed69da354e70b300b5a223) (Dest &dst) const |
|  | Evaluate the Kronecker tensor product.  |
|  |
|  | [KroneckerProduct](classeigen_1_1kroneckerproduct#a0b01b6d5ae2413cef8fd91fe7a98a0d7) (const Lhs &A, const Rhs &B) |
|  | Constructor.  |
|  |
| - Public Member Functions inherited from [Eigen::KroneckerProductBase< KroneckerProduct< Lhs, Rhs > >](classeigen_1_1kroneckerproductbase) |
| Scalar  | [coeff](classeigen_1_1kroneckerproductbase#a673348e7d9d2a4570aa0bcac33507f7b) ([Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) i) const |
|  |
| Scalar  | [coeff](classeigen_1_1kroneckerproductbase#a0b302d4e55f5a58955e6c645d066928f) ([Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) row, [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) col) const |
|  |
|  | [KroneckerProductBase](classeigen_1_1kroneckerproductbase#a0cb05eaa978b9fdc0285b48a6e0ecfb1) (const Lhs &A, const Rhs &B) |
|  | Constructor.  |
|  |

 

---

The documentation for this class was generated from the following file:* [KroneckerTensorProduct.h](https://eigen.tuxfamily.org/dox/unsupported/KroneckerTensorProduct_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1KroneckerProduct.html>

Eigen::KroneckerProductBase
===========================

  
### template<typename Derived> class Eigen::KroneckerProductBase< Derived >

 The base class of dense and sparse Kronecker product. 

 
Template Parameters
 

|  |  |
| --- | --- |
| Derived | is the derived type.  |

    Inherits ReturnByValue< Derived >.

 

|  |
| --- |
|  |
| Scalar  | [coeff](classeigen_1_1kroneckerproductbase#a673348e7d9d2a4570aa0bcac33507f7b) ([Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) i) const |
|  |
| Scalar  | [coeff](classeigen_1_1kroneckerproductbase#a0b302d4e55f5a58955e6c645d066928f) ([Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) row, [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) col) const |
|  |
|  | [KroneckerProductBase](classeigen_1_1kroneckerproductbase#a0cb05eaa978b9fdc0285b48a6e0ecfb1) (const Lhs &A, const Rhs &B) |
|  | Constructor.  |
|  |

  coeff() [1/2]
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Scalar [Eigen::KroneckerProductBase](classeigen_1_1kroneckerproductbase)< Derived >::coeff  | ( | [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *i* | ) |  const |

 | inline |

 
 This overrides ReturnByValue::coeff because this function is efficient enough. 

    coeff() [2/2]
-------------

    template<typename Derived >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Scalar [Eigen::KroneckerProductBase](classeigen_1_1kroneckerproductbase)< Derived >::coeff  | ( | [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *row*,  |
|  |  | [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *col* |
|  | ) |  |  const |

 | inline |

 
 This overrides ReturnByValue::coeff because this function is efficient enough. 

   

---

The documentation for this class was generated from the following file:* [KroneckerTensorProduct.h](https://eigen.tuxfamily.org/dox/unsupported/KroneckerTensorProduct_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1KroneckerProductBase.html>

Eigen::MaxSizeVector
====================

  
### template<typename T> class Eigen::MaxSizeVector< T >

 The [MaxSizeVector](classeigen_1_1maxsizevector "The MaxSizeVector class.") class. 

 The MaxSizeVector provides a subset of std::vector functionality.

 The goal is to provide basic std::vector operations when using std::vector is not an option (e.g. on GPU or when compiling using FMA/AVX, as this can cause either compilation failures or illegal instruction failures).

 Beware: The constructors are not API compatible with these of std::vector. 

 


---

The documentation for this class was generated from the following file:* [MaxSizeVector.h](https://eigen.tuxfamily.org/dox/unsupported/MaxSizeVector_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1MaxSizeVector.html>

Eigen::DGMRES
=============

  
### template<typename \_MatrixType, typename \_Preconditioner> class Eigen::DGMRES< \_MatrixType, \_Preconditioner >

 A Restarted [GMRES](classeigen_1_1gmres "A GMRES solver for sparse square problems.") with deflation. This class implements a modification of the [GMRES](classeigen_1_1gmres "A GMRES solver for sparse square problems.") solver for sparse linear systems. The basis is built with modified Gram-Schmidt. At each restart, a few approximated eigenvectors corresponding to the smallest eigenvalues are used to build a preconditioner for the next cycle. This preconditioner for deflation can be combined with any other preconditioner, the [IncompleteLUT](../classeigen_1_1incompletelut) for instance. The preconditioner is applied at right of the matrix and the combination is multiplicative. 

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the sparse matrix A, can be a dense or a sparse matrix.  |
| \_Preconditioner | the type of the preconditioner. Default is [DiagonalPreconditioner](../classeigen_1_1diagonalpreconditioner) Typical usage : 
```
SparseMatrix<double> A;
VectorXd x, b; 
//Fill A and b ...
DGMRES<SparseMatrix<double> > solver;
solver.set_restart(30); // Set restarting value
solver.setEigenv(1); // Set the number of eigenvalues to deflate
solver.compute(A);
x = solver.solve(b);

```
 |

   [DGMRES](classeigen_1_1dgmres "A Restarted GMRES with deflation. This class implements a modification of the GMRES solver for sparse...") can also be used in a matrix-free context, see the following [example](../group__matrixfreesolverexample) .

 References : [1] D. NUENTSA WAKAM and F. PACULL, Memory Efficient Hybrid Algebraic Solvers for Linear Systems Arising from Compressible Flows, Computers and Fluids, In Press, <https://doi.org/10.1016/j.compfluid.2012.03.023>   
 [2] K. Burrage and J. Erhel, On the performance of various adaptive preconditioned [GMRES](classeigen_1_1gmres "A GMRES solver for sparse square problems.") strategies, 5(1998), 101-121. [3] J. Erhel, K. Burrage and B. Pohl, Restarted [GMRES](classeigen_1_1gmres "A GMRES solver for sparse square problems.") preconditioned by deflation,J. Computational and Applied Mathematics, 69(1996), 303-318. 

     ![Inheritance graph]       

|  |
| --- |
|  |
| [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [deflSize](classeigen_1_1dgmres#ab80013fc06926d2067b677a021367363) () |
|  |
|  | [DGMRES](classeigen_1_1dgmres#a17bd25826b56c39bc7cc4ce8fbf8a848) () |
|  |
| template<typename MatrixDerived >  |
|  | [DGMRES](classeigen_1_1dgmres#a800fcf37c0ac66f76d5c070e4aeae2a7) (const [EigenBase](../structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [restart](classeigen_1_1dgmres#afba35ad9e10dba460a9658075ade4d57) () |
|  |
| void  | [set\_restart](classeigen_1_1dgmres#abc4c4e02112c861b122a19a2742319f0) (const [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [restart](classeigen_1_1dgmres#afba35ad9e10dba460a9658075ade4d57)) |
|  |
| void  | [setEigenv](classeigen_1_1dgmres#ae74eb1faaaf3559bcf73b4d7703ea629) (const [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) neig) |
|  |
| void  | [setMaxEigenv](classeigen_1_1dgmres#a6e715bd5199a6a4474a9bc9e8481f9bd) (const [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) maxNeig) |
|  |




|  |
| --- |
|  |
| template<typename Rhs , typename Dest >  |
| void  | [dgmres](classeigen_1_1dgmres#a1b06062ec16932d3a20ea4767d9de51d) (const MatrixType &mat, const Rhs &rhs, Dest &x, const Preconditioner &precond) const |
|  | Perform several cycles of restarted [GMRES](classeigen_1_1gmres "A GMRES solver for sparse square problems.") with modified Gram Schmidt,. [More...](classeigen_1_1dgmres#a1b06062ec16932d3a20ea4767d9de51d) |
|  |
| template<typename Dest >  |
| [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [dgmresCycle](classeigen_1_1dgmres#ab77d66ef7f84ff15b6bd55fb76619218) (const MatrixType &mat, const Preconditioner &precond, Dest &x, [DenseVector](../classeigen_1_1matrix) &r0, RealScalar &beta, const RealScalar &normRhs, [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) &nbIts) const |
|  | Perform one restart cycle of [DGMRES](classeigen_1_1dgmres "A Restarted GMRES with deflation. This class implements a modification of the GMRES solver for sparse..."). [More...](classeigen_1_1dgmres#ab77d66ef7f84ff15b6bd55fb76619218) |
|  |

  DGMRES() [1/2]
--------------

    template<typename \_MatrixType , typename \_Preconditioner >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::DGMRES](classeigen_1_1dgmres)< \_MatrixType, \_Preconditioner >::[DGMRES](classeigen_1_1dgmres) | ( |  | ) |  |

 | inline |

 
 Default constructor. 

    DGMRES() [2/2]
--------------

    template<typename \_MatrixType , typename \_Preconditioner >   template<typename MatrixDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::DGMRES](classeigen_1_1dgmres)< \_MatrixType, \_Preconditioner >::[DGMRES](classeigen_1_1dgmres) | ( | const [EigenBase](../structeigen_1_1eigenbase)< MatrixDerived > &  | *A* | ) |  |

 | inlineexplicit |

 
 Initialize the solver with matrix *A* for further `Ax=b` solving.

 This constructor is a shortcut for the default constructor followed by a call to [compute()](../classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914).

 
Warning
this class stores a reference to the matrix A as well as some precomputed values that depend on it. Therefore, if *A* is changed this class becomes invalid. Call [compute()](../classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914) to update it with the new matrix A, or modify a copy of A. 
    deflSize()
----------

    template<typename \_MatrixType , typename \_Preconditioner >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::DGMRES](classeigen_1_1dgmres)< \_MatrixType, \_Preconditioner >::deflSize  | ( |  | ) |  |

 | inline |

 
 Get the size of the deflation subspace size 

    dgmres()
--------

    template<typename \_MatrixType , typename \_Preconditioner >   template<typename Rhs , typename Dest >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::DGMRES](classeigen_1_1dgmres)< \_MatrixType, \_Preconditioner >::dgmres  | ( | const MatrixType &  | *mat*,  |
|  |  | const Rhs &  | *rhs*,  |
|  |  | Dest &  | *x*,  |
|  |  | const Preconditioner &  | *precond* |
|  | ) |  |  const |

 | protected |

 
 Perform several cycles of restarted [GMRES](classeigen_1_1gmres "A GMRES solver for sparse square problems.") with modified Gram Schmidt,. 

 A right preconditioner is used combined with deflation. 

    dgmresCycle()
-------------

    template<typename \_MatrixType , typename \_Preconditioner >   template<typename Dest >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::DGMRES](classeigen_1_1dgmres)< \_MatrixType, \_Preconditioner >::dgmresCycle  | ( | const MatrixType &  | *mat*,  |
|  |  | const Preconditioner &  | *precond*,  |
|  |  | Dest &  | *x*,  |
|  |  | [DenseVector](../classeigen_1_1matrix) &  | *r0*,  |
|  |  | RealScalar &  | *beta*,  |
|  |  | const RealScalar &  | *normRhs*,  |
|  |  | [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) &  | *nbIts* |
|  | ) |  |  const |

 | protected |

 
 Perform one restart cycle of [DGMRES](classeigen_1_1dgmres "A Restarted GMRES with deflation. This class implements a modification of the GMRES solver for sparse..."). 

 
Parameters
 

|  |  |
| --- | --- |
| mat | The coefficient matrix  |
| precond | The preconditioner  |
| x | the new approximated solution  |
| r0 | The initial residual vector  |
| beta | The norm of the residual computed so far  |
| normRhs | The norm of the right hand side vector  |
| nbIts | The number of iterations  |

      restart()
---------

    template<typename \_MatrixType , typename \_Preconditioner >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::DGMRES](classeigen_1_1dgmres)< \_MatrixType, \_Preconditioner >::restart  | ( |  | ) |  |

 | inline |

 
 Get the restart value 

    set\_restart()
--------------

    template<typename \_MatrixType , typename \_Preconditioner >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::DGMRES](classeigen_1_1dgmres)< \_MatrixType, \_Preconditioner >::set\_restart  | ( | const [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *restart* | ) |  |

 | inline |

 
 Set the restart value (default is 30)   
 

    setEigenv()
-----------

    template<typename \_MatrixType , typename \_Preconditioner >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::DGMRES](classeigen_1_1dgmres)< \_MatrixType, \_Preconditioner >::setEigenv  | ( | const [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *neig* | ) |  |

 | inline |

 
 Set the number of eigenvalues to deflate at each restart 

    setMaxEigenv()
--------------

    template<typename \_MatrixType , typename \_Preconditioner >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::DGMRES](classeigen_1_1dgmres)< \_MatrixType, \_Preconditioner >::setMaxEigenv  | ( | const [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *maxNeig* | ) |  |

 | inline |

 
 Set the maximum size of the deflation subspace 

   

---

The documentation for this class was generated from the following file:* [DGMRES.h](https://eigen.tuxfamily.org/dox/unsupported/DGMRES_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1DGMRES.html>

Eigen::GMRES
============

  
### template<typename \_MatrixType, typename \_Preconditioner> class Eigen::GMRES< \_MatrixType, \_Preconditioner >

 A [GMRES](classeigen_1_1gmres "A GMRES solver for sparse square problems.") solver for sparse square problems. 

 This class allows to solve for A.x = b sparse linear problems using a generalized minimal residual method. The vectors x and b can be either dense or sparse.

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the sparse matrix A, can be a dense or a sparse matrix.  |
| \_Preconditioner | the type of the preconditioner. Default is [DiagonalPreconditioner](../classeigen_1_1diagonalpreconditioner) |

   The maximal number of iterations and tolerance value can be controlled via the [setMaxIterations()](../classeigen_1_1iterativesolverbase#af83de7a7d31d9d4bd1fef6222b07335b) and [setTolerance()](../classeigen_1_1iterativesolverbase#ac160a444af8998f93da9aa30e858470d) methods. The defaults are the size of the problem for the maximal number of iterations and NumTraits<Scalar>::epsilon() for the tolerance.

 This class can be used as the direct solver classes. Here is a typical usage example: 



```
int n = 10000;
VectorXd x(n), b(n);
SparseMatrix<double> A(n,n);
// fill A and b
GMRES<SparseMatrix<double> > solver(A);
x = solver.solve(b);
std::cout << "#iterations: " << solver.iterations() << std::endl;
std::cout << "estimated error: " << solver.error()      << std::endl;
// update b, and solve again
x = solver.solve(b);

```

By default the iterations start with x=0 as an initial guess of the solution. One can control the start using the [solveWithGuess()](../classeigen_1_1iterativesolverbase#adcc18d1ab283786dcbb5a3f63f4b4bd8) method.

 [GMRES](classeigen_1_1gmres "A GMRES solver for sparse square problems.") can also be used in a matrix-free context, see the following [example](../group__matrixfreesolverexample) .

 
See also
class [SimplicialCholesky](../classeigen_1_1simplicialcholesky), [DiagonalPreconditioner](../classeigen_1_1diagonalpreconditioner), [IdentityPreconditioner](../classeigen_1_1identitypreconditioner) 
     ![Inheritance graph]       

|  |
| --- |
|  |
| [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [get\_restart](classeigen_1_1gmres#ade721328e58ace2d4493cbdcbe53ad09) () |
|  |
|  | [GMRES](classeigen_1_1gmres#a73153e328dfa402cb3640711289f2985) () |
|  |
| template<typename MatrixDerived >  |
|  | [GMRES](classeigen_1_1gmres#a9ceeeb826c7e60ee948c0d1c0a219607) (const [EigenBase](../structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| void  | [set\_restart](classeigen_1_1gmres#ac50d6bbca4a8a275861770feb211900d) (const [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) restart) |
|  |

  GMRES() [1/2]
-------------

    template<typename \_MatrixType , typename \_Preconditioner >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::GMRES](classeigen_1_1gmres)< \_MatrixType, \_Preconditioner >::[GMRES](classeigen_1_1gmres) | ( |  | ) |  |

 | inline |

 
 Default constructor. 

    GMRES() [2/2]
-------------

    template<typename \_MatrixType , typename \_Preconditioner >   template<typename MatrixDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::GMRES](classeigen_1_1gmres)< \_MatrixType, \_Preconditioner >::[GMRES](classeigen_1_1gmres) | ( | const [EigenBase](../structeigen_1_1eigenbase)< MatrixDerived > &  | *A* | ) |  |

 | inlineexplicit |

 
 Initialize the solver with matrix *A* for further `Ax=b` solving.

 This constructor is a shortcut for the default constructor followed by a call to [compute()](../classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914).

 
Warning
this class stores a reference to the matrix A as well as some precomputed values that depend on it. Therefore, if *A* is changed this class becomes invalid. Call [compute()](../classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914) to update it with the new matrix A, or modify a copy of A. 
    get\_restart()
--------------

    template<typename \_MatrixType , typename \_Preconditioner >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::GMRES](classeigen_1_1gmres)< \_MatrixType, \_Preconditioner >::get\_restart  | ( |  | ) |  |

 | inline |

 
 Get the number of iterations after that a restart is performed. 

    set\_restart()
--------------

    template<typename \_MatrixType , typename \_Preconditioner >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::GMRES](classeigen_1_1gmres)< \_MatrixType, \_Preconditioner >::set\_restart  | ( | const [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *restart* | ) |  |

 | inline |

 
 Set the number of iterations after that a restart is performed. 



Parameters
 

|  |  |
| --- | --- |
| restart | number of iterations for a restarti, default is 30.  |

     

---

The documentation for this class was generated from the following file:* [GMRES.h](https://eigen.tuxfamily.org/dox/unsupported/GMRES_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1GMRES.html>

Eigen::EulerSystem
==================

  
### template<int \_AlphaAxis, int \_BetaAxis, int \_GammaAxis> class Eigen::EulerSystem< \_AlphaAxis, \_BetaAxis, \_GammaAxis >

 Represents a fixed Euler rotation system. 

 This meta-class goal is to represent the Euler system in compilation time, for [EulerAngles](classeigen_1_1eulerangles "Represents a rotation in a 3 dimensional space as three Euler angles.").

 You can use this class to get two things:


* Build an Euler system, and then pass it as a template parameter to [EulerAngles](classeigen_1_1eulerangles "Represents a rotation in a 3 dimensional space as three Euler angles.").
* Query some compile time data about an Euler system. (e.g. Whether it's Tait-Bryan)

 Euler rotation is a set of three rotation on fixed axes. (see [EulerAngles](classeigen_1_1eulerangles)) This meta-class store constantly those signed axes. (see [EulerAxis](group__eulerangles__module#gae614aa7cdd687fb5c421a54f2ce5c361))

 ### 
 Types of Euler systems

 All and only valid 3 dimension Euler rotation over standard signed axes{+X,+Y,+Z,-X,-Y,-Z} are supported:


* all axes X, Y, Z in each valid order (see below what order is valid)
* rotation over the axis is supported both over the positive and negative directions.
* both Tait-Bryan and proper/classic Euler angles (i.e. the opposite).

 Since [EulerSystem](classeigen_1_1eulersystem "Represents a fixed Euler rotation system.") support both positive and negative directions, you may call this rotation distinction in other names:


* *right handed* or *left handed*
* *counterclockwise* or *clockwise*

 Notice all axed combination are valid, and would trigger a static assertion. Same unsigned axes can't be neighbors, e.g. {X,X,Y} is invalid. This yield two and only two classes:


* *Tait-Bryan* - all unsigned axes are distinct, e.g. {X,Y,Z}
* *proper/classic Euler angles* - The first and the third unsigned axes is equal, and the second is different, e.g. {X,Y,X}

 ### 
 Intrinsic vs extrinsic Euler systems

 Only intrinsic Euler systems are supported for simplicity. If you want to use extrinsic Euler systems, just use the equal intrinsic opposite order for axes and angles. I.e axes (A,B,C) becomes (C,B,A), and angles (a,b,c) becomes (c,b,a).

 ### 
 Convenient user typedefs

 Convenient typedefs for [EulerSystem](classeigen_1_1eulersystem "Represents a fixed Euler rotation system.") exist (only for positive axes Euler systems), in a form of [EulerSystem](classeigen_1_1eulersystem "Represents a fixed Euler rotation system."){A}{B}{C}, e.g. EulerSystemXYZ.

 ### 
 Additional reading

 More information about Euler angles: <https://en.wikipedia.org/wiki/Euler_angles>

 
Template Parameters
 

|  |  |
| --- | --- |
| \_AlphaAxis | the first fixed EulerAxis |
| \_BetaAxis | the second fixed EulerAxis |
| \_GammaAxis | the third fixed EulerAxis  |

   


|  |
| --- |
|  |
| enum  | {  [AlphaAxisAbs](classeigen_1_1eulersystem#a1df84cc5ba09c5bc1deb24832edfa70aa58eb5d1cddcc26fc15f643eab45ce06b) ,  [BetaAxisAbs](classeigen_1_1eulersystem#a1df84cc5ba09c5bc1deb24832edfa70aa6a215356d13cf14b7c48a27117dbc3ba) ,  [GammaAxisAbs](classeigen_1_1eulersystem#a1df84cc5ba09c5bc1deb24832edfa70aa121638032850c0d43438aedfb32e3d4f) ,  [IsAlphaOpposite](classeigen_1_1eulersystem#a1df84cc5ba09c5bc1deb24832edfa70aa44dcc3422221a0284b76970e01f03877) ,  [IsBetaOpposite](classeigen_1_1eulersystem#a1df84cc5ba09c5bc1deb24832edfa70aa940fe9742857e33fa7d036f3a0fff57c) ,  [IsGammaOpposite](classeigen_1_1eulersystem#a1df84cc5ba09c5bc1deb24832edfa70aa3e7e0d4bd2abf4da43c48c3d0ecafbfe) ,  [IsOdd](classeigen_1_1eulersystem#a1df84cc5ba09c5bc1deb24832edfa70aa3e35fba7036026953caf28323e699dc9) ,  [IsEven](classeigen_1_1eulersystem#a1df84cc5ba09c5bc1deb24832edfa70aa5066a58a34a7acfab35b76398d2cd506) ,  [IsTaitBryan](classeigen_1_1eulersystem#a1df84cc5ba09c5bc1deb24832edfa70aa900def911be74336de5186063de0a21c)  } |
|  |




|  |
| --- |
|  |
| static const int  | [AlphaAxis](classeigen_1_1eulersystem#a99fd18091ad6cd5629e9e5d8c223b3f1) |
|  |
| static const int  | [BetaAxis](classeigen_1_1eulersystem#a4899578f5c8e0e4e430945b38448e3d0) |
|  |
| static const int  | [GammaAxis](classeigen_1_1eulersystem#ace6abcfe0b287329a5b9658b62e16b0d) |
|  |

  anonymous enum
--------------

    template<int \_AlphaAxis, int \_BetaAxis, int \_GammaAxis>  

|  |
| --- |
| anonymous enum |

 
 

| Enumerator |
| --- |
| AlphaAxisAbs  | the first rotation axis unsigned  |
| BetaAxisAbs  | the second rotation axis unsigned  |
| GammaAxisAbs  | the third rotation axis unsigned  |
| IsAlphaOpposite  | whether alpha axis is negative  |
| IsBetaOpposite  | whether beta axis is negative  |
| IsGammaOpposite  | whether gamma axis is negative  |
| IsOdd  | whether the Euler system is odd  |
| IsEven  | whether the Euler system is even  |
| IsTaitBryan  | whether the Euler system is Tait-Bryan  |

    AlphaAxis
---------

    template<int \_AlphaAxis, int \_BetaAxis, int \_GammaAxis>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const int [Eigen::EulerSystem](classeigen_1_1eulersystem)< \_AlphaAxis, \_BetaAxis, \_GammaAxis >::AlphaAxis |

 | static |

 
 The first rotation axis 

    BetaAxis
--------

    template<int \_AlphaAxis, int \_BetaAxis, int \_GammaAxis>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const int [Eigen::EulerSystem](classeigen_1_1eulersystem)< \_AlphaAxis, \_BetaAxis, \_GammaAxis >::BetaAxis |

 | static |

 
 The second rotation axis 

    GammaAxis
---------

    template<int \_AlphaAxis, int \_BetaAxis, int \_GammaAxis>  

|  |  |  |
| --- | --- | --- |
| 

|  |
| --- |
| const int [Eigen::EulerSystem](classeigen_1_1eulersystem)< \_AlphaAxis, \_BetaAxis, \_GammaAxis >::GammaAxis |

 | static |

 
 The third rotation axis 

   

---

The documentation for this class was generated from the following file:* [EulerSystem.h](https://eigen.tuxfamily.org/dox/unsupported/EulerSystem_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1EulerSystem.html>

Eigen::IDRS
===========

  
### template<typename \_MatrixType, typename \_Preconditioner> class Eigen::IDRS< \_MatrixType, \_Preconditioner >

 The Induced Dimension Reduction method (IDR(s)) is a short-recurrences Krylov method for sparse square problems. 

 This class allows to solve for A.x = b sparse linear problems. The vectors x and b can be either dense or sparse. he Induced Dimension Reduction method, IDR(), is a robust and efficient short-recurrence Krylov subspace method for solving large nonsymmetric systems of linear equations.

 For indefinite systems IDR(S) outperforms both BiCGStab and BiCGStab(L). Additionally, IDR(S) can handle matrices with complex eigenvalues more efficiently than BiCGStab.

 Many problems that do not converge for [BiCGSTAB](../classeigen_1_1bicgstab) converge for IDR(s) (for larger values of s). And if both methods converge the convergence for IDR(s) is typically much faster for difficult systems (for example indefinite problems).

 IDR(s) is a limited memory finite termination method. In exact arithmetic it converges in at most N+N/s iterations, with N the system size. It uses a fixed number of 4+3s vector. In comparison, [BiCGSTAB](../classeigen_1_1bicgstab) terminates in 2N iterations and uses 7 vectors. [GMRES](classeigen_1_1gmres "A GMRES solver for sparse square problems.") terminates in at most N iterations, and uses I+3 vectors, with I the number of iterations. Restarting [GMRES](classeigen_1_1gmres "A GMRES solver for sparse square problems.") limits the memory consumption, but destroys the finite termination property.

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the sparse matrix A, can be a dense or a sparse matrix.  |
| \_Preconditioner | the type of the preconditioner. Default is [DiagonalPreconditioner](../classeigen_1_1diagonalpreconditioner) |

   This class follows the [sparse solver concept](../group__topicsparsesystems#TutorialSparseSolverConcept) .

 The maximal number of iterations and tolerance value can be controlled via the [setMaxIterations()](../classeigen_1_1iterativesolverbase#af83de7a7d31d9d4bd1fef6222b07335b) and [setTolerance()](../classeigen_1_1iterativesolverbase#ac160a444af8998f93da9aa30e858470d) methods. The defaults are the size of the problem for the maximal number of iterations and NumTraits<Scalar>::epsilon() for the tolerance.

 The tolerance corresponds to the relative residual error: |Ax-b|/|b|

 **Performance:** when using sparse matrices, best performance is achied for a row-major sparse matrix format. Moreover, in this case multi-threading can be exploited if the user code is compiled with OpenMP enabled. See [Eigen and multi-threading](../topicmultithreading) for details.

 By default the iterations start with x=0 as an initial guess of the solution. One can control the start using the [solveWithGuess()](../classeigen_1_1iterativesolverbase#adcc18d1ab283786dcbb5a3f63f4b4bd8) method.

 IDR(s) can also be used in a matrix-free context, see the following [example](../group__matrixfreesolverexample) .

 
See also
class [SimplicialCholesky](../classeigen_1_1simplicialcholesky), [DiagonalPreconditioner](../classeigen_1_1diagonalpreconditioner), [IdentityPreconditioner](../classeigen_1_1identitypreconditioner) 
     ![Inheritance graph]       

|  |
| --- |
|  |
| template<typename Rhs , typename Dest >  |
| void  | [\_solve\_vector\_with\_guess\_impl](classeigen_1_1idrs#aadf6594bebe313ed467e38e34f0f7c3c) (const Rhs &b, Dest &x) const |
|  |
|  | [IDRS](classeigen_1_1idrs#a5dbc1f0eeb30242e42a355633dfa810e) () |
|  |
| template<typename MatrixDerived >  |
|  | [IDRS](classeigen_1_1idrs#a36dd53442294df02948d5249d5e947fe) (const [EigenBase](../structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
| void  | [setAngle](classeigen_1_1idrs#abdb086e6e62287fea6e7ff19081c66b8) (RealScalar angle) |
|  |
| void  | [setResidualUpdate](classeigen_1_1idrs#a4514423c90c591ef914a3698f3d7123b) (bool update) |
|  |
| void  | [setS](classeigen_1_1idrs#a3ae67e1f4b29dc8a67978d870b14db8f) ([Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) S) |
|  |
| void  | [setSmoothing](classeigen_1_1idrs#a278e3f2df45165436b6cf1169d3ba820) (bool smoothing) |
|  |

  IDRS() [1/2]
------------

    template<typename \_MatrixType , typename \_Preconditioner >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::IDRS](classeigen_1_1idrs)< \_MatrixType, \_Preconditioner >::[IDRS](classeigen_1_1idrs) | ( |  | ) |  |

 | inline |

 
 Default constructor. 

    IDRS() [2/2]
------------

    template<typename \_MatrixType , typename \_Preconditioner >   template<typename MatrixDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::IDRS](classeigen_1_1idrs)< \_MatrixType, \_Preconditioner >::[IDRS](classeigen_1_1idrs) | ( | const [EigenBase](../structeigen_1_1eigenbase)< MatrixDerived > &  | *A* | ) |  |

 | inlineexplicit |

 
 Initialize the solver with matrix *A* for further `Ax=b` solving.

 This constructor is a shortcut for the default constructor followed by a call to [compute()](../classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914).

 
Warning
this class stores a reference to the matrix A as well as some precomputed values that depend on it. Therefore, if *A* is changed this class becomes invalid. Call [compute()](../classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914) to update it with the new matrix A, or modify a copy of A. 
    \_solve\_vector\_with\_guess\_impl()
------------------------------------

    template<typename \_MatrixType , typename \_Preconditioner >   template<typename Rhs , typename Dest >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::IDRS](classeigen_1_1idrs)< \_MatrixType, \_Preconditioner >::\_solve\_vector\_with\_guess\_impl  | ( | const Rhs &  | *b*,  |
|  |  | Dest &  | *x* |
|  | ) |  |  const |

 | inline |

 
 Loops over the number of columns of b and does the following:


1. sets the tolerence and maxIterations
2. Calls the function that has the core solver routine

    setAngle()
----------

    template<typename \_MatrixType , typename \_Preconditioner >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::IDRS](classeigen_1_1idrs)< \_MatrixType, \_Preconditioner >::setAngle  | ( | RealScalar  | *angle* | ) |  |

 | inline |

 
 The angle must be a real scalar. In IDR(s), a value for the iteration parameter omega must be chosen in every s+1th step. The most natural choice is to select a value to minimize the norm of the next residual. This corresponds to the parameter omega = 0. In practice, this may lead to values of omega that are so small that the other iteration parameters cannot be computed with sufficient accuracy. In such cases it is better to increase the value of omega sufficiently such that a compromise is reached between accurate computations and reduction of the residual norm. The parameter angle =0.7 (”maintaining the convergence strategy”) results in such a compromise. 

    setResidualUpdate()
-------------------

    template<typename \_MatrixType , typename \_Preconditioner >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::IDRS](classeigen_1_1idrs)< \_MatrixType, \_Preconditioner >::setResidualUpdate  | ( | bool  | *update* | ) |  |

 | inline |

 
 The parameter replace is a logical that determines whether a residual replacement strategy is employed to increase the accuracy of the solution. 

    setS()
------

    template<typename \_MatrixType , typename \_Preconditioner >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::IDRS](classeigen_1_1idrs)< \_MatrixType, \_Preconditioner >::setS  | ( | [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *S* | ) |  |

 | inline |

 
 Sets the parameter S, indicating the dimension of the shadow space. Default is 4 

    setSmoothing()
--------------

    template<typename \_MatrixType , typename \_Preconditioner >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::IDRS](classeigen_1_1idrs)< \_MatrixType, \_Preconditioner >::setSmoothing  | ( | bool  | *smoothing* | ) |  |

 | inline |

 
 Switches off and on smoothing. Residual smoothing results in monotonically decreasing residual norms at the expense of two extra vectors of storage and a few extra vector operations. Although monotonic decrease of the residual norms is a desirable property, the rate of convergence of the unsmoothed process and the smoothed process is basically the same. Default is off 

   

---

The documentation for this class was generated from the following file:* [IDRS.h](https://eigen.tuxfamily.org/dox/unsupported/IDRS_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1IDRS.html>

Eigen::KdBVH
============

  
### template<typename \_Scalar, int \_Dim, typename \_Object> class Eigen::KdBVH< \_Scalar, \_Dim, \_Object >

 A simple bounding volume hierarchy based on [AlignedBox](../classeigen_1_1alignedbox). 

 
Parameters
 

|  |  |
| --- | --- |
| \_Scalar | The underlying scalar type of the bounding boxes  |
| \_Dim | The dimension of the space in which the hierarchy lives  |
| \_Object | The object type that lives in the hierarchy. It must have value semantics. Either bounding\_box(\_Object) must be defined and return an AlignedBox<\_Scalar, \_Dim> or bounding boxes must be provided to the tree initializer. |

   This class provides a simple (as opposed to optimized) implementation of a bounding volume hierarchy analogous to a Kd-tree. Given a sequence of objects, it computes their bounding boxes, constructs a Kd-tree of their centers and builds a BVH with the structure of that Kd-tree. When the elements of the tree are too expensive to be copied around, it is useful for \_Object to be a pointer. 

 


|  |
| --- |
|  |
| void  | [getChildren](classeigen_1_1kdbvh#afa2682bdb56b8fae57d7226ee6675f44) (Index index, VolumeIterator &outVBegin, VolumeIterator &outVEnd, ObjectIterator &outOBegin, ObjectIterator &outOEnd) const |
|  |
| Index  | [getRootIndex](classeigen_1_1kdbvh#a8111486ece7980dd8f0d10aff9693d11) () const |
|  |
| const [Volume](../classeigen_1_1alignedbox) &  | [getVolume](classeigen_1_1kdbvh#a59e7a2afb19fe7ae919fb95425bd6bf0) (Index index) const |
|  |
| template<typename Iter >  |
| void  | [init](classeigen_1_1kdbvh#a431eed3c2567a854fb350f0b327d3307) (Iter begin, Iter end) |
|  |
| template<typename OIter , typename BIter >  |
| void  | [init](classeigen_1_1kdbvh#a10a9c8f6d596d7a2cd285a3fb3e8c053) (OIter begin, OIter end, BIter boxBegin, BIter boxEnd) |
|  |
| template<typename Iter >  |
|  | [KdBVH](classeigen_1_1kdbvh#a87d240e2d6ac5e87fc2e4ae6e0fe4bdc) (Iter begin, Iter end) |
|  |
| template<typename OIter , typename BIter >  |
|  | [KdBVH](classeigen_1_1kdbvh#a94f781127eeec80a7659b8a625e2fa94) (OIter begin, OIter end, BIter boxBegin, BIter boxEnd) |
|  |

  KdBVH() [1/2]
-------------

    template<typename \_Scalar , int \_Dim, typename \_Object >   template<typename Iter >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::KdBVH](classeigen_1_1kdbvh)< \_Scalar, \_Dim, \_Object >::[KdBVH](classeigen_1_1kdbvh) | ( | Iter  | *begin*,  |
|  |  | Iter  | *end* |
|  | ) |  |  |

 | inline |

 
 Given an iterator range over *Object* references, constructs the BVH. Requires that bounding\_box(Object) return a Volume. 

    KdBVH() [2/2]
-------------

    template<typename \_Scalar , int \_Dim, typename \_Object >   template<typename OIter , typename BIter >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::KdBVH](classeigen_1_1kdbvh)< \_Scalar, \_Dim, \_Object >::[KdBVH](classeigen_1_1kdbvh) | ( | OIter  | *begin*,  |
|  |  | OIter  | *end*,  |
|  |  | BIter  | *boxBegin*,  |
|  |  | BIter  | *boxEnd* |
|  | ) |  |  |

 | inline |

 
 Given an iterator range over *Object* references and an iterator range over their bounding boxes, constructs the BVH 

    getChildren()
-------------

    template<typename \_Scalar , int \_Dim, typename \_Object >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::KdBVH](classeigen_1_1kdbvh)< \_Scalar, \_Dim, \_Object >::getChildren  | ( | Index  | *index*,  |
|  |  | VolumeIterator &  | *outVBegin*,  |
|  |  | VolumeIterator &  | *outVEnd*,  |
|  |  | ObjectIterator &  | *outOBegin*,  |
|  |  | ObjectIterator &  | *outOEnd* |
|  | ) |  |  const |

 | inline |

 
 Given an *index* of a node, on exit, *outVBegin* and *outVEnd* range over the indices of the volume children of the node and *outOBegin* and *outOEnd* range over the object children of the node 

    getRootIndex()
--------------

    template<typename \_Scalar , int \_Dim, typename \_Object >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Index [Eigen::KdBVH](classeigen_1_1kdbvh)< \_Scalar, \_Dim, \_Object >::getRootIndex  | ( |  | ) |  const |

 | inline |

 
 
Returns
the index of the root of the hierarchy 
    getVolume()
-----------

    template<typename \_Scalar , int \_Dim, typename \_Object >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| const [Volume](../classeigen_1_1alignedbox)& [Eigen::KdBVH](classeigen_1_1kdbvh)< \_Scalar, \_Dim, \_Object >::getVolume  | ( | Index  | *index* | ) |  const |

 | inline |

 
 
Returns
the bounding box of the node at *index* 
    init() [1/2]
------------

    template<typename \_Scalar , int \_Dim, typename \_Object >   template<typename Iter >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::KdBVH](classeigen_1_1kdbvh)< \_Scalar, \_Dim, \_Object >::init  | ( | Iter  | *begin*,  |
|  |  | Iter  | *end* |
|  | ) |  |  |

 | inline |

 
 Given an iterator range over *Object* references, constructs the BVH, overwriting whatever is in there currently. Requires that bounding\_box(Object) return a Volume. 

    init() [2/2]
------------

    template<typename \_Scalar , int \_Dim, typename \_Object >   template<typename OIter , typename BIter >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::KdBVH](classeigen_1_1kdbvh)< \_Scalar, \_Dim, \_Object >::init  | ( | OIter  | *begin*,  |
|  |  | OIter  | *end*,  |
|  |  | BIter  | *boxBegin*,  |
|  |  | BIter  | *boxEnd* |
|  | ) |  |  |

 | inline |

 
 Given an iterator range over *Object* references and an iterator range over their bounding boxes, constructs the BVH, overwriting whatever is in there currently. 

   

---

The documentation for this class was generated from the following file:* [KdBVH.h](https://eigen.tuxfamily.org/dox/unsupported/KdBVH_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1KdBVH.html>

Eigen::DynamicSparseMatrix
==========================

  
### template<typename \_Scalar, int \_Options, typename \_StorageIndex> class Eigen::DynamicSparseMatrix< \_Scalar, \_Options, \_StorageIndex >

 A sparse matrix class designed for matrix assembly purpose. 

 
**[Deprecated:](deprecated#_deprecated000001)**
use a [SparseMatrix](../classeigen_1_1sparsematrix) in an uncompressed mode
 
Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the scalar type, i.e. the type of the coefficients |

   Unlike [SparseMatrix](../classeigen_1_1sparsematrix), this class provides a much higher degree of flexibility. In particular, it allows random read/write accesses in log(rho\*outer\_size) where `rho` is the probability that a coefficient is nonzero and outer\_size is the number of columns if the matrix is column-major and the number of rows otherwise.

 Internally, the data are stored as a std::vector of compressed vector. The performances of random writes might decrease as the number of nonzeros per inner-vector increase. In practice, we observed very good performance till about 100 nonzeros/vector, and the performance remains relatively good till 500 nonzeros/vectors.

 
See also

[SparseMatrix](../classeigen_1_1sparsematrix) 
     ![Inheritance graph]       

|  |
| --- |
|  |
| Scalar  | [coeff](classeigen_1_1dynamicsparsematrix#a64b7d586c6b212dbe912a9ee05c3a85a) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) const |
|  |
| Scalar &  | [coeffRef](classeigen_1_1dynamicsparsematrix#a17093cd39bd0e6ebd6250bc5feb61a0f) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| EIGEN\_DEPRECATED  | [DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix#a46a6947fcf115e6b7b731a8e01e7995d) () |
|  |
| template<typename OtherDerived >  |
| EIGEN\_DEPRECATED  | [DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix#ab5bd886d79beb30802df0b1508727482) (const [SparseMatrixBase](../classeigen_1_1sparsematrixbase)< OtherDerived > &other) |
|  |
| EIGEN\_DEPRECATED  | [DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix#ad1c810ff3cfcc97db704d26b9d114f94) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| EIGEN\_DEPRECATED void  | [endFill](classeigen_1_1dynamicsparsematrix#aa806b3dde0a055844110610907b016f3) () |
|  |
| EIGEN\_DEPRECATED Scalar &  | [fill](classeigen_1_1dynamicsparsematrix#a70c8f529b38fd5b7d93d6dfe1a122723) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| EIGEN\_DEPRECATED Scalar &  | [fillrand](classeigen_1_1dynamicsparsematrix#a6a5eb3c9d153d8ebdf4e0967321108e2) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| void  | [finalize](classeigen_1_1dynamicsparsematrix#aa0abc0e4565143f103f0d7373bd4a125) () |
|  |
| Scalar &  | [insertBack](classeigen_1_1dynamicsparsematrix#a0a556652195b91c09e9f6c4d8b7cc81d) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| Scalar &  | [insertBackByOuterInner](classeigen_1_1dynamicsparsematrix#ac97c2463058ae55d7f0ef21c851eb5f3) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) outer, [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) inner) |
|  |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1dynamicsparsematrix#a473cd00ddc0319327f4c8a6c82ec96cf) () const |
|  |
| void  | [prune](classeigen_1_1dynamicsparsematrix#af3b38485a69d03e5c53d9ba57f9ce1d0) (Scalar reference, RealScalar epsilon=[NumTraits](../structeigen_1_1numtraits)< RealScalar >::dummy\_precision()) |
|  |
| void  | [resize](classeigen_1_1dynamicsparsematrix#a2d793e836fdb4bf0a85c9cf390e07861) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) rows, [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) cols) |
|  |
| EIGEN\_DEPRECATED void  | [startFill](classeigen_1_1dynamicsparsematrix#abade0bf46139d8577aa24ead30c76771) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) reserveSize=1000) |
|  |
| void  | [startVec](classeigen_1_1dynamicsparsematrix#a294b998a50cc01859425e5e7c23d6108) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02)) |
|  |
|  | [~DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix#af0677c8aec1e1dee9f0a389509082a83) () |
|  |

  DynamicSparseMatrix() [1/3]
---------------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_DEPRECATED [Eigen::DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix)< \_Scalar, \_Options, \_StorageIndex >::[DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix) | ( |  | ) |  |

 | inline |

 
 The class [DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix "A sparse matrix class designed for matrix assembly purpose.") is deprecated 

    DynamicSparseMatrix() [2/3]
---------------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| EIGEN\_DEPRECATED [Eigen::DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix)< \_Scalar, \_Options, \_StorageIndex >::[DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix) | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols* |
|  | ) |  |  |

 | inline |

 
 The class [DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix "A sparse matrix class designed for matrix assembly purpose.") is deprecated 

    DynamicSparseMatrix() [3/3]
---------------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >   template<typename OtherDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_DEPRECATED [Eigen::DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix)< \_Scalar, \_Options, \_StorageIndex >::[DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix) | ( | const [SparseMatrixBase](../classeigen_1_1sparsematrixbase)< OtherDerived > &  | *other* | ) |  |

 | inlineexplicit |

 
 The class [DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix "A sparse matrix class designed for matrix assembly purpose.") is deprecated 

    ~DynamicSparseMatrix()
----------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix)< \_Scalar, \_Options, \_StorageIndex >::~[DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix) | ( |  | ) |  |

 | inline |

 
 Destructor 

    coeff()
-------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Scalar [Eigen::DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix)< \_Scalar, \_Options, \_StorageIndex >::coeff  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *row*,  |
|  |  | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *col* |
|  | ) |  |  const |

 | inline |

 
 
Returns
the coefficient value at given position *row*, *col* This operation involes a log(rho\*outer\_size) binary search. 
    coeffRef()
----------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Scalar& [Eigen::DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix)< \_Scalar, \_Options, \_StorageIndex >::coeffRef  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *row*,  |
|  |  | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *col* |
|  | ) |  |  |

 | inline |

 
 
Returns
a reference to the coefficient value at given position *row*, *col* This operation involes a log(rho\*outer\_size) binary search. If the coefficient does not exist yet, then a sorted insertion into a sequential buffer is performed. 
    endFill()
---------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_DEPRECATED void [Eigen::DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix)< \_Scalar, \_Options, \_StorageIndex >::endFill  | ( |  | ) |  |

 | inline |

 
 
**[Deprecated:](deprecated#_deprecated000005)**
use [finalize()](classeigen_1_1dynamicsparsematrix#aa0abc0e4565143f103f0d7373bd4a125) Does nothing. Provided for compatibility with [SparseMatrix](../classeigen_1_1sparsematrix). 
    fill()
------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| EIGEN\_DEPRECATED Scalar& [Eigen::DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix)< \_Scalar, \_Options, \_StorageIndex >::fill  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *row*,  |
|  |  | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *col* |
|  | ) |  |  |

 | inline |

 
 
**[Deprecated:](deprecated#_deprecated000003)**
use insert() inserts a nonzero coefficient at given coordinates *row*, *col* and returns its reference assuming that: 1 - the coefficient does not exist yet 2 - this the coefficient with greater inner coordinate for the given outer coordinate. In other words, assuming `*this` is column-major, then there must not exists any nonzero coefficient of coordinates `i` `x` *col* such that `i` >= *row*. Otherwise the matrix is invalid.
 
See also

[fillrand()](classeigen_1_1dynamicsparsematrix#a6a5eb3c9d153d8ebdf4e0967321108e2), [coeffRef()](classeigen_1_1dynamicsparsematrix#a17093cd39bd0e6ebd6250bc5feb61a0f) 
    fillrand()
----------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| EIGEN\_DEPRECATED Scalar& [Eigen::DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix)< \_Scalar, \_Options, \_StorageIndex >::fillrand  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *row*,  |
|  |  | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *col* |
|  | ) |  |  |

 | inline |

 
 
**[Deprecated:](deprecated#_deprecated000004)**
use insert() Like [fill()](classeigen_1_1dynamicsparsematrix#a70c8f529b38fd5b7d93d6dfe1a122723) but with random inner coordinates. Compared to the generic [coeffRef()](classeigen_1_1dynamicsparsematrix#a17093cd39bd0e6ebd6250bc5feb61a0f), the unique limitation is that we assume the coefficient does not exist yet. 
    finalize()
----------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix)< \_Scalar, \_Options, \_StorageIndex >::finalize  | ( |  | ) |  |

 | inline |

 
 Does nothing: provided for compatibility with [SparseMatrix](../classeigen_1_1sparsematrix) 

    insertBack()
------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Scalar& [Eigen::DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix)< \_Scalar, \_Options, \_StorageIndex >::insertBack  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *row*,  |
|  |  | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *col* |
|  | ) |  |  |

 | inline |

 
 
Returns
a reference to the non zero coefficient at position *row*, *col* assuming that:* the nonzero does not already exist
* the new coefficient is the last one of the given inner vector.

 
 
See also
insert, [insertBackByOuterInner](classeigen_1_1dynamicsparsematrix#ac97c2463058ae55d7f0ef21c851eb5f3) 
    insertBackByOuterInner()
------------------------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Scalar& [Eigen::DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix)< \_Scalar, \_Options, \_StorageIndex >::insertBackByOuterInner  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *outer*,  |
|  |  | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *inner* |
|  | ) |  |  |

 | inline |

 
 
See also

[insertBack](classeigen_1_1dynamicsparsematrix#a0a556652195b91c09e9f6c4d8b7cc81d) 
    nonZeros()
----------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix)< \_Scalar, \_Options, \_StorageIndex >::nonZeros  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of non zero coefficients 
    prune()
-------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix)< \_Scalar, \_Options, \_StorageIndex >::prune  | ( | Scalar  | *reference*,  |
|  |  | RealScalar  | *epsilon* = `[NumTraits](../structeigen_1_1numtraits)<RealScalar>::dummy_precision()` |
|  | ) |  |  |

 | inline |

 
 Suppress all nonzeros which are smaller than *reference* under the tolerance *epsilon* 

    resize()
--------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix)< \_Scalar, \_Options, \_StorageIndex >::resize  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *rows*,  |
|  |  | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *cols* |
|  | ) |  |  |

 | inline |

 
 Resize the matrix without preserving the data (the matrix is set to zero) 

    startFill()
-----------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| EIGEN\_DEPRECATED void [Eigen::DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix)< \_Scalar, \_Options, \_StorageIndex >::startFill  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *reserveSize* = `1000` | ) |  |

 | inline |

 
 
**[Deprecated:](deprecated#_deprecated000002)**
Set the matrix to zero and reserve the memory for *reserveSize* nonzero coefficients. 
    startVec()
----------

    template<typename \_Scalar , int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::DynamicSparseMatrix](classeigen_1_1dynamicsparsematrix)< \_Scalar, \_Options, \_StorageIndex >::startVec  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) |  | ) |  |

 | inline |

 
 Does nothing: provided for compatibility with [SparseMatrix](../classeigen_1_1sparsematrix) 

   

---

The documentation for this class was generated from the following file:* [DynamicSparseMatrix.h](https://eigen.tuxfamily.org/dox/unsupported/DynamicSparseMatrix_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1DynamicSparseMatrix.html>

Eigen::KroneckerProductSparse
=============================

  
### template<typename Lhs, typename Rhs> class Eigen::KroneckerProductSparse< Lhs, Rhs >

 Kronecker tensor product helper class for sparse matrices. 

 If at least one of the operands is a sparse matrix expression, then this class is returned and evaluates into a sparse matrix.

 This class is the return value of kroneckerProduct([EigenBase](../structeigen_1_1eigenbase), [EigenBase](../structeigen_1_1eigenbase)). Use the function rather than construct this class directly to avoid specifying template prarameters.

 
Template Parameters
 

|  |  |
| --- | --- |
| Lhs | Type of the left-hand side, a matrix expression.  |
| Rhs | Type of the rignt-hand side, a matrix expression.  |

       ![Inheritance graph]      

|  |
| --- |
|  |
|  template<typename Dest >  |
| void  | [evalTo](classeigen_1_1kroneckerproductsparse#a8b7269c23294765e0965b70b5af2557b) (Dest &dst) const |
|  | Evaluate the Kronecker tensor product.  |
|  |
|  | [KroneckerProductSparse](classeigen_1_1kroneckerproductsparse#ac0a69ba844415fbe79e6514f32b41fb5) (const Lhs &A, const Rhs &B) |
|  | Constructor.  |
|  |
| - Public Member Functions inherited from [Eigen::KroneckerProductBase< KroneckerProductSparse< Lhs, Rhs > >](classeigen_1_1kroneckerproductbase) |
| Scalar  | [coeff](classeigen_1_1kroneckerproductbase#a673348e7d9d2a4570aa0bcac33507f7b) ([Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) i) const |
|  |
| Scalar  | [coeff](classeigen_1_1kroneckerproductbase#a0b302d4e55f5a58955e6c645d066928f) ([Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) row, [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) col) const |
|  |
|  | [KroneckerProductBase](classeigen_1_1kroneckerproductbase#a0cb05eaa978b9fdc0285b48a6e0ecfb1) (const Lhs &A, const Rhs &B) |
|  | Constructor.  |
|  |

 

---

The documentation for this class was generated from the following file:* [KroneckerTensorProduct.h](https://eigen.tuxfamily.org/dox/unsupported/KroneckerTensorProduct_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1KroneckerProductSparse.html>

Eigen::MatrixMarketIterator
===========================

  
### template<typename Scalar> class Eigen::MatrixMarketIterator< Scalar >

 Iterator to browse matrices from a specified folder. 

 This is used to load all the matrices from a folder. The matrices should be in [Matrix](../classeigen_1_1matrix) Market format It is assumed that the matrices are named as matname.mtx and matname\_SPD.mtx if the matrix is Symmetric and positive definite (or Hermitian) The right hand side vectors are loaded as well, if they exist. They should be named as matname\_b.mtx. Note that the right hand side for a SPD matrix is named as matname\_SPD\_b.mtx

 Sometimes a reference solution is available. In this case, it should be named as matname\_x.mtx

 Sample code 




Template Parameters
 

|  |  |
| --- | --- |
| Scalar | The scalar type  |

   


|  |
| --- |
|  |
| [MatrixType](../classeigen_1_1sparsematrix) &  | [matrix](classeigen_1_1matrixmarketiterator#ac938961d685306ef5b48d9943f7dcabd) () |
|  |
| [VectorType](../classeigen_1_1matrix) &  | [refX](classeigen_1_1matrixmarketiterator#a80f334d9fbbed0d24ba0c32d2bea16bc) () |
|  |
| [VectorType](../classeigen_1_1matrix) &  | [rhs](classeigen_1_1matrixmarketiterator#ac141e537f3bc3a3c078a2780a6a956b6) () |
|  |

  matrix()
--------

    template<typename Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [MatrixType](../classeigen_1_1sparsematrix)& [Eigen::MatrixMarketIterator](classeigen_1_1matrixmarketiterator)< Scalar >::matrix  | ( |  | ) |  |

 | inline |

 
 Return the sparse matrix corresponding to the current file 

    refX()
------

    template<typename Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [VectorType](../classeigen_1_1matrix)& [Eigen::MatrixMarketIterator](classeigen_1_1matrixmarketiterator)< Scalar >::refX  | ( |  | ) |  |

 | inline |

 
 Return a reference solution If it is not provided and if the right hand side is not available then refX is randomly generated such that A\*refX = b where A and b are the matrix and the rhs. Note that when a rhs is provided, refX is not available 

    rhs()
-----

    template<typename Scalar >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [VectorType](../classeigen_1_1matrix)& [Eigen::MatrixMarketIterator](classeigen_1_1matrixmarketiterator)< Scalar >::rhs  | ( |  | ) |  |

 | inline |

 
 Return the right hand side corresponding to the current matrix. If the rhs file is not provided, a random rhs is generated 

   

---

The documentation for this class was generated from the following file:* [MatrixMarketIterator.h](https://eigen.tuxfamily.org/dox/unsupported/MatrixMarketIterator_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1MatrixMarketIterator.html>

Eigen::MINRES
=============

  
### template<typename \_MatrixType, int \_UpLo, typename \_Preconditioner> class Eigen::MINRES< \_MatrixType, \_UpLo, \_Preconditioner >

 A minimal residual solver for sparse symmetric problems. 

 This class allows to solve for A.x = b sparse linear problems using the [MINRES](classeigen_1_1minres "A minimal residual solver for sparse symmetric problems.") algorithm of Paige and Saunders (1975). The sparse matrix A must be symmetric (possibly indefinite). The vectors x and b can be either dense or sparse.

 
Template Parameters
 

|  |  |
| --- | --- |
| \_MatrixType | the type of the sparse matrix A, can be a dense or a sparse matrix.  |
| \_UpLo | the triangular part that will be used for the computations. It can be Lower, Upper, or Lower|Upper in which the full matrix entries will be considered. Default is Lower.  |
| \_Preconditioner | the type of the preconditioner. Default is [DiagonalPreconditioner](../classeigen_1_1diagonalpreconditioner) |

   The maximal number of iterations and tolerance value can be controlled via the [setMaxIterations()](../classeigen_1_1iterativesolverbase#af83de7a7d31d9d4bd1fef6222b07335b) and [setTolerance()](../classeigen_1_1iterativesolverbase#ac160a444af8998f93da9aa30e858470d) methods. The defaults are the size of the problem for the maximal number of iterations and NumTraits<Scalar>::epsilon() for the tolerance.

 This class can be used as the direct solver classes. Here is a typical usage example: 



```
int n = 10000;
VectorXd x(n), b(n);
SparseMatrix<double> A(n,n);
// fill A and b
MINRES<SparseMatrix<double> > mr;
mr.compute(A);
x = mr.solve(b);
std::cout << "#iterations: " << mr.iterations() << std::endl;
std::cout << "estimated error: " << mr.error()      << std::endl;
// update b, and solve again
x = mr.solve(b);

```

By default the iterations start with x=0 as an initial guess of the solution. One can control the start using the [solveWithGuess()](../classeigen_1_1iterativesolverbase#adcc18d1ab283786dcbb5a3f63f4b4bd8) method.

 [MINRES](classeigen_1_1minres "A minimal residual solver for sparse symmetric problems.") can also be used in a matrix-free context, see the following [example](../group__matrixfreesolverexample) .

 
See also
class [ConjugateGradient](../classeigen_1_1conjugategradient), [BiCGSTAB](../classeigen_1_1bicgstab), [SimplicialCholesky](../classeigen_1_1simplicialcholesky), [DiagonalPreconditioner](../classeigen_1_1diagonalpreconditioner), [IdentityPreconditioner](../classeigen_1_1identitypreconditioner) 
     ![Inheritance graph]       

|  |
| --- |
|  |
|  | [MINRES](classeigen_1_1minres#aa519021be1178a99f5f9ec633de9fc09) () |
|  |
| template<typename MatrixDerived >  |
|  | [MINRES](classeigen_1_1minres#a971bc758d11d1795d9e0abd3c958030b) (const [EigenBase](../structeigen_1_1eigenbase)< MatrixDerived > &A) |
|  |
|  | [~MINRES](classeigen_1_1minres#a3f40ba58caac8b10ae7df474af93a05b) () |
|  |

  MINRES() [1/2]
--------------

    template<typename \_MatrixType , int \_UpLo, typename \_Preconditioner >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::MINRES](classeigen_1_1minres)< \_MatrixType, \_UpLo, \_Preconditioner >::[MINRES](classeigen_1_1minres) | ( |  | ) |  |

 | inline |

 
 Default constructor. 

    MINRES() [2/2]
--------------

    template<typename \_MatrixType , int \_UpLo, typename \_Preconditioner >   template<typename MatrixDerived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::MINRES](classeigen_1_1minres)< \_MatrixType, \_UpLo, \_Preconditioner >::[MINRES](classeigen_1_1minres) | ( | const [EigenBase](../structeigen_1_1eigenbase)< MatrixDerived > &  | *A* | ) |  |

 | inlineexplicit |

 
 Initialize the solver with matrix *A* for further `Ax=b` solving.

 This constructor is a shortcut for the default constructor followed by a call to [compute()](../classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914).

 
Warning
this class stores a reference to the matrix A as well as some precomputed values that depend on it. Therefore, if *A* is changed this class becomes invalid. Call [compute()](../classeigen_1_1iterativesolverbase#a7dfa55c55e82d697bde227696a630914) to update it with the new matrix A, or modify a copy of A. 
    ~MINRES()
---------

    template<typename \_MatrixType , int \_UpLo, typename \_Preconditioner >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::MINRES](classeigen_1_1minres)< \_MatrixType, \_UpLo, \_Preconditioner >::~[MINRES](classeigen_1_1minres) | ( |  | ) |  |

 | inline |

 
 Destructor. 

   

---

The documentation for this class was generated from the following file:* [MINRES.h](https://eigen.tuxfamily.org/dox/unsupported/MINRES_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1MINRES.html>

Eigen::NumericalDiff
====================

  
### template<typename \_Functor, NumericalDiffMode mode = Forward> class Eigen::NumericalDiff< \_Functor, mode >

 This class allows you to add a method [df()](classeigen_1_1numericaldiff#a8fc63f1c3307cc6e61dc4d70c57b5037) to your functor, which will use numerical differentiation to compute an approximate of the derivative for the functor. Of course, if you have an analytical form for the derivative, you should rather implement [df()](classeigen_1_1numericaldiff#a8fc63f1c3307cc6e61dc4d70c57b5037) by yourself.

 More information on <http://en.wikipedia.org/wiki/Numerical_differentiation>

 Currently only "Forward" and "Central" scheme are implemented. 

  Inherits \_Functor.

 

|  |
| --- |
|  |
| int  | [df](classeigen_1_1numericaldiff#a8fc63f1c3307cc6e61dc4d70c57b5037) (const InputType &\_x, JacobianType &jac) const |
|  |

  df()
----

    template<typename \_Functor , NumericalDiffMode mode = Forward>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| int [Eigen::NumericalDiff](classeigen_1_1numericaldiff)< \_Functor, mode >::df  | ( | const InputType &  | *\_x*,  |
|  |  | JacobianType &  | *jac* |
|  | ) |  |  const |

 | inline |

 
 return the number of evaluation of functor 

   

---

The documentation for this class was generated from the following file:* [NumericalDiff.h](https://eigen.tuxfamily.org/dox/unsupported/NumericalDiff_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1NumericalDiff.html>

Eigen::NumTraits
================

  

```
\defgroup MPRealSupport_Module MPFRC++ Support module
\code
#include <Eigen/MPRealSupport>
\endcode

This module provides support for multi precision floating point numbers
via the <a href="http://www.holoborodko.com/pavel/mpfr">MPFR C++</a>
library which itself is built upon <a href="http://www.mpfr.org/">MPFR</a>/<a href="http://gmplib.org/">GMP</a>.

\warning MPFR C++ is licensed under the GPL.

You can find a copy of MPFR C++ that is known to be compatible in the unsupported/test/mpreal folder.

Here is an example:

```
 
```
#include <iostream>
#include <Eigen/MPRealSupport>
#include <Eigen/LU>
using namespace mpfr;
using namespace [Eigen](namespaceeigen);
int main()
{
  // set precision to 256 bits (double has only 53 bits)
  mpreal::set_default_prec(256);
  // Declare matrix and vector types with multi-precision scalar type
  typedef Matrix<mpreal,Dynamic,Dynamic>  MatrixXmp;
  typedef Matrix<mpreal,Dynamic,1>        VectorXmp;
 
  MatrixXmp A = MatrixXmp::Random(100,100);
  VectorXmp b = VectorXmp::Random(100);
 
  // Solve Ax=b using LU
  VectorXmp x = A.lu().solve(b);
  std::cout << "relative error: " << (A*x - b).norm() / b.norm() << std::endl;
  return 0;
}
```
  Inherits GenericNumTraits< mpfr::mpreal >.

 

---

The documentation for this struct was generated from the following file:* MPRealSupport

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/structEigen_1_1NumTraits_3_01mpfr_1_1mpreal_01_4.html>

Eigen::SGroup
=============

  
### template<typename... Gen> class Eigen::SGroup< Gen >

 Symmetry group, initialized from template arguments. 

 This class represents a symmetry group whose generators are already known at compile time. It may or may not be resolved at compile time, depending on the estimated size of the group.

 
See also

[StaticSGroup](classeigen_1_1staticsgroup "Static symmetry group.")   [DynamicSGroup](classeigen_1_1dynamicsgroup "Dynamic symmetry group.") 
  Inherits internal::tensor\_symmetry\_pre\_analysis::root\_type.

 

---

The documentation for this class was generated from the following file:* [Symmetry.h](https://eigen.tuxfamily.org/dox/unsupported/Symmetry_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1SGroup.html>

Eigen::BlockSparseMatrix
========================

  
### template<typename \_Scalar, int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex> class Eigen::BlockSparseMatrix< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >

 A versatile sparse matrix representation where each element is a block. 

 This class provides routines to manipulate block sparse matrices stored in a BSR-like representation. There are two main types :

 1. All blocks have the same number of rows and columns, called block size in the following. In this case, if this block size is known at compile time, it can be given as a template parameter like 
```
BlockSparseMatrix<Scalar, 3, ColMajor> bmat(b_rows, b_cols);

```
 Here, bmat is a b\_rows x b\_cols block sparse matrix where each coefficient is a 3x3 dense matrix. If the block size is fixed but will be given at runtime, 
```
BlockSparseMatrix<Scalar, Dynamic, ColMajor> bmat(b_rows, b_cols);
bmat.setBlockSize(block_size);

```
2. The second case is for variable-block sparse matrices. Here each block has its own dimensions. The only restriction is that all the blocks in a row (resp. a column) should have the same number of rows (resp. of columns). It is thus required in this case to describe the layout of the matrix by calling setBlockLayout(rowBlocks, colBlocks).

 In any of the previous case, the matrix can be filled by calling [setFromTriplets()](classeigen_1_1blocksparsematrix#aa148b63f89555f4eed312638abe597eb "Fill values in a matrix from a triplet list."). A regular sparse matrix can be converted to a block sparse matrix and vice versa. It is obviously required to describe the block layout beforehand by calling either [setBlockSize()](classeigen_1_1blocksparsematrix#a1984d81fa41dc2f4e8f1208f602e7e45 "set the block size at runtime for fixed-size block layout") for fixed-size blocks or setBlockLayout for variable-size blocks.

 
Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | The Scalar type  |
| \_BlockAtCompileTime | The block layout option. It takes the following values Dynamic : block size known at runtime a numeric number : fixed-size block known at compile time  |

       ![Inheritance graph]       

|  |
| --- |
|  |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [blockCols](classeigen_1_1blocksparsematrix#a645eb7f708ca89383e0f3fabb30d9e92) () const |
|  |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [blockColsIndex](classeigen_1_1blocksparsematrix#a6310ee4a4aa6f3689eaed0395d0db35e) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) bj) const |
|  |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [blockPtr](classeigen_1_1blocksparsematrix#a16b8ee2d4e92d774bf286e6575fd8369) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) id) const |
|  |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [blockRows](classeigen_1_1blocksparsematrix#a5f4768ab4e48f7f81cd8a3697d3016e8) () const |
|  |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [blockRowsIndex](classeigen_1_1blocksparsematrix#ad43927292bc7b1e53cc98d4559838c96) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) bi) const |
|  |
|  | [BlockSparseMatrix](classeigen_1_1blocksparsematrix#a5d0b6ea10540a0968410daf3b1ff99e8) (const [BlockSparseMatrix](classeigen_1_1blocksparsematrix) &other) |
|  | Copy-constructor.  |
|  |
|  template<typename MatrixType >  |
|  | [BlockSparseMatrix](classeigen_1_1blocksparsematrix#a1d5e6091b3a85a872f10a02265c3c8c6) (const MatrixType &spmat) |
|  | Constructor from a sparse matrix.  |
|  |
|  | [BlockSparseMatrix](classeigen_1_1blocksparsematrix#a319d4ed434693fc09cdb7d71e090bbd8) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) brow, [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) bcol) |
|  | Construct and resize.  |
|  |
| [Map](../classeigen_1_1map)< const [BlockScalar](../classeigen_1_1matrix) >  | [coeff](classeigen_1_1blocksparsematrix#aa6f4ffb07a0ef2863e7a933676a46abf) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) brow, [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) bcol) const |
|  |
| [Ref](../classeigen_1_1ref)< [BlockScalar](../classeigen_1_1matrix) >  | [coeffRef](classeigen_1_1blocksparsematrix#af7d43390424f705f281c41a2c07db92f) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) brow, [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) bcol) |
|  |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1blocksparsematrix#aa689bd28af9a8176d1c793c075aa0a42) () const |
|  |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerToBlock](classeigen_1_1blocksparsematrix#a53fd11658531b86986cd2a5fb2ea3d3d) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) inner) const |
|  |
|  bool  | [isCompressed](classeigen_1_1blocksparsematrix#a3acfdd3edc02e4347402a8d343131b9e) () const |
|  | for compatibility purposes with the [SparseMatrix](../classeigen_1_1sparsematrix) class  |
|  |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1blocksparsematrix#a2c0d76392df6669fa66b592ef6b5618a) () const |
|  |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZerosBlocks](classeigen_1_1blocksparsematrix#a83d5af142c851196a2178bf9ec532d8c) () const |
|  |
| template<typename MatrixType >  |
| [BlockSparseMatrix](classeigen_1_1blocksparsematrix) &  | [operator=](classeigen_1_1blocksparsematrix#a5c5479fd38867538383e092a1d90db5a) (const MatrixType &spmat) |
|  | Assignment from a sparse matrix with the same storage order. [More...](classeigen_1_1blocksparsematrix#a5c5479fd38867538383e092a1d90db5a) |
|  |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerToBlock](classeigen_1_1blocksparsematrix#a9f83554f7b1309ac7ad88d19ef8d6339) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) outer) const |
|  |
| void  | [reserve](classeigen_1_1blocksparsematrix#a2e1814d2fb4d66320ce3ec97303d0648) (const [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) nonzerosblocks) |
|  | Allocate the internal array of pointers to blocks and their inner indices. [More...](classeigen_1_1blocksparsematrix#a2e1814d2fb4d66320ce3ec97303d0648) |
|  |
|  void  | [resize](classeigen_1_1blocksparsematrix#ae0b2c5f1f4aa7a2a54dea00bbcef8e0b) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) brow, [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) bcol) |
|  | Set the number of rows and columns blocks.  |
|  |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1blocksparsematrix#a89c2e0b48b6425c4828a794f4c654796) () const |
|  |
| void  | [setBlockLayout](classeigen_1_1blocksparsematrix#acad69e4bb5e747db973cacc75c2f4a4d) (const VectorXi &rowBlocks, const VectorXi &colBlocks) |
|  | Set the row and column block layouts,. [More...](classeigen_1_1blocksparsematrix#acad69e4bb5e747db973cacc75c2f4a4d) |
|  |
| void  | [setBlockSize](classeigen_1_1blocksparsematrix#a1984d81fa41dc2f4e8f1208f602e7e45) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) blockSize) |
|  | set the block size at runtime for fixed-size block layout [More...](classeigen_1_1blocksparsematrix#a1984d81fa41dc2f4e8f1208f602e7e45) |
|  |
| template<typename MatrixType >  |
| void  | [setBlockStructure](classeigen_1_1blocksparsematrix#a40891e477661e68bc870319d1379c7aa) (const MatrixType &blockPattern) |
|  | Set the nonzero block pattern of the matrix. [More...](classeigen_1_1blocksparsematrix#a40891e477661e68bc870319d1379c7aa) |
|  |
| template<typename InputIterator >  |
| void  | [setFromTriplets](classeigen_1_1blocksparsematrix#aa148b63f89555f4eed312638abe597eb) (const InputIterator &begin, const InputIterator &end) |
|  | Fill values in a matrix from a triplet list. [More...](classeigen_1_1blocksparsematrix#aa148b63f89555f4eed312638abe597eb) |
|  |

  blockCols()
-----------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::blockCols  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of columns grouped by blocks 
    blockColsIndex()
----------------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::blockColsIndex  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *bj* | ) |  const |

 | inline |

 
 
Returns
the starting index of the bj col block 
    blockPtr()
----------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::blockPtr  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *id* | ) |  const |

 | inline |

 
 
Returns
the starting position of the block `id` in the array of values 
    blockRows()
-----------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::blockRows  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of rows grouped by blocks 
    blockRowsIndex()
----------------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::blockRowsIndex  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *bi* | ) |  const |

 | inline |

 
 
Returns
the starting index of the bi row block 
    coeff()
-------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Map](../classeigen_1_1map)<const [BlockScalar](../classeigen_1_1matrix)> [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::coeff  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *brow*,  |
|  |  | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *bcol* |
|  | ) |  |  const |

 | inline |

 
 
Returns
the value of the (i,j) block as an [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") [Dense](../structeigen_1_1dense) [Matrix](../classeigen_1_1matrix) 
    coeffRef()
----------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Ref](../classeigen_1_1ref)<[BlockScalar](../classeigen_1_1matrix)> [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::coeffRef  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *brow*,  |
|  |  | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *bcol* |
|  | ) |  |  |

 | inline |

 
 
Returns
a reference to the (i,j) block as an [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") [Dense](../structeigen_1_1dense) [Matrix](../classeigen_1_1matrix) 
    cols()
------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::cols  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of cols 
    innerToBlock()
--------------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::innerToBlock  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *inner* | ) |  const |

 | inline |

 
 
Returns
the block index where inner belongs to 
    nonZeros()
----------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::nonZeros  | ( |  | ) |  const |

 | inline |

 
 
Returns
the total number of nonzero elements, including eventual explicit zeros in blocks 
    nonZerosBlocks()
----------------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::nonZerosBlocks  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of nonzero blocks 
    operator=()
-----------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >   template<typename MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [BlockSparseMatrix](classeigen_1_1blocksparsematrix)& [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::operator=  | ( | const MatrixType &  | *spmat* | ) |  |

 | inline |

 
 Assignment from a sparse matrix with the same storage order. 

 Convert from a sparse matrix to block sparse matrix. 



Warning
Before calling this function, tt is necessary to call either [setBlockLayout()](classeigen_1_1blocksparsematrix#acad69e4bb5e747db973cacc75c2f4a4d "Set the row and column block layouts,.") (matrices with variable-size blocks) or [setBlockSize()](classeigen_1_1blocksparsematrix#a1984d81fa41dc2f4e8f1208f602e7e45 "set the block size at runtime for fixed-size block layout") (for fixed-size blocks). 
    outerToBlock()
--------------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::outerToBlock  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *outer* | ) |  const |

 | inline |

 
 
Returns
the block index where outer belongs to 
    reserve()
---------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::reserve  | ( | const [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *nonzerosblocks* | ) |  |

 | inline |

 
 Allocate the internal array of pointers to blocks and their inner indices. 

 
Note
For fixed-size blocks, call [setBlockSize()](classeigen_1_1blocksparsematrix#a1984d81fa41dc2f4e8f1208f602e7e45 "set the block size at runtime for fixed-size block layout") to set the block. And For variable-size blocks, call [setBlockLayout()](classeigen_1_1blocksparsematrix#acad69e4bb5e747db973cacc75c2f4a4d "Set the row and column block layouts,.") before using this function
 
Parameters
 

|  |  |
| --- | --- |
| nonzerosblocks | Number of nonzero blocks. The total number of nonzeros is is computed in [setBlockLayout()](classeigen_1_1blocksparsematrix#acad69e4bb5e747db973cacc75c2f4a4d "Set the row and column block layouts,.") for variable-size blocks  |

   
See also

[setBlockSize()](classeigen_1_1blocksparsematrix#a1984d81fa41dc2f4e8f1208f602e7e45 "set the block size at runtime for fixed-size block layout") 
    rows()
------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::rows  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of rows 
    setBlockLayout()
----------------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::setBlockLayout  | ( | const VectorXi &  | *rowBlocks*,  |
|  |  | const VectorXi &  | *colBlocks* |
|  | ) |  |  |

 | inline |

 
 Set the row and column block layouts,. 

 This function set the size of each row and column block. So this function should be used only for blocks with variable size. 



Parameters
 

|  |  |
| --- | --- |
| rowBlocks | : Number of rows per row block  |
| colBlocks | : Number of columns per column block  |

   
See also

[resize()](classeigen_1_1blocksparsematrix#ae0b2c5f1f4aa7a2a54dea00bbcef8e0b "Set the number of rows and columns blocks."), [setBlockSize()](classeigen_1_1blocksparsematrix#a1984d81fa41dc2f4e8f1208f602e7e45 "set the block size at runtime for fixed-size block layout") 
    setBlockSize()
--------------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::setBlockSize  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *blockSize* | ) |  |

 | inline |

 
 set the block size at runtime for fixed-size block layout 

 Call this only for fixed-size blocks 

    setBlockStructure()
-------------------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >   template<typename MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::setBlockStructure  | ( | const MatrixType &  | *blockPattern* | ) |  |

 | inline |

 
 Set the nonzero block pattern of the matrix. 

 Given a sparse matrix describing the nonzero block pattern, this function prepares the internal pointers for values. After calling this function, any *nonzero* block (bi, bj) can be set with a simple call to coeffRef(bi,bj).

 
Warning
Before calling this function, tt is necessary to call either [setBlockLayout()](classeigen_1_1blocksparsematrix#acad69e4bb5e747db973cacc75c2f4a4d "Set the row and column block layouts,.") (matrices with variable-size blocks) or [setBlockSize()](classeigen_1_1blocksparsematrix#a1984d81fa41dc2f4e8f1208f602e7e45 "set the block size at runtime for fixed-size block layout") (for fixed-size blocks).
 
Parameters
 

|  |  |
| --- | --- |
| blockPattern | [Sparse](../structeigen_1_1sparse) matrix of boolean elements describing the block structure |

   
See also

[setBlockLayout()](classeigen_1_1blocksparsematrix#acad69e4bb5e747db973cacc75c2f4a4d "Set the row and column block layouts,.")   [setBlockSize()](classeigen_1_1blocksparsematrix#a1984d81fa41dc2f4e8f1208f602e7e45 "set the block size at runtime for fixed-size block layout") 
    setFromTriplets()
-----------------

    template<typename \_Scalar , int \_BlockAtCompileTime, int \_Options, typename \_StorageIndex >   template<typename InputIterator >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::BlockSparseMatrix](classeigen_1_1blocksparsematrix)< \_Scalar, \_BlockAtCompileTime, \_Options, \_StorageIndex >::setFromTriplets  | ( | const InputIterator &  | *begin*,  |
|  |  | const InputIterator &  | *end* |
|  | ) |  |  |

 | inline |

 
 Fill values in a matrix from a triplet list. 

 Each triplet item has a block stored in an [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") dense matrix. The InputIterator class should provide the functions row(), col() and value()

 
Note
For fixed-size blocks, call [setBlockSize()](classeigen_1_1blocksparsematrix#a1984d81fa41dc2f4e8f1208f602e7e45 "set the block size at runtime for fixed-size block layout") before this function.
 FIXME Do not accept duplicates 

   

---

The documentation for this class was generated from the following file:* [BlockSparseMatrix.h](https://eigen.tuxfamily.org/dox/unsupported/BlockSparseMatrix_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1BlockSparseMatrix.html>

Eigen::PolynomialSolver
=======================

  
### template<typename \_Scalar, int \_Deg> class Eigen::PolynomialSolver< \_Scalar, \_Deg >

 A polynomial solver. 

 Computes the complex roots of a real polynomial.

 
Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the scalar type, i.e., the type of the polynomial coefficients  |
| \_Deg | the degree of the polynomial, can be a compile time value or Dynamic. Notice that the number of polynomial coefficients is \_Deg+1. |

   This class implements a polynomial solver and provides convenient methods such as


* real roots,
* greatest, smallest complex roots,
* real roots with greatest, smallest absolute real value.
* greatest, smallest real roots.

 WARNING: this polynomial solver is experimental, part of the unsupported [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") modules.

 Currently a QR algorithm is used to compute the eigenvalues of the companion matrix of the polynomial to compute its roots. This supposes that the complex moduli of the roots are all distinct: e.g. there should be no multiple roots or conjugate roots for instance. With 32bit (float) floating types this problem shows up frequently. However, almost always, correct accuracy is reached even in these cases for 64bit (double) floating types and small polynomial degree (<20). 

     ![Inheritance graph]      

|  |
| --- |
|  |
| template<typename OtherPolynomial >  |
| void  | [compute](classeigen_1_1polynomialsolver#ac3ceae48528f3798d44c15a025cb03b8) (const OtherPolynomial &poly) |
|  |
| - Public Member Functions inherited from [Eigen::PolynomialSolverBase< \_Scalar, \_Deg >](classeigen_1_1polynomialsolverbase) |
| const RealScalar &  | [absGreatestRealRoot](classeigen_1_1polynomialsolverbase#aa2f003d9662af8c776f1a1c12a9d4210) (bool &hasArealRoot, const RealScalar &absImaginaryThreshold=[NumTraits](../structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| const RealScalar &  | [absSmallestRealRoot](classeigen_1_1polynomialsolverbase#a9316eeb24076bcd4f60ea4d7f3e549eb) (bool &hasArealRoot, const RealScalar &absImaginaryThreshold=[NumTraits](../structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| const RealScalar &  | [greatestRealRoot](classeigen_1_1polynomialsolverbase#a5094b7ccc49918b7c7ae9e2a8c49d4bd) (bool &hasArealRoot, const RealScalar &absImaginaryThreshold=[NumTraits](../structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| const RootType &  | [greatestRoot](classeigen_1_1polynomialsolverbase#a0327769cc88877a79c7c838f03d78384) () const |
|  |
| template<typename Stl\_back\_insertion\_sequence >  |
| void  | [realRoots](classeigen_1_1polynomialsolverbase#a4ea3b29499623832a0ad7b2b3ab05597) (Stl\_back\_insertion\_sequence &bi\_seq, const RealScalar &absImaginaryThreshold=[NumTraits](../structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| const [RootsType](../classeigen_1_1matrix) &  | [roots](classeigen_1_1polynomialsolverbase#a07bcd5339be5eacdf7e566d07d81bedb) () const |
|  |
| const RealScalar &  | [smallestRealRoot](classeigen_1_1polynomialsolverbase#a24b054cdf82a8e9409bea47c3c05c756) (bool &hasArealRoot, const RealScalar &absImaginaryThreshold=[NumTraits](../structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| const RootType &  | [smallestRoot](classeigen_1_1polynomialsolverbase#a64389d0acf586c772fb3d1db47a3f7ef) () const |
|  |

  compute()
---------

    template<typename \_Scalar , int \_Deg>   template<typename OtherPolynomial >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::PolynomialSolver](classeigen_1_1polynomialsolver)< \_Scalar, \_Deg >::compute  | ( | const OtherPolynomial &  | *poly* | ) |  |

 | inline |

 
 Computes the complex roots of a new polynomial. 

   

---

The documentation for this class was generated from the following file:* [PolynomialSolver.h](https://eigen.tuxfamily.org/dox/unsupported/PolynomialSolver_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1PolynomialSolver.html>

Eigen::PolynomialSolverBase
===========================

  
### template<typename \_Scalar, int \_Deg> class Eigen::PolynomialSolverBase< \_Scalar, \_Deg >

 Defined to be inherited by polynomial solvers: it provides convenient methods such as. 

 * real roots,
* greatest, smallest complex roots,
* real roots with greatest, smallest absolute real value,
* greatest, smallest real roots.

 It stores the set of roots as a vector of complexes. 

     ![Inheritance graph]      

|  |
| --- |
|  |
| const RealScalar &  | [absGreatestRealRoot](classeigen_1_1polynomialsolverbase#aa2f003d9662af8c776f1a1c12a9d4210) (bool &hasArealRoot, const RealScalar &absImaginaryThreshold=[NumTraits](../structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| const RealScalar &  | [absSmallestRealRoot](classeigen_1_1polynomialsolverbase#a9316eeb24076bcd4f60ea4d7f3e549eb) (bool &hasArealRoot, const RealScalar &absImaginaryThreshold=[NumTraits](../structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| const RealScalar &  | [greatestRealRoot](classeigen_1_1polynomialsolverbase#a5094b7ccc49918b7c7ae9e2a8c49d4bd) (bool &hasArealRoot, const RealScalar &absImaginaryThreshold=[NumTraits](../structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| const RootType &  | [greatestRoot](classeigen_1_1polynomialsolverbase#a0327769cc88877a79c7c838f03d78384) () const |
|  |
| template<typename Stl\_back\_insertion\_sequence >  |
| void  | [realRoots](classeigen_1_1polynomialsolverbase#a4ea3b29499623832a0ad7b2b3ab05597) (Stl\_back\_insertion\_sequence &bi\_seq, const RealScalar &absImaginaryThreshold=[NumTraits](../structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| const [RootsType](../classeigen_1_1matrix) &  | [roots](classeigen_1_1polynomialsolverbase#a07bcd5339be5eacdf7e566d07d81bedb) () const |
|  |
| const RealScalar &  | [smallestRealRoot](classeigen_1_1polynomialsolverbase#a24b054cdf82a8e9409bea47c3c05c756) (bool &hasArealRoot, const RealScalar &absImaginaryThreshold=[NumTraits](../structeigen_1_1numtraits)< Scalar >::dummy\_precision()) const |
|  |
| const RootType &  | [smallestRoot](classeigen_1_1polynomialsolverbase#a64389d0acf586c772fb3d1db47a3f7ef) () const |
|  |

  absGreatestRealRoot()
---------------------

    template<typename \_Scalar , int \_Deg>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const RealScalar& [Eigen::PolynomialSolverBase](classeigen_1_1polynomialsolverbase)< \_Scalar, \_Deg >::absGreatestRealRoot  | ( | bool &  | *hasArealRoot*,  |
|  |  | const RealScalar &  | *absImaginaryThreshold* = `[NumTraits](../structeigen_1_1numtraits)<Scalar>::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 
Returns
a real root with greatest absolute magnitude. A real root is defined as the real part of a complex root with absolute imaginary part smallest than absImaginaryThreshold. absImaginaryThreshold takes the dummy\_precision associated with the \_Scalar template parameter of the [PolynomialSolver](classeigen_1_1polynomialsolver "A polynomial solver.") class as the default value. If no real root is found the boolean hasArealRoot is set to false and the real part of the root with smallest absolute imaginary part is returned instead.
 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [out] | hasArealRoot | : boolean true if a real root is found according to the absImaginaryThreshold criterion, false otherwise.  |
| [in] | absImaginaryThreshold | : threshold on the absolute imaginary part to decide whether or not a root is real.  |

      absSmallestRealRoot()
---------------------

    template<typename \_Scalar , int \_Deg>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const RealScalar& [Eigen::PolynomialSolverBase](classeigen_1_1polynomialsolverbase)< \_Scalar, \_Deg >::absSmallestRealRoot  | ( | bool &  | *hasArealRoot*,  |
|  |  | const RealScalar &  | *absImaginaryThreshold* = `[NumTraits](../structeigen_1_1numtraits)<Scalar>::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 
Returns
a real root with smallest absolute magnitude. A real root is defined as the real part of a complex root with absolute imaginary part smallest than absImaginaryThreshold. absImaginaryThreshold takes the dummy\_precision associated with the \_Scalar template parameter of the [PolynomialSolver](classeigen_1_1polynomialsolver "A polynomial solver.") class as the default value. If no real root is found the boolean hasArealRoot is set to false and the real part of the root with smallest absolute imaginary part is returned instead.
 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [out] | hasArealRoot | : boolean true if a real root is found according to the absImaginaryThreshold criterion, false otherwise.  |
| [in] | absImaginaryThreshold | : threshold on the absolute imaginary part to decide whether or not a root is real.  |

      greatestRealRoot()
------------------

    template<typename \_Scalar , int \_Deg>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const RealScalar& [Eigen::PolynomialSolverBase](classeigen_1_1polynomialsolverbase)< \_Scalar, \_Deg >::greatestRealRoot  | ( | bool &  | *hasArealRoot*,  |
|  |  | const RealScalar &  | *absImaginaryThreshold* = `[NumTraits](../structeigen_1_1numtraits)<Scalar>::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 
Returns
the real root with greatest value. A real root is defined as the real part of a complex root with absolute imaginary part smallest than absImaginaryThreshold. absImaginaryThreshold takes the dummy\_precision associated with the \_Scalar template parameter of the [PolynomialSolver](classeigen_1_1polynomialsolver "A polynomial solver.") class as the default value. If no real root is found the boolean hasArealRoot is set to false and the real part of the root with smallest absolute imaginary part is returned instead.
 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [out] | hasArealRoot | : boolean true if a real root is found according to the absImaginaryThreshold criterion, false otherwise.  |
| [in] | absImaginaryThreshold | : threshold on the absolute imaginary part to decide whether or not a root is real.  |

      greatestRoot()
--------------

    template<typename \_Scalar , int \_Deg>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const RootType& [Eigen::PolynomialSolverBase](classeigen_1_1polynomialsolverbase)< \_Scalar, \_Deg >::greatestRoot  | ( |  | ) |  const |

 | inline |

 
 
Returns
the complex root with greatest norm. 
    realRoots()
-----------

    template<typename \_Scalar , int \_Deg>   template<typename Stl\_back\_insertion\_sequence >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::PolynomialSolverBase](classeigen_1_1polynomialsolverbase)< \_Scalar, \_Deg >::realRoots  | ( | Stl\_back\_insertion\_sequence &  | *bi\_seq*,  |
|  |  | const RealScalar &  | *absImaginaryThreshold* = `[NumTraits](../structeigen_1_1numtraits)<Scalar>::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 Clear and fills the back insertion sequence with the real roots of the polynomial i.e. the real part of the complex roots that have an imaginary part which absolute value is smaller than absImaginaryThreshold. absImaginaryThreshold takes the dummy\_precision associated with the \_Scalar template parameter of the [PolynomialSolver](classeigen_1_1polynomialsolver "A polynomial solver.") class as the default value.

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [out] | bi\_seq | : the back insertion sequence (stl concept)  |
| [in] | absImaginaryThreshold | : the maximum bound of the imaginary part of a complex number that is considered as real.  |

      roots()
-------

    template<typename \_Scalar , int \_Deg>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [RootsType](../classeigen_1_1matrix)& [Eigen::PolynomialSolverBase](classeigen_1_1polynomialsolverbase)< \_Scalar, \_Deg >::roots  | ( |  | ) |  const |

 | inline |

 
 
Returns
the complex roots of the polynomial 
    smallestRealRoot()
------------------

    template<typename \_Scalar , int \_Deg>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| const RealScalar& [Eigen::PolynomialSolverBase](classeigen_1_1polynomialsolverbase)< \_Scalar, \_Deg >::smallestRealRoot  | ( | bool &  | *hasArealRoot*,  |
|  |  | const RealScalar &  | *absImaginaryThreshold* = `[NumTraits](../structeigen_1_1numtraits)<Scalar>::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 
Returns
the real root with smallest value. A real root is defined as the real part of a complex root with absolute imaginary part smallest than absImaginaryThreshold. absImaginaryThreshold takes the dummy\_precision associated with the \_Scalar template parameter of the [PolynomialSolver](classeigen_1_1polynomialsolver "A polynomial solver.") class as the default value. If no real root is found the boolean hasArealRoot is set to false and the real part of the root with smallest absolute imaginary part is returned instead.
 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [out] | hasArealRoot | : boolean true if a real root is found according to the absImaginaryThreshold criterion, false otherwise.  |
| [in] | absImaginaryThreshold | : threshold on the absolute imaginary part to decide whether or not a root is real.  |

      smallestRoot()
--------------

    template<typename \_Scalar , int \_Deg>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const RootType& [Eigen::PolynomialSolverBase](classeigen_1_1polynomialsolverbase)< \_Scalar, \_Deg >::smallestRoot  | ( |  | ) |  const |

 | inline |

 
 
Returns
the complex root with smallest norm. 
   

---

The documentation for this class was generated from the following file:* [PolynomialSolver.h](https://eigen.tuxfamily.org/dox/unsupported/PolynomialSolver_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1PolynomialSolverBase.html>

Eigen::RandomSetter
===================

  
### template<typename SparseMatrixType, template< typename T > class MapTraits = StdMapTraits, int OuterPacketBits = 6> class Eigen::RandomSetter< SparseMatrixType, MapTraits, OuterPacketBits >

 The [RandomSetter](classeigen_1_1randomsetter "The RandomSetter is a wrapper object allowing to set/update a sparse matrix with random access.") is a wrapper object allowing to set/update a sparse matrix with random access. 

 
Template Parameters
 

|  |  |
| --- | --- |
| SparseMatrixType | the type of the sparse matrix we are updating  |
| MapTraits | a traits class representing the map implementation used for the temporary sparse storage. Its default value depends on the system.  |
| OuterPacketBits | defines the number of rows (or columns) manage by a single map object as a power of two exponent. |

   This class temporarily represents a sparse matrix object using a generic map implementation allowing for efficient random access. The conversion from the compressed representation to a hash\_map object is performed in the [RandomSetter](classeigen_1_1randomsetter "The RandomSetter is a wrapper object allowing to set/update a sparse matrix with random access.") constructor, while the sparse matrix is updated back at destruction time. This strategy suggest the use of nested blocks as in this example:

 
```
SparseMatrix<double> m(rows,cols);
{
  RandomSetter<SparseMatrix<double> > w(m);
  // don't use m but w instead with read/write random access to the coefficients:
  for(;;)
    w(rand(),rand()) = rand;
}
// when w is deleted, the data are copied back to m
// and m is ready to use.

```

Since hash\_map objects are not fully sorted, representing a full matrix as a single hash\_map would involve a big and costly sort to update the compressed matrix back. To overcome this issue, a [RandomSetter](classeigen_1_1randomsetter "The RandomSetter is a wrapper object allowing to set/update a sparse matrix with random access.") use multiple hash\_map, each representing 2^OuterPacketBits columns or rows according to the storage order. To reach optimal performance, this value should be adjusted according to the average number of nonzeros per rows/columns.

 The possible values for the template parameter MapTraits are:


* **[StdMapTraits](structeigen_1_1stdmaptraits):** corresponds to std::map. (does not perform very well)
* **GnuHashMapTraits:** corresponds to \_\_gnu\_cxx::hash\_map (available only with GCC)
* **GoogleDenseHashMapTraits:** corresponds to google::dense\_hash\_map (best efficiency, reasonable memory consumption)
* **GoogleSparseHashMapTraits:** corresponds to google::sparse\_hash\_map (best memory consumption, relatively good performance)

 The default map implementation depends on the availability, and the preferred order is: GoogleSparseHashMapTraits, GnuHashMapTraits, and finally [StdMapTraits](structeigen_1_1stdmaptraits).

 For performance and memory consumption reasons it is highly recommended to use one of Google's hash\_map implementations. To enable the support for them, you must define EIGEN\_GOOGLEHASH\_SUPPORT. This will include both <google/dense\_hash\_map> and <google/sparse\_hash\_map> for you.

 
See also

<https://github.com/sparsehash/sparsehash> 
 


|  |
| --- |
|  |
| [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | [nonZeros](classeigen_1_1randomsetter#ac34e5cd67e370641c3b48c8a91705046) () const |
|  |
| Scalar &  | [operator()](classeigen_1_1randomsetter#a77dcbbc964b42027e00af269a5147c68) ([Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) row, [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) col) |
|  |
|  | [RandomSetter](classeigen_1_1randomsetter#a62e960bd52cec62a59ebb285f381138f) (SparseMatrixType &target) |
|  |
|  | [~RandomSetter](classeigen_1_1randomsetter#a3e4a78672df59ab4dd2799919b431027) () |
|  |

  RandomSetter()
--------------

    template<typename SparseMatrixType , template< typename T > class MapTraits = StdMapTraits, int OuterPacketBits = 6>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::RandomSetter](classeigen_1_1randomsetter)< SparseMatrixType, MapTraits, OuterPacketBits >::[RandomSetter](classeigen_1_1randomsetter) | ( | SparseMatrixType &  | *target* | ) |  |

 | inline |

 
 Constructs a random setter object from the sparse matrix *target* 

 Note that the initial value of *target* are imported. If you want to re-set a sparse matrix from scratch, then you must set it to zero first using the setZero() function. 

    ~RandomSetter()
---------------

    template<typename SparseMatrixType , template< typename T > class MapTraits = StdMapTraits, int OuterPacketBits = 6>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::RandomSetter](classeigen_1_1randomsetter)< SparseMatrixType, MapTraits, OuterPacketBits >::~[RandomSetter](classeigen_1_1randomsetter) | ( |  | ) |  |

 | inline |

 
 Destructor updating back the sparse matrix target 

    nonZeros()
----------

    template<typename SparseMatrixType , template< typename T > class MapTraits = StdMapTraits, int OuterPacketBits = 6>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) [Eigen::RandomSetter](classeigen_1_1randomsetter)< SparseMatrixType, MapTraits, OuterPacketBits >::nonZeros  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of non zero coefficients
 
Note
According to the underlying map/hash\_map implementation, this function might be quite expensive. 
    operator()()
------------

    template<typename SparseMatrixType , template< typename T > class MapTraits = StdMapTraits, int OuterPacketBits = 6>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| Scalar& [Eigen::RandomSetter](classeigen_1_1randomsetter)< SparseMatrixType, MapTraits, OuterPacketBits >::operator()  | ( | [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *row*,  |
|  |  | [Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde) | *col* |
|  | ) |  |  |

 | inline |

 
 
Returns
a reference to the coefficient at given coordinates *row*, *col* 
   

---

The documentation for this class was generated from the following file:* [RandomSetter.h](https://eigen.tuxfamily.org/dox/unsupported/RandomSetter_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1RandomSetter.html>

Eigen::SkylineInplaceLU
=======================

  
### template<typename MatrixType> class Eigen::SkylineInplaceLU< MatrixType >

 Inplace LU decomposition of a skyline matrix and associated features. 

 
Parameters
 

|  |  |
| --- | --- |
| MatrixType | the type of the matrix of which we are computing the LU factorization  |

   


|  |
| --- |
|  |
| void  | [compute](classeigen_1_1skylineinplacelu#a590e9a988b2843712a29a541787e6c38) () |
|  |
| int  | [flags](classeigen_1_1skylineinplacelu#a5e491f7643c548ac81d3f4a7e432be19) () const |
|  |
| RealScalar  | [precision](classeigen_1_1skylineinplacelu#a050bcbe008f2ddeea4f6d5872e0daca5) () const |
|  |
| void  | [setFlags](classeigen_1_1skylineinplacelu#afd8013d183aaca495dfd10d819e61aaf) (int f) |
|  |
| void  | [setPrecision](classeigen_1_1skylineinplacelu#a1c057a7dec39b8b196d49d7d411ea999) (RealScalar v) |
|  |
|  | [SkylineInplaceLU](classeigen_1_1skylineinplacelu#ac76b9384281e73b86b80f770015cf436) (MatrixType &matrix, int [flags](classeigen_1_1skylineinplacelu#a5e491f7643c548ac81d3f4a7e432be19)=0) |
|  |
| template<typename BDerived , typename XDerived >  |
| bool  | [solve](classeigen_1_1skylineinplacelu#a53c846d76559221d2bcf336a2da4d68f) (const [MatrixBase](../classeigen_1_1matrixbase)< BDerived > &b, [MatrixBase](../classeigen_1_1matrixbase)< XDerived > \*x, const int transposed=0) const |
|  |
| bool  | [succeeded](classeigen_1_1skylineinplacelu#abd633c27a0a342fb392b6af3ceb800ba) (void) const |
|  |

  SkylineInplaceLU()
------------------

    template<typename MatrixType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::SkylineInplaceLU](classeigen_1_1skylineinplacelu)< MatrixType >::[SkylineInplaceLU](classeigen_1_1skylineinplacelu) | ( | MatrixType &  | *matrix*,  |
|  |  | int  | *flags* = `0` |
|  | ) |  |  |

 | inline |

 
 Creates a LU object and compute the respective factorization of *matrix* using flags *flags*. 

    compute()
---------

    template<typename MatrixType >  

|  |
| --- |
| void [Eigen::SkylineInplaceLU](classeigen_1_1skylineinplacelu)< MatrixType >::compute |

 
 Computes/re-computes the LU factorization

 Computes / recomputes the in place LU decomposition of the [SkylineInplaceLU](classeigen_1_1skylineinplacelu "Inplace LU decomposition of a skyline matrix and associated features."). using the default algorithm. 

    flags()
-------

    template<typename MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| int [Eigen::SkylineInplaceLU](classeigen_1_1skylineinplacelu)< MatrixType >::flags  | ( |  | ) |  const |

 | inline |

 
 
Returns
the current flags 
    precision()
-----------

    template<typename MatrixType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::SkylineInplaceLU](classeigen_1_1skylineinplacelu)< MatrixType >::precision  | ( |  | ) |  const |

 | inline |

 
 
Returns
the current precision.
 
See also

[setPrecision()](classeigen_1_1skylineinplacelu#a1c057a7dec39b8b196d49d7d411ea999) 
    setFlags()
----------

    template<typename MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SkylineInplaceLU](classeigen_1_1skylineinplacelu)< MatrixType >::setFlags  | ( | int  | *f* | ) |  |

 | inline |

 
 Sets the flags. Possible values are:


* CompleteFactorization
* IncompleteFactorization
* MemoryEfficient
* one of the ordering methods
* etc...

 
See also

[flags()](classeigen_1_1skylineinplacelu#a5e491f7643c548ac81d3f4a7e432be19) 
    setPrecision()
--------------

    template<typename MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::SkylineInplaceLU](classeigen_1_1skylineinplacelu)< MatrixType >::setPrecision  | ( | RealScalar  | *v* | ) |  |

 | inline |

 
 Sets the relative threshold value used to prune zero coefficients during the decomposition.

 Setting a value greater than zero speeds up computation, and yields to an incomplete factorization with fewer non zero coefficients. Such approximate factors are especially useful to initialize an iterative solver.

 Note that the exact meaning of this parameter might depends on the actual backend. Moreover, not all backends support this feature.

 
See also

[precision()](classeigen_1_1skylineinplacelu#a050bcbe008f2ddeea4f6d5872e0daca5) 
    solve()
-------

    template<typename MatrixType >   template<typename BDerived , typename XDerived >  

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::SkylineInplaceLU](classeigen_1_1skylineinplacelu)< MatrixType >::solve  | ( | const [MatrixBase](../classeigen_1_1matrixbase)< BDerived > &  | *b*,  |
|  |  | [MatrixBase](../classeigen_1_1matrixbase)< XDerived > \*  | *x*,  |
|  |  | const int  | *transposed* = `0` |
|  | ) |  |  const |

 
 
Returns
the lower triangular matrix L   the upper triangular matrix U
 Computes \*x = U^-1 L^-1 b

 If *transpose* is set to SvTranspose or SvAdjoint, the solution of the transposed/adjoint system is computed instead.

 Not all backends implement the solution of the transposed or adjoint system. 

    succeeded()
-----------

    template<typename MatrixType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| bool [Eigen::SkylineInplaceLU](classeigen_1_1skylineinplacelu)< MatrixType >::succeeded  | ( | void  |  | ) |  const |

 | inline |

 
 
Returns
true if the factorization succeeded 
   

---

The documentation for this class was generated from the following file:* [SkylineInplaceLU.h](https://eigen.tuxfamily.org/dox/unsupported/SkylineInplaceLU_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1SkylineInplaceLU.html>

Eigen::SkylineMatrix
====================

  
### template<typename \_Scalar, int \_Options> class Eigen::SkylineMatrix< \_Scalar, \_Options >

 The main skyline matrix class. 

 This class implements a skyline matrix using the very uncommon storage scheme.

 
Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the scalar type, i.e. the type of the coefficients  |
| \_Options | Union of bit flags controlling the storage scheme. Currently the only possibility is RowMajor. The default is 0 which means column-major.  |

       ![Inheritance graph]       

|  |
| --- |
|  |
| void  | [finalize](classeigen_1_1skylinematrix#a1269310d041fb3ca2a980644f3cfe5a2) () |
|  |
| EIGEN\_DONT\_INLINE Scalar &  | [insert](classeigen_1_1skylinematrix#a6e2d550f29d0dd59f83aa9d568d92c23) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) row, [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) col) |
|  |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1skylinematrix#aea6d3b694cef560f15a7d18c1f010604) () const |
|  |
| void  | [reserve](classeigen_1_1skylinematrix#aac6da20a87fca9d4cb6b871504497577) ([Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) reserveSize, [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) reserveUpperSize, [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) reserveLowerSize) |
|  |
| void  | [resize](classeigen_1_1skylinematrix#a918eed5cc583f6d402f0db60c5c5ad52) (size\_t rows, size\_t cols) |
|  |
| void  | [setZero](classeigen_1_1skylinematrix#afeb349e5dc4b5d8c107ff067b44438f5) () |
|  |
| Scalar  | [sum](classeigen_1_1skylinematrix#a56c9841de52e52744a2d5e6593979154) () const |
|  |
|  | [~SkylineMatrix](classeigen_1_1skylinematrix#a456b254a757d26580b2c05fe270eaae7) () |
|  |
| - Public Member Functions inherited from [Eigen::SkylineMatrixBase< SkylineMatrix< \_Scalar, \_Options > >](classeigen_1_1skylinematrixbase) |
| EIGEN\_CONSTEXPR [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [cols](classeigen_1_1skylinematrixbase#aeed7d90e131bbe98835c2c66c22264c5) () const EIGEN\_NOEXCEPT |
|  |
| const internal::eval< [SkylineMatrix](classeigen_1_1skylinematrix)< \_Scalar, \_Options >, IsSkyline >::type  | [eval](classeigen_1_1skylinematrixbase#a8223cbedd8027149ac7a5e930d89f156) () const |
|  |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [innerSize](classeigen_1_1skylinematrixbase#a901f2691facc1a0321740300dc7a12d7) () const |
|  |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [nonZeros](classeigen_1_1skylinematrixbase#aaeda265186dd626052df8580779b7460) () const |
|  |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [outerSize](classeigen_1_1skylinematrixbase#a63cc4a263d32a8a225e4a42e891b8ac0) () const |
|  |
| EIGEN\_CONSTEXPR [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [rows](classeigen_1_1skylinematrixbase#ab1bbf8b98d01a166c91c0e98fbaaab5d) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | [size](classeigen_1_1skylinematrixbase#a3b1c3eada36fd4cb23d4feeb696bdc88) () const EIGEN\_NOEXCEPT |
|  |




|  |
| --- |
|  |

  ~SkylineMatrix()
----------------

    template<typename \_Scalar , int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::SkylineMatrix](classeigen_1_1skylinematrix)< \_Scalar, \_Options >::~[SkylineMatrix](classeigen_1_1skylinematrix) | ( |  | ) |  |

 | inline |

 
 Destructor 

    finalize()
----------

    template<typename \_Scalar , int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::SkylineMatrix](classeigen_1_1skylinematrix)< \_Scalar, \_Options >::finalize  | ( |  | ) |  |

 | inline |

 
 Must be called after inserting a set of non zero entries. 

    insert()
--------

    template<typename \_Scalar , int \_Options>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| EIGEN\_DONT\_INLINE Scalar& [Eigen::SkylineMatrix](classeigen_1_1skylinematrix)< \_Scalar, \_Options >::insert  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *row*,  |
|  |  | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *col* |
|  | ) |  |  |

 | inline |

 
 
Returns
a reference to a novel non zero coefficient with coordinates *row* x *col*.
 
Warning
This function can be extremely slow if the non zero coefficients are not inserted in a coherent order.
 After an insertion session, you should call the [finalize()](classeigen_1_1skylinematrix#a1269310d041fb3ca2a980644f3cfe5a2) function. 

    nonZeros()
----------

    template<typename \_Scalar , int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) [Eigen::SkylineMatrix](classeigen_1_1skylinematrix)< \_Scalar, \_Options >::nonZeros  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of non zero coefficients 
    reserve()
---------

    template<typename \_Scalar , int \_Options>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::SkylineMatrix](classeigen_1_1skylinematrix)< \_Scalar, \_Options >::reserve  | ( | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *reserveSize*,  |
|  |  | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *reserveUpperSize*,  |
|  |  | [Index](../structeigen_1_1eigenbase#a554f30542cc2316add4b1ea0a492ff02) | *reserveLowerSize* |
|  | ) |  |  |

 | inline |

 
 Preallocates *reserveSize* non zeros 

    resize()
--------

    template<typename \_Scalar , int \_Options>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| void [Eigen::SkylineMatrix](classeigen_1_1skylinematrix)< \_Scalar, \_Options >::resize  | ( | size\_t  | *rows*,  |
|  |  | size\_t  | *cols* |
|  | ) |  |  |

 | inline |

 
 Resizes the matrix to a *rows* x *cols* matrix and initializes it to zero 



See also
resizeNonZeros(Index), [reserve()](classeigen_1_1skylinematrix#aac6da20a87fca9d4cb6b871504497577), [setZero()](classeigen_1_1skylinematrix#afeb349e5dc4b5d8c107ff067b44438f5) 
    setZero()
---------

    template<typename \_Scalar , int \_Options>  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::SkylineMatrix](classeigen_1_1skylinematrix)< \_Scalar, \_Options >::setZero  | ( |  | ) |  |

 | inline |

 
 Removes all non zeros 

    sum()
-----

    template<typename \_Scalar , int \_Options>  

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Scalar [Eigen::SkylineMatrix](classeigen_1_1skylinematrix)< \_Scalar, \_Options >::sum  | ( |  | ) |  const |

 
 Overloaded for performance 

   

---

The documentation for this class was generated from the following file:* [SkylineMatrix.h](https://eigen.tuxfamily.org/dox/unsupported/SkylineMatrix_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1SkylineMatrix.html>

Eigen::SkylineStorage
=====================

  
### template<typename Scalar> class Eigen::SkylineStorage< Scalar >

 Stores a skyline set of values in three structures : The diagonal elements The upper elements The lower elements 

 


---

The documentation for this class was generated from the following file:* [SkylineStorage.h](https://eigen.tuxfamily.org/dox/unsupported/SkylineStorage_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1SkylineStorage.html>

Eigen::SplineTraits
===================

  
### template<typename \_Scalar, int \_Dim, int \_Degree, int \_DerivativeOrder> struct Eigen::SplineTraits< Spline< \_Scalar, \_Dim, \_Degree >, \_DerivativeOrder >

 Compile-time attributes of the [Spline](classeigen_1_1spline "A class representing multi-dimensional spline curves.") class for fixed degree. 

 The traits class inherits all attributes from the SplineTraits of Dynamic degree. 

  Inherits Eigen::SplineTraits< SplineType, DerivativeOrder >.

 

|  |
| --- |
|  |
| enum  | { [OrderAtCompileTime](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01__derivativeorder_01_4#a0b33979eab591bb1721c3d19e731bfb3aa546f3e09061b25456cf70107db72ccd) } |
|  |
| enum  | { [NumOfDerivativesAtCompileTime](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01__derivativeorder_01_4#a536651c0156aebbba6f92ab86b9231c8a75a34223007ae974d1c19d653b2abfa3) } |
|  |
| enum  | { [DerivativeMemoryLayout](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01__derivativeorder_01_4#a2d35c4785da3f3c3054adb4dad1e50fca7e79c844da14c6fa961e112d05e23175) } |
|  |
|  typedef [Array](../classeigen_1_1array)< \_Scalar, [Dynamic](../namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](../namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [RowMajor](../group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f), [NumOfDerivativesAtCompileTime](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01__derivativeorder_01_4#a536651c0156aebbba6f92ab86b9231c8a75a34223007ae974d1c19d653b2abfa3), [OrderAtCompileTime](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01__derivativeorder_01_4#a0b33979eab591bb1721c3d19e731bfb3aa546f3e09061b25456cf70107db72ccd) >  | [BasisDerivativeType](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01__derivativeorder_01_4#a507283e4ba6108e20eae19e805816770) |
|  | The data type used to store the values of the basis function derivatives.  |
|  |
|  typedef [Array](../classeigen_1_1array)< \_Scalar, \_Dim, [Dynamic](../namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [DerivativeMemoryLayout](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01__derivativeorder_01_4#a2d35c4785da3f3c3054adb4dad1e50fca7e79c844da14c6fa961e112d05e23175), \_Dim, [NumOfDerivativesAtCompileTime](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01__derivativeorder_01_4#a536651c0156aebbba6f92ab86b9231c8a75a34223007ae974d1c19d653b2abfa3) >  | [DerivativeType](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01__derivativeorder_01_4#a5e0a0e3b07c844c84cf164a7f0db9314) |
|  | The data type used to store the spline's derivative values.  |
|  |

  anonymous enum
--------------

    template<typename \_Scalar , int \_Dim, int \_Degree, int \_DerivativeOrder>  

|  |
| --- |
| anonymous enum |

 
 

| Enumerator |
| --- |
| OrderAtCompileTime  | The spline curve's order at compile-time.  |

    anonymous enum
--------------

    template<typename \_Scalar , int \_Dim, int \_Degree, int \_DerivativeOrder>  

|  |
| --- |
| anonymous enum |

 
 

| Enumerator |
| --- |
| NumOfDerivativesAtCompileTime  | The number of derivatives defined for the current spline.  |

    anonymous enum
--------------

    template<typename \_Scalar , int \_Dim, int \_Degree, int \_DerivativeOrder>  

|  |
| --- |
| anonymous enum |

 
 

| Enumerator |
| --- |
| DerivativeMemoryLayout  | The derivative type's memory layout.  |

   

---

The documentation for this struct was generated from the following file:* [SplineFwd.h](https://eigen.tuxfamily.org/dox/unsupported/SplineFwd_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/structEigen_1_1SplineTraits_3_01Spline_3_01__Scalar_00_01__Dim_00_01__Degree_01_4_00_01__DerivativeOrder_01_4.html>

Eigen::EulerAngles
==================

  
### template<typename \_Scalar, class \_System> class Eigen::EulerAngles< \_Scalar, \_System >

 Represents a rotation in a 3 dimensional space as three Euler angles. 

 Euler rotation is a set of three rotation of three angles over three fixed axes, defined by the [EulerSystem](classeigen_1_1eulersystem "Represents a fixed Euler rotation system.") given as a template parameter.

 Here is how intrinsic Euler angles works:


* first, rotate the axes system over the alpha axis in angle alpha
* then, rotate the axes system over the beta axis(which was rotated in the first stage) in angle beta
* then, rotate the axes system over the gamma axis(which was rotated in the two stages above) in angle gamma

 
Note
This class support only intrinsic Euler angles for simplicity, see [EulerSystem](classeigen_1_1eulersystem "Represents a fixed Euler rotation system.") how to easily overcome this for extrinsic systems.
 ### 
 Rotation representation and conversions

 It has been proved(see Wikipedia link below) that every rotation can be represented by Euler angles, but there is no single representation (e.g. unlike rotation matrices). Therefore, you can convert from [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") rotation and to them (including rotation matrices, which is not called "rotations" by [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") design).

 Euler angles usually used for:


* convenient human representation of rotation, especially in interactive GUI.
* gimbal systems and robotics
* efficient encoding(i.e. 3 floats only) of rotation for network protocols.

 However, Euler angles are slow comparing to quaternion or matrices, because their unnatural math definition, although it's simple for human. To overcome this, this class provide easy movement from the math friendly representation to the human friendly representation, and vise-versa.

 All the user need to do is a safe simple C++ type conversion, and this class take care for the math. Additionally, some axes related computation is done in compile time.

 #### 
 Euler angles ranges in conversions

 Rotations representation as [EulerAngles](classeigen_1_1eulerangles "Represents a rotation in a 3 dimensional space as three Euler angles.") are not single (unlike matrices), and even have infinite [EulerAngles](classeigen_1_1eulerangles "Represents a rotation in a 3 dimensional space as three Euler angles.") representations.  
 For example, add or subtract 2\*PI from either angle of [EulerAngles](classeigen_1_1eulerangles "Represents a rotation in a 3 dimensional space as three Euler angles.") and you'll get the same rotation. This is the general reason for infinite representation, but it's not the only general reason for not having a single representation.

 When converting rotation to [EulerAngles](classeigen_1_1eulerangles "Represents a rotation in a 3 dimensional space as three Euler angles."), this class convert it to specific ranges When converting some rotation to [EulerAngles](classeigen_1_1eulerangles "Represents a rotation in a 3 dimensional space as three Euler angles."), the rules for ranges are as follow:


* If the rotation we converting from is an [EulerAngles](classeigen_1_1eulerangles "Represents a rotation in a 3 dimensional space as three Euler angles.") (even when it represented as [RotationBase](../classeigen_1_1rotationbase) explicitly), angles ranges are **undefined**.
* otherwise, alpha and gamma angles will be in the range [-PI, PI].  
 As for Beta angle:
	+ If the system is Tait-Bryan, the beta angle will be in the range [-PI/2, PI/2].
	+ otherwise:
		- If the beta axis is positive, the beta angle will be in the range [0, PI]
		- If the beta axis is negative, the beta angle will be in the range [-PI, 0]

 
See also

[EulerAngles(const MatrixBase<Derived>&)](classeigen_1_1eulerangles#aa7d02f35a984118d4c157a63915bd216)   [EulerAngles(const RotationBase<Derived, 3>&)](classeigen_1_1eulerangles#a22539c574d7b6ca4577691f533f60061)

 ### 
 Convenient user typedefs

 Convenient typedefs for [EulerAngles](classeigen_1_1eulerangles "Represents a rotation in a 3 dimensional space as three Euler angles.") exist for float and double scalar, in a form of [EulerAngles](classeigen_1_1eulerangles "Represents a rotation in a 3 dimensional space as three Euler angles."){A}{B}{C}{scalar}, e.g. EulerAnglesXYZd, EulerAnglesZYZf.

 Only for positive axes{+x,+y,+z} Euler systems are have convenient typedef. If you need negative axes{-x,-y,-z}, it is recommended to create you own typedef with a word that represent what you need.

 ### 
 Example

 
```
#include <unsupported/Eigen/EulerAngles>
#include <iostream>
 
using namespace [Eigen](namespaceeigen);
 
int main()
{
  // A common Euler system by many armies around the world,
  // where the first one is the azimuth(the angle from the north -
  // the same angle that is show in compass)
  // and the second one is elevation(the angle from the horizon)
  // and the third one is roll(the angle between the horizontal body
  // direction and the plane ground surface)
  // Keep remembering we're using radian angles here!
  typedef EulerSystem<-[EULER\_Z](group__eulerangles__module#ggae614aa7cdd687fb5c421a54f2ce5c361a95187b9943820cca5edc4bc96b3c08be), [EULER\_Y](group__eulerangles__module#ggae614aa7cdd687fb5c421a54f2ce5c361aee756a2b63043248f3d83541386c266b), [EULER\_X](group__eulerangles__module#ggae614aa7cdd687fb5c421a54f2ce5c361a11e1ea88cbe04a6fc077475d515d0b38)> MyArmySystem;
  typedef EulerAngles<double, MyArmySystem> MyArmyAngles;
  
  MyArmyAngles vehicleAngles(
    3.14/\*PI\*/ / 2, /\* heading to east, notice that this angle is counter-clockwise \*/
    -0.3, /\* going down from a mountain \*/
    0.1); /\* slightly rolled to the right \*/
  
  // Some Euler angles representation that our plane use.
  EulerAnglesZYZd planeAngles(0.78474, 0.5271, -0.513794);
  
  MyArmyAngles planeAnglesInMyArmyAngles(planeAngles);
  
  std::cout << "vehicle angles(MyArmy): " << vehicleAngles << std::endl;
  std::cout << "plane angles(ZYZ): " << planeAngles << std::endl;
  std::cout << "plane angles(MyArmy): " << planeAnglesInMyArmyAngles << std::endl;
  
  // Now lets rotate the plane a little bit
  std::cout << "==========================================================\n";
  std::cout << "rotating plane now!\n";
  std::cout << "==========================================================\n";
  
  [Quaterniond](../group__geometry__module#ga5daab8e66aa480465000308455578830) planeRotated = [AngleAxisd](../group__geometry__module#gaed936d6e9192d97f00a9608081fa9b64)(-0.342, Vector3d::UnitY()) * planeAngles;
  
  planeAngles = planeRotated;
  planeAnglesInMyArmyAngles = planeRotated;
  
  std::cout << "new plane angles(ZYZ): " << planeAngles << std::endl;
  std::cout << "new plane angles(MyArmy): " << planeAnglesInMyArmyAngles << std::endl;
  
  return 0;
}
```

 Output: 



```
vehicle angles(MyArmy):     1.57 -0.3  0.1
plane angles(ZYZ):          0.78474    0.5271 -0.513794
plane angles(MyArmy):     -0.206273  0.453463 -0.278617
==========================================================
rotating plane now!
==========================================================
new plane angles(ZYZ):      1.44358 0.366507 -1.23637
new plane angles(MyArmy):  -0.18648  0.117896 -0.347841

```

### 
 Additional reading

 If you're want to get more idea about how Euler system work in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") see [EulerSystem](classeigen_1_1eulersystem "Represents a fixed Euler rotation system.").

 More information about Euler angles: <https://en.wikipedia.org/wiki/Euler_angles>

 
Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | the scalar type, i.e. the type of the angles. |
| \_System | the [EulerSystem](classeigen_1_1eulersystem "Represents a fixed Euler rotation system.") to use, which represents the axes of rotation.  |

       ![Inheritance graph]      

|  |
| --- |
|  |
| typedef [AngleAxis](../classeigen_1_1angleaxis)< [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) >  | [AngleAxisType](classeigen_1_1eulerangles#a0bc2416b52b29a213eccad8a43ce61a6) |
|  |
| typedef [Matrix](../classeigen_1_1matrix)< [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac), 3, 3 >  | [Matrix3](classeigen_1_1eulerangles#ad0f0ee8240849b0f7d028695849cdbad) |
|  |
| typedef [Quaternion](../classeigen_1_1quaternion)< [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) >  | [QuaternionType](classeigen_1_1eulerangles#adf351608cad15e660279f7323e516d3a) |
|  |
| typedef \_Scalar  | [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) |
|  |
| typedef \_System  | [System](classeigen_1_1eulerangles#a17e3dee5fef4af35bbb4e319c2cdc3c1) |
|  |
| typedef [Matrix](../classeigen_1_1matrix)< [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac), 3, 1 >  | [Vector3](classeigen_1_1eulerangles#af0f446aa0f46b3439abedff63fabf39c) |
|  |




|  |
| --- |
|  |
| [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) &  | [alpha](classeigen_1_1eulerangles#a69942a5a9b0c3670e7f2797e84cbde8c) () |
|  |
| [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) | [alpha](classeigen_1_1eulerangles#a6146f78ee0fb9d9a7d685a4654066825) () const |
|  |
| [Vector3](classeigen_1_1eulerangles#af0f446aa0f46b3439abedff63fabf39c) &  | [angles](classeigen_1_1eulerangles#afff76daa2d6a3165a1354c349366fb80) () |
|  |
| const [Vector3](classeigen_1_1eulerangles#af0f446aa0f46b3439abedff63fabf39c) &  | [angles](classeigen_1_1eulerangles#a2decf84b5efd265f7251fd32f539a36b) () const |
|  |
| [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) &  | [beta](classeigen_1_1eulerangles#a2db042cfba5486d46fdeb77fecd8e509) () |
|  |
| [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) | [beta](classeigen_1_1eulerangles#a1bf59f8acaed985964c98c1f59d8f5ab) () const |
|  |
| template<typename NewScalarType >  |
| [EulerAngles](classeigen_1_1eulerangles)< NewScalarType, [System](classeigen_1_1eulerangles#a17e3dee5fef4af35bbb4e319c2cdc3c1) >  | [cast](classeigen_1_1eulerangles#acbabd36b148c07fb3e6a0b346fff066e) () const |
|  |
|  | [EulerAngles](classeigen_1_1eulerangles#a47be9344fbd4a5b34df45486cfaf1e2b) () |
|  |
| template<typename Derived >  |
|  | [EulerAngles](classeigen_1_1eulerangles#aa7d02f35a984118d4c157a63915bd216) (const [MatrixBase](../classeigen_1_1matrixbase)< Derived > &other) |
|  |
| template<typename Derived >  |
|  | [EulerAngles](classeigen_1_1eulerangles#a22539c574d7b6ca4577691f533f60061) (const [RotationBase](../classeigen_1_1rotationbase)< Derived, 3 > &rot) |
|  |
|  | [EulerAngles](classeigen_1_1eulerangles#a765135b6e5d35248517b4268046840b6) (const [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) &[alpha](classeigen_1_1eulerangles#a6146f78ee0fb9d9a7d685a4654066825), const [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) &[beta](classeigen_1_1eulerangles#a1bf59f8acaed985964c98c1f59d8f5ab), const [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) &[gamma](classeigen_1_1eulerangles#aa75a5f16105d96eedf81bf9f8e789e21)) |
|  |
|  | [EulerAngles](classeigen_1_1eulerangles#a4f212a178fd75ac9e53569e7c1d97e84) (const [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) \*data) |
|  |
| [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) &  | [gamma](classeigen_1_1eulerangles#a4c6216fa2fca4d5d70d8f44dae4cf88c) () |
|  |
| [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) | [gamma](classeigen_1_1eulerangles#aa75a5f16105d96eedf81bf9f8e789e21) () const |
|  |
| [EulerAngles](classeigen_1_1eulerangles) | [inverse](classeigen_1_1eulerangles#a1c37cedc590311d6ecaec7215d7c8f2c) () const |
|  |
| bool  | [isApprox](classeigen_1_1eulerangles#a8ab2f4cea6fca8cf604b274038218d22) (const [EulerAngles](classeigen_1_1eulerangles) &other, const RealScalar &prec=[NumTraits](../structeigen_1_1numtraits)< [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) >::dummy\_precision()) const |
|  |
|  | [operator QuaternionType](classeigen_1_1eulerangles#aa4ccd4b412c3146a9dd58a884eaea42e) () const |
|  |
| [EulerAngles](classeigen_1_1eulerangles) | [operator-](classeigen_1_1eulerangles#a2a30e027e6f3fa275d7403c1c7e613af) () const |
|  |
| template<class Derived >  |
| [EulerAngles](classeigen_1_1eulerangles) &  | [operator=](classeigen_1_1eulerangles#a99446e06ed9cae7f1c8764f6264bbde3) (const [MatrixBase](../classeigen_1_1matrixbase)< Derived > &other) |
|  |
| template<typename Derived >  |
| [EulerAngles](classeigen_1_1eulerangles) &  | [operator=](classeigen_1_1eulerangles#abc2256872ea7e285cb915b8af82b6810) (const [RotationBase](../classeigen_1_1rotationbase)< Derived, 3 > &rot) |
|  |
| [Matrix3](classeigen_1_1eulerangles#ad0f0ee8240849b0f7d028695849cdbad) | [toRotationMatrix](classeigen_1_1eulerangles#a11ec16b3ed918fac62d295012ec4e2ac) () const |
|  |




|  |
| --- |
|  |
| static [Vector3](classeigen_1_1eulerangles#af0f446aa0f46b3439abedff63fabf39c) | [AlphaAxisVector](classeigen_1_1eulerangles#a33d034ea7e8cac1f4d7c329d741b9a59) () |
|  |
| static [Vector3](classeigen_1_1eulerangles#af0f446aa0f46b3439abedff63fabf39c) | [BetaAxisVector](classeigen_1_1eulerangles#aede24ef1ffc5913f2eb6539c1f1b9dc4) () |
|  |
| static [Vector3](classeigen_1_1eulerangles#af0f446aa0f46b3439abedff63fabf39c) | [GammaAxisVector](classeigen_1_1eulerangles#a77ea78dac1d599353e2a87d95cc6f1d4) () |
|  |

  AngleAxisType
-------------

    template<typename \_Scalar , class \_System >  

|  |
| --- |
| typedef [AngleAxis](../classeigen_1_1angleaxis)<[Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac)> [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::[AngleAxisType](classeigen_1_1eulerangles#a0bc2416b52b29a213eccad8a43ce61a6) |

 
 the equivalent angle-axis type 

    Matrix3
-------

    template<typename \_Scalar , class \_System >  

|  |
| --- |
| typedef [Matrix](../classeigen_1_1matrix)<[Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac),3,3> [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::[Matrix3](classeigen_1_1eulerangles#ad0f0ee8240849b0f7d028695849cdbad) |

 
 the equivalent rotation matrix type 

    QuaternionType
--------------

    template<typename \_Scalar , class \_System >  

|  |
| --- |
| typedef [Quaternion](../classeigen_1_1quaternion)<[Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac)> [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::[QuaternionType](classeigen_1_1eulerangles#adf351608cad15e660279f7323e516d3a) |

 
 the equivalent quaternion type 

    Scalar
------

    template<typename \_Scalar , class \_System >  

|  |
| --- |
| typedef \_Scalar [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::[Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) |

 
 the scalar type of the angles 

    System
------

    template<typename \_Scalar , class \_System >  

|  |
| --- |
| typedef \_System [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::[System](classeigen_1_1eulerangles#a17e3dee5fef4af35bbb4e319c2cdc3c1) |

 
 the [EulerSystem](classeigen_1_1eulersystem "Represents a fixed Euler rotation system.") to use, which represents the axes of rotation. 

    Vector3
-------

    template<typename \_Scalar , class \_System >  

|  |
| --- |
| typedef [Matrix](../classeigen_1_1matrix)<[Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac),3,1> [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::[Vector3](classeigen_1_1eulerangles#af0f446aa0f46b3439abedff63fabf39c) |

 
 the equivalent 3 dimension vector type 

    EulerAngles() [1/5]
-------------------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::[EulerAngles](classeigen_1_1eulerangles) | ( |  | ) |  |

 | inline |

 
 Default constructor without initialization. 

    EulerAngles() [2/5]
-------------------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::[EulerAngles](classeigen_1_1eulerangles) | ( | const [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) &  | *alpha*,  |
|  |  | const [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) &  | *beta*,  |
|  |  | const [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) &  | *gamma* |
|  | ) |  |  |

 | inline |

 
 Constructs and initialize an [EulerAngles](classeigen_1_1eulerangles "Represents a rotation in a 3 dimensional space as three Euler angles.") (`alpha`, `beta`, `gamma`). 

    EulerAngles() [3/5]
-------------------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::[EulerAngles](classeigen_1_1eulerangles) | ( | const [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) \*  | *data* | ) |  |

 | inlineexplicit |

 
 Constructs and initialize an [EulerAngles](classeigen_1_1eulerangles "Represents a rotation in a 3 dimensional space as three Euler angles.") from the array data {alpha, beta, gamma} 

    EulerAngles() [4/5]
-------------------

    template<typename \_Scalar , class \_System >   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::[EulerAngles](classeigen_1_1eulerangles) | ( | const [MatrixBase](../classeigen_1_1matrixbase)< Derived > &  | *other* | ) |  |

 | inlineexplicit |

 
 Constructs and initializes an [EulerAngles](classeigen_1_1eulerangles "Represents a rotation in a 3 dimensional space as three Euler angles.") from either:


* a 3x3 rotation matrix expression(i.e. pure orthogonal matrix with determinant of +1),
* a 3D vector expression representing Euler angles.

 
Note
If `other` is a 3x3 rotation matrix, the angles range rules will be as follow:  
 Alpha and gamma angles will be in the range [-PI, PI].  
 As for Beta angle:* If the system is Tait-Bryan, the beta angle will be in the range [-PI/2, PI/2].
* otherwise:
	+ If the beta axis is positive, the beta angle will be in the range [0, PI]
	+ If the beta axis is negative, the beta angle will be in the range [-PI, 0]

 
    EulerAngles() [5/5]
-------------------

    template<typename \_Scalar , class \_System >   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::[EulerAngles](classeigen_1_1eulerangles) | ( | const [RotationBase](../classeigen_1_1rotationbase)< Derived, 3 > &  | *rot* | ) |  |

 | inline |

 
 Constructs and initialize Euler angles from a rotation `rot`.

 
Note
If `rot` is an [EulerAngles](classeigen_1_1eulerangles "Represents a rotation in a 3 dimensional space as three Euler angles.") (even when it represented as [RotationBase](../classeigen_1_1rotationbase) explicitly), angles ranges are **undefined**. Otherwise, alpha and gamma angles will be in the range [-PI, PI].  
 As for Beta angle:* If the system is Tait-Bryan, the beta angle will be in the range [-PI/2, PI/2].
* otherwise:
	+ If the beta axis is positive, the beta angle will be in the range [0, PI]
	+ If the beta axis is negative, the beta angle will be in the range [-PI, 0]

 
    alpha() [1/2]
-------------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac)& [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::alpha  | ( |  | ) |  |

 | inline |

 
 
Returns
A read-write reference to the angle of the first angle. 
    alpha() [2/2]
-------------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::alpha  | ( |  | ) |  const |

 | inline |

 
 
Returns
The value of the first angle. 
    AlphaAxisVector()
-----------------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| static [Vector3](classeigen_1_1eulerangles#af0f446aa0f46b3439abedff63fabf39c) [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::AlphaAxisVector  | ( |  | ) |  |

 | inlinestatic |

 
 
Returns
the axis vector of the first (alpha) rotation 
    angles() [1/2]
--------------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Vector3](classeigen_1_1eulerangles#af0f446aa0f46b3439abedff63fabf39c)& [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::angles  | ( |  | ) |  |

 | inline |

 
 
Returns
A read-write reference to the angle values stored in a vector (alpha, beta, gamma). 
    angles() [2/2]
--------------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const [Vector3](classeigen_1_1eulerangles#af0f446aa0f46b3439abedff63fabf39c)& [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::angles  | ( |  | ) |  const |

 | inline |

 
 
Returns
The angle values stored in a vector (alpha, beta, gamma). 
    beta() [1/2]
------------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac)& [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::beta  | ( |  | ) |  |

 | inline |

 
 
Returns
A read-write reference to the angle of the second angle. 
    beta() [2/2]
------------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::beta  | ( |  | ) |  const |

 | inline |

 
 
Returns
The value of the second angle. 
    BetaAxisVector()
----------------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| static [Vector3](classeigen_1_1eulerangles#af0f446aa0f46b3439abedff63fabf39c) [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::BetaAxisVector  | ( |  | ) |  |

 | inlinestatic |

 
 
Returns
the axis vector of the second (beta) rotation 
    cast()
------

    template<typename \_Scalar , class \_System >   template<typename NewScalarType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [EulerAngles](classeigen_1_1eulerangles)<NewScalarType, [System](classeigen_1_1eulerangles#a17e3dee5fef4af35bbb4e319c2cdc3c1)> [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::cast  | ( |  | ) |  const |

 | inline |

 
 
Returns

`*this` with scalar type casted to *NewScalarType* 
    gamma() [1/2]
-------------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac)& [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::gamma  | ( |  | ) |  |

 | inline |

 
 
Returns
A read-write reference to the angle of the third angle. 
    gamma() [2/2]
-------------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac) [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::gamma  | ( |  | ) |  const |

 | inline |

 
 
Returns
The value of the third angle. 
    GammaAxisVector()
-----------------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| static [Vector3](classeigen_1_1eulerangles#af0f446aa0f46b3439abedff63fabf39c) [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::GammaAxisVector  | ( |  | ) |  |

 | inlinestatic |

 
 
Returns
the axis vector of the third (gamma) rotation 
    inverse()
---------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [EulerAngles](classeigen_1_1eulerangles) [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::inverse  | ( |  | ) |  const |

 | inline |

 
 
Returns
The Euler angles rotation inverse (which is as same as the negative), (-alpha, -beta, -gamma). 
    isApprox()
----------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| bool [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::isApprox  | ( | const [EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System > &  | *other*,  |
|  |  | const RealScalar &  | *prec* = `[NumTraits](../structeigen_1_1numtraits)<[Scalar](classeigen_1_1eulerangles#a2ab1d433ac9683268446f8905ac31aac)>::dummy_precision()` |
|  | ) |  |  const |

 | inline |

 
 
Returns

`true` if `*this` is approximately equal to *other*, within the precision determined by *prec*.
 
See also

[MatrixBase::isApprox()](../classeigen_1_1densebase#ae8443357b808cd393be1b51974213f9c) 
    operator QuaternionType()
-------------------------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::operator [QuaternionType](classeigen_1_1eulerangles#adf351608cad15e660279f7323e516d3a) | ( |  | ) |  const |

 | inline |

 
 Convert the Euler angles to quaternion. 

    operator-()
-----------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [EulerAngles](classeigen_1_1eulerangles) [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::operator-  | ( |  | ) |  const |

 | inline |

 
 
Returns
The Euler angles rotation negative (which is as same as the inverse), (-alpha, -beta, -gamma). 
    operator=() [1/2]
-----------------

    template<typename \_Scalar , class \_System >   template<class Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [EulerAngles](classeigen_1_1eulerangles)& [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::operator=  | ( | const [MatrixBase](../classeigen_1_1matrixbase)< Derived > &  | *other* | ) |  |

 | inline |

 
 Set `*this` from either:


* a 3x3 rotation matrix expression(i.e. pure orthogonal matrix with determinant of +1),
* a 3D vector expression representing Euler angles.

 See EulerAngles(const MatrixBase<Derived, 3>&) for more information about angles ranges output. 

    operator=() [2/2]
-----------------

    template<typename \_Scalar , class \_System >   template<typename Derived >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [EulerAngles](classeigen_1_1eulerangles)& [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::operator=  | ( | const [RotationBase](../classeigen_1_1rotationbase)< Derived, 3 > &  | *rot* | ) |  |

 | inline |

 
 Set `*this` from a rotation.

 See [EulerAngles(const RotationBase<Derived, 3>&)](classeigen_1_1eulerangles#a22539c574d7b6ca4577691f533f60061) for more information about angles ranges output. 

    toRotationMatrix()
------------------

    template<typename \_Scalar , class \_System >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [Matrix3](classeigen_1_1eulerangles#ad0f0ee8240849b0f7d028695849cdbad) [Eigen::EulerAngles](classeigen_1_1eulerangles)< \_Scalar, \_System >::toRotationMatrix  | ( |  | ) |  const |

 | inline |

 
 
Returns
an equivalent 3x3 rotation matrix. 
   

---

The documentation for this class was generated from the following file:* [EulerAngles.h](https://eigen.tuxfamily.org/dox/unsupported/EulerAngles_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1EulerAngles.html>

Eigen::SkylineMatrixBase
========================

  
### template<typename Derived> class Eigen::SkylineMatrixBase< Derived >

 Base class of any skyline matrices or skyline expressions. 

 
Parameters
 

|  |  |
| --- | --- |
| Derived |  |

       ![Inheritance graph]      

|  |
| --- |
|  |
| enum  | {  [RowsAtCompileTime](classeigen_1_1skylinematrixbase#a6b62c550e32df9d80b92891b440d28f0a38d1bf953af9198ddd3f0e56fc282015) ,  [ColsAtCompileTime](classeigen_1_1skylinematrixbase#a6b62c550e32df9d80b92891b440d28f0a288f9228ca4a52efa9d3f4edef53a635) ,  [SizeAtCompileTime](classeigen_1_1skylinematrixbase#a6b62c550e32df9d80b92891b440d28f0a0c8807124023bf5a3e94bd0a61dcf1b1) ,  **MaxRowsAtCompileTime** ,  **MaxColsAtCompileTime** ,  **MaxSizeAtCompileTime** ,  [IsVectorAtCompileTime](classeigen_1_1skylinematrixbase#a6b62c550e32df9d80b92891b440d28f0af6ae6724ce38083a0032925e68782a43) ,  [Flags](classeigen_1_1skylinematrixbase#a6b62c550e32df9d80b92891b440d28f0a687566e95391ffd9783432d3fee5d655) ,  [CoeffReadCost](classeigen_1_1skylinematrixbase#a6b62c550e32df9d80b92891b440d28f0a30b689b8ac0277eaa3da46fd52702cb9) ,  **IsRowMajor**  } |
|  |




|  |
| --- |
|  |
| EIGEN\_CONSTEXPR Index  | [cols](classeigen_1_1skylinematrixbase#aeed7d90e131bbe98835c2c66c22264c5) () const EIGEN\_NOEXCEPT |
|  |
| const internal::eval< Derived, IsSkyline >::type  | [eval](classeigen_1_1skylinematrixbase#a8223cbedd8027149ac7a5e930d89f156) () const |
|  |
| Index  | [innerSize](classeigen_1_1skylinematrixbase#a901f2691facc1a0321740300dc7a12d7) () const |
|  |
| Index  | [nonZeros](classeigen_1_1skylinematrixbase#aaeda265186dd626052df8580779b7460) () const |
|  |
| Index  | [outerSize](classeigen_1_1skylinematrixbase#a63cc4a263d32a8a225e4a42e891b8ac0) () const |
|  |
| EIGEN\_CONSTEXPR Index  | [rows](classeigen_1_1skylinematrixbase#ab1bbf8b98d01a166c91c0e98fbaaab5d) () const EIGEN\_NOEXCEPT |
|  |
| EIGEN\_CONSTEXPR Index  | [size](classeigen_1_1skylinematrixbase#a3b1c3eada36fd4cb23d4feeb696bdc88) () const EIGEN\_NOEXCEPT |
|  |

  anonymous enum
--------------

    template<typename Derived >  

|  |
| --- |
| anonymous enum |

 
 

| Enumerator |
| --- |
| RowsAtCompileTime  | The number of rows at compile-time. This is just a copy of the value provided by the *Derived* type. If a value is not known at compile-time, it is set to the *Dynamic* constant. 

See also

[MatrixBase::rows()](../classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [MatrixBase::cols()](../classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), [ColsAtCompileTime](classeigen_1_1skylinematrixbase#a6b62c550e32df9d80b92891b440d28f0a288f9228ca4a52efa9d3f4edef53a635), [SizeAtCompileTime](classeigen_1_1skylinematrixbase#a6b62c550e32df9d80b92891b440d28f0a0c8807124023bf5a3e94bd0a61dcf1b1) 
 |
| ColsAtCompileTime  | The number of columns at compile-time. This is just a copy of the value provided by the *Derived* type. If a value is not known at compile-time, it is set to the *Dynamic* constant. 

See also

[MatrixBase::rows()](../classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#ac22eb0695d00edd7d4a3b2d0a98b81c2), [MatrixBase::cols()](../classeigen_1_1densecoeffsbase_3_01derived_00_01directwriteaccessors_01_4#a2d768a9877f5f69f49432d447b552bfe), [RowsAtCompileTime](classeigen_1_1skylinematrixbase#a6b62c550e32df9d80b92891b440d28f0a38d1bf953af9198ddd3f0e56fc282015), [SizeAtCompileTime](classeigen_1_1skylinematrixbase#a6b62c550e32df9d80b92891b440d28f0a0c8807124023bf5a3e94bd0a61dcf1b1) 
 |
| SizeAtCompileTime  | This is equal to the number of coefficients, i.e. the number of rows times the number of columns, or to *Dynamic* if this is not known at compile-time. 

See also

[RowsAtCompileTime](classeigen_1_1skylinematrixbase#a6b62c550e32df9d80b92891b440d28f0a38d1bf953af9198ddd3f0e56fc282015), [ColsAtCompileTime](classeigen_1_1skylinematrixbase#a6b62c550e32df9d80b92891b440d28f0a288f9228ca4a52efa9d3f4edef53a635) 
 |
| IsVectorAtCompileTime  | This is set to true if either the number of rows or the number of columns is known at compile-time to be equal to 1. Indeed, in that case, we are dealing with a column-vector (if there is only one column) or with a row-vector (if there is only one row).  |
| Flags  | This stores expression [Flags](../group__flags) flags which may or may not be inherited by new expressions constructed from this one. See the [list of flags](../group__flags).  |
| CoeffReadCost  | This is a rough measure of how expensive it is to read one coefficient from this expression.  |

    cols()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR Index [Eigen::SkylineMatrixBase](classeigen_1_1skylinematrixbase)< Derived >::cols  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of columns. 
 
See also

[rows()](classeigen_1_1skylinematrixbase#ab1bbf8b98d01a166c91c0e98fbaaab5d), [ColsAtCompileTime](classeigen_1_1skylinematrixbase#a6b62c550e32df9d80b92891b440d28f0a288f9228ca4a52efa9d3f4edef53a635) 
    eval()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| const internal::eval<Derived, IsSkyline>::type [Eigen::SkylineMatrixBase](classeigen_1_1skylinematrixbase)< Derived >::eval  | ( |  | ) |  const |

 | inline |

 
 
Returns
the matrix or vector obtained by evaluating this expression.
 Notice that in the case of a plain matrix or vector (not an expression) this function just returns a const reference, in order to avoid a useless copy. 

    innerSize()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Index [Eigen::SkylineMatrixBase](classeigen_1_1skylinematrixbase)< Derived >::innerSize  | ( |  | ) |  const |

 | inline |

 
 
Returns
the size of the inner dimension according to the storage order, i.e., the number of rows for a columns major matrix, and the number of cols otherwise 
    nonZeros()
----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Index [Eigen::SkylineMatrixBase](classeigen_1_1skylinematrixbase)< Derived >::nonZeros  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of nonzero coefficients which is in practice the number of stored coefficients. 
    outerSize()
-----------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Index [Eigen::SkylineMatrixBase](classeigen_1_1skylinematrixbase)< Derived >::outerSize  | ( |  | ) |  const |

 | inline |

 
 
Returns
the size of the storage major dimension, i.e., the number of columns for a columns major matrix, and the number of rows otherwise 
    rows()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR Index [Eigen::SkylineMatrixBase](classeigen_1_1skylinematrixbase)< Derived >::rows  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of rows. 
 
See also

[cols()](classeigen_1_1skylinematrixbase#aeed7d90e131bbe98835c2c66c22264c5), [RowsAtCompileTime](classeigen_1_1skylinematrixbase#a6b62c550e32df9d80b92891b440d28f0a38d1bf953af9198ddd3f0e56fc282015) 
    size()
------

    template<typename Derived >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| EIGEN\_CONSTEXPR Index [Eigen::SkylineMatrixBase](classeigen_1_1skylinematrixbase)< Derived >::size  | ( |  | ) |  const |

 | inline |

 
 
Returns
the number of coefficients, which is *[rows()](classeigen_1_1skylinematrixbase#ab1bbf8b98d01a166c91c0e98fbaaab5d)\*cols*(). 
 
See also

[rows()](classeigen_1_1skylinematrixbase#ab1bbf8b98d01a166c91c0e98fbaaab5d), [cols()](classeigen_1_1skylinematrixbase#aeed7d90e131bbe98835c2c66c22264c5), [SizeAtCompileTime](classeigen_1_1skylinematrixbase#a6b62c550e32df9d80b92891b440d28f0a0c8807124023bf5a3e94bd0a61dcf1b1). 
   

---

The documentation for this class was generated from the following files:* [SkylineMatrixBase.h](https://eigen.tuxfamily.org/dox/unsupported/SkylineMatrixBase_8h_source.html)
* [SkylineProduct.h](https://eigen.tuxfamily.org/dox/unsupported/SkylineProduct_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1SkylineMatrixBase.html>

Eigen::SplineFitting
====================

  
### template<typename SplineType> struct Eigen::SplineFitting< SplineType >

 [Spline](classeigen_1_1spline "A class representing multi-dimensional spline curves.") fitting methods. 

 


|  |
| --- |
|  |
| template<typename PointArrayType >  |
| static SplineType  | [Interpolate](structeigen_1_1splinefitting#adc80b6f0dd0dbbea28130fb254626874) (const PointArrayType &pts, DenseIndex degree) |
|  | Fits an interpolating [Spline](classeigen_1_1spline "A class representing multi-dimensional spline curves.") to the given data points. [More...](structeigen_1_1splinefitting#adc80b6f0dd0dbbea28130fb254626874) |
|  |
| template<typename PointArrayType >  |
| static SplineType  | [Interpolate](structeigen_1_1splinefitting#af08185c8b635283f7c76efe91576cc83) (const PointArrayType &pts, DenseIndex degree, const KnotVectorType &knot\_parameters) |
|  | Fits an interpolating [Spline](classeigen_1_1spline "A class representing multi-dimensional spline curves.") to the given data points. [More...](structeigen_1_1splinefitting#af08185c8b635283f7c76efe91576cc83) |
|  |
| template<typename PointArrayType , typename IndexArray >  |
| static SplineType  | [InterpolateWithDerivatives](structeigen_1_1splinefitting#a7bd937fdcfa168dbdc27932886a4da9f) (const PointArrayType &points, const PointArrayType &derivatives, const IndexArray &derivativeIndices, const unsigned int degree) |
|  | Fits an interpolating spline to the given data points and derivatives. [More...](structeigen_1_1splinefitting#a7bd937fdcfa168dbdc27932886a4da9f) |
|  |
| template<typename PointArrayType , typename IndexArray >  |
| static SplineType  | [InterpolateWithDerivatives](structeigen_1_1splinefitting#a0317c97f2b57ccf5dcf077409d51e54d) (const PointArrayType &points, const PointArrayType &derivatives, const IndexArray &derivativeIndices, const unsigned int degree, const ParameterVectorType &parameters) |
|  | Fits an interpolating spline to the given data points and derivatives. [More...](structeigen_1_1splinefitting#a0317c97f2b57ccf5dcf077409d51e54d) |
|  |

  Interpolate() [1/2]
-------------------

    template<typename SplineType >   template<typename PointArrayType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| SplineType [Eigen::SplineFitting](structeigen_1_1splinefitting)< SplineType >::Interpolate  | ( | const PointArrayType &  | *pts*,  |
|  |  | DenseIndex  | *degree* |
|  | ) |  |  |

 | static |

 
 Fits an interpolating [Spline](classeigen_1_1spline "A class representing multi-dimensional spline curves.") to the given data points. 

 
Parameters
 

|  |  |
| --- | --- |
| pts | The points for which an interpolating spline will be computed.  |
| degree | The degree of the interpolating spline. |

   
Returns
A spline interpolating the initially provided points. 
    Interpolate() [2/2]
-------------------

    template<typename SplineType >   template<typename PointArrayType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| SplineType [Eigen::SplineFitting](structeigen_1_1splinefitting)< SplineType >::Interpolate  | ( | const PointArrayType &  | *pts*,  |
|  |  | DenseIndex  | *degree*,  |
|  |  | const KnotVectorType &  | *knot\_parameters* |
|  | ) |  |  |

 | static |

 
 Fits an interpolating [Spline](classeigen_1_1spline "A class representing multi-dimensional spline curves.") to the given data points. 

 
Parameters
 

|  |  |
| --- | --- |
| pts | The points for which an interpolating spline will be computed.  |
| degree | The degree of the interpolating spline.  |
| knot\_parameters | The knot parameters for the interpolation. |

   
Returns
A spline interpolating the initially provided points. 
    InterpolateWithDerivatives() [1/2]
----------------------------------

    template<typename SplineType >   template<typename PointArrayType , typename IndexArray >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| SplineType [Eigen::SplineFitting](structeigen_1_1splinefitting)< SplineType >::InterpolateWithDerivatives  | ( | const PointArrayType &  | *points*,  |
|  |  | const PointArrayType &  | *derivatives*,  |
|  |  | const IndexArray &  | *derivativeIndices*,  |
|  |  | const unsigned int  | *degree* |
|  | ) |  |  |

 | static |

 
 Fits an interpolating spline to the given data points and derivatives. 

 
Parameters
 

|  |  |
| --- | --- |
| points | The points for which an interpolating spline will be computed.  |
| derivatives | The desired derivatives of the interpolating spline at interpolation points.  |
| derivativeIndices | An array indicating which point each derivative belongs to. This must be the same size as *derivatives*.  |
| degree | The degree of the interpolating spline. |

   
Returns
A spline interpolating *points* with *derivatives* at those points.
 
See also
Les A. Piegl, Khairan Rajab, Volha Smarodzinana. 2008. Curve interpolation with directional constraints for engineering design. Engineering with Computers 
    InterpolateWithDerivatives() [2/2]
----------------------------------

    template<typename SplineType >   template<typename PointArrayType , typename IndexArray >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| SplineType [Eigen::SplineFitting](structeigen_1_1splinefitting)< SplineType >::InterpolateWithDerivatives  | ( | const PointArrayType &  | *points*,  |
|  |  | const PointArrayType &  | *derivatives*,  |
|  |  | const IndexArray &  | *derivativeIndices*,  |
|  |  | const unsigned int  | *degree*,  |
|  |  | const ParameterVectorType &  | *parameters* |
|  | ) |  |  |

 | static |

 
 Fits an interpolating spline to the given data points and derivatives. 

 
Parameters
 

|  |  |
| --- | --- |
| points | The points for which an interpolating spline will be computed.  |
| derivatives | The desired derivatives of the interpolating spline at interpolation points.  |
| derivativeIndices | An array indicating which point each derivative belongs to. This must be the same size as *derivatives*.  |
| degree | The degree of the interpolating spline.  |
| parameters | The parameters corresponding to the interpolation points. |

   
Returns
A spline interpolating *points* with *derivatives* at those points.
 
See also
Les A. Piegl, Khairan Rajab, Volha Smarodzinana. 2008. Curve interpolation with directional constraints for engineering design. Engineering with Computers 
   

---

The documentation for this struct was generated from the following file:* [SplineFitting.h](https://eigen.tuxfamily.org/dox/unsupported/SplineFitting_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/structEigen_1_1SplineFitting.html>

Eigen::StaticSGroup
===================

  
### template<typename... Gen> class Eigen::StaticSGroup< Gen >

 Static symmetry group. 

 This class represents a symmetry group that is known and resolved completely at compile time. Ideally, no run-time penalty is incurred compared to the manual unrolling of the symmetry.

 ***CAUTION:***

 Do not use this class directly for large symmetry groups. The compiler may run into a limit, or segfault or in the very least will take a very, very, very long time to compile the code. Use the [SGroup](classeigen_1_1sgroup "Symmetry group, initialized from template arguments.") class instead if you want a static group. That class contains logic that will automatically select the [DynamicSGroup](classeigen_1_1dynamicsgroup "Dynamic symmetry group.") class instead if the symmetry group becomes too large. (In that case, unrolling may not even be beneficial.) 

 


---

The documentation for this class was generated from the following file:* [StaticSymmetry.h](https://eigen.tuxfamily.org/dox/unsupported/StaticSymmetry_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1StaticSGroup.html>

Eigen::StdMapTraits
===================

  
### template<typename Scalar> struct Eigen::StdMapTraits< Scalar >

 Represents a std::map

 
See also

[RandomSetter](classeigen_1_1randomsetter "The RandomSetter is a wrapper object allowing to set/update a sparse matrix with random access.") 
 


---

The documentation for this struct was generated from the following file:* [RandomSetter.h](https://eigen.tuxfamily.org/dox/unsupported/RandomSetter_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/structEigen_1_1StdMapTraits.html>

Eigen::TensorAsyncDevice
========================

  
### template<typename ExpressionType, typename DeviceType, typename DoneCallback> class Eigen::TensorAsyncDevice< ExpressionType, DeviceType, DoneCallback >

 Pseudo expression providing an operator = that will evaluate its argument asynchronously on the specified device. Currently only ThreadPoolDevice implements proper asynchronous execution, while the default and GPU devices just run the expression synchronously and call m\_done() on completion.. 

 Example: auto done = []() { ... expression evaluation done ... }; C.device(thread\_pool\_device, std::move(done)) = A + B; 

 


---

The documentation for this class was generated from the following file:* [TensorDevice.h](https://eigen.tuxfamily.org/dox/unsupported/TensorDevice_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1TensorAsyncDevice.html>

Eigen::TensorBase
=================

  
### template<typename Derived, int AccessLevel> class Eigen::TensorBase< Derived, AccessLevel >

 The tensor base class. 

 This class is the common parent of the [Tensor](classeigen_1_1tensor "The tensor class.") and [TensorMap](classeigen_1_1tensormap "A tensor expression mapping an existing array of data.") class, thus making it possible to use either class interchangeably in expressions. 

     ![Inheritance graph]      

---

The documentation for this class was generated from the following file:* [TensorForwardDeclarations.h](https://eigen.tuxfamily.org/dox/unsupported/TensorForwardDeclarations_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1TensorBase.html>

Eigen::TensorConcatenationOp
============================

  
### template<typename Axis, typename LhsXprType, typename RhsXprType> class Eigen::TensorConcatenationOp< Axis, LhsXprType, RhsXprType >

 [Tensor](classeigen_1_1tensor "The tensor class.") concatenation class. 

     ![Inheritance graph]      

---

The documentation for this class was generated from the following file:* [TensorConcatenation.h](https://eigen.tuxfamily.org/dox/unsupported/TensorConcatenation_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1TensorConcatenationOp.html>

Eigen::LevenbergMarquardt
=========================

  
### template<typename \_FunctorType> class Eigen::LevenbergMarquardt< \_FunctorType >

 Performs non linear optimization over a non-linear function, using a variant of the Levenberg Marquardt algorithm. 

 Check wikipedia for more information. <http://en.wikipedia.org/wiki/Levenberg%E2%80%93Marquardt_algorithm> 

  Inherits internal::no\_assignment\_operator.

 

|  |
| --- |
|  |
| [FVectorType](../classeigen_1_1matrix) &  | [diag](classeigen_1_1levenbergmarquardt#a6e237ca1f23cdf5caa98fe23c6bcf464) () |
|  |
| RealScalar  | [epsilon](classeigen_1_1levenbergmarquardt#aac799068926ca0bc3387b2dc5c0eb113) () const |
|  |
| RealScalar  | [factor](classeigen_1_1levenbergmarquardt#a282e28b8331376b9875429dab1e280ba) () const |
|  |
| RealScalar  | [fnorm](classeigen_1_1levenbergmarquardt#ac30c5ce96ac91663b287b2ba7ec7c712) () |
|  |
| RealScalar  | [ftol](classeigen_1_1levenbergmarquardt#a957ac071ec775779bb03d10b463ddfbc) () const |
|  |
| [FVectorType](../classeigen_1_1matrix) &  | [fvec](classeigen_1_1levenbergmarquardt#a6c296a4a5b91f0ecc398b479a67c242d) () |
|  |
| RealScalar  | [gnorm](classeigen_1_1levenbergmarquardt#ab91ec0507fb508a2402ac0dfa15af776) () |
|  |
| RealScalar  | [gtol](classeigen_1_1levenbergmarquardt#a18597c537ec7d492ee6d43788178e458) () const |
|  |
| [ComputationInfo](../group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) | [info](classeigen_1_1levenbergmarquardt#ae65bdccd2487989ae9b25f9c2e9dfab9) () const |
|  | Reports whether the minimization was successful. [More...](classeigen_1_1levenbergmarquardt#ae65bdccd2487989ae9b25f9c2e9dfab9) |
|  |
| Index  | [iterations](classeigen_1_1levenbergmarquardt#aeb094683f0abe9c29ee89be0677de744) () |
|  |
| JacobianType &  | [jacobian](classeigen_1_1levenbergmarquardt#aaf2179310fdf873483f5d8b46f15da8c) () |
|  |
| RealScalar  | [lm\_param](classeigen_1_1levenbergmarquardt#aa8aa0d8c1dab58ac51df999587609e09) (void) |
|  |
| JacobianType &  | [matrixR](classeigen_1_1levenbergmarquardt#afd6cd64fdd7ca32cc71a83d91432ea69) () |
|  |
| Index  | [maxfev](classeigen_1_1levenbergmarquardt#a495894dde1fedfba97721f6b4a076901) () const |
|  |
| Index  | [nfev](classeigen_1_1levenbergmarquardt#ad9563c6abeb33c0aba82e55fd72c64a6) () |
|  |
| Index  | [njev](classeigen_1_1levenbergmarquardt#a31bedcc92106ed170fde5750559a62a5) () |
|  |
| [PermutationType](../classeigen_1_1permutationmatrix) | [permutation](classeigen_1_1levenbergmarquardt#a691142ba877e072c58016b4be77e9855) () |
|  |
| void  | [resetParameters](classeigen_1_1levenbergmarquardt#a16172a2048058ea0a908213a7b0f8971) () |
|  |
| void  | [setEpsilon](classeigen_1_1levenbergmarquardt#a3e13f6631ae59be984ee1ea196899cd7) (RealScalar epsfcn) |
|  |
| void  | [setExternalScaling](classeigen_1_1levenbergmarquardt#a4af7d41545ec5908485357493839e6f6) (bool value) |
|  |
| void  | [setFactor](classeigen_1_1levenbergmarquardt#a3054eeba042b197ae8d415729770db69) (RealScalar [factor](classeigen_1_1levenbergmarquardt#a282e28b8331376b9875429dab1e280ba)) |
|  |
| void  | [setFtol](classeigen_1_1levenbergmarquardt#a09c0852c6a4534b84a16ac5d9c631c12) (RealScalar [ftol](classeigen_1_1levenbergmarquardt#a957ac071ec775779bb03d10b463ddfbc)) |
|  |
| void  | [setGtol](classeigen_1_1levenbergmarquardt#ad5610b2353f1ce5e0c7357ed1b215fea) (RealScalar [gtol](classeigen_1_1levenbergmarquardt#a18597c537ec7d492ee6d43788178e458)) |
|  |
| void  | [setMaxfev](classeigen_1_1levenbergmarquardt#af072d0f89c44415d8ed284df8b4a634a) (Index [maxfev](classeigen_1_1levenbergmarquardt#a495894dde1fedfba97721f6b4a076901)) |
|  |
| void  | [setXtol](classeigen_1_1levenbergmarquardt#a691b571366630f1329d2de7a5e40e7a5) (RealScalar [xtol](classeigen_1_1levenbergmarquardt#a25a7629ea877d8f08670536b3d234897)) |
|  |
| RealScalar  | [xtol](classeigen_1_1levenbergmarquardt#a25a7629ea877d8f08670536b3d234897) () const |
|  |

  diag()
------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [FVectorType](../classeigen_1_1matrix)& [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::diag  | ( |  | ) |  |

 | inline |

 
 
Returns
a reference to the diagonal of the jacobian 
    epsilon()
---------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::epsilon  | ( |  | ) |  const |

 | inline |

 
 
Returns
the error precision 
    factor()
--------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::factor  | ( |  | ) |  const |

 | inline |

 
 
Returns
the step bound for the diagonal shift 
    fnorm()
-------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::fnorm  | ( |  | ) |  |

 | inline |

 
 
Returns
the norm of current vector function 
    ftol()
------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::ftol  | ( |  | ) |  const |

 | inline |

 
 
Returns
the tolerance for the norm of the vector function 
    fvec()
------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [FVectorType](../classeigen_1_1matrix)& [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::fvec  | ( |  | ) |  |

 | inline |

 
 
Returns
a reference to the current vector function 
    gnorm()
-------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::gnorm  | ( |  | ) |  |

 | inline |

 
 
Returns
the norm of the gradient of the error 
    gtol()
------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::gtol  | ( |  | ) |  const |

 | inline |

 
 
Returns
the tolerance for the norm of the gradient of the error vector 
    info()
------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [ComputationInfo](../group__enums#ga85fad7b87587764e5cf6b513a9e0ee5e) [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::info  | ( |  | ) |  const |

 | inline |

 
 Reports whether the minimization was successful. 

 
Returns

`Success` if the minimization was successful, `NumericalIssue` if a numerical problem arises during the minimization process, for example during the QR factorization `NoConvergence` if the minimization did not converge after the maximum number of function evaluation allowed `InvalidInput` if the input matrix is invalid 
    iterations()
------------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Index [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::iterations  | ( |  | ) |  |

 | inline |

 
 
Returns
the number of iterations performed 
    jacobian()
----------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| JacobianType& [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::jacobian  | ( |  | ) |  |

 | inline |

 
 
Returns
a reference to the matrix where the current Jacobian matrix is stored 
    lm\_param()
-----------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| RealScalar [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::lm\_param  | ( | void  |  | ) |  |

 | inline |

 
 
Returns
the [LevenbergMarquardt](classeigen_1_1levenbergmarquardt "Performs non linear optimization over a non-linear function, using a variant of the Levenberg Marquar...") parameter 
    matrixR()
---------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| JacobianType& [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::matrixR  | ( |  | ) |  |

 | inline |

 
 
Returns
a reference to the triangular matrix R from the QR of the jacobian matrix. 
 
See also

[jacobian()](classeigen_1_1levenbergmarquardt#aaf2179310fdf873483f5d8b46f15da8c) 
    maxfev()
--------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Index [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::maxfev  | ( |  | ) |  const |

 | inline |

 
 
Returns
the maximum number of function evaluation 
    nfev()
------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Index [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::nfev  | ( |  | ) |  |

 | inline |

 
 
Returns
the number of functions evaluation 
    njev()
------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Index [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::njev  | ( |  | ) |  |

 | inline |

 
 
Returns
the number of jacobian evaluation 
    permutation()
-------------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| [PermutationType](../classeigen_1_1permutationmatrix) [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::permutation  | ( |  | ) |  |

 | inline |

 
 the permutation used in the QR factorization 

    resetParameters()
-----------------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| void [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::resetParameters  | ( |  | ) |  |

 | inline |

 
 Sets the default parameters 

    setEpsilon()
------------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::setEpsilon  | ( | RealScalar  | *epsfcn* | ) |  |

 | inline |

 
 Sets the error precision   
 

    setExternalScaling()
--------------------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::setExternalScaling  | ( | bool  | *value* | ) |  |

 | inline |

 
 Use an external Scaling. If set to true, pass a nonzero diagonal to diag() 

    setFactor()
-----------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::setFactor  | ( | RealScalar  | *factor* | ) |  |

 | inline |

 
 Sets the step bound for the diagonal shift 

    setFtol()
---------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::setFtol  | ( | RealScalar  | *ftol* | ) |  |

 | inline |

 
 Sets the tolerance for the norm of the vector function 

    setGtol()
---------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::setGtol  | ( | RealScalar  | *gtol* | ) |  |

 | inline |

 
 Sets the tolerance for the norm of the gradient of the error vector 

    setMaxfev()
-----------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::setMaxfev  | ( | Index  | *maxfev* | ) |  |

 | inline |

 
 Sets the maximum number of function evaluation 

    setXtol()
---------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::setXtol  | ( | RealScalar  | *xtol* | ) |  |

 | inline |

 
 Sets the tolerance for the norm of the solution vector 

    xtol()
------

    template<typename \_FunctorType >  

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| RealScalar [Eigen::LevenbergMarquardt](classeigen_1_1levenbergmarquardt)< \_FunctorType >::xtol  | ( |  | ) |  const |

 | inline |

 
 
Returns
the tolerance for the norm of the solution vector 
   

---

The documentation for this class was generated from the following files:* [LevenbergMarquardt/LevenbergMarquardt.h](https://eigen.tuxfamily.org/dox/unsupported/LevenbergMarquardt_2LevenbergMarquardt_8h_source.html)
* [LMonestep.h](https://eigen.tuxfamily.org/dox/unsupported/LMonestep_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1LevenbergMarquardt.html>

Eigen::SplineTraits
===================

  
### template<typename \_Scalar, int \_Dim, int \_Degree> struct Eigen::SplineTraits< Spline< \_Scalar, \_Dim, \_Degree >, Dynamic >

 Compile-time attributes of the [Spline](classeigen_1_1spline "A class representing multi-dimensional spline curves.") class for Dynamic degree. 

 


|  |
| --- |
|  |
| enum  | { [Dimension](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#ac4f7aaf3f2e8ee39cfd6f02e68339b1fa14c4a4e9fe5d03a6ba00511dacf018b3) } |
|  |
| enum  | { [Degree](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#a41e754a0cd76bf6195c44826c173b6d3a39d70871bb511aeb19f8c5a2501f0eaf) } |
|  |
| enum  | { [OrderAtCompileTime](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#a3ccfc317467e4553efd0dabf1ae673e0a782b4fa82b6dd9b27315743dc4696719) } |
|  |
| enum  | { [NumOfDerivativesAtCompileTime](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#a6bf3fcc0504bfa54bb1d6c4dbff87635a5699cd0a1c022f44b527c079adfc0049) } |
|  |
| enum  | { [DerivativeMemoryLayout](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#a42214943716b3cf3dbb6c9a35deb9b98a3b107c361982e84a53d02e066743dcdb) } |
|  |
|  typedef [Array](../classeigen_1_1array)< [Scalar](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#aa440dee6a559821c867c94ee4bbf60f3), [Dynamic](../namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [Dynamic](../namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [RowMajor](../group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f), [NumOfDerivativesAtCompileTime](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#a6bf3fcc0504bfa54bb1d6c4dbff87635a5699cd0a1c022f44b527c079adfc0049), [OrderAtCompileTime](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#a3ccfc317467e4553efd0dabf1ae673e0a782b4fa82b6dd9b27315743dc4696719) >  | [BasisDerivativeType](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#a79379499c52489dbf2b0251941f98370) |
|  | The data type used to store the values of the basis function derivatives.  |
|  |
|  typedef [Array](../classeigen_1_1array)< [Scalar](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#aa440dee6a559821c867c94ee4bbf60f3), 1, [OrderAtCompileTime](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#a3ccfc317467e4553efd0dabf1ae673e0a782b4fa82b6dd9b27315743dc4696719) >  | [BasisVectorType](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#a8f6574a4a8281fad62adbde35169bae5) |
|  | The data type used to store non-zero basis functions.  |
|  |
|  typedef [Array](../classeigen_1_1array)< [Scalar](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#aa440dee6a559821c867c94ee4bbf60f3), [Dimension](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#ac4f7aaf3f2e8ee39cfd6f02e68339b1fa14c4a4e9fe5d03a6ba00511dacf018b3), [Dynamic](../namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) >  | [ControlPointVectorType](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#ad4a21460926a6186f3b56cec9380e742) |
|  | The data type representing the spline's control points.  |
|  |
|  typedef [Array](../classeigen_1_1array)< [Scalar](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#aa440dee6a559821c867c94ee4bbf60f3), [Dimension](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#ac4f7aaf3f2e8ee39cfd6f02e68339b1fa14c4a4e9fe5d03a6ba00511dacf018b3), [Dynamic](../namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2), [DerivativeMemoryLayout](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#a42214943716b3cf3dbb6c9a35deb9b98a3b107c361982e84a53d02e066743dcdb), [Dimension](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#ac4f7aaf3f2e8ee39cfd6f02e68339b1fa14c4a4e9fe5d03a6ba00511dacf018b3), [NumOfDerivativesAtCompileTime](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#a6bf3fcc0504bfa54bb1d6c4dbff87635a5699cd0a1c022f44b527c079adfc0049) >  | [DerivativeType](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#ab8a352bf7e6f02ab6f1864e372868db2) |
|  | The data type used to store the spline's derivative values.  |
|  |
|  typedef [Array](../classeigen_1_1array)< [Scalar](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#aa440dee6a559821c867c94ee4bbf60f3), 1, [Dynamic](../namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) >  | [KnotVectorType](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#a2f5f4e5598c650df3f284c3db0eeafa9) |
|  | The data type used to store knot vectors.  |
|  |
|  typedef [Array](../classeigen_1_1array)< [Scalar](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#aa440dee6a559821c867c94ee4bbf60f3), 1, [Dynamic](../namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) >  | [ParameterVectorType](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#a61cd43163c3fe6c68cc6c191d210a36f) |
|  | The data type used to store parameter vectors.  |
|  |
|  typedef [Array](../classeigen_1_1array)< [Scalar](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#aa440dee6a559821c867c94ee4bbf60f3), [Dimension](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#ac4f7aaf3f2e8ee39cfd6f02e68339b1fa14c4a4e9fe5d03a6ba00511dacf018b3), 1 >  | [PointType](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#ad479d9b94761b2cf332fda5984301fcf) |
|  | The point type the spline is representing.  |
|  |
| typedef \_Scalar  | [Scalar](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#aa440dee6a559821c867c94ee4bbf60f3) |
|  |

  Scalar
------

    template<typename \_Scalar , int \_Dim, int \_Degree>  

|  |
| --- |
| typedef \_Scalar Eigen::SplineTraits< [Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree >, [Dynamic](../namespaceeigen#ad81fa7195215a0ce30017dfac309f0b2) >::[Scalar](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#aa440dee6a559821c867c94ee4bbf60f3) |

 
 The spline curve's scalar type. 

    anonymous enum
--------------

    template<typename \_Scalar , int \_Dim, int \_Degree>  

|  |
| --- |
| anonymous enum |

 
 

| Enumerator |
| --- |
| Dimension  | The spline curve's dimension.  |

    anonymous enum
--------------

    template<typename \_Scalar , int \_Dim, int \_Degree>  

|  |
| --- |
| anonymous enum |

 
 

| Enumerator |
| --- |
| Degree  | The spline curve's degree.  |

    anonymous enum
--------------

    template<typename \_Scalar , int \_Dim, int \_Degree>  

|  |
| --- |
| anonymous enum |

 
 

| Enumerator |
| --- |
| OrderAtCompileTime  | The spline curve's order at compile-time.  |

    anonymous enum
--------------

    template<typename \_Scalar , int \_Dim, int \_Degree>  

|  |
| --- |
| anonymous enum |

 
 

| Enumerator |
| --- |
| NumOfDerivativesAtCompileTime  | The number of derivatives defined for the current spline.  |

    anonymous enum
--------------

    template<typename \_Scalar , int \_Dim, int \_Degree>  

|  |
| --- |
| anonymous enum |

 
 

| Enumerator |
| --- |
| DerivativeMemoryLayout  | The derivative type's memory layout.  |

   

---

The documentation for this struct was generated from the following file:* [SplineFwd.h](https://eigen.tuxfamily.org/dox/unsupported/SplineFwd_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/structEigen_1_1SplineTraits_3_01Spline_3_01__Scalar_00_01__Dim_00_01__Degree_01_4_00_01Dynamic_01_4.html>

Eigen::Tensor
=============

  
### template<typename Scalar\_, int NumIndices\_, int Options\_, typename IndexType\_> class Eigen::Tensor< Scalar\_, NumIndices\_, Options\_, IndexType\_ >

 The tensor class. 

 The Tensor class is the work-horse for all *dense* tensors within [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.").

 The Tensor class encompasses only dynamic-size objects so far.

 The first two template parameters are required: 



Template Parameters
 

|  |  |
| --- | --- |
| Scalar\_ | Numeric type, e.g. float, double, int or `std::complex<float>`. User defined scalar types are supported as well (see [here](../topiccustomizing_customscalar#user_defined_scalars)).  |
| NumIndices\_ | Number of indices (i.e. rank of the tensor) |

   The remaining template parameters are optional – in most cases you don't have to worry about them. 



Template Parameters
 

|  |  |
| --- | --- |
| Options\_ | A combination of either **[RowMajor](../group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f)** or **[ColMajor](../group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a0103672ae41005ab03b4176c765afd62)**, and of either **[AutoAlign](../group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13ad0e7f67d40bcde3d41c12849b16ce6ea)** or **[DontAlign](../group__enums#ggaacded1a18ae58b0f554751f6cdf9eb13a56908522e51443a0aa0567f879c2e78a)**. The former controls [storage order](../group__topicstorageorders), and defaults to column-major. The latter controls alignment, which is required for vectorization. It defaults to aligning tensors. Note that tensors currently do not support any operations that profit from vectorization. Support for such operations (i.e. adding two tensors etc.) is planned. |

   You can access elements of tensors using normal subscripting:

 
```
[Eigen::Tensor<double, 4>](classeigen_1_1tensor) t(10, 10, 10, 10);
t(0, 1, 2, 3) = 42.0;
```

This class can be extended with the help of the plugin mechanism described on the page [Extending MatrixBase (and other classes)](../topiccustomizing_plugins) by defining the preprocessor symbol `EIGEN_TENSOR_PLUGIN`.

 ***Some notes:***

  
**Relation to other parts of [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."):**  The midterm development goal for this class is to have a similar hierarchy as [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") uses for matrices, so that taking blocks or using tensors in expressions is easily possible, including an interface with the vector/matrix code by providing .asMatrix() and .asVector() (or similar) methods for rank 2 and 1 tensors. However, currently, the Tensor class does not provide any of these features and is only available as a stand-alone class that just allows for coefficient access. Also, when fixed-size tensors are implemented, the number of template arguments is likely to change dramatically.   [Storage orders](../group__topicstorageorders) 

     ![Inheritance graph]      

|  |
| --- |
|  |
| void  | [resize](classeigen_1_1tensor#ade5949755478e59ad152dd952d6a8636) (const array< Index, NumIndices > &dimensions) |
|  |
| template<typename std::ptrdiff\_t... Indices>  |
| void  | [resize](classeigen_1_1tensor#a903e6654bc86b4abe01ddba12dc17223) (const Sizes< Indices... > &dimensions) |
|  |
|  | [Tensor](classeigen_1_1tensor#a9d0f7b1474af9b4e76cb4e544c2bb03c) (const array< Index, NumIndices > &dimensions) |
|  |

  Tensor()
--------

    template<typename Scalar\_ , int NumIndices\_, int Options\_, typename IndexType\_ >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Tensor](classeigen_1_1tensor)< Scalar\_, NumIndices\_, Options\_, IndexType\_ >::[Tensor](classeigen_1_1tensor) | ( | const array< Index, NumIndices > &  | *dimensions* | ) |  |

 | inlineexplicit |

 
 Normal Dimension 

    resize() [1/2]
--------------

    template<typename Scalar\_ , int NumIndices\_, int Options\_, typename IndexType\_ >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::Tensor](classeigen_1_1tensor)< Scalar\_, NumIndices\_, Options\_, IndexType\_ >::resize  | ( | const array< Index, NumIndices > &  | *dimensions* | ) |  |

 | inline |

 
 Normal Dimension 

    resize() [2/2]
--------------

    template<typename Scalar\_ , int NumIndices\_, int Options\_, typename IndexType\_ >   template<typename std::ptrdiff\_t... Indices>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| void [Eigen::Tensor](classeigen_1_1tensor)< Scalar\_, NumIndices\_, Options\_, IndexType\_ >::resize  | ( | const Sizes< Indices... > &  | *dimensions* | ) |  |

 | inline |

 
 Custom Dimension 

   

---

The documentation for this class was generated from the following file:* [Tensor.h](https://eigen.tuxfamily.org/dox/unsupported/Tensor_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1Tensor.html>

Eigen::TensorConversionOp
=========================

  
### template<typename TargetType, typename XprType> class Eigen::TensorConversionOp< TargetType, XprType >

 [Tensor](classeigen_1_1tensor "The tensor class.") conversion class. This class makes it possible to vectorize type casting operations when the number of scalars per packet in the source and the destination type differ. 

     ![Inheritance graph]      

---

The documentation for this class was generated from the following file:* [TensorConversion.h](https://eigen.tuxfamily.org/dox/unsupported/TensorConversion_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1TensorConversionOp.html>

Eigen::TensorCustomBinaryOp
===========================

  
### template<typename CustomBinaryFunc, typename LhsXprType, typename RhsXprType> class Eigen::TensorCustomBinaryOp< CustomBinaryFunc, LhsXprType, RhsXprType >

 [Tensor](classeigen_1_1tensor "The tensor class.") custom class. 

     ![Inheritance graph]      

---

The documentation for this class was generated from the following file:* [TensorCustomOp.h](https://eigen.tuxfamily.org/dox/unsupported/TensorCustomOp_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1TensorCustomBinaryOp.html>

Eigen::TensorCustomUnaryOp
==========================

  
### template<typename CustomUnaryFunc, typename XprType> class Eigen::TensorCustomUnaryOp< CustomUnaryFunc, XprType >

 [Tensor](classeigen_1_1tensor "The tensor class.") custom class. 

     ![Inheritance graph]      

---

The documentation for this class was generated from the following file:* [TensorCustomOp.h](https://eigen.tuxfamily.org/dox/unsupported/TensorCustomOp_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1TensorCustomUnaryOp.html>

Eigen::TensorDevice
===================

  
### template<typename ExpressionType, typename DeviceType> class Eigen::TensorDevice< ExpressionType, DeviceType >

 Pseudo expression providing an operator = that will evaluate its argument on the specified computing 'device' (GPU, thread pool, ...) 

 Example: C.device(EIGEN\_GPU) = A + B;

 Todo: operator \*= and /=. 

 


---

The documentation for this class was generated from the following file:* [TensorDevice.h](https://eigen.tuxfamily.org/dox/unsupported/TensorDevice_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1TensorDevice.html>

Eigen::TensorEvaluator
======================

  
### template<typename Derived, typename Device> class Eigen::TensorEvaluator< Derived, Device >

 A cost model used to limit the number of threads used for evaluating tensor expression. 

 The tensor evaluator classes.

 These classes are responsible for the evaluation of the tensor expression.

 TODO: add support for more types of expressions, in particular expressions leading to lvalues (slicing, reshaping, etc...) 

  Inherited by Eigen::TensorEvaluator< TensorChippingOp< DimId, ArgType >, Device >, Eigen::TensorEvaluator< TensorConcatenationOp< Axis, LeftArgType, RightArgType >, Device >, Eigen::TensorEvaluator< TensorLayoutSwapOp< ArgType >, Device >, Eigen::TensorEvaluator< TensorRef< Derived >, Device >, Eigen::TensorEvaluator< TensorReshapingOp< NewDimensions, ArgType >, Device >, Eigen::TensorEvaluator< TensorReverseOp< ReverseDimensions, ArgType >, Device >, Eigen::TensorEvaluator< TensorShufflingOp< Shuffle, ArgType >, Device >, Eigen::TensorEvaluator< TensorSlicingOp< StartIndices, Sizes, ArgType >, Device >, Eigen::TensorEvaluator< TensorStridingOp< Strides, ArgType >, Device >, and Eigen::TensorEvaluator< TensorStridingSlicingOp< StartIndices, StopIndices, Strides, ArgType >, Device >.

 

---

The documentation for this class was generated from the following file:* [TensorEvaluator.h](https://eigen.tuxfamily.org/dox/unsupported/TensorEvaluator_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/structEigen_1_1TensorEvaluator.html>

Eigen::TensorFixedSize
======================

  
### template<typename Scalar\_, typename Dimensions\_, int Options\_, typename IndexType> class Eigen::TensorFixedSize< Scalar\_, Dimensions\_, Options\_, IndexType >

 The fixed sized version of the tensor class. 

 The fixed sized equivalent of Eigen::Tensor<float, 3> t(3, 5, 7); is [Eigen::TensorFixedSize](classeigen_1_1tensorfixedsize "The fixed sized version of the tensor class.")<float, Sizes<3,5,7>> t; 

     ![Inheritance graph]      

---

The documentation for this class was generated from the following file:* [TensorFixedSize.h](https://eigen.tuxfamily.org/dox/unsupported/TensorFixedSize_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1TensorFixedSize.html>

Eigen::TensorGeneratorOp
========================

  
### template<typename Generator, typename XprType> class Eigen::TensorGeneratorOp< Generator, XprType >

 [Tensor](classeigen_1_1tensor "The tensor class.") generator class. 

     ![Inheritance graph]      

---

The documentation for this class was generated from the following files:* [TensorForwardDeclarations.h](https://eigen.tuxfamily.org/dox/unsupported/TensorForwardDeclarations_8h_source.html)
* [TensorGenerator.h](https://eigen.tuxfamily.org/dox/unsupported/TensorGenerator_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1TensorGeneratorOp.html>

Eigen::TensorMap
================

  
### template<typename PlainObjectType, int Options\_, template< class > class MakePointer\_> class Eigen::TensorMap< PlainObjectType, Options\_, MakePointer\_ >

 A tensor expression mapping an existing array of data. 

 `template <class> class MakePointer_` is added to convert the host pointer to the device pointer. It is added due to the fact that for our device compiler `T*` is not allowed. If we wanted to use the same Evaluator functions we have to convert that type to our pointer `T`. This is done through our `MakePointer_` class. By default the Type in the `MakePointer_<T>` is `T*` . Therefore, by adding the default value, we managed to convert the type and it does not break any existing code as its default value is `T*`. 

     ![Inheritance graph]      

---

The documentation for this class was generated from the following files:* [TensorForwardDeclarations.h](https://eigen.tuxfamily.org/dox/unsupported/TensorForwardDeclarations_8h_source.html)
* [TensorMap.h](https://eigen.tuxfamily.org/dox/unsupported/TensorMap_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1TensorMap.html>

Eigen::Spline
=============

  
### template<typename \_Scalar, int \_Dim, int \_Degree> class Eigen::Spline< \_Scalar, \_Dim, \_Degree >

 A class representing multi-dimensional spline curves. 

 The class represents B-splines with non-uniform knot vectors. Each control point of the B-spline is associated with a basis function 


 \begin{align\*} C(u) & = \sum\_{i=0}^{n}N\_{i,p}(u)P\_i \end{align\*} 

 
Template Parameters
 

|  |  |
| --- | --- |
| \_Scalar | The underlying data type (typically float or double)  |
| \_Dim | The curve dimension (e.g. 2 or 3)  |
| \_Degree | Per default set to Dynamic; could be set to the actual desired degree for optimization purposes (would result in stack allocation of several temporary variables).  |

   


|  |
| --- |
|  |
| enum  | { [Dimension](classeigen_1_1spline#addd9e94417775ca7f1ff41e48a4eb594ae0308df454dc12fe04b50909acccc432) } |
|  |
| enum  | { [Degree](classeigen_1_1spline#a9a67788e6a956eda63db28893fc09e71aeb9d45bc9095c3065fa5fa2e0ac3e061) } |
|  |
|  typedef SplineTraits< [Spline](classeigen_1_1spline) >::[BasisDerivativeType](classeigen_1_1spline#a9db0b0108353660cd03524f2e67d6b3c) | [BasisDerivativeType](classeigen_1_1spline#a9db0b0108353660cd03524f2e67d6b3c) |
|  | The data type used to store the values of the basis function derivatives.  |
|  |
|  typedef SplineTraits< [Spline](classeigen_1_1spline) >::[BasisVectorType](classeigen_1_1spline#a1d49cef942ea59d85d1711ee32354e6b) | [BasisVectorType](classeigen_1_1spline#a1d49cef942ea59d85d1711ee32354e6b) |
|  | The data type used to store non-zero basis functions.  |
|  |
|  typedef SplineTraits< [Spline](classeigen_1_1spline) >::[ControlPointVectorType](classeigen_1_1spline#ac42c673462a98ad1779761bebeb450bf) | [ControlPointVectorType](classeigen_1_1spline#ac42c673462a98ad1779761bebeb450bf) |
|  | The data type representing the spline's control points.  |
|  |
|  typedef SplineTraits< [Spline](classeigen_1_1spline) >::[KnotVectorType](classeigen_1_1spline#a066f7a8b120316c9068b559f0790e9ec) | [KnotVectorType](classeigen_1_1spline#a066f7a8b120316c9068b559f0790e9ec) |
|  | The data type used to store knot vectors.  |
|  |
|  typedef SplineTraits< [Spline](classeigen_1_1spline) >::[ParameterVectorType](classeigen_1_1spline#a04bcc878ef5c8316e8cc60b4cf00d77c) | [ParameterVectorType](classeigen_1_1spline#a04bcc878ef5c8316e8cc60b4cf00d77c) |
|  | The data type used to store parameter vectors.  |
|  |
|  typedef SplineTraits< [Spline](classeigen_1_1spline) >::[PointType](classeigen_1_1spline#a9ade8a2f81dae6eedb8845cb080672bd) | [PointType](classeigen_1_1spline#a9ade8a2f81dae6eedb8845cb080672bd) |
|  | The point type the spline is representing.  |
|  |
| typedef \_Scalar  | [Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) |
|  |




|  |
| --- |
|  |
| SplineTraits< [Spline](classeigen_1_1spline) >::[BasisDerivativeType](classeigen_1_1spline#a9db0b0108353660cd03524f2e67d6b3c) | [basisFunctionDerivatives](classeigen_1_1spline#a17d416e814d1ee957e5b309dc423751f) ([Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) u, DenseIndex order) const |
|  | Computes the non-zero spline basis function derivatives up to given order. [More...](classeigen_1_1spline#a17d416e814d1ee957e5b309dc423751f) |
|  |
| template<int DerivativeOrder>  |
| SplineTraits< [Spline](classeigen_1_1spline), DerivativeOrder >::[BasisDerivativeType](classeigen_1_1spline#a9db0b0108353660cd03524f2e67d6b3c) | [basisFunctionDerivatives](classeigen_1_1spline#acd36d8b5a4f57eb1d7f27989ac6d54ac) ([Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) u, DenseIndex order=DerivativeOrder) const |
|  | Computes the non-zero spline basis function derivatives up to given order. [More...](classeigen_1_1spline#acd36d8b5a4f57eb1d7f27989ac6d54ac) |
|  |
| SplineTraits< [Spline](classeigen_1_1spline) >::[BasisVectorType](classeigen_1_1spline#a1d49cef942ea59d85d1711ee32354e6b) | [basisFunctions](classeigen_1_1spline#afe0997f0bb02a3fac3073016abac04c6) ([Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) u) const |
|  | Computes the non-zero basis functions at the given site. [More...](classeigen_1_1spline#afe0997f0bb02a3fac3073016abac04c6) |
|  |
|  const [ControlPointVectorType](classeigen_1_1spline#ac42c673462a98ad1779761bebeb450bf) &  | [ctrls](classeigen_1_1spline#a0fc81e475d3a0ba34da1bd97f2e8fbc7) () const |
|  | Returns the ctrls of the underlying spline.  |
|  |
|  DenseIndex  | [degree](classeigen_1_1spline#a0df23e941ac0f31dcd095a4dd4f4a7ec) () const |
|  | Returns the spline degree.  |
|  |
| SplineTraits< [Spline](classeigen_1_1spline) >::DerivativeType  | [derivatives](classeigen_1_1spline#a196730cf190dfa16907db888277e5aed) ([Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) u, DenseIndex order) const |
|  | Evaluation of spline derivatives of up-to given order. [More...](classeigen_1_1spline#a196730cf190dfa16907db888277e5aed) |
|  |
| template<int DerivativeOrder>  |
| SplineTraits< [Spline](classeigen_1_1spline), DerivativeOrder >::DerivativeType  | [derivatives](classeigen_1_1spline#a50bcf6c99a95ecab7c475f3ab503ee22) ([Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) u, DenseIndex order=DerivativeOrder) const |
|  | Evaluation of spline derivatives of up-to given order. [More...](classeigen_1_1spline#a50bcf6c99a95ecab7c475f3ab503ee22) |
|  |
|  const [KnotVectorType](classeigen_1_1spline#a066f7a8b120316c9068b559f0790e9ec) &  | [knots](classeigen_1_1spline#ae3eac8af580ad880d8ad3a259d453aa1) () const |
|  | Returns the knots of the underlying spline.  |
|  |
| [PointType](classeigen_1_1spline#a9ade8a2f81dae6eedb8845cb080672bd) | [operator()](classeigen_1_1spline#a3c7e1838eae4ee7e341ef9d3dbf9ba45) ([Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) u) const |
|  | Returns the spline value at a given site \(u\). [More...](classeigen_1_1spline#a3c7e1838eae4ee7e341ef9d3dbf9ba45) |
|  |
| DenseIndex  | [span](classeigen_1_1spline#ab62751802b4cc237aadb0dbf3455df98) ([Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) u) const |
|  | Returns the span within the knot vector in which u is falling. [More...](classeigen_1_1spline#ab62751802b4cc237aadb0dbf3455df98) |
|  |
|  | [Spline](classeigen_1_1spline#a25ebf3b3621db98ffe60eba3c0d64025) () |
|  | Creates a (constant) zero spline. For Splines with dynamic degree, the resulting degree will be 0.  |
|  |
| template<typename OtherVectorType , typename OtherArrayType >  |
|  | [Spline](classeigen_1_1spline#ac9dfdbeabf9573642d970e29e92dd2be) (const OtherVectorType &[knots](classeigen_1_1spline#ae3eac8af580ad880d8ad3a259d453aa1), const OtherArrayType &[ctrls](classeigen_1_1spline#a0fc81e475d3a0ba34da1bd97f2e8fbc7)) |
|  | Creates a spline from a knot vector and control points. [More...](classeigen_1_1spline#ac9dfdbeabf9573642d970e29e92dd2be) |
|  |
| template<int OtherDegree>  |
|  | [Spline](classeigen_1_1spline#a0e6083605acc9f565e8bf4057b3f4bd3) (const [Spline](classeigen_1_1spline)< [Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742), [Dimension](classeigen_1_1spline#addd9e94417775ca7f1ff41e48a4eb594ae0308df454dc12fe04b50909acccc432), OtherDegree > &spline) |
|  | Copy constructor for splines. [More...](classeigen_1_1spline#a0e6083605acc9f565e8bf4057b3f4bd3) |
|  |




|  |
| --- |
|  |
| static [BasisDerivativeType](classeigen_1_1spline#a9db0b0108353660cd03524f2e67d6b3c) | [BasisFunctionDerivatives](classeigen_1_1spline#ab5d0d30713ca56dcd33dbb37c262829a) (const [Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) u, const DenseIndex order, const DenseIndex [degree](classeigen_1_1spline#a0df23e941ac0f31dcd095a4dd4f4a7ec), const [KnotVectorType](classeigen_1_1spline#a066f7a8b120316c9068b559f0790e9ec) &[knots](classeigen_1_1spline#ae3eac8af580ad880d8ad3a259d453aa1)) |
|  | Computes the non-zero spline basis function derivatives up to given order. [More...](classeigen_1_1spline#ab5d0d30713ca56dcd33dbb37c262829a) |
|  |
| static [BasisVectorType](classeigen_1_1spline#a1d49cef942ea59d85d1711ee32354e6b) | [BasisFunctions](classeigen_1_1spline#aac1839e8a956636d76bec24a4afc27e2) ([Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) u, DenseIndex [degree](classeigen_1_1spline#a0df23e941ac0f31dcd095a4dd4f4a7ec), const [KnotVectorType](classeigen_1_1spline#a066f7a8b120316c9068b559f0790e9ec) &[knots](classeigen_1_1spline#ae3eac8af580ad880d8ad3a259d453aa1)) |
|  | Returns the spline's non-zero basis functions. [More...](classeigen_1_1spline#aac1839e8a956636d76bec24a4afc27e2) |
|  |
|  static DenseIndex  | [Span](classeigen_1_1spline#aaba7632c61b84194e890696c2b57be1b) (typename SplineTraits< [Spline](classeigen_1_1spline) >::[Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) u, DenseIndex [degree](classeigen_1_1spline#a0df23e941ac0f31dcd095a4dd4f4a7ec), const typename SplineTraits< [Spline](classeigen_1_1spline) >::[KnotVectorType](classeigen_1_1spline#a066f7a8b120316c9068b559f0790e9ec) &[knots](classeigen_1_1spline#ae3eac8af580ad880d8ad3a259d453aa1)) |
|  | Computes the span within the provided knot vector in which u is falling.  |
|  |

  Scalar
------

    template<typename \_Scalar , int \_Dim, int \_Degree>  

|  |
| --- |
| typedef \_Scalar [Eigen::Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree >::[Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) |

 
 The spline curve's scalar type. 

    anonymous enum
--------------

    template<typename \_Scalar , int \_Dim, int \_Degree>  

|  |
| --- |
| anonymous enum |

 
 

| Enumerator |
| --- |
| Dimension  | The spline curve's dimension.  |

    anonymous enum
--------------

    template<typename \_Scalar , int \_Dim, int \_Degree>  

|  |
| --- |
| anonymous enum |

 
 

| Enumerator |
| --- |
| Degree  | The spline curve's degree.  |

    Spline() [1/2]
--------------

    template<typename \_Scalar , int \_Dim, int \_Degree>   template<typename OtherVectorType , typename OtherArrayType >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Eigen::Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree >::[Spline](classeigen_1_1spline) | ( | const OtherVectorType &  | *knots*,  |
|  |  | const OtherArrayType &  | *ctrls* |
|  | ) |  |  |

 | inline |

 
 Creates a spline from a knot vector and control points. 

 
Parameters
 

|  |  |
| --- | --- |
| knots | The spline's knot vector.  |
| ctrls | The spline's control point vector.  |

      Spline() [2/2]
--------------

    template<typename \_Scalar , int \_Dim, int \_Degree>   template<int OtherDegree>  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Eigen::Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree >::[Spline](classeigen_1_1spline) | ( | const [Spline](classeigen_1_1spline)< [Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742), [Dimension](classeigen_1_1spline#addd9e94417775ca7f1ff41e48a4eb594ae0308df454dc12fe04b50909acccc432), OtherDegree > &  | *spline* | ) |  |

 | inline |

 
 Copy constructor for splines. 

 
Parameters
 

|  |  |
| --- | --- |
| spline | The input spline.  |

      BasisFunctionDerivatives()
--------------------------

    template<typename \_Scalar , int \_Dim, int \_Degree>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| SplineTraits< [Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree > >::[BasisDerivativeType](classeigen_1_1spline#a9db0b0108353660cd03524f2e67d6b3c) [Eigen::Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree >::BasisFunctionDerivatives  | ( | const [Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) | *u*,  |
|  |  | const DenseIndex  | *order*,  |
|  |  | const DenseIndex  | *degree*,  |
|  |  | const [KnotVectorType](classeigen_1_1spline#a066f7a8b120316c9068b559f0790e9ec) &  | *knots* |
|  | ) |  |  |

 | static |

 
 Computes the non-zero spline basis function derivatives up to given order. 

 The function computes 


 \begin{align\*} \frac{d^i}{du^i} N\_{i,p}(u), \hdots, \frac{d^i}{du^i} N\_{i+p+1,p}(u) \end{align\*} 

  with i ranging from 0 up to the specified order.

 
Parameters
 

|  |  |
| --- | --- |
| u | Parameter \(u \in [0;1]\) at which the non-zero basis function derivatives are computed.  |
| order | The order up to which the basis function derivatives are computes.  |
| degree | The degree of the underlying spline  |
| knots | The underlying spline's knot vector.  |

      basisFunctionDerivatives() [1/2]
--------------------------------

    template<typename \_Scalar , int \_Dim, int \_Degree>  

|  |  |  |  |
| --- | --- | --- | --- |
| SplineTraits< [Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree >, DerivativeOrder >::[BasisDerivativeType](classeigen_1_1spline#a9db0b0108353660cd03524f2e67d6b3c) [Eigen::Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree >::basisFunctionDerivatives  | ( | [Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) | *u*,  |
|  |  | DenseIndex  | *order* |
|  | ) |  |  const |

 
 Computes the non-zero spline basis function derivatives up to given order. 

 The function computes 


 \begin{align\*} \frac{d^i}{du^i} N\_{i,p}(u), \hdots, \frac{d^i}{du^i} N\_{i+p+1,p}(u) \end{align\*} 

  with i ranging from 0 up to the specified order.

 
Parameters
 

|  |  |
| --- | --- |
| u | Parameter \(u \in [0;1]\) at which the non-zero basis function derivatives are computed.  |
| order | The order up to which the basis function derivatives are computes.  |

      basisFunctionDerivatives() [2/2]
--------------------------------

    template<typename \_Scalar , int \_Dim, int \_Degree>   template<int DerivativeOrder>  

|  |  |  |  |
| --- | --- | --- | --- |
| SplineTraits<[Spline](classeigen_1_1spline),DerivativeOrder>::[BasisDerivativeType](classeigen_1_1spline#a9db0b0108353660cd03524f2e67d6b3c) [Eigen::Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree >::basisFunctionDerivatives  | ( | [Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) | *u*,  |
|  |  | DenseIndex  | *order* = `DerivativeOrder` |
|  | ) |  |  const |

 
 Computes the non-zero spline basis function derivatives up to given order. 

 The function computes 


 \begin{align\*} \frac{d^i}{du^i} N\_{i,p}(u), \hdots, \frac{d^i}{du^i} N\_{i+p+1,p}(u) \end{align\*} 

  with i ranging from 0 up to the specified order.

 
Parameters
 

|  |  |
| --- | --- |
| u | Parameter \(u \in [0;1]\) at which the non-zero basis function derivatives are computed.  |
| order | The order up to which the basis function derivatives are computes. Using the template version of this function is more efficieent since temporary objects are allocated on the stack whenever this is possible.  |

      basisFunctions()
----------------

    template<typename \_Scalar , int \_Dim, int \_Degree>  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| SplineTraits< [Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree > >::[BasisVectorType](classeigen_1_1spline#a1d49cef942ea59d85d1711ee32354e6b) [Eigen::Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree >::basisFunctions  | ( | [Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) | *u* | ) |  const |

 
 Computes the non-zero basis functions at the given site. 

 Splines have local support and a point from their image is defined by exactly \(p+1\) control points \(P\_i\) where \(p\) is the spline degree.

 This function computes the \(p+1\) non-zero basis function values for a given parameter value \(u\). It returns 


 \begin{align\*} N\_{i,p}(u), \hdots, N\_{i+p+1,p}(u) \end{align\*} 

 
Parameters
 

|  |  |
| --- | --- |
| u | Parameter \(u \in [0;1]\) at which the non-zero basis functions are computed.  |

      BasisFunctions()
----------------

    template<typename \_Scalar , int \_Dim, int \_Degree>  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| [Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree >::[BasisVectorType](classeigen_1_1spline#a1d49cef942ea59d85d1711ee32354e6b) [Eigen::Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree >::BasisFunctions  | ( | [Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) | *u*,  |
|  |  | DenseIndex  | *degree*,  |
|  |  | const [KnotVectorType](classeigen_1_1spline#a066f7a8b120316c9068b559f0790e9ec) &  | *knots* |
|  | ) |  |  |

 | static |

 
 Returns the spline's non-zero basis functions. 

 The function computes and returns 


 \begin{align\*} N\_{i,p}(u), \hdots, N\_{i+p+1,p}(u) \end{align\*} 

 
Parameters
 

|  |  |
| --- | --- |
| u | The site at which the basis functions are computed.  |
| degree | The degree of the underlying spline.  |
| knots | The underlying spline's knot vector.  |

      derivatives() [1/2]
-------------------

    template<typename \_Scalar , int \_Dim, int \_Degree>  

|  |  |  |  |
| --- | --- | --- | --- |
| SplineTraits< [Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree >, DerivativeOrder >::DerivativeType [Eigen::Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree >::derivatives  | ( | [Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) | *u*,  |
|  |  | DenseIndex  | *order* |
|  | ) |  |  const |

 
 Evaluation of spline derivatives of up-to given order. 

 The function returns 


 \begin{align\*} \frac{d^i}{du^i}C(u) & = \sum\_{i=0}^{n} \frac{d^i}{du^i} N\_{i,p}(u)P\_i \end{align\*} 

  for i ranging between 0 and order.

 
Parameters
 

|  |  |
| --- | --- |
| u | Parameter \(u \in [0;1]\) at which the spline derivative is evaluated.  |
| order | The order up to which the derivatives are computed.  |

      derivatives() [2/2]
-------------------

    template<typename \_Scalar , int \_Dim, int \_Degree>   template<int DerivativeOrder>  

|  |  |  |  |
| --- | --- | --- | --- |
| SplineTraits<[Spline](classeigen_1_1spline),DerivativeOrder>::DerivativeType [Eigen::Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree >::derivatives  | ( | [Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) | *u*,  |
|  |  | DenseIndex  | *order* = `DerivativeOrder` |
|  | ) |  |  const |

 
 Evaluation of spline derivatives of up-to given order. 

 The function returns 


 \begin{align\*} \frac{d^i}{du^i}C(u) & = \sum\_{i=0}^{n} \frac{d^i}{du^i} N\_{i,p}(u)P\_i \end{align\*} 

  for i ranging between 0 and order.

 
Parameters
 

|  |  |
| --- | --- |
| u | Parameter \(u \in [0;1]\) at which the spline derivative is evaluated.  |
| order | The order up to which the derivatives are computed. Using the template version of this function is more efficieent since temporary objects are allocated on the stack whenever this is possible.  |

      operator()()
------------

    template<typename \_Scalar , int \_Dim, int \_Degree>  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree >::[PointType](classeigen_1_1spline#a9ade8a2f81dae6eedb8845cb080672bd) [Eigen::Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree >::operator()  | ( | [Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) | *u* | ) |  const |

 
 Returns the spline value at a given site \(u\). 

 The function returns 


 \begin{align\*} C(u) & = \sum\_{i=0}^{n}N\_{i,p}P\_i \end{align\*} 

 
Parameters
 

|  |  |
| --- | --- |
| u | Parameter \(u \in [0;1]\) at which the spline is evaluated.  |

   
Returns
The spline value at the given location \(u\). 
    span()
------

    template<typename \_Scalar , int \_Dim, int \_Degree>  

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| DenseIndex [Eigen::Spline](classeigen_1_1spline)< \_Scalar, \_Dim, \_Degree >::span  | ( | [Scalar](classeigen_1_1spline#a8cafd78b564825c76fbb3419653d9742) | *u* | ) |  const |

 
 Returns the span within the knot vector in which u is falling. 

 
Parameters
 

|  |  |
| --- | --- |
| u | The site for which the span is determined.  |

     

---

The documentation for this class was generated from the following file:* [Spline.h](https://eigen.tuxfamily.org/dox/unsupported/Spline_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1Spline.html>

Eigen::TensorRef
================

  
### template<typename PlainObjectType> class Eigen::TensorRef< PlainObjectType >

 A reference to a tensor expression The expression will be evaluated lazily (as much as possible). 

     ![Inheritance graph]      

---

The documentation for this class was generated from the following files:* [TensorForwardDeclarations.h](https://eigen.tuxfamily.org/dox/unsupported/TensorForwardDeclarations_8h_source.html)
* [TensorRef.h](https://eigen.tuxfamily.org/dox/unsupported/TensorRef_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1TensorRef.html>

EulerAngles module
==================

  This module provides generic euler angles rotation. 

 Euler angles are a way to represent 3D rotation.

 In order to use this module in your code, include this header: 



```
#include <unsupported/Eigen/EulerAngles>

```

See [EulerAngles](classeigen_1_1eulerangles) for more information. 

 

|  |
| --- |
|  |
| class  | [Eigen::EulerAngles< \_Scalar, \_System >](classeigen_1_1eulerangles) |
|  | Represents a rotation in a 3 dimensional space as three Euler angles. [More...](classeigen_1_1eulerangles#details) |
|  |
| class  | [Eigen::EulerSystem< \_AlphaAxis, \_BetaAxis, \_GammaAxis >](classeigen_1_1eulersystem) |
|  | Represents a fixed Euler rotation system. [More...](classeigen_1_1eulersystem#details) |
|  |




|  |
| --- |
|  |
| enum  | [Eigen::EulerAxis](group__eulerangles__module#gae614aa7cdd687fb5c421a54f2ce5c361) {  [Eigen::EULER\_X](group__eulerangles__module#ggae614aa7cdd687fb5c421a54f2ce5c361a11e1ea88cbe04a6fc077475d515d0b38) ,  [Eigen::EULER\_Y](group__eulerangles__module#ggae614aa7cdd687fb5c421a54f2ce5c361aee756a2b63043248f3d83541386c266b) ,  [Eigen::EULER\_Z](group__eulerangles__module#ggae614aa7cdd687fb5c421a54f2ce5c361a95187b9943820cca5edc4bc96b3c08be)  } |
|  | Representation of a fixed signed rotation axis for EulerSystem. [More...](group__eulerangles__module#gae614aa7cdd687fb5c421a54f2ce5c361) |
|  |

  EulerAxis
---------

   

|  |
| --- |
| enum [Eigen::EulerAxis](group__eulerangles__module#gae614aa7cdd687fb5c421a54f2ce5c361) |

 
 Representation of a fixed signed rotation axis for [EulerSystem](classeigen_1_1eulersystem "Represents a fixed Euler rotation system."). 

 Values here represent:


* The axis of the rotation: X, Y or Z.
* The sign (i.e. direction of the rotation along the axis): positive(+) or negative(-)

 Therefore, this could express all the axes {+X,+Y,+Z,-X,-Y,-Z}

 For positive axis, use +EULER\_{axis}, and for negative axis use -EULER\_{axis}. 

 

| Enumerator |
| --- |
| EULER\_X  | the X axis  |
| EULER\_Y  | the Y axis  |
| EULER\_Z  | the Z axis  |

    

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/group__EulerAngles__Module.html>

KroneckerProduct module
=======================

  This module contains an experimental Kronecker product implementation.

 
```
#include <Eigen/KroneckerProduct>

```
 

|  |
| --- |
|  |
| class  | [Eigen::KroneckerProduct< Lhs, Rhs >](classeigen_1_1kroneckerproduct) |
|  | Kronecker tensor product helper class for dense matrices. [More...](classeigen_1_1kroneckerproduct#details) |
|  |
| class  | [Eigen::KroneckerProductBase< Derived >](classeigen_1_1kroneckerproductbase) |
|  | The base class of dense and sparse Kronecker product. [More...](classeigen_1_1kroneckerproductbase#details) |
|  |
| class  | [Eigen::KroneckerProductSparse< Lhs, Rhs >](classeigen_1_1kroneckerproductsparse) |
|  | Kronecker tensor product helper class for sparse matrices. [More...](classeigen_1_1kroneckerproductsparse#details) |
|  |




|  |
| --- |
|  |
| template<typename A , typename B >  |
| [KroneckerProductSparse](classeigen_1_1kroneckerproductsparse)< A, B >  | [Eigen::kroneckerProduct](group__kroneckerproduct__module#gaca497f43cc92bcbf6eaff64984a266cc) (const [EigenBase](../structeigen_1_1eigenbase)< A > &a, const [EigenBase](../structeigen_1_1eigenbase)< B > &b) |
|  |
| template<typename A , typename B >  |
| [KroneckerProduct](classeigen_1_1kroneckerproduct)< A, B >  | [Eigen::kroneckerProduct](group__kroneckerproduct__module#gaa8924dffc6cee7aa1e908dc395a7a167) (const [MatrixBase](../classeigen_1_1matrixbase)< A > &a, const [MatrixBase](../classeigen_1_1matrixbase)< B > &b) |
|  |

  kroneckerProduct() [1/2]
------------------------

    template<typename A , typename B >  

|  |  |  |  |
| --- | --- | --- | --- |
| [KroneckerProductSparse](classeigen_1_1kroneckerproductsparse)<A,B> Eigen::kroneckerProduct  | ( | const [EigenBase](../structeigen_1_1eigenbase)< A > &  | *a*,  |
|  |  | const [EigenBase](../structeigen_1_1eigenbase)< B > &  | *b* |
|  | ) |  |  |

 
 Computes Kronecker tensor product of two matrices, at least one of which is sparse

 
Warning
If you want to replace a matrix by its Kronecker product with some matrix, do **NOT** do this: 
```
A = [kroneckerProduct](group__kroneckerproduct__module#gaa8924dffc6cee7aa1e908dc395a7a167)(A,B); // bug!!! caused by aliasing effect
```
 instead, use eval() to work around this: 
```
A = [kroneckerProduct](group__kroneckerproduct__module#gaa8924dffc6cee7aa1e908dc395a7a167)(A,B).eval();

```


 
Parameters
 

|  |  |
| --- | --- |
| a | Dense/sparse matrix a  |
| b | Dense/sparse matrix b  |

   
Returns
Kronecker tensor product of a and b, stored in a sparse matrix 
    kroneckerProduct() [2/2]
------------------------

    template<typename A , typename B >  

|  |  |  |  |
| --- | --- | --- | --- |
| [KroneckerProduct](classeigen_1_1kroneckerproduct)<A,B> Eigen::kroneckerProduct  | ( | const [MatrixBase](../classeigen_1_1matrixbase)< A > &  | *a*,  |
|  |  | const [MatrixBase](../classeigen_1_1matrixbase)< B > &  | *b* |
|  | ) |  |  |

 
 Computes Kronecker tensor product of two dense matrices

 
Warning
If you want to replace a matrix by its Kronecker product with some matrix, do **NOT** do this: 
```
A = [kroneckerProduct](group__kroneckerproduct__module#gaa8924dffc6cee7aa1e908dc395a7a167)(A,B); // bug!!! caused by aliasing effect

```
 instead, use eval() to work around this: 
```
A = [kroneckerProduct](group__kroneckerproduct__module#gaa8924dffc6cee7aa1e908dc395a7a167)(A,B).eval();

```


 
Parameters
 

|  |  |
| --- | --- |
| a | [Dense](../structeigen_1_1dense) matrix a  |
| b | [Dense](../structeigen_1_1dense) matrix b  |

   
Returns
Kronecker tensor product of a and b 
    

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/group__KroneckerProduct__Module.html>

Non linear optimization module
==============================

  
```
#include <unsupported/Eigen/NonLinearOptimization>

```

This module provides implementation of two important algorithms in non linear optimization. In both cases, we consider a system of non linear functions. Of course, this should work, and even work very well if those functions are actually linear. But if this is so, you should probably better use other methods more fitted to this special case.

 One algorithm allows to find a least-squares solution of such a system (Levenberg-Marquardt algorithm) and the second one is used to find a zero for the system (Powell hybrid "dogleg" method).

 This code is a port of minpack (<http://en.wikipedia.org/wiki/MINPACK>). Minpack is a very famous, old, robust and well renowned package, written in fortran. Those implementations have been carefully tuned, tested, and used for several decades.

 The original fortran code was automatically translated using f2c (<http://en.wikipedia.org/wiki/F2c>) in C, then c++, and then cleaned by several different authors. The last one of those cleanings being our starting point : <http://devernay.free.fr/hacks/cminpack.html>

 Finally, we ported this code to [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."), creating classes and API coherent with [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library."). When possible, we switched to [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") implementation, such as most linear algebra (vectors, matrices, stable norms).

 Doing so, we were very careful to check the tests we setup at the very beginning, which ensure that the same results are found.

 
 Tests
=======

 The tests are placed in the file unsupported/test/NonLinear.cpp.

 There are two kinds of tests : those that come from examples bundled with cminpack. They guaranty we get the same results as the original algorithms (value for 'x', for the number of evaluations of the function, and for the number of evaluations of the Jacobian if ever).

 Other tests were added by myself at the very beginning of the process and check the results for Levenberg-Marquardt using the reference data on <http://www.itl.nist.gov/div898/strd/nls/nls_main.shtml>. Since then i've carefully checked that the same results were obtained when modifying the code. Please note that we do not always get the exact same decimals as they do, but this is ok : they use 128bits float, and we do the tests using the C type 'double', which is 64 bits on most platforms (x86 and amd64, at least). I've performed those tests on several other implementations of Levenberg-Marquardt, and (c)minpack performs VERY well compared to those, both in accuracy and speed.

 The documentation for running the tests is on the wiki <http://eigen.tuxfamily.org/index.php?title=Tests>

 
 API: overview of methods
==========================

 Both algorithms needs a functor computing the Jacobian. It can be computed by hand, using auto-differentiation (see [Auto Diff module](group__autodiff__module)), or using numerical differences (see [Numerical differentiation module](group__numericaldiff__module)). For instance: 



```
MyFunc func;
NumericalDiff<MyFunc> func_with_num_diff(func);
LevenbergMarquardt<NumericalDiff<MyFunc> > lm(func_with_num_diff);

```

 For HybridNonLinearSolver, the method solveNumericalDiff() does the above wrapping for you.

 The methods LevenbergMarquardt.lmder1()/lmdif1()/lmstr1() and HybridNonLinearSolver.hybrj1()/hybrd1() are specific methods from the original minpack package that you probably should NOT use until you are porting a code that was previously using minpack. They just define a 'simple' API with default values for some parameters.

 All algorithms are provided using two APIs :


* one where the user inits the algorithm, and uses '\*OneStep()' as much as he wants : this way the caller have control over the steps
* one where the user just calls a method (optimize() or solve()) which will handle the loop: init + loop until a stop condition is met. Those are provided for convenience.

 As an example, the method LevenbergMarquardt::minimize() is implemented as follow: 



```
Status LevenbergMarquardt<FunctorType,Scalar>::minimize(FVectorType  &x, const int mode)
{
    Status status = minimizeInit(x, mode);
    do {
        status = minimizeOneStep(x, mode);
    } while (status==Running);
    return status;
}

```


 Examples
==========

 The easiest way to understand how to use this module is by looking at the many examples in the file unsupported/test/NonLinearOptimization.cpp. 

 

|  |
| --- |
|  |
| class  | [Eigen::HybridNonLinearSolver< FunctorType, Scalar >](classeigen_1_1hybridnonlinearsolver) |
|  | Finds a zero of a system of n nonlinear functions in n variables by a modification of the Powell hybrid method ("dogleg"). [More...](classeigen_1_1hybridnonlinearsolver#details) |
|  |
| class  | [Eigen::LevenbergMarquardt< \_FunctorType >](classeigen_1_1levenbergmarquardt) |
|  | Performs non linear optimization over a non-linear function, using a variant of the Levenberg Marquardt algorithm. [More...](classeigen_1_1levenbergmarquardt#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/group__NonLinearOptimization__Module.html>

Iterative solvers module
========================

  This module aims to provide various iterative linear and non linear solver algorithms. It currently provides:


* a constrained conjugate gradient
* a Householder GMRES implementation
* an IDR(s) implementation
* a DGMRES implementation
* a MINRES implementation

 
```
#include <unsupported/Eigen/IterativeSolvers>

```
 

|  |
| --- |
|  |
| class  | [Eigen::DGMRES< \_MatrixType, \_Preconditioner >](classeigen_1_1dgmres) |
|  | A Restarted [GMRES](classeigen_1_1gmres "A GMRES solver for sparse square problems.") with deflation. This class implements a modification of the [GMRES](classeigen_1_1gmres "A GMRES solver for sparse square problems.") solver for sparse linear systems. The basis is built with modified Gram-Schmidt. At each restart, a few approximated eigenvectors corresponding to the smallest eigenvalues are used to build a preconditioner for the next cycle. This preconditioner for deflation can be combined with any other preconditioner, the [IncompleteLUT](../classeigen_1_1incompletelut) for instance. The preconditioner is applied at right of the matrix and the combination is multiplicative. [More...](classeigen_1_1dgmres#details) |
|  |
| class  | [Eigen::GMRES< \_MatrixType, \_Preconditioner >](classeigen_1_1gmres) |
|  | A [GMRES](classeigen_1_1gmres "A GMRES solver for sparse square problems.") solver for sparse square problems. [More...](classeigen_1_1gmres#details) |
|  |
| class  | [Eigen::IDRS< \_MatrixType, \_Preconditioner >](classeigen_1_1idrs) |
|  | The Induced Dimension Reduction method (IDR(s)) is a short-recurrences Krylov method for sparse square problems. [More...](classeigen_1_1idrs#details) |
|  |
| class  | [Eigen::IterationController](classeigen_1_1iterationcontroller) |
|  | Controls the iterations of the iterative solvers. [More...](classeigen_1_1iterationcontroller#details) |
|  |
| class  | [Eigen::MINRES< \_MatrixType, \_UpLo, \_Preconditioner >](classeigen_1_1minres) |
|  | A minimal residual solver for sparse symmetric problems. [More...](classeigen_1_1minres#details) |
|  |




|  |
| --- |
|  |
| template<typename TMatrix , typename CMatrix , typename VectorX , typename VectorB , typename VectorF >  |
| void  | [Eigen::internal::constrained\_cg](group__iterativelinearsolvers__module#ga1c2f99746877fd46158af4a6b7dce2f9) (const TMatrix &A, const CMatrix &C, [VectorX](../group__matrixtypedefs#ga7e589e92f0ae4929f5540a578cfd2bac) &x, const VectorB &b, const VectorF &f, [IterationController](classeigen_1_1iterationcontroller) &iter) |
|  |
| template<typename CMatrix , typename CINVMatrix >  |
| void  | [Eigen::internal::pseudo\_inverse](group__iterativelinearsolvers__module#ga58a0ccf0e71d88beeb5dcf72ed0bdd5f) (const CMatrix &C, CINVMatrix &CINV) |
|  |

  constrained\_cg()
-----------------

    template<typename TMatrix , typename CMatrix , typename VectorX , typename VectorB , typename VectorF >  

|  |  |  |  |
| --- | --- | --- | --- |
| void Eigen::internal::constrained\_cg  | ( | const TMatrix &  | *A*,  |
|  |  | const CMatrix &  | *C*,  |
|  |  | [VectorX](../group__matrixtypedefs#ga7e589e92f0ae4929f5540a578cfd2bac) &  | *x*,  |
|  |  | const VectorB &  | *b*,  |
|  |  | const VectorF &  | *f*,  |
|  |  | [IterationController](classeigen_1_1iterationcontroller) &  | *iter* |
|  | ) |  |  |

 
 Constrained conjugate gradient

 Computes the minimum of \( 1/2((Ax).x) - bx \) under the constraint \( Cx \le f \) 

    pseudo\_inverse()
-----------------

    template<typename CMatrix , typename CINVMatrix >  

|  |  |  |  |
| --- | --- | --- | --- |
| void Eigen::internal::pseudo\_inverse  | ( | const CMatrix &  | *C*,  |
|  |  | CINVMatrix &  | *CINV* |
|  | ) |  |  |

 
 Compute the pseudo inverse of the non-square matrix C such that \( CINV = (C \* C^T)^{-1} \* C \) based on a conjugate gradient method.

 This function is internally used by constrained\_cg. 

    

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/group__IterativeLinearSolvers__Module.html>

Deprecated List
===============

   
 Class [Eigen::DynamicSparseMatrix< \_Scalar, \_Options, \_StorageIndex >](classeigen_1_1dynamicsparsematrix)  
use a [SparseMatrix](../classeigen_1_1sparsematrix) in an uncompressed mode  Member [Eigen::DynamicSparseMatrix< \_Scalar, \_Options, \_StorageIndex >::endFill](classeigen_1_1dynamicsparsematrix#aa806b3dde0a055844110610907b016f3) () 
use [finalize()](classeigen_1_1dynamicsparsematrix#aa0abc0e4565143f103f0d7373bd4a125) Does nothing. Provided for compatibility with [SparseMatrix](../classeigen_1_1sparsematrix).  Member [Eigen::DynamicSparseMatrix< \_Scalar, \_Options, \_StorageIndex >::fill](classeigen_1_1dynamicsparsematrix#a70c8f529b38fd5b7d93d6dfe1a122723) (Index row, Index col) 
use insert() inserts a nonzero coefficient at given coordinates *row*, *col* and returns its reference assuming that: 1 - the coefficient does not exist yet 2 - this the coefficient with greater inner coordinate for the given outer coordinate. In other words, assuming `*this` is column-major, then there must not exists any nonzero coefficient of coordinates `i` `x` *col* such that `i` >= *row*. Otherwise the matrix is invalid.  Member [Eigen::DynamicSparseMatrix< \_Scalar, \_Options, \_StorageIndex >::fillrand](classeigen_1_1dynamicsparsematrix#a6a5eb3c9d153d8ebdf4e0967321108e2) (Index row, Index col) 
use insert() Like [fill()](classeigen_1_1dynamicsparsematrix#a70c8f529b38fd5b7d93d6dfe1a122723) but with random inner coordinates. Compared to the generic [coeffRef()](classeigen_1_1dynamicsparsematrix#a17093cd39bd0e6ebd6250bc5feb61a0f), the unique limitation is that we assume the coefficient does not exist yet.  Member [Eigen::DynamicSparseMatrix< \_Scalar, \_Options, \_StorageIndex >::startFill](classeigen_1_1dynamicsparsematrix#abade0bf46139d8577aa24ead30c76771) (Index reserveSize=1000) 
 Set the matrix to zero and reserve the memory for *reserveSize* nonzero coefficients.   
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/deprecated.html>

Polynomials module
==================

  This module provides a QR based polynomial solver. 

 To use this module, add 



```
#include <unsupported/Eigen/Polynomials>

```

 at the start of your source file. 

 

|  |
| --- |
|  |
| class  | [Eigen::PolynomialSolver< \_Scalar, \_Deg >](classeigen_1_1polynomialsolver) |
|  | A polynomial solver. [More...](classeigen_1_1polynomialsolver#details) |
|  |
| class  | [Eigen::PolynomialSolverBase< \_Scalar, \_Deg >](classeigen_1_1polynomialsolverbase) |
|  | Defined to be inherited by polynomial solvers: it provides convenient methods such as. [More...](classeigen_1_1polynomialsolverbase#details) |
|  |




|  |
| --- |
|  |
| template<typename Polynomial >  |
| [NumTraits](../structeigen_1_1numtraits)< typename Polynomial::Scalar >::Real  | [Eigen::cauchy\_max\_bound](group__polynomials__module#ga375e3ea1f370fb76dfe0f43a89b95926) (const Polynomial &poly) |
|  |
| template<typename Polynomial >  |
| [NumTraits](../structeigen_1_1numtraits)< typename Polynomial::Scalar >::Real  | [Eigen::cauchy\_min\_bound](group__polynomials__module#gab076afbdba0e9298a541cc4e8cc7506b) (const Polynomial &poly) |
|  |
| template<typename Polynomials , typename T >  |
| T  | [Eigen::poly\_eval](group__polynomials__module#gadb64ffddaa9e83634e3ab0e3fd3664f5) (const Polynomials &poly, const T &x) |
|  |
| template<typename Polynomials , typename T >  |
| T  | [Eigen::poly\_eval\_horner](group__polynomials__module#gaadbf059bc28ce1cf94c57c1454633d40) (const Polynomials &poly, const T &x) |
|  |
| template<typename RootVector , typename Polynomial >  |
| void  | [Eigen::roots\_to\_monicPolynomial](group__polynomials__module#gafbc3648f7ef67db3d5d04454fc1257fd) (const RootVector &rv, Polynomial &poly) |
|  |

  cauchy\_max\_bound()
--------------------

    template<typename Polynomial >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [NumTraits](../structeigen_1_1numtraits)<typename Polynomial::Scalar>::Real Eigen::cauchy\_max\_bound  | ( | const Polynomial &  | *poly* | ) |  |

 | inline |

 
 
Returns
a maximum bound for the absolute value of any root of the polynomial.
 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | poly | : the vector of coefficients of the polynomial ordered by degrees i.e. poly[i] is the coefficient of degree i of the polynomial e.g. \( 1 + 3x^2 \) is stored as a vector \( [ 1, 0, 3 ] \). |

   
Precondition
the leading coefficient of the input polynomial poly must be non zero 
    cauchy\_min\_bound()
--------------------

    template<typename Polynomial >  

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| [NumTraits](../structeigen_1_1numtraits)<typename Polynomial::Scalar>::Real Eigen::cauchy\_min\_bound  | ( | const Polynomial &  | *poly* | ) |  |

 | inline |

 
 
Returns
a minimum bound for the absolute value of any non zero root of the polynomial. 
 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | poly | : the vector of coefficients of the polynomial ordered by degrees i.e. poly[i] is the coefficient of degree i of the polynomial e.g. \( 1 + 3x^2 \) is stored as a vector \( [ 1, 0, 3 ] \).  |

      poly\_eval()
------------

    template<typename Polynomials , typename T >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| T Eigen::poly\_eval  | ( | const Polynomials &  | *poly*,  |
|  |  | const T &  | *x* |
|  | ) |  |  |

 | inline |

 
 
Returns
the evaluation of the polynomial at x using stabilized Horner algorithm.
 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | poly | : the vector of coefficients of the polynomial ordered by degrees i.e. poly[i] is the coefficient of degree i of the polynomial e.g. \( 1 + 3x^2 \) is stored as a vector \( [ 1, 0, 3 ] \).  |
| [in] | x | : the value to evaluate the polynomial at.  |

      poly\_eval\_horner()
--------------------

    template<typename Polynomials , typename T >  

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 

|  |  |  |  |
| --- | --- | --- | --- |
| T Eigen::poly\_eval\_horner  | ( | const Polynomials &  | *poly*,  |
|  |  | const T &  | *x* |
|  | ) |  |  |

 | inline |

 
 
Returns
the evaluation of the polynomial at x using Horner algorithm.
 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | poly | : the vector of coefficients of the polynomial ordered by degrees i.e. poly[i] is the coefficient of degree i of the polynomial e.g. \( 1 + 3x^2 \) is stored as a vector \( [ 1, 0, 3 ] \).  |
| [in] | x | : the value to evaluate the polynomial at. |

   
Note
for stability: \( |x| \le 1 \) 
    roots\_to\_monicPolynomial()
----------------------------

    template<typename RootVector , typename Polynomial >  

|  |  |  |  |
| --- | --- | --- | --- |
| void Eigen::roots\_to\_monicPolynomial  | ( | const RootVector &  | *rv*,  |
|  |  | Polynomial &  | *poly* |
|  | ) |  |  |

 
 Given the roots of a polynomial compute the coefficients in the monomial basis of the monic polynomial with same roots and minimal degree. If RootVector is a vector of complexes, Polynomial should also be a vector of complexes. 



Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | rv | : a vector containing the roots of a polynomial.  |
| [out] | poly | : the vector of coefficients of the polynomial ordered by degrees i.e. poly[i] is the coefficient of degree i of the polynomial e.g. \( 3 + x^2 \) is stored as a vector \( [ 3, 0, 1 ] \).  |

      

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/group__Polynomials__Module.html>

Spline and spline fitting module
================================

  This module provides a simple multi-dimensional spline class while offering most basic functionality to fit a spline to point sets.

 
```
#include <unsupported/Eigen/Splines>

```
 

|  |
| --- |
|  |
| class  | [Eigen::Spline< \_Scalar, \_Dim, \_Degree >](classeigen_1_1spline) |
|  | A class representing multi-dimensional spline curves. [More...](classeigen_1_1spline#details) |
|  |
| struct  | [Eigen::SplineFitting< SplineType >](structeigen_1_1splinefitting) |
|  | [Spline](classeigen_1_1spline "A class representing multi-dimensional spline curves.") fitting methods. [More...](structeigen_1_1splinefitting#details) |
|  |
| struct  | [Eigen::SplineTraits< Spline< \_Scalar, \_Dim, \_Degree >, \_DerivativeOrder >](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01__derivativeorder_01_4) |
|  | Compile-time attributes of the [Spline](classeigen_1_1spline "A class representing multi-dimensional spline curves.") class for fixed degree. [More...](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01__derivativeorder_01_4#details) |
|  |
| struct  | [Eigen::SplineTraits< Spline< \_Scalar, \_Dim, \_Degree >, Dynamic >](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4) |
|  | Compile-time attributes of the [Spline](classeigen_1_1spline "A class representing multi-dimensional spline curves.") class for Dynamic degree. [More...](structeigen_1_1splinetraits_3_01spline_3_01__scalar_00_01__dim_00_01__degree_01_4_00_01dynamic_01_4#details) |
|  |




|  |
| --- |
|  |
| template<typename PointArrayType , typename KnotVectorType >  |
| void  | [Eigen::ChordLengths](group__splines__module#ga1b4cbde5d98411405871accf877552d2) (const PointArrayType &pts, KnotVectorType &chord\_lengths) |
|  | Computes chord length parameters which are required for spline interpolation. [More...](group__splines__module#ga1b4cbde5d98411405871accf877552d2) |
|  |
| template<typename KnotVectorType >  |
| void  | [Eigen::KnotAveraging](group__splines__module#ga9474da5ed68bbd9a6788a999330416d6) (const KnotVectorType &parameters, DenseIndex degree, KnotVectorType &knots) |
|  | Computes knot averages. [More...](group__splines__module#ga9474da5ed68bbd9a6788a999330416d6) |
|  |
| template<typename KnotVectorType , typename ParameterVectorType , typename IndexArray >  |
| void  | [Eigen::KnotAveragingWithDerivatives](group__splines__module#gae10a6f9b6ab7fb400a2526b6382c533b) (const ParameterVectorType &parameters, const unsigned int degree, const IndexArray &derivativeIndices, KnotVectorType &knots) |
|  | Computes knot averages when derivative constraints are present. Note that this is a technical interpretation of the referenced article since the algorithm contained therein is incorrect as written. [More...](group__splines__module#gae10a6f9b6ab7fb400a2526b6382c533b) |
|  |

  ChordLengths()
--------------

    template<typename PointArrayType , typename KnotVectorType >  

|  |  |  |  |
| --- | --- | --- | --- |
| void Eigen::ChordLengths  | ( | const PointArrayType &  | *pts*,  |
|  |  | KnotVectorType &  | *chord\_lengths* |
|  | ) |  |  |

 
 Computes chord length parameters which are required for spline interpolation. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | pts | The data points to which a spline should be fit.  |
| [out] | chord\_lengths | The resulting chord length vector. |

   
See also
Les Piegl and Wayne Tiller, The NURBS book (2nd ed.), 1997, 9.2.1 Global Curve Interpolation to Point Data 
    KnotAveraging()
---------------

    template<typename KnotVectorType >  

|  |  |  |  |
| --- | --- | --- | --- |
| void Eigen::KnotAveraging  | ( | const KnotVectorType &  | *parameters*,  |
|  |  | DenseIndex  | *degree*,  |
|  |  | KnotVectorType &  | *knots* |
|  | ) |  |  |

 
 Computes knot averages. 

 The knots are computed as 


 \begin{align\*} u\_0 & = \hdots = u\_p = 0 \\ u\_{m-p} & = \hdots = u\_{m} = 1 \\ u\_{j+p} & = \frac{1}{p}\sum\_{i=j}^{j+p-1}\bar{u}\_i \quad\quad j=1,\hdots,n-p \end{align\*} 

  where \(p\) is the degree and \(m+1\) the number knots of the desired interpolating spline.

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | parameters | The input parameters. During interpolation one for each data point.  |
| [in] | degree | The spline degree which is used during the interpolation.  |
| [out] | knots | The output knot vector. |

   
See also
Les Piegl and Wayne Tiller, The NURBS book (2nd ed.), 1997, 9.2.1 Global Curve Interpolation to Point Data 
    KnotAveragingWithDerivatives()
------------------------------

    template<typename KnotVectorType , typename ParameterVectorType , typename IndexArray >  

|  |  |  |  |
| --- | --- | --- | --- |
| void Eigen::KnotAveragingWithDerivatives  | ( | const ParameterVectorType &  | *parameters*,  |
|  |  | const unsigned int  | *degree*,  |
|  |  | const IndexArray &  | *derivativeIndices*,  |
|  |  | KnotVectorType &  | *knots* |
|  | ) |  |  |

 
 Computes knot averages when derivative constraints are present. Note that this is a technical interpretation of the referenced article since the algorithm contained therein is incorrect as written. 

 
Parameters
 

|  |  |  |
| --- | --- | --- |
| [in] | parameters | The parameters at which the interpolation B-Spline will intersect the given interpolation points. The parameters are assumed to be a non-decreasing sequence.  |
| [in] | degree | The degree of the interpolating B-Spline. This must be greater than zero.  |
| [in] | derivativeIndices | The indices corresponding to parameters at which there are derivative constraints. The indices are assumed to be a non-decreasing sequence.  |
| [out] | knots | The calculated knot vector. These will be returned as a non-decreasing sequence |

   
See also
Les A. Piegl, Khairan Rajab, Volha Smarodzinana. 2008. Curve interpolation with directional constraints for engineering design. Engineering with Computers 
    

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/group__Splines__Module.html>

Skyline module
==============

  

|  |
| --- |
|  |
| class  | [Eigen::SkylineInplaceLU< MatrixType >](classeigen_1_1skylineinplacelu) |
|  | Inplace LU decomposition of a skyline matrix and associated features. [More...](classeigen_1_1skylineinplacelu#details) |
|  |
| class  | [Eigen::SkylineMatrix< \_Scalar, \_Options >](classeigen_1_1skylinematrix) |
|  | The main skyline matrix class. [More...](classeigen_1_1skylinematrix#details) |
|  |
| class  | [Eigen::SkylineMatrixBase< Derived >](classeigen_1_1skylinematrixbase) |
|  | Base class of any skyline matrices or skyline expressions. [More...](classeigen_1_1skylinematrixbase#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/group__Skyline__Module.html>

Tensor Module
=============

  This module provides a Tensor class for storing arbitrarily indexed objects.

 
```
#include <Eigen/CXX11/Tensor>

```

Much of the documentation can be found [here](eigen_tensors). 

 

|  |
| --- |
|  |
| class  | [Eigen::Tensor< Scalar\_, NumIndices\_, Options\_, IndexType\_ >](classeigen_1_1tensor) |
|  | The tensor class. [More...](classeigen_1_1tensor#details) |
|  |
| class  | [TensorAssign](classtensorassign) |
|  | The tensor assignment class. [More...](classtensorassign#details) |
|  |
| class  | [Eigen::TensorAsyncDevice< ExpressionType, DeviceType, DoneCallback >](classeigen_1_1tensorasyncdevice) |
|  | Pseudo expression providing an operator = that will evaluate its argument asynchronously on the specified device. Currently only ThreadPoolDevice implements proper asynchronous execution, while the default and GPU devices just run the expression synchronously and call m\_done() on completion.. [More...](classeigen_1_1tensorasyncdevice#details) |
|  |
| class  | [Eigen::TensorBase< Derived, AccessLevel >](classeigen_1_1tensorbase) |
|  | The tensor base class. [More...](classeigen_1_1tensorbase#details) |
|  |
| class  | [TensorBroadcasting](classtensorbroadcasting) |
|  | Tensor broadcasting class. [More...](classtensorbroadcasting#details) |
|  |
| class  | [Eigen::TensorConcatenationOp< Axis, LhsXprType, RhsXprType >](classeigen_1_1tensorconcatenationop) |
|  | [Tensor](classeigen_1_1tensor "The tensor class.") concatenation class. [More...](classeigen_1_1tensorconcatenationop#details) |
|  |
| class  | [TensorContraction](classtensorcontraction) |
|  | Tensor contraction class. [More...](classtensorcontraction#details) |
|  |
| class  | [Eigen::TensorConversionOp< TargetType, XprType >](classeigen_1_1tensorconversionop) |
|  | [Tensor](classeigen_1_1tensor "The tensor class.") conversion class. This class makes it possible to vectorize type casting operations when the number of scalars per packet in the source and the destination type differ. [More...](classeigen_1_1tensorconversionop#details) |
|  |
| class  | [TensorConvolution](classtensorconvolution) |
|  | Tensor convolution class. [More...](classtensorconvolution#details) |
|  |
| class  | [Eigen::TensorCustomBinaryOp< CustomBinaryFunc, LhsXprType, RhsXprType >](classeigen_1_1tensorcustombinaryop) |
|  | [Tensor](classeigen_1_1tensor "The tensor class.") custom class. [More...](classeigen_1_1tensorcustombinaryop#details) |
|  |
| class  | [Eigen::TensorCustomUnaryOp< CustomUnaryFunc, XprType >](classeigen_1_1tensorcustomunaryop) |
|  | [Tensor](classeigen_1_1tensor "The tensor class.") custom class. [More...](classeigen_1_1tensorcustomunaryop#details) |
|  |
| class  | [Eigen::TensorDevice< ExpressionType, DeviceType >](classeigen_1_1tensordevice) |
|  | Pseudo expression providing an operator = that will evaluate its argument on the specified computing 'device' (GPU, thread pool, ...) [More...](classeigen_1_1tensordevice#details) |
|  |
| class  | [Eigen::TensorEvaluator< Derived, Device >](structeigen_1_1tensorevaluator) |
|  | A cost model used to limit the number of threads used for evaluating tensor expression. [More...](structeigen_1_1tensorevaluator#details) |
|  |
| class  | [TensorExecutor](classtensorexecutor) |
|  | The tensor executor class. [More...](classtensorexecutor#details) |
|  |
| class  | [TensorExpr](classtensorexpr) |
|  | Tensor expression classes. [More...](classtensorexpr#details) |
|  |
| class  | [TensorFFT](classtensorfft) |
|  | Tensor FFT class. [More...](classtensorfft#details) |
|  |
| class  | [Eigen::TensorFixedSize< Scalar\_, Dimensions\_, Options\_, IndexType >](classeigen_1_1tensorfixedsize) |
|  | The fixed sized version of the tensor class. [More...](classeigen_1_1tensorfixedsize#details) |
|  |
| class  | [TensorForcedEval](classtensorforcedeval) |
|  | Tensor reshaping class. [More...](classtensorforcedeval#details) |
|  |
| class  | [Eigen::TensorGeneratorOp< Generator, XprType >](classeigen_1_1tensorgeneratorop) |
|  | [Tensor](classeigen_1_1tensor "The tensor class.") generator class. [More...](classeigen_1_1tensorgeneratorop#details) |
|  |
| class  | [TensorImagePatch](classtensorimagepatch) |
|  | Patch extraction specialized for image processing. This assumes that the input has a least 3 dimensions ordered as follow: 1st dimension: channels (of size d) 2nd dimension: rows (of size r) 3rd dimension: columns (of size c) There can be additional dimensions such as time (for video) or batch (for bulk processing after the first 3. Calling the image patch code with patch\_rows and patch\_cols is equivalent to calling the regular patch extraction code with parameters d, patch\_rows, patch\_cols, and 1 for all the additional dimensions. [More...](classtensorimagepatch#details) |
|  |
| class  | [TensorIndexTuple](classtensorindextuple) |
|  | Tensor + Index Tuple class. [More...](classtensorindextuple#details) |
|  |
| class  | [TensorInflation](classtensorinflation) |
|  | Tensor inflation class. [More...](classtensorinflation#details) |
|  |
| class  | [TensorKChippingReshaping](classtensorkchippingreshaping) |
|  | A chip is a thin slice, corresponding to a column or a row in a 2-d tensor. [More...](classtensorkchippingreshaping#details) |
|  |
| class  | [TensorLayoutSwap](classtensorlayoutswap) |
|  | Swap the layout from col-major to row-major, or row-major to col-major, and invert the order of the dimensions. [More...](classtensorlayoutswap#details) |
|  |
| class  | [Eigen::TensorMap< PlainObjectType, Options\_, MakePointer\_ >](classeigen_1_1tensormap) |
|  | A tensor expression mapping an existing array of data. [More...](classeigen_1_1tensormap#details) |
|  |
| class  | [TensorPadding](classtensorpadding) |
|  | Tensor padding class. At the moment only padding with a constant value is supported. [More...](classtensorpadding#details) |
|  |
| class  | [TensorPatch](classtensorpatch) |
|  | Tensor patch class. [More...](classtensorpatch#details) |
|  |
| class  | [TensorReduction](classtensorreduction) |
|  | Tensor reduction class. [More...](classtensorreduction#details) |
|  |
| class  | [Eigen::TensorRef< PlainObjectType >](classeigen_1_1tensorref) |
|  | A reference to a tensor expression The expression will be evaluated lazily (as much as possible). [More...](classeigen_1_1tensorref#details) |
|  |
| class  | [TensorReshaping](classtensorreshaping) |
|  | Tensor reshaping class. [More...](classtensorreshaping#details) |
|  |
| class  | [TensorReverse](classtensorreverse) |
|  | Tensor reverse elements class. [More...](classtensorreverse#details) |
|  |
| class  | [TensorScan](classtensorscan) |
|  | Tensor scan class. [More...](classtensorscan#details) |
|  |
| class  | [TensorShuffling](classtensorshuffling) |
|  | Tensor shuffling class. [More...](classtensorshuffling#details) |
|  |
| class  | [TensorSlicing](classtensorslicing) |
|  | Tensor slicing class. [More...](classtensorslicing#details) |
|  |
| class  | [TensorStriding](classtensorstriding) |
|  | Tensor striding class. [More...](classtensorstriding#details) |
|  |
| class  | [TensorTrace](classtensortrace) |
|  | Tensor Trace class. [More...](classtensortrace#details) |
|  |
| class  | [TensorTupleIndex](classtensortupleindex) |
|  | Converts to Tensor<Tuple<Index, Scalar> > and reduces to Tensor<Index>. [More...](classtensortupleindex#details) |
|  |
| class  | [TensorVolumePatch](classtensorvolumepatch) |
|  | Patch extraction specialized for processing of volumetric data. This assumes that the input has a least 4 dimensions ordered as follows: [More...](classtensorvolumepatch#details) |
|  |

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/group__CXX11__Tensor__Module.html>

Auto Diff module
================

  This module features forward automatic differentation via a simple templated scalar type wrapper [AutoDiffScalar](classeigen_1_1autodiffscalar "A scalar type replacement with automatic differentiation capability.").

 Warning : this should NOT be confused with numerical differentiation, which is a different method and has its own module in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") : [Numerical differentiation module](group__numericaldiff__module).

 
```
#include <unsupported/Eigen/AutoDiff>

```
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/group__AutoDiff__Module.html>

Numerical differentiation module
================================

  
```
#include <unsupported/Eigen/NumericalDiff>

```

See <http://en.wikipedia.org/wiki/Numerical_differentiation>

 Warning : this should NOT be confused with automatic differentiation, which is a different method and has its own module in [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") : [Auto Diff module](group__autodiff__module).

 Currently only "Forward" and "Central" schemes are implemented. Those are basic methods, and there exist some more elaborated way of computing such approximates. They are implemented using both proprietary and free software, and usually requires linking to an external library. It is very easy for you to write a functor using such software, and the purpose is quite orthogonal to what we want to achieve with [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.").

 This is why we will not provide wrappers for every great numerical differentiation software that exist, but should rather stick with those basic ones, that still are useful for testing.

 Also, the [Non linear optimization module](group__nonlinearoptimization__module) needs this in order to provide full features compatibility with the original (c)minpack package. 

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/group__NumericalDiff__Module.html>

TensorAssign
============

  
The tensor assignment class. 

 This class is represents the assignment of the values resulting from the evaluation of the rhs expression to the memory locations denoted by the lhs expression. 

 


---

The documentation for this class was generated from the following file:* [TensorAssign.h](https://eigen.tuxfamily.org/dox/unsupported/TensorAssign_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorAssign.html>

TensorBroadcasting
==================

  
Tensor broadcasting class. 

 


---

The documentation for this class was generated from the following file:* [TensorBroadcasting.h](https://eigen.tuxfamily.org/dox/unsupported/TensorBroadcasting_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorBroadcasting.html>

TensorConvolution
=================

  
Tensor convolution class. 

 


---

The documentation for this class was generated from the following files:* [TensorConvolution.h](https://eigen.tuxfamily.org/dox/unsupported/TensorConvolution_8h_source.html)
* [TensorConvolutionSycl.h](https://eigen.tuxfamily.org/dox/unsupported/TensorConvolutionSycl_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorConvolution.html>

TensorContraction
=================

  
Tensor contraction class. 

 


---

The documentation for this class was generated from the following file:* [TensorContraction.h](https://eigen.tuxfamily.org/dox/unsupported/TensorContraction_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorContraction.html>

TensorExecutor
==============

  
The tensor executor class. 

 This class is responsible for launch the evaluation of the expression on the specified computing device.

 
Template Parameters
 

|  |  |
| --- | --- |
| Vectorizable | can use packet math (SSE/AVX/etc... registers and instructions)  |
| Tiling | can use block based tensor evaluation (see [TensorBlock.h](https://eigen.tuxfamily.org/dox/unsupported/TensorBlock_8h_source.html))  |

   


---

The documentation for this class was generated from the following file:* [TensorExecutor.h](https://eigen.tuxfamily.org/dox/unsupported/TensorExecutor_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorExecutor.html>

TensorFFT
=========

  
Tensor FFT class. 

 TODO: Vectorize the Cooley Tukey and the Bluestein algorithm Add support for multithreaded evaluation Improve the performance on GPU 

 


---

The documentation for this class was generated from the following file:* [TensorFFT.h](https://eigen.tuxfamily.org/dox/unsupported/TensorFFT_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorFFT.html>

TensorInflation
===============

  
Tensor inflation class. 

 


---

The documentation for this class was generated from the following file:* [TensorInflation.h](https://eigen.tuxfamily.org/dox/unsupported/TensorInflation_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorInflation.html>

TensorPadding
=============

  
Tensor padding class. At the moment only padding with a constant value is supported. 

 


---

The documentation for this class was generated from the following file:* [TensorPadding.h](https://eigen.tuxfamily.org/dox/unsupported/TensorPadding_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorPadding.html>

TensorExpr
==========

  
Tensor expression classes. 

 The TensorCwiseNullaryOp class applies a nullary operators to an expression. This is typically used to generate constants.

 The TensorCwiseUnaryOp class represents an expression where a unary operator (e.g. cwiseSqrt) is applied to an expression.

 The TensorCwiseBinaryOp class represents an expression where a binary operator (e.g. addition) is applied to a lhs and a rhs expression. 

 


---

The documentation for this class was generated from the following file:* [TensorExpr.h](https://eigen.tuxfamily.org/dox/unsupported/TensorExpr_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorExpr.html>

TensorForcedEval
================

  
Tensor reshaping class. 

 


---

The documentation for this class was generated from the following files:* [TensorEvalTo.h](https://eigen.tuxfamily.org/dox/unsupported/TensorEvalTo_8h_source.html)
* [TensorForcedEval.h](https://eigen.tuxfamily.org/dox/unsupported/TensorForcedEval_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorForcedEval.html>

TensorImagePatch
================

  
Patch extraction specialized for image processing. This assumes that the input has a least 3 dimensions ordered as follow: 1st dimension: channels (of size d) 2nd dimension: rows (of size r) 3rd dimension: columns (of size c) There can be additional dimensions such as time (for video) or batch (for bulk processing after the first 3. Calling the image patch code with patch\_rows and patch\_cols is equivalent to calling the regular patch extraction code with parameters d, patch\_rows, patch\_cols, and 1 for all the additional dimensions. 

 


---

The documentation for this class was generated from the following file:* [TensorImagePatch.h](https://eigen.tuxfamily.org/dox/unsupported/TensorImagePatch_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorImagePatch.html>

TensorIndexTuple
================

  
Tensor + Index Tuple class. 

 


---

The documentation for this class was generated from the following file:* [TensorArgMax.h](https://eigen.tuxfamily.org/dox/unsupported/TensorArgMax_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorIndexTuple.html>

TensorKChippingReshaping
========================

  
A chip is a thin slice, corresponding to a column or a row in a 2-d tensor. 

 


---

The documentation for this class was generated from the following file:* [TensorChipping.h](https://eigen.tuxfamily.org/dox/unsupported/TensorChipping_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorKChippingReshaping.html>

TensorLayoutSwap
================

  
Swap the layout from col-major to row-major, or row-major to col-major, and invert the order of the dimensions. 

 Beware: the dimensions are reversed by this operation. If you want to preserve the ordering of the dimensions, you need to combine this operation with a shuffle. 

 


---

The documentation for this class was generated from the following file:* [TensorLayoutSwap.h](https://eigen.tuxfamily.org/dox/unsupported/TensorLayoutSwap_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorLayoutSwap.html>

TensorPatch
===========

  
Tensor patch class. 

 


---

The documentation for this class was generated from the following file:* [TensorPatch.h](https://eigen.tuxfamily.org/dox/unsupported/TensorPatch_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorPatch.html>

TensorReduction
===============

  
Tensor reduction class. 

 


---

The documentation for this class was generated from the following file:* [TensorReduction.h](https://eigen.tuxfamily.org/dox/unsupported/TensorReduction_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorReduction.html>

TensorReverse
=============

  
Tensor reverse elements class. 

 


---

The documentation for this class was generated from the following file:* [TensorReverse.h](https://eigen.tuxfamily.org/dox/unsupported/TensorReverse_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorReverse.html>

TensorScan
==========

  
Tensor scan class. 

 


---

The documentation for this class was generated from the following file:* [TensorScan.h](https://eigen.tuxfamily.org/dox/unsupported/TensorScan_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorScan.html>

TensorSlicing
=============

  
Tensor slicing class. 

 


---

The documentation for this class was generated from the following file:* [TensorMorphing.h](https://eigen.tuxfamily.org/dox/unsupported/TensorMorphing_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorSlicing.html>

TensorTrace
===========

  
Tensor Trace class. 

 


---

The documentation for this class was generated from the following file:* [TensorTrace.h](https://eigen.tuxfamily.org/dox/unsupported/TensorTrace_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorTrace.html>

TensorShuffling
===============

  
Tensor shuffling class. 

 


---

The documentation for this class was generated from the following file:* [TensorShuffling.h](https://eigen.tuxfamily.org/dox/unsupported/TensorShuffling_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorShuffling.html>

TensorStriding
==============

  
Tensor striding class. 

 


---

The documentation for this class was generated from the following file:* [TensorStriding.h](https://eigen.tuxfamily.org/dox/unsupported/TensorStriding_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorStriding.html>

TensorVolumePatch
=================

  
Patch extraction specialized for processing of volumetric data. This assumes that the input has a least 4 dimensions ordered as follows: 

 * channels
* planes
* rows
* columns
* (optional) additional dimensions such as time or batch size. Calling the volume patch code with patch\_planes, patch\_rows, and patch\_cols is equivalent to calling the regular patch extraction code with parameters d, patch\_planes, patch\_rows, patch\_cols, and 1 for all the additional dimensions.

 


---

The documentation for this class was generated from the following file:* [TensorVolumePatch.h](https://eigen.tuxfamily.org/dox/unsupported/TensorVolumePatch_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorVolumePatch.html>

TensorTupleIndex
================

  
Converts to Tensor<Tuple<Index, Scalar> > and reduces to Tensor<Index>. 

 


---

The documentation for this class was generated from the following file:* [TensorArgMax.h](https://eigen.tuxfamily.org/dox/unsupported/TensorArgMax_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorTupleIndex.html>

TensorReshaping
===============

  
Tensor reshaping class. 

 


---

The documentation for this class was generated from the following file:* [TensorMorphing.h](https://eigen.tuxfamily.org/dox/unsupported/TensorMorphing_8h_source.html)

  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/classTensorReshaping.html>

Eigen Tensors
=============

   
 Tensors are multidimensional arrays of elements. Elements are typically scalars, but more complex types such as strings are also supported.

 
 Tensor Classes
================

 You can manipulate a tensor with one of the following classes. They all are in the namespace `[Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.").`

 
 Class Tensor<data\_type, rank>
--------------------------------

 This is the class to use to create a tensor and allocate memory for it. The class is templatized with the tensor datatype, such as float or int, and the tensor rank. The rank is the number of dimensions, for example rank 2 is a matrix.

 Tensors of this class are resizable. For example, if you assign a tensor of a different size to a Tensor, that tensor is resized to match its new value.

 ### 
 Constructor Tensor<data\_type, rank>(size0, size1, ...)

 Constructor for a Tensor. The constructor must be passed `rank` integers indicating the sizes of the instance along each of the the `rank` dimensions. 



```
// Create a tensor of rank 3 of sizes 2, 3, 4.  This tensor owns
// memory to hold 24 floating point values (24 = 2 x 3 x 4).
Tensor<float, 3> t_3d(2, 3, 4);

// Resize t_3d by assigning a tensor of different sizes, but same rank.
t_3d = Tensor<float, 3>(3, 4, 3);

```
 ### 
 Constructor Tensor<data\_type, rank>(size\_array)

 Constructor where the sizes for the constructor are specified as an array of values instead of an explicitly list of parameters. The array type to use is `Eigen::array<[Eigen::Index](../namespaceeigen#a62e77e0933482dafde8fe197d9a2cfde)>`. The array can be constructed automatically from an initializer list. 



```
// Create a tensor of strings of rank 2 with sizes 5, 7.
Tensor<string, 2> t_2d({5, 7});

```


 Class TensorFixedSize<data\_type, Sizes<size0, size1, ...>>
-------------------------------------------------------------

 Class to use for tensors of fixed size, where the size is known at compile time. Fixed sized tensors can provide very fast computations because all their dimensions are known by the compiler. FixedSize tensors are not resizable.

 If the total number of elements in a fixed size tensor is small enough the tensor data is held onto the stack and does not cause heap allocation and free. 



```
// Create a 4 x 3 tensor of floats.
TensorFixedSize<float, Sizes<4, 3>> t_4x3;

```
 
 Class TensorMap<Tensor<data\_type, rank>>
-------------------------------------------

 This is the class to use to create a tensor on top of memory allocated and owned by another part of your code. It allows to view any piece of allocated memory as a Tensor. Instances of this class do not own the memory where the data are stored.

 A TensorMap is not resizable because it does not own the memory where its data are stored.

 ### 
 Constructor TensorMap<Tensor<data\_type, rank>>(data, size0, size1, ...)

 Constructor for a Tensor. The constructor must be passed a pointer to the storage for the data, and "rank" size attributes. The storage has to be large enough to hold all the data. 



```
// Map a tensor of ints on top of stack-allocated storage.
int storage[128];  // 2 x 4 x 2 x 8 = 128
TensorMap<Tensor<int, 4>> t_4d(storage, 2, 4, 2, 8);

// The same storage can be viewed as a different tensor.
// You can also pass the sizes as an array.
TensorMap<Tensor<int, 2>> t_2d(storage, 16, 8);

// You can also map fixed-size tensors.  Here we get a 1d view of
// the 2d fixed-size tensor.
TensorFixedSize<float, Sizes<4, 3>> t_4x3;
TensorMap<Tensor<float, 1>> t_12(t_4x3.data(), 12);

```

### 
 Class TensorRef

 See Assigning to a TensorRef below.

 
 Accessing Tensor Elements
===========================

 ### 
 <data\_type> tensor(index0, index1...)

 Return the element at position `(index0, index1...)` in tensor `tensor`. You must pass as many parameters as the rank of `tensor`. The expression can be used as an l-value to set the value of the element at the specified position. The value returned is of the datatype of the tensor. 



```
// Set the value of the element at position (0, 1, 0);
Tensor<float, 3> t_3d(2, 3, 4);
t_3d(0, 1, 0) = 12.0f;

// Initialize all elements to random values.
for (int i = 0; i < 2; ++i) {
  for (int j = 0; j < 3; ++j) {
    for (int k = 0; k < 4; ++k) {
      t_3d(i, j, k) = ...some random value...;
    }
  }
}

// Print elements of a tensor.
for (int i = 0; i < 2; ++i) {
  LOG(INFO) << t_3d(i, 0, 0);
}

```


 TensorLayout
==============

 The tensor library supports 2 layouts: `ColMajor` (the default) and `RowMajor`. Only the default column major layout is currently fully supported, and it is therefore not recommended to attempt to use the row major layout at the moment.

 The layout of a tensor is optionally specified as part of its type. If not specified explicitly column major is assumed. 



```
Tensor<float, 3, ColMajor> col_major;  // equivalent to Tensor<float, 3>
TensorMap<Tensor<float, 3, RowMajor> > row_major(data, ...);

```

 All the arguments to an expression must use the same layout. Attempting to mix different layouts will result in a compilation error.

 It is possible to change the layout of a tensor or an expression using the `swap_layout()` method. Note that this will also reverse the order of the dimensions. 



```
Tensor<float, 2, ColMajor> col_major(2, 4);
Tensor<float, 2, RowMajor> row_major(2, 4);

Tensor<float, 2> col_major_result = col_major;  // ok, layouts match
Tensor<float, 2> col_major_result = row_major;  // will not compile

// Simple layout swap
col_major_result = row_major.swap_layout();
eigen_assert(col_major_result.dimension(0) == 4);
eigen_assert(col_major_result.dimension(1) == 2);

// Swap the layout and preserve the order of the dimensions
array<int, 2> shuffle(1, 0);
col_major_result = row_major.swap_layout().shuffle(shuffle);
eigen_assert(col_major_result.dimension(0) == 2);
eigen_assert(col_major_result.dimension(1) == 4);

```


 Tensor Operations
===================

 The [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") Tensor library provides a vast library of operations on Tensors: numerical operations such as addition and multiplication, geometry operations such as slicing and shuffling, etc. These operations are available as methods of the Tensor classes, and in some cases as operator overloads. For example the following code computes the elementwise addition of two tensors: 



```
Tensor<float, 3> t1(2, 3, 4);
...set some values in t1...
Tensor<float, 3> t2(2, 3, 4);
...set some values in t2...
// Set t3 to the element wise sum of t1 and t2
Tensor<float, 3> t3 = t1 + t2;

```

 While the code above looks easy enough, it is important to understand that the expression `t1 + t2` is not actually adding the values of the tensors. The expression instead constructs a "tensor operator" object of the class TensorCwiseBinaryOp<scalar\_sum>, which has references to the tensors `t1` and `t2`. This is a small C++ object that knows how to add `t1` and `t2`. It is only when the value of the expression is assigned to the tensor `t3` that the addition is actually performed. Technically, this happens through the overloading of `operator=()` in the Tensor class.

 This mechanism for computing tensor expressions allows for lazy evaluation and optimizations which are what make the tensor library very fast.

 Of course, the tensor operators do nest, and the expression `t1 + t2 * 0.3f` is actually represented with the (approximate) tree of operators: 



```
TensorCwiseBinaryOp<scalar_sum>(t1, TensorCwiseUnaryOp<scalar_mul>(t2, 0.3f))

```


 Tensor Operations and C++ "auto"
----------------------------------

 Because Tensor operations create tensor operators, the C++ `auto` keyword does not have its intuitive meaning. Consider these 2 lines of code: 



```
Tensor<float, 3> t3 = t1 + t2;
auto t4 = t1 + t2;

```

 In the first line we allocate the tensor `t3` and it will contain the result of the addition of `t1` and `t2`. In the second line, `t4` is actually the tree of tensor operators that will compute the addition of `t1` and `t2`. In fact, `t4` is *not* a tensor and you cannot get the values of its elements: 



```
Tensor<float, 3> t3 = t1 + t2;
cout << t3(0, 0, 0);  // OK prints the value of t1(0, 0, 0) + t2(0, 0, 0)

auto t4 = t1 + t2;
cout << t4(0, 0, 0);  // Compilation error!

```

 When you use `auto` you do not get a Tensor as a result but instead a non-evaluated expression. So only use `auto` to delay evaluation.

 Unfortunately, there is no single underlying concrete type for holding non-evaluated expressions, hence you have to use auto in the case when you do want to hold non-evaluated expressions.

 When you need the results of set of tensor computations you have to assign the result to a Tensor that will be capable of holding onto them. This can be either a normal Tensor, a fixed size Tensor, or a TensorMap on an existing piece of memory. All the following will work: 



```
auto t4 = t1 + t2;

Tensor<float, 3> result = t4;  // Could also be: result(t4);
cout << result(0, 0, 0);

TensorMap<float, 4> result(<a float* with enough space>, <size0>, ...) = t4;
cout << result(0, 0, 0);

TensorFixedSize<float, Sizes<size0, ...>> result = t4;
cout << result(0, 0, 0);

```

 Until you need the results, you can keep the operation around, and even reuse it for additional operations. As long as you keep the expression as an operation, no computation is performed. 



```
// One way to compute exp((t1 + t2) * 0.2f);
auto t3 = t1 + t2;
auto t4 = t3 * 0.2f;
auto t5 = t4.exp();
Tensor<float, 3> result = t5;

// Another way, exactly as efficient as the previous one:
Tensor<float, 3> result = ((t1 + t2) * 0.2f).exp();

```
 
 Controlling When Expression are Evaluated
-------------------------------------------

 There are several ways to control when expressions are evaluated:

 * Assignment to a Tensor, TensorFixedSize, or TensorMap.
* Use of the eval() method.
* Assignment to a TensorRef.

 ### 
 Assigning to a Tensor, TensorFixedSize, or TensorMap.

 The most common way to evaluate an expression is to assign it to a Tensor. In the example below, the `auto` declarations make the intermediate values "Operations", not Tensors, and do not cause the expressions to be evaluated. The assignment to the Tensor `result` causes the evaluation of all the operations. 



```
auto t3 = t1 + t2;             // t3 is an Operation.
auto t4 = t3 * 0.2f;           // t4 is an Operation.
auto t5 = t4.exp();            // t5 is an Operation.
Tensor<float, 3> result = t5;  // The operations are evaluated.

```

 If you know the ranks and sizes of the Operation value you can assign the Operation to a TensorFixedSize instead of a Tensor, which is a bit more efficient. 



```
// We know that the result is a 4x4x2 tensor!
TensorFixedSize<float, Sizes<4, 4, 2>> result = t5;

```

 Simiarly, assigning an expression to a TensorMap causes its evaluation. Like tensors of type TensorFixedSize, TensorMaps cannot be resized so they have to have the rank and sizes of the expression that are assigned to them.

 ### 
 Calling eval().

 When you compute large composite expressions, you sometimes want to tell [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") that an intermediate value in the expression tree is worth evaluating ahead of time. This is done by inserting a call to the `eval()` method of the expression Operation. 



```
// The previous example could have been written:
Tensor<float, 3> result = ((t1 + t2) * 0.2f).exp();

// If you want to compute (t1 + t2) once ahead of time you can write:
Tensor<float, 3> result = ((t1 + t2).eval() * 0.2f).exp();

```

 Semantically, calling `eval()` is equivalent to materializing the value of the expression in a temporary Tensor of the right size. The code above in effect does: 



```
// .eval() knows the size!
TensorFixedSize<float, Sizes<4, 4, 2>> tmp = t1 + t2;
Tensor<float, 3> result = (tmp * 0.2f).exp();

```

 Note that the return value of `eval()` is itself an Operation, so the following code does not do what you may think: 



```
// Here t3 is an evaluation Operation.  t3 has not been evaluated yet.
auto t3 = (t1 + t2).eval();

// You can use t3 in another expression.  Still no evaluation.
auto t4 = (t3 * 0.2f).exp();

// The value is evaluated when you assign the Operation to a Tensor, using
// an intermediate tensor to represent t3.x
Tensor<float, 3> result = t4;

```

 While in the examples above calling `eval()` does not make a difference in performance, in other cases it can make a huge difference. In the expression below the `broadcast()` expression causes the `X.maximum()` expression to be evaluated many times: 



```
Tensor<...> X ...;
Tensor<...> Y = ((X - X.maximum(depth_dim).reshape(dims2d).broadcast(bcast))
                 * beta).exp();

```

 Inserting a call to `eval()` between the `maximum()` and `reshape()` calls guarantees that maximum() is only computed once and greatly speeds-up execution: 



```
Tensor<...> Y =
  ((X - X.maximum(depth_dim).eval().reshape(dims2d).broadcast(bcast))
    * beta).exp();

```

 In the other example below, the tensor `Y` is both used in the expression and its assignment. This is an aliasing problem and if the evaluation is not done in the right order Y will be updated incrementally during the evaluation resulting in bogus results: 



```
 Tensor<...> Y ...;
 Y = Y / (Y.sum(depth_dim).reshape(dims2d).broadcast(bcast));

```

 Inserting a call to `eval()` between the `sum()` and `reshape()` expressions ensures that the sum is computed before any updates to `Y` are done. 



```
 Y = Y / (Y.sum(depth_dim).eval().reshape(dims2d).broadcast(bcast));

```

 Note that an eval around the full right hand side expression is not needed because the generated has to compute the i-th value of the right hand side before assigning it to the left hand side.

 However, if you were assigning the expression value to a shuffle of `Y` then you would need to force an eval for correctness by adding an `eval()` call for the right hand side: 



```
 Y.shuffle(...) =
    (Y / (Y.sum(depth_dim).eval().reshape(dims2d).broadcast(bcast))).eval();

```

### 
 Assigning to a TensorRef.

 If you need to access only a few elements from the value of an expression you can avoid materializing the value in a full tensor by using a TensorRef.

 A TensorRef is a small wrapper class for any [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") Operation. It provides overloads for the `()` operator that let you access individual values in the expression. TensorRef is convenient, because the Operation themselves do not provide a way to access individual elements. 



```
// Create a TensorRef for the expression.  The expression is not
// evaluated yet.
TensorRef<Tensor<float, 3> > ref = ((t1 + t2) * 0.2f).exp();

// Use "ref" to access individual elements.  The expression is evaluated
// on the fly.
float at_0 = ref(0, 0, 0);
cout << ref(0, 1, 0);

```

 Only use TensorRef when you need a subset of the values of the expression. TensorRef only computes the values you access. However note that if you are going to access all the values it will be much faster to materialize the results in a Tensor first.

 In some cases, if the full Tensor result would be very large, you may save memory by accessing it as a TensorRef. But not always. So don't count on it.

 
 Controlling How Expressions Are Evaluated
-------------------------------------------

 The tensor library provides several implementations of the various operations such as contractions and convolutions. The implementations are optimized for different environments: single threaded on CPU, multi threaded on CPU, or on a GPU using cuda. Additional implementations may be added later.

 You can choose which implementation to use with the `device()` call. If you do not choose an implementation explicitly the default implementation that uses a single thread on the CPU is used.

 The default implementation has been optimized for recent Intel CPUs, taking advantage of SSE, AVX, and FMA instructions. Work is ongoing to tune the library on ARM CPUs. Note that you need to pass compiler-dependent flags to enable the use of SSE, AVX, and other instructions.

 For example, the following code adds two tensors using the default single-threaded CPU implementation: 



```
Tensor<float, 2> a(30, 40);
Tensor<float, 2> b(30, 40);
Tensor<float, 2> c = a + b;

```

 To choose a different implementation you have to insert a `device()` call before the assignment of the result. For technical C++ reasons this requires that the Tensor for the result be declared on its own. This means that you have to know the size of the result. 



```
Eigen::Tensor<float, 2> c(30, 40);
c.device(...) = a + b;

```

 The call to `device()` must be the last call on the left of the operator=.

 You must pass to the `device()` call an [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") device object. There are presently three devices you can use: DefaultDevice, ThreadPoolDevice and GpuDevice.

 ### 
 Evaluating With the DefaultDevice

 This is exactly the same as not inserting a `device()` call. 



```
DefaultDevice my_device;
c.device(my_device) = a + b;

```
 ### 
 Evaluating with a Thread Pool

 
```
// Create the Eigen ThreadPool
Eigen::ThreadPool pool(8 /* number of threads in pool */)

// Create the Eigen ThreadPoolDevice.
Eigen::ThreadPoolDevice my_device(&pool, 4 /* number of threads to use */);

// Now just use the device when evaluating expressions.
Eigen::Tensor<float, 2> c(30, 50);
c.device(my_device) = a.contract(b, dot_product_dims);

```

### 
 Evaluating On GPU

 This is presently a bit more complicated than just using a thread pool device. You need to create a GPU device but you also need to explicitly allocate the memory for tensors with cuda.

 
 API Reference
===============

 
 Datatypes
-----------

 In the documentation of the tensor methods and Operation we mention datatypes that are tensor-type specific:

 ### 
 <Tensor-Type>::Dimensions

 Acts like an array of ints. Has an `int size` attribute, and can be indexed like an array to access individual values. Used to represent the dimensions of a tensor. See `dimensions()`.

 ### 
 <Tensor-Type>::Index

 Acts like an `int`. Used for indexing tensors along their dimensions. See `operator()`, `dimension()`, and `size()`.

 ### 
 <Tensor-Type>::Scalar

 Represents the datatype of individual tensor elements. For example, for a `Tensor<float>`, `Scalar` is the type `float`. See `setConstant()`.

 ### 
 <Operation>

 We use this pseudo type to indicate that a tensor Operation is returned by a method. We indicate in the text the type and dimensions of the tensor that the Operation returns after evaluation.

 The Operation will have to be evaluated, for example by assigning it to a tensor, before you can access the values of the resulting tensor. You can also access the values through a TensorRef.

 
 Built-in Tensor Methods
=========================

 These are usual C++ methods that act on tensors immediately. They are not Operations which provide delayed evaluation of their results. Unless specified otherwise, all the methods listed below are available on all tensor classes: Tensor, TensorFixedSize, and TensorMap.

 
 Metadata
==========

 
 int NumDimensions
-------------------

 Constant value indicating the number of dimensions of a Tensor. This is also known as the tensor "rank". 



```
  Eigen::Tensor<float, 2> a(3, 4);
  cout << "Dims " << a.NumDimensions;
  => Dims 2

```
 
 Dimensions dimensions()
-------------------------

 Returns an array-like object representing the dimensions of the tensor. The actual type of the `dimensions()` result is `<Tensor-Type>::``Dimensions`. 



```
Eigen::Tensor<float, 2> a(3, 4);
const Eigen::Tensor<float, 2>::Dimensions& d = a.dimensions();
cout << "Dim size: " << d.size << ", dim 0: " << d[0]
     << ", dim 1: " << d[1];
=> Dim size: 2, dim 0: 3, dim 1: 4

```

 If you use a C++11 compiler, you can use `auto` to simplify the code: 



```
const auto& d = a.dimensions();
cout << "Dim size: " << d.size << ", dim 0: " << d[0]
     << ", dim 1: " << d[1];
=> Dim size: 2, dim 0: 3, dim 1: 4

```
 
 Index dimension(Index n)
--------------------------

 Returns the n-th dimension of the tensor. The actual type of the `dimension()` result is `<Tensor-Type>::``Index`, but you can always use it like an int. 



```
  Eigen::Tensor<float, 2> a(3, 4);
  int dim1 = a.dimension(1);
  cout << "Dim 1: " << dim1;
  => Dim 1: 4

```
 
 Index size()
--------------

 Returns the total number of elements in the tensor. This is the product of all the tensor dimensions. The actual type of the `size()` result is `<Tensor-Type>::``Index`, but you can always use it like an int. 



```
Eigen::Tensor<float, 2> a(3, 4);
cout << "Size: " << a.size();
=> Size: 12

```


 Getting Dimensions From An Operation
--------------------------------------

 A few operations provide `dimensions()` directly, e.g. `TensorReslicingOp`. Most operations defer calculating dimensions until the operation is being evaluated. If you need access to the dimensions of a deferred operation, you can wrap it in a TensorRef (see Assigning to a TensorRef above), which provides `dimensions()` and `dimension()` as above.

 TensorRef can also wrap the plain Tensor types, so this is a useful idiom in templated contexts where the underlying object could be either a raw Tensor or some deferred operation (e.g. a slice of a Tensor). In this case, the template code can wrap the object in a TensorRef and reason about its dimensionality while remaining agnostic to the underlying type.

 
 Constructors
==============

 
 Tensor
--------

 Creates a tensor of the specified size. The number of arguments must be equal to the rank of the tensor. The content of the tensor is not initialized. 



```
Eigen::Tensor<float, 2> a(3, 4);
cout << "NumRows: " << a.dimension(0) << " NumCols: " << a.dimension(1) << endl;
=> NumRows: 3 NumCols: 4

```
 
 TensorFixedSize
-----------------

 Creates a tensor of the specified size. The number of arguments in the Sizes<> template parameter determines the rank of the tensor. The content of the tensor is not initialized. 



```
Eigen::TensorFixedSize<float, Sizes<3, 4>> a;
cout << "Rank: " << a.rank() << endl;
=> Rank: 2
cout << "NumRows: " << a.dimension(0) << " NumCols: " << a.dimension(1) << endl;
=> NumRows: 3 NumCols: 4

```
 
 TensorMap
-----------

 Creates a tensor mapping an existing array of data. The data must not be freed until the TensorMap is discarded, and the size of the data must be large enough to accommodate the coefficients of the tensor. 



```
float data[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
Eigen::TensorMap<Tensor<float, 2>> a(data, 3, 4);
cout << "NumRows: " << a.dimension(0) << " NumCols: " << a.dimension(1) << endl;
=> NumRows: 3 NumCols: 4
cout << "a(1, 2): " << a(1, 2) << endl;
=> a(1, 2): 7

```


 Contents Initialization
=========================

 When a new Tensor or a new TensorFixedSize are created, memory is allocated to hold all the tensor elements, but the memory is not initialized. Similarly, when a new TensorMap is created on top of non-initialized memory the memory its contents are not initialized.

 You can use one of the methods below to initialize the tensor memory. These have an immediate effect on the tensor and return the tensor itself as a result. These are not tensor Operations which delay evaluation.

 
 <Tensor-Type> setConstant(const Scalar& val)
----------------------------------------------

 Sets all elements of the tensor to the constant value `val`. `Scalar` is the type of data stored in the tensor. You can pass any value that is convertible to that type.

 Returns the tensor itself in case you want to chain another call. 



```
a.setConstant(12.3f);
cout << "Constant: " << endl << a << endl << endl;
=>
Constant:
12.3 12.3 12.3 12.3
12.3 12.3 12.3 12.3
12.3 12.3 12.3 12.3

```

 Note that `setConstant()` can be used on any tensor where the element type has a copy constructor and an `operator=()`: 



```
Eigen::Tensor<string, 2> a(2, 3);
a.setConstant("yolo");
cout << "String tensor: " << endl << a << endl << endl;
=>
String tensor:
yolo yolo yolo
yolo yolo yolo

```


 <Tensor-Type> setZero()
-------------------------

 Fills the tensor with zeros. Equivalent to `setConstant(Scalar(0))`. Returns the tensor itself in case you want to chain another call. 



```
a.setZero();
cout << "Zeros: " << endl << a << endl << endl;
=>
Zeros:
0 0 0 0
0 0 0 0
0 0 0 0

```


 <Tensor-Type> setValues({..initializer\_list})
------------------------------------------------

 Fills the tensor with explicit values specified in a std::initializer\_list. The type of the initializer list depends on the type and rank of the tensor.

 If the tensor has rank N, the initializer list must be nested N times. The most deeply nested lists must contains P scalars of the Tensor type where P is the size of the last dimension of the Tensor.

 For example, for a `TensorFixedSize<float, 2, 3>` the initializer list must contains 2 lists of 3 floats each.

 `setValues()` returns the tensor itself in case you want to chain another call. 



```
Eigen::Tensor<float, 2> a(2, 3);
a.setValues({{0.0f, 1.0f, 2.0f}, {3.0f, 4.0f, 5.0f}});
cout << "a" << endl << a << endl << endl;
=>
a
0 1 2
3 4 5

```

 If a list is too short, the corresponding elements of the tensor will not be changed. This is valid at each level of nesting. For example the following code only sets the values of the first row of the tensor. 



```
Eigen::Tensor<int, 2> a(2, 3);
a.setConstant(1000);
a.setValues({{10, 20, 30}});
cout << "a" << endl << a << endl << endl;
=>
a
10   20   30
1000 1000 1000

```
 
 <Tensor-Type> setRandom()
---------------------------

 Fills the tensor with random values. Returns the tensor itself in case you want to chain another call. 



```
a.setRandom();
cout << "Random: " << endl << a << endl << endl;
=>
Random:
  0.680375    0.59688  -0.329554    0.10794
 -0.211234   0.823295   0.536459 -0.0452059
  0.566198  -0.604897  -0.444451   0.257742

```

 You can customize `setRandom()` by providing your own random number generator as a template argument: 



```
a.setRandom<MyRandomGenerator>();

```

 Here, `MyRandomGenerator` must be a struct with the following member functions, where Scalar and Index are the same as `<Tensor-Type>::``Scalar` and `<Tensor-Type>::``Index`.

 See `struct UniformRandomGenerator` in [TensorFunctors.h](https://eigen.tuxfamily.org/dox/unsupported/TensorFunctors_8h_source.html) for an example. 



```
// Custom number generator for use with setRandom().
struct MyRandomGenerator {
  // Default and copy constructors. Both are needed
  MyRandomGenerator() { }
  MyRandomGenerator(const MyRandomGenerator& ) { }

  // Return a random value to be used.  "element_location" is the
  // location of the entry to set in the tensor, it can typically
  // be ignored.
  Scalar operator()(Eigen::DenseIndex element_location,
                    Eigen::DenseIndex /*unused*/ = 0) const {
    return <randomly generated value of type T>;
  }

  // Same as above but generates several numbers at a time.
  typename internal::packet_traits<Scalar>::type packetOp(
      Eigen::DenseIndex packet_location, Eigen::DenseIndex /*unused*/ = 0) const {
    return <a packet of randomly generated values>;
  }
};

```

 You can also use one of the 2 random number generators that are part of the tensor library:


* UniformRandomGenerator
* NormalRandomGenerator

 
 Data Access
=============

 The Tensor, TensorFixedSize, and TensorRef classes provide the following accessors to access the tensor coefficients: 



```
const Scalar& operator()(const array<Index, NumIndices>& indices)
const Scalar& operator()(Index firstIndex, IndexTypes... otherIndices)
Scalar& operator()(const array<Index, NumIndices>& indices)
Scalar& operator()(Index firstIndex, IndexTypes... otherIndices)

```

 The number of indices must be equal to the rank of the tensor. Moreover, these accessors are not available on tensor expressions. In order to access the values of a tensor expression, the expression must either be evaluated or wrapped in a TensorRef.

 
 Scalar\* data() and const Scalar\* data() const
-------------------------------------------------

 Returns a pointer to the storage for the tensor. The pointer is const if the tensor was const. This allows direct access to the data. The layout of the data depends on the tensor layout: RowMajor or ColMajor.

 This access is usually only needed for special cases, for example when mixing [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") Tensor code with other libraries.

 Scalar is the type of data stored in the tensor. 



```
Eigen::Tensor<float, 2> a(3, 4);
float* a_data = a.data();
a_data[0] = 123.45f;
cout << "a(0, 0): " << a(0, 0);
=> a(0, 0): 123.45

```


 Tensor Operations
===================

 All the methods documented below return non evaluated tensor `Operations`. These can be chained: you can apply another Tensor Operation to the value returned by the method.

 The chain of Operation is evaluated lazily, typically when it is assigned to a tensor. See "Controlling when Expression are Evaluated" for more details about their evaluation.

 
 <Operation> constant(const Scalar& val)
-----------------------------------------

 Returns a tensor of the same type and dimensions as the original tensor but where all elements have the value `val`.

 This is useful, for example, when you want to add or subtract a constant from a tensor, or multiply every element of a tensor by a scalar. 



```
Eigen::Tensor<float, 2> a(2, 3);
a.setConstant(1.0f);
Eigen::Tensor<float, 2> b = a + a.constant(2.0f);
Eigen::Tensor<float, 2> c = b * b.constant(0.2f);
cout << "a" << endl << a << endl << endl;
cout << "b" << endl << b << endl << endl;
cout << "c" << endl << c << endl << endl;
=>
a
1 1 1
1 1 1

b
3 3 3
3 3 3

c
0.6 0.6 0.6
0.6 0.6 0.6

```
 
 <Operation> random()
----------------------

 Returns a tensor of the same type and dimensions as the current tensor but where all elements have random values.

 This is for example useful to add random values to an existing tensor. The generation of random values can be customized in the same manner as for `setRandom()`. 



```
Eigen::Tensor<float, 2> a(2, 3);
a.setConstant(1.0f);
Eigen::Tensor<float, 2> b = a + a.random();
cout << "a" << endl << a << endl << endl;
cout << "b" << endl << b << endl << endl;
=>
a
1 1 1
1 1 1

b
1.68038   1.5662  1.82329
0.788766  1.59688 0.395103

```


 Unary Element Wise Operations
===============================

 All these operations take a single input tensor as argument and return a tensor of the same type and dimensions as the tensor to which they are applied. The requested operations are applied to each element independently.

 
 <Operation> operator-()
-------------------------

 Returns a tensor of the same type and dimensions as the original tensor containing the opposite values of the original tensor. 



```
Eigen::Tensor<float, 2> a(2, 3);
a.setConstant(1.0f);
Eigen::Tensor<float, 2> b = -a;
cout << "a" << endl << a << endl << endl;
cout << "b" << endl << b << endl << endl;
=>
a
1 1 1
1 1 1

b
-1 -1 -1
-1 -1 -1

```
 
 <Operation> sqrt()
--------------------

 Returns a tensor of the same type and dimensions as the original tensor containing the square roots of the original tensor.

 
 <Operation> rsqrt()
---------------------

 Returns a tensor of the same type and dimensions as the original tensor containing the inverse square roots of the original tensor.

 
 <Operation> square()
----------------------

 Returns a tensor of the same type and dimensions as the original tensor containing the squares of the original tensor values.

 
 <Operation> inverse()
-----------------------

 Returns a tensor of the same type and dimensions as the original tensor containing the inverse of the original tensor values.

 
 <Operation> exp()
-------------------

 Returns a tensor of the same type and dimensions as the original tensor containing the exponential of the original tensor.

 
 <Operation> log()
-------------------

 Returns a tensor of the same type and dimensions as the original tensor containing the natural logarithms of the original tensor.

 
 <Operation> abs()
-------------------

 Returns a tensor of the same type and dimensions as the original tensor containing the absolute values of the original tensor.

 
 <Operation> pow(Scalar exponent)
----------------------------------

 Returns a tensor of the same type and dimensions as the original tensor containing the coefficients of the original tensor to the power of the exponent.

 The type of the exponent, Scalar, is always the same as the type of the tensor coefficients. For example, only integer exponents can be used in conjuntion with tensors of integer values.

 You can use cast() to lift this restriction. For example this computes cubic roots of an int Tensor: 



```
Eigen::Tensor<int, 2> a(2, 3);
a.setValues({{0, 1, 8}, {27, 64, 125}});
Eigen::Tensor<double, 2> b = a.cast<double>().pow(1.0 / 3.0);
cout << "a" << endl << a << endl << endl;
cout << "b" << endl << b << endl << endl;
=>
a
0   1   8
27  64 125

b
0 1 2
3 4 5

```
 
 <Operation> operator \* (Scalar scale)
----------------------------------------

 Multiplies all the coefficients of the input tensor by the provided scale.

 
 <Operation> cwiseMax(Scalar threshold)
----------------------------------------

 TODO

 
 <Operation> cwiseMin(Scalar threshold)
----------------------------------------

 TODO

 
 <Operation> unaryExpr(const CustomUnaryOp& func)
--------------------------------------------------

 TODO

 
 Binary Element Wise Operations
================================

 These operations take two input tensors as arguments. The 2 input tensors should be of the same type and dimensions. The result is a tensor of the same dimensions as the tensors to which they are applied, and unless otherwise specified it is also of the same type. The requested operations are applied to each pair of elements independently.

 
 <Operation> operator+(const OtherDerived& other)
--------------------------------------------------

 Returns a tensor of the same type and dimensions as the input tensors containing the coefficient wise sums of the inputs.

 
 <Operation> operator-(const OtherDerived& other)
--------------------------------------------------

 Returns a tensor of the same type and dimensions as the input tensors containing the coefficient wise differences of the inputs.

 
 <Operation> operator\*(const OtherDerived& other)
---------------------------------------------------

 Returns a tensor of the same type and dimensions as the input tensors containing the coefficient wise products of the inputs.

 
 <Operation> operator/(const OtherDerived& other)
--------------------------------------------------

 Returns a tensor of the same type and dimensions as the input tensors containing the coefficient wise quotients of the inputs.

 This operator is not supported for integer types.

 
 <Operation> cwiseMax(const OtherDerived& other)
-------------------------------------------------

 Returns a tensor of the same type and dimensions as the input tensors containing the coefficient wise maximums of the inputs.

 
 <Operation> cwiseMin(const OtherDerived& other)
-------------------------------------------------

 Returns a tensor of the same type and dimensions as the input tensors containing the coefficient wise mimimums of the inputs.

 
 <Operation> Logical operators
-------------------------------

 The following logical operators are supported as well:

 * operator&&(const OtherDerived& other)
* operator||(const OtherDerived& other)
* operator<(const OtherDerived& other)
* operator<=(const OtherDerived& other)
* operator>(const OtherDerived& other)
* operator>=(const OtherDerived& other)
* operator==(const OtherDerived& other)
* operator!=(const OtherDerived& other)

 They all return a tensor of boolean values.

 
 Selection (select(const ThenDerived& thenTensor, const ElseDerived& elseTensor)
=================================================================================

 Selection is a coefficient-wise ternary operator that is the tensor equivalent to the if-then-else operation. 



```
Tensor<bool, 3> if = ...;
Tensor<float, 3> then = ...;
Tensor<float, 3> else = ...;
Tensor<float, 3> result = if.select(then, else);

```

 The 3 arguments must be of the same dimensions, which will also be the dimension of the result. The 'if' tensor must be of type boolean, the 'then' and the 'else' tensor must be of the same type, which will also be the type of the result.

 Each coefficient in the result is equal to the corresponding coefficient in the 'then' tensor if the corresponding value in the 'if' tensor is true. If not, the resulting coefficient will come from the 'else' tensor.

 
 Contraction
=============

 Tensor *contractions* are a generalization of the matrix product to the multidimensional case. 



```
// Create 2 matrices using tensors of rank 2
Eigen::Tensor<int, 2> a(2, 3);
a.setValues({{1, 2, 3}, {6, 5, 4}});
Eigen::Tensor<int, 2> b(3, 2);
b.setValues({{1, 2}, {4, 5}, {5, 6}});

// Compute the traditional matrix product
Eigen::array<Eigen::IndexPair<int>, 1> product_dims = { Eigen::IndexPair<int>(1, 0) };
Eigen::Tensor<int, 2> AB = a.contract(b, product_dims);

// Compute the product of the transpose of the matrices
Eigen::array<Eigen::IndexPair<int>, 1> transposed_product_dims = { Eigen::IndexPair<int>(0, 1) };
Eigen::Tensor<int, 2> AtBt = a.contract(b, transposed_product_dims);

// Contraction to scalar value using a double contraction.
// First coordinate of both tensors are contracted as well as both second coordinates, i.e., this computes the sum of the squares of the elements.
Eigen::array<Eigen::IndexPair<int>, 2> double_contraction_product_dims = { Eigen::IndexPair<int>(0, 0), Eigen::IndexPair<int>(1, 1) };
Eigen::Tensor<int, 0> AdoubleContractedA = a.contract(a, double_contraction_product_dims);

// Extracting the scalar value of the tensor contraction for further usage
int value = AdoubleContractedA(0);

```
 
 Reduction Operations
======================

 A *Reduction* operation returns a tensor with fewer dimensions than the original tensor. The values in the returned tensor are computed by applying a *reduction operator* to slices of values from the original tensor. You specify the dimensions along which the slices are made.

 The [Eigen](namespaceeigen "Namespace containing all symbols from the Eigen library.") Tensor library provides a set of predefined reduction operators such as `maximum()` and `sum()` and lets you define additional operators by implementing a few methods from a reductor template.

 
 Reduction Dimensions
----------------------

 All reduction operations take a single parameter of type `<TensorType>::``Dimensions` which can always be specified as an array of ints. These are called the "reduction dimensions." The values are the indices of the dimensions of the input tensor over which the reduction is done. The parameter can have at most as many element as the rank of the input tensor; each element must be less than the tensor rank, as it indicates one of the dimensions to reduce.

 Each dimension of the input tensor should occur at most once in the reduction dimensions as the implementation does not remove duplicates.

 The order of the values in the reduction dimensions does not affect the results, but the code may execute faster if you list the dimensions in increasing order.

 Example: Reduction along one dimension. 



```
// Create a tensor of 2 dimensions
Eigen::Tensor<int, 2> a(2, 3);
a.setValues({{1, 2, 3}, {6, 5, 4}});
// Reduce it along the second dimension (1)...
Eigen::array<int, 1> dims({1 /* dimension to reduce */});
// ...using the "maximum" operator.
// The result is a tensor with one dimension.  The size of
// that dimension is the same as the first (non-reduced) dimension of a.
Eigen::Tensor<int, 1> b = a.maximum(dims);
cout << "a" << endl << a << endl << endl;
cout << "b" << endl << b << endl << endl;
=>
a
1 2 3
6 5 4

b
3
6

```

 Example: Reduction along two dimensions. 



```
Eigen::Tensor<float, 3, Eigen::ColMajor> a(2, 3, 4);
a.setValues({{{0.0f, 1.0f, 2.0f, 3.0f},
              {7.0f, 6.0f, 5.0f, 4.0f},
              {8.0f, 9.0f, 10.0f, 11.0f}},
             {{12.0f, 13.0f, 14.0f, 15.0f},
              {19.0f, 18.0f, 17.0f, 16.0f},
              {20.0f, 21.0f, 22.0f, 23.0f}}});
// The tensor a has 3 dimensions.  We reduce along the
// first 2, resulting in a tensor with a single dimension
// of size 4 (the last dimension of a.)
// Note that we pass the array of reduction dimensions
// directly to the maximum() call.
Eigen::Tensor<float, 1, Eigen::ColMajor> b =
    a.maximum(Eigen::array<int, 2>({0, 1}));
cout << "b" << endl << b << endl << endl;
=>
b
20
21
22
23

```
 ### 
 Reduction along all dimensions

 As a special case, if you pass no parameter to a reduction operation the original tensor is reduced along *all* its dimensions. The result is a scalar, represented as a zero-dimension tensor. 



```
Eigen::Tensor<float, 3> a(2, 3, 4);
a.setValues({{{0.0f, 1.0f, 2.0f, 3.0f},
              {7.0f, 6.0f, 5.0f, 4.0f},
              {8.0f, 9.0f, 10.0f, 11.0f}},
             {{12.0f, 13.0f, 14.0f, 15.0f},
              {19.0f, 18.0f, 17.0f, 16.0f},
              {20.0f, 21.0f, 22.0f, 23.0f}}});
// Reduce along all dimensions using the sum() operator.
Eigen::Tensor<float, 0> b = a.sum();
cout << "b" << endl << b << endl << endl;
=>
b
276

```


 <Operation> sum(const Dimensions& new\_dims)
----------------------------------------------

 
 <Operation> sum()
-------------------

 Reduce a tensor using the sum() operator. The resulting values are the sum of the reduced values.

 
 <Operation> mean(const Dimensions& new\_dims)
-----------------------------------------------

 
 <Operation> mean()
--------------------

 Reduce a tensor using the mean() operator. The resulting values are the mean of the reduced values.

 
 <Operation> maximum(const Dimensions& new\_dims)
--------------------------------------------------

 
 <Operation> maximum()
-----------------------

 Reduce a tensor using the maximum() operator. The resulting values are the largest of the reduced values.

 
 <Operation> minimum(const Dimensions& new\_dims)
--------------------------------------------------

 
 <Operation> minimum()
-----------------------

 Reduce a tensor using the minimum() operator. The resulting values are the smallest of the reduced values.

 
 <Operation> prod(const Dimensions& new\_dims)
-----------------------------------------------

 
 <Operation> prod()
--------------------

 Reduce a tensor using the prod() operator. The resulting values are the product of the reduced values.

 
 <Operation> all(const Dimensions& new\_dims)
----------------------------------------------

 
 <Operation> all()
-------------------

 Reduce a tensor using the [all()](../group__core__module#ga790ab6c4226ef5f678b9eb532a3eab14) operator. Casts tensor to bool and then checks whether all elements are true. Runs through all elements rather than short-circuiting, so may be significantly inefficient.

 
 <Operation> any(const Dimensions& new\_dims)
----------------------------------------------

 
 <Operation> any()
-------------------

 Reduce a tensor using the any() operator. Casts tensor to bool and then checks whether any element is true. Runs through all elements rather than short-circuiting, so may be significantly inefficient.

 
 <Operation> reduce(const Dimensions& new\_dims, const Reducer& reducer)
-------------------------------------------------------------------------

 Reduce a tensor using a user-defined reduction operator. See `SumReducer` in [TensorFunctors.h](https://eigen.tuxfamily.org/dox/unsupported/TensorFunctors_8h_source.html) for information on how to implement a reduction operator.

 
 Trace
=======

 A *Trace* operation returns a tensor with fewer dimensions than the original tensor. It returns a tensor whose elements are the sum of the elements of the original tensor along the main diagonal for a list of specified dimensions, the "trace dimensions". Similar to the `Reduction Dimensions`, the trace dimensions are passed as an input parameter to the operation, are of type `<TensorType>::``Dimensions` , and have the same requirements when passed as an input parameter. In addition, the trace dimensions must have the same size.

 Example: Trace along 2 dimensions. 



```
// Create a tensor of 3 dimensions
Eigen::Tensor<int, 3> a(2, 2, 3);
a.setValues({{{1, 2, 3}, {4, 5, 6}}, {{7, 8, 9}, {10, 11, 12}}});
// Specify the dimensions along which the trace will be computed.
// In this example, the trace can only be computed along the dimensions
// with indices 0 and 1
Eigen::array<int, 2> dims({0, 1});
// The output tensor contains all but the trace dimensions.
Tensor<int, 1> a_trace = a.trace(dims);
cout << "a_trace:" << endl;
cout << a_trace << endl;
=>
a_trace:
11
13
15

```


 <Operation> trace(const Dimensions& new\_dims)
------------------------------------------------

 
 <Operation> trace()
---------------------

 As a special case, if no parameter is passed to the operation, trace is computed along *all* dimensions of the input tensor.

 Example: Trace along all dimensions. 



```
// Create a tensor of 3 dimensions, with all dimensions having the same size.
Eigen::Tensor<int, 3> a(3, 3, 3);
a.setValues({{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}},
            {{10, 11, 12}, {13, 14, 15}, {16, 17, 18}},
            {{19, 20, 21}, {22, 23, 24}, {25, 26, 27}}});
// Result is a zero dimension tensor
Tensor<int, 0> a_trace = a.trace();
cout<<"a_trace:"<<endl;
cout<<a_trace<<endl;
=>
a_trace:
42

```


 Scan Operations
=================

 A *Scan* operation returns a tensor with the same dimensions as the original tensor. The operation performs an inclusive scan along the specified axis, which means it computes a running total along the axis for a given reduction operation. If the reduction operation corresponds to summation, then this computes the prefix sum of the tensor along the given axis.

 Example: dd a comment to this line 



```
// Create a tensor of 2 dimensions
Eigen::Tensor<int, 2> a(2, 3);
a.setValues({{1, 2, 3}, {4, 5, 6}});
// Scan it along the second dimension (1) using summation
Eigen::Tensor<int, 2> b = a.cumsum(1);
// The result is a tensor with the same size as the input
cout << "a" << endl << a << endl << endl;
cout << "b" << endl << b << endl << endl;
=>
a
1 2 3
4 5 6

b
1  3  6
4  9 15

```
 
 <Operation> cumsum(const Index& axis)
---------------------------------------

 Perform a scan by summing consecutive entries.

 
 <Operation> cumprod(const Index& axis)
----------------------------------------

 Perform a scan by multiplying consecutive entries.

 
 Convolutions
==============

 
 <Operation> convolve(const Kernel& kernel, const Dimensions& dims)
--------------------------------------------------------------------

 Returns a tensor that is the output of the convolution of the input tensor with the kernel, along the specified dimensions of the input tensor. The dimension size for dimensions of the output tensor which were part of the convolution will be reduced by the formula: output\_dim\_size = input\_dim\_size - kernel\_dim\_size + 1 (requires: input\_dim\_size >= kernel\_dim\_size). The dimension sizes for dimensions that were not part of the convolution will remain the same. Performance of the convolution can depend on the length of the stride(s) of the input tensor dimension(s) along which the convolution is computed (the first dimension has the shortest stride for ColMajor, whereas RowMajor's shortest stride is for the last dimension). 



```
// Compute convolution along the second and third dimension.
Tensor<float, 4, DataLayout> input(3, 3, 7, 11);
Tensor<float, 2, DataLayout> kernel(2, 2);
Tensor<float, 4, DataLayout> output(3, 2, 6, 11);
input.setRandom();
kernel.setRandom();

Eigen::array<ptrdiff_t, 2> dims({1, 2});  // Specify second and third dimension for convolution.
output = input.convolve(kernel, dims);

for (int i = 0; i < 3; ++i) {
  for (int j = 0; j < 2; ++j) {
    for (int k = 0; k < 6; ++k) {
      for (int l = 0; l < 11; ++l) {
        const float result = output(i,j,k,l);
        const float expected = input(i,j+0,k+0,l) * kernel(0,0) +
                               input(i,j+1,k+0,l) * kernel(1,0) +
                               input(i,j+0,k+1,l) * kernel(0,1) +
                               input(i,j+1,k+1,l) * kernel(1,1);
        VERIFY_IS_APPROX(result, expected);
      }
    }
  }
}

```


 Geometrical Operations
========================

 These operations return a Tensor with different dimensions than the original Tensor. They can be used to access slices of tensors, see them with different dimensions, or pad tensors with additional data.

 
 <Operation> reshape(const Dimensions& new\_dims)
--------------------------------------------------

 Returns a view of the input tensor that has been reshaped to the specified new dimensions. The argument new\_dims is an array of Index values. The rank of the resulting tensor is equal to the number of elements in new\_dims.

 The product of all the sizes in the new dimension array must be equal to the number of elements in the input tensor. 



```
// Increase the rank of the input tensor by introducing a new dimension
// of size 1.
Tensor<float, 2> input(7, 11);
array<int, 3> three_dims{{7, 11, 1}};
Tensor<float, 3> result = input.reshape(three_dims);

// Decrease the rank of the input tensor by merging 2 dimensions;
array<int, 1> one_dim{{7 * 11}};
Tensor<float, 1> result = input.reshape(one_dim);

```

 This operation does not move any data in the input tensor, so the resulting contents of a reshaped Tensor depend on the data layout of the original Tensor.

 For example this is what happens when you `reshape()` a 2D ColMajor tensor to one dimension: 



```
Eigen::Tensor<float, 2, Eigen::ColMajor> a(2, 3);
a.setValues({{0.0f, 100.0f, 200.0f}, {300.0f, 400.0f, 500.0f}});
Eigen::array<Eigen::DenseIndex, 1> one_dim({3 * 2});
Eigen::Tensor<float, 1, Eigen::ColMajor> b = a.reshape(one_dim);
cout << "b" << endl << b << endl;
=>
b
  0
300
100
400
200
500

```

 This is what happens when the 2D Tensor is RowMajor: 



```
Eigen::Tensor<float, 2, Eigen::RowMajor> a(2, 3);
a.setValues({{0.0f, 100.0f, 200.0f}, {300.0f, 400.0f, 500.0f}});
Eigen::array<Eigen::DenseIndex, 1> one_dim({3 * 2});
Eigen::Tensor<float, 1, Eigen::RowMajor> b = a.reshape(one_dim);
cout << "b" << endl << b << endl;
=>
b
  0
100
200
300
400
500

```

 The reshape operation is a lvalue. In other words, it can be used on the left side of the assignment operator.

 The previous example can be rewritten as follow: 



```
Eigen::Tensor<float, 2, Eigen::ColMajor> a(2, 3);
a.setValues({{0.0f, 100.0f, 200.0f}, {300.0f, 400.0f, 500.0f}});
Eigen::array<Eigen::DenseIndex, 2> two_dim({2, 3});
Eigen::Tensor<float, 1, Eigen::ColMajor> b(6);
b.reshape(two_dim) = a;
cout << "b" << endl << b << endl;
=>
b
  0
300
100
400
200
500

```

 Note that "b" itself was not reshaped but that instead the assignment is done to the reshape view of b.

 
 <Operation> shuffle(const Shuffle& shuffle)
---------------------------------------------

 Returns a copy of the input tensor whose dimensions have been reordered according to the specified permutation. The argument shuffle is an array of Index values. Its size is the rank of the input tensor. It must contain a permutation of 0, 1, ..., rank - 1. The i-th dimension of the output tensor equals to the size of the shuffle[i]-th dimension of the input tensor. For example: 



```
// Shuffle all dimensions to the left by 1.
Tensor<float, 3> input(20, 30, 50);
// ... set some values in input.
Tensor<float, 3> output = input.shuffle({1, 2, 0})

eigen_assert(output.dimension(0) == 30);
eigen_assert(output.dimension(1) == 50);
eigen_assert(output.dimension(2) == 20);

```

 Indices into the output tensor are shuffled accordingly to formulate indices into the input tensor. For example, one can assert in the above code snippet that: 



```
eigen_assert(output(3, 7, 11) == input(11, 3, 7));

```

 In general, one can assert that 



```
eigen_assert(output(..., indices[shuffle[i]], ...) ==
             input(..., indices[i], ...))

```

 The shuffle operation results in a lvalue, which means that it can be assigned to. In other words, it can be used on the left side of the assignment operator.

 Let's rewrite the previous example to take advantage of this feature: 



```
// Shuffle all dimensions to the left by 1.
Tensor<float, 3> input(20, 30, 50);
// ... set some values in input.
Tensor<float, 3> output(30, 50, 20);
output.shuffle({2, 0, 1}) = input;

```


 <Operation> stride(const Strides& strides)
--------------------------------------------

 Returns a view of the input tensor that strides (skips stride-1 elements) along each of the dimensions. The argument strides is an array of Index values. The dimensions of the resulting tensor are ceil(input\_dimensions[i] / strides[i]).

 For example this is what happens when you `stride()` a 2D tensor: 



```
Eigen::Tensor<int, 2> a(4, 3);
a.setValues({{0, 100, 200}, {300, 400, 500}, {600, 700, 800}, {900, 1000, 1100}});
Eigen::array<Eigen::DenseIndex, 2> strides({3, 2});
Eigen::Tensor<int, 2> b = a.stride(strides);
cout << "b" << endl << b << endl;
=>
b
   0   200
 900  1100

```

 It is possible to assign a tensor to a stride: Tensor<float, 3> input(20, 30, 50); // ... set some values in input. Tensor<float, 3> output(40, 90, 200); output.stride({2, 3, 4}) = input;

 
 <Operation> slice(const StartIndices& offsets, const Sizes& extents)
----------------------------------------------------------------------

 Returns a sub-tensor of the given tensor. For each dimension i, the slice is made of the coefficients stored between offset[i] and offset[i] + extents[i] in the input tensor. 



```
Eigen::Tensor<int, 2> a(4, 3);
a.setValues({{0, 100, 200}, {300, 400, 500},
             {600, 700, 800}, {900, 1000, 1100}});
Eigen::array<int, 2> offsets = {1, 0};
Eigen::array<int, 2> extents = {2, 2};
Eigen::Tensor<int, 1> slice = a.slice(offsets, extents);
cout << "a" << endl << a << endl;
=>
a
   0   100   200
 300   400   500
 600   700   800
 900  1000  1100
cout << "slice" << endl << slice << endl;
=>
slice
 300   400
 600   700

```


 <Operation> chip(const Index offset, const Index dim)
-------------------------------------------------------

 A chip is a special kind of slice. It is the subtensor at the given offset in the dimension dim. The returned tensor has one fewer dimension than the input tensor: the dimension dim is removed.

 For example, a matrix chip would be either a row or a column of the input matrix. 



```
Eigen::Tensor<int, 2> a(4, 3);
a.setValues({{0, 100, 200}, {300, 400, 500},
             {600, 700, 800}, {900, 1000, 1100}});
Eigen::Tensor<int, 1> row_3 = a.chip(2, 0);
Eigen::Tensor<int, 1> col_2 = a.chip(1, 1);
cout << "a" << endl << a << endl;
=>
a
   0   100   200
 300   400   500
 600   700   800
 900  1000  1100
cout << "row_3" << endl << row_3 << endl;
=>
row_3
   600   700   800
cout << "col_2" << endl << col_2 << endl;
=>
col_2
   100   400   700    1000

```

 It is possible to assign values to a tensor chip since the chip operation is a lvalue. For example: 



```
Eigen::Tensor<int, 1> a(3);
a.setValues({{100, 200, 300}});
Eigen::Tensor<int, 2> b(2, 3);
b.setZero();
b.chip(0, 0) = a;
cout << "a" << endl << a << endl;
=>
a
 100
 200
 300
cout << "b" << endl << b << endl;
=>
b
   100   200   300
     0     0     0

```


 <Operation> reverse(const ReverseDimensions& reverse)
-------------------------------------------------------

 Returns a view of the input tensor that reverses the order of the coefficients along a subset of the dimensions. The argument reverse is an array of boolean values that indicates whether or not the order of the coefficients should be reversed along each of the dimensions. This operation preserves the dimensions of the input tensor.

 For example this is what happens when you `reverse()` the first dimension of a 2D tensor: 



```
Eigen::Tensor<int, 2> a(4, 3);
a.setValues({{0, 100, 200}, {300, 400, 500},
            {600, 700, 800}, {900, 1000, 1100}});
Eigen::array<bool, 2> reverse({true, false});
Eigen::Tensor<int, 2> b = a.reverse(reverse);
cout << "a" << endl << a << endl << "b" << endl << b << endl;
=>
a
   0   100   200
 300   400   500
 600   700   800
 900  1000  1100
b
 900  1000  1100
 600   700   800
 300   400   500
   0   100   200

```


 <Operation> broadcast(const Broadcast& broadcast)
---------------------------------------------------

 Returns a view of the input tensor in which the input is replicated one to many times. The broadcast argument specifies how many copies of the input tensor need to be made in each of the dimensions. 



```
Eigen::Tensor<int, 2> a(2, 3);
a.setValues({{0, 100, 200}, {300, 400, 500}});
Eigen::array<int, 2> bcast({3, 2});
Eigen::Tensor<int, 2> b = a.broadcast(bcast);
cout << "a" << endl << a << endl << "b" << endl << b << endl;
=>
a
   0   100   200
 300   400   500
b
   0   100   200    0   100   200
 300   400   500  300   400   500
   0   100   200    0   100   200
 300   400   500  300   400   500
   0   100   200    0   100   200
 300   400   500  300   400   500

```
 
 <Operation> concatenate(const OtherDerived& other, Axis axis)
---------------------------------------------------------------

 TODO

 
 <Operation> pad(const PaddingDimensions& padding)
---------------------------------------------------

 Returns a view of the input tensor in which the input is padded with zeros. 



```
Eigen::Tensor<int, 2> a(2, 3);
a.setValues({{0, 100, 200}, {300, 400, 500}});
Eigen::array<pair<int, int>, 2> paddings;
paddings[0] = make_pair(0, 1);
paddings[1] = make_pair(2, 3);
Eigen::Tensor<int, 2> b = a.pad(paddings);
cout << "a" << endl << a << endl << "b" << endl << b << endl;
=>
a
   0   100   200
 300   400   500
b
   0     0     0    0
   0     0     0    0
   0   100   200    0
 300   400   500    0
   0     0     0    0
   0     0     0    0
   0     0     0    0

```


 <Operation> extract\_patches(const PatchDims& patch\_dims)
------------------------------------------------------------

 Returns a tensor of coefficient patches extracted from the input tensor, where each patch is of dimension specified by 'patch\_dims'. The returned tensor has one greater dimension than the input tensor, which is used to index each patch. The patch index in the output tensor depends on the data layout of the input tensor: the patch index is the last dimension ColMajor layout, and the first dimension in RowMajor layout.

 For example, given the following input tensor: 



```
Eigen::Tensor<float, 2, DataLayout> tensor(3,4);
tensor.setValues({{0.0f, 1.0f, 2.0f, 3.0f},
                  {4.0f, 5.0f, 6.0f, 7.0f},
                  {8.0f, 9.0f, 10.0f, 11.0f}});

cout << "tensor: " << endl << tensor << endl;
=>
tensor:
 0   1   2   3
 4   5   6   7
 8   9  10  11

```

 Six 2x2 patches can be extracted and indexed using the following code: 



```
Eigen::Tensor<float, 3, DataLayout> patch;
Eigen::array<ptrdiff_t, 2> patch_dims;
patch_dims[0] = 2;
patch_dims[1] = 2;
patch = tensor.extract_patches(patch_dims);
for (int k = 0; k < 6; ++k) {
  cout << "patch index: " << k << endl;
  for (int i = 0; i < 2; ++i) {
    for (int j = 0; j < 2; ++j) {
      if (DataLayout == ColMajor) {
            cout << patch(i, j, k) << " ";
      } else {
            cout << patch(k, i, j) << " ";
      }
    }
    cout << endl;
  }
}

```

 This code results in the following output when the data layout is ColMajor: 



```
patch index: 0
0 1
4 5
patch index: 1
4 5
8 9
patch index: 2
1 2
5 6
patch index: 3
5 6
9 10
patch index: 4
2 3
6 7
patch index: 5
6 7
10 11

```

 This code results in the following output when the data layout is RowMajor: (NOTE: the set of patches is the same as in ColMajor, but are indexed differently). 



```
patch index: 0
0 1
4 5
patch index: 1
1 2
5 6
patch index: 2
2 3
6 7
patch index: 3
4 5
8 9
patch index: 4
5 6
9 10
patch index: 5
6 7
10 11

```
 
 <Operation> extract\_image\_patches(const Index patch\_rows, const Index patch\_cols, const Index row\_stride, const Index col\_stride, const PaddingType padding\_type)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 Returns a tensor of coefficient image patches extracted from the input tensor, which is expected to have dimensions ordered as follows (depending on the data layout of the input tensor, and the number of additional dimensions 'N'):

 \*) ColMajor 1st dimension: channels (of size d) 2nd dimension: rows (of size r) 3rd dimension: columns (of size c) 4th-Nth dimension: time (for video) or batch (for bulk processing).

 \*) RowMajor (reverse order of ColMajor) 1st-Nth dimension: time (for video) or batch (for bulk processing). N+1'th dimension: columns (of size c) N+2'th dimension: rows (of size r) N+3'th dimension: channels (of size d)

 The returned tensor has one greater dimension than the input tensor, which is used to index each patch. The patch index in the output tensor depends on the data layout of the input tensor: the patch index is the 4'th dimension in ColMajor layout, and the 4'th from the last dimension in RowMajor layout.

 For example, given the following input tensor with the following dimension sizes: \*) depth: 2 \*) rows: 3 \*) columns: 5 \*) batch: 7

 Tensor<float, 4> tensor(2,3,5,7); Tensor<float, 4, RowMajor> tensor\_row\_major = tensor.swap\_layout();

 2x2 image patches can be extracted and indexed using the following code:

 \*) 2D patch: ColMajor (patch indexed by second-to-last dimension) 



```
Tensor<float, 5> twod_patch;
twod_patch = tensor.extract_image_patches<2, 2>();
// twod_patch.dimension(0) == 2
// twod_patch.dimension(1) == 2
// twod_patch.dimension(2) == 2
// twod_patch.dimension(3) == 3*5
// twod_patch.dimension(4) == 7

```

 \*) 2D patch: RowMajor (patch indexed by the second dimension) 



```
Tensor<float, 5, RowMajor> twod_patch_row_major;
twod_patch_row_major = tensor_row_major.extract_image_patches<2, 2>();
// twod_patch_row_major.dimension(0) == 7
// twod_patch_row_major.dimension(1) == 3*5
// twod_patch_row_major.dimension(2) == 2
// twod_patch_row_major.dimension(3) == 2
// twod_patch_row_major.dimension(4) == 2

```
 
 Special Operations
====================

 
 <Operation> cast<T>()
-----------------------

 Returns a tensor of type T with the same dimensions as the original tensor. The returned tensor contains the values of the original tensor converted to type T. 



```
Eigen::Tensor<float, 2> a(2, 3);
Eigen::Tensor<int, 2> b = a.cast<int>();

```

 This can be useful for example if you need to do element-wise division of Tensors of integers. This is not currently supported by the Tensor library but you can easily cast the tensors to floats to do the division: 



```
Eigen::Tensor<int, 2> a(2, 3);
a.setValues({{0, 1, 2}, {3, 4, 5}});
Eigen::Tensor<int, 2> b =
    (a.cast<float>() / a.constant(2).cast<float>()).cast<int>();
cout << "a" << endl << a << endl << endl;
cout << "b" << endl << b << endl << endl;
=>
a
0 1 2
3 4 5

b
0 0 1
1 2 2

```


 <Operation> eval()
--------------------

 TODO

 
 Representation of scalar values
=================================

 Scalar values are often represented by tensors of size 1 and rank 0.For example Tensor<T, N>::maximum() currently returns a Tensor<T, 0>. Similarly, the inner product of 2 1d tensors (through contractions) returns a 0d tensor.

 
 Limitations
=============

 * The number of tensor dimensions is currently limited to 250 when using a compiler that supports cxx11. It is limited to only 5 for older compilers.
* The IndexList class requires a cxx11 compliant compiler. You can use an array of indices instead if you don't have access to a modern compiler.
* On GPUs only floating point values are properly tested and optimized for.
* Complex and integer values are known to be broken on GPUs. If you try to use them you'll most likely end up triggering a static assertion failure such as EIGEN\_STATIC\_ASSERT(packetSize > 1, YOU\_MADE\_A\_PROGRAMMING\_MISTAKE)

 
  

 © Eigen.  
Licensed under the MPL2 License.  

<https://eigen.tuxfamily.org/dox/unsupported/eigen_tensors.html>

eigen3