mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-21 20:34:28 +08:00
DOC: Update documentation for 3.4.x
This commit is contained in:
parent
b0f877f8e0
commit
b0eded878d
@ -14,7 +14,7 @@ In particular, it supports \b slicing that consists in taking a set of rows, col
|
|||||||
All the aforementioned operations are handled through the generic DenseBase::operator()(const RowIndices&, const ColIndices&) method.
|
All the aforementioned operations are handled through the generic DenseBase::operator()(const RowIndices&, const ColIndices&) method.
|
||||||
Each argument can be:
|
Each argument can be:
|
||||||
- An integer indexing a single row or column, including symbolic indices.
|
- An integer indexing a single row or column, including symbolic indices.
|
||||||
- The symbol Eigen::all representing the whole set of respective rows or columns in increasing order.
|
- The symbol Eigen::placeholders::all representing the whole set of respective rows or columns in increasing order.
|
||||||
- An ArithmeticSequence as constructed by the Eigen::seq, Eigen::seqN, or Eigen::placeholders::lastN functions.
|
- An ArithmeticSequence as constructed by the Eigen::seq, Eigen::seqN, or Eigen::placeholders::lastN 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]`.
|
- Any 1D vector/array of integers including %Eigen's vector/array, expressions, std::vector, std::array, as well as plain C arrays: `int[N]`.
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ namespace internal {
|
|||||||
{
|
{
|
||||||
// This method should implement "dst += alpha * lhs * rhs" inplace,
|
// 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.
|
// 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_assert(alpha==Scalar(1) && "scaling is not implemented");
|
||||||
EIGEN_ONLY_USED_FOR_DEBUG(alpha);
|
EIGEN_ONLY_USED_FOR_DEBUG(alpha);
|
||||||
|
|
||||||
// Here we could simply call dst.noalias() += lhs.my_matrix() * rhs,
|
// Here we could simply call dst.noalias() += lhs.my_matrix() * rhs,
|
||||||
|
@ -5,7 +5,8 @@ cout << "Here is a random symmetric 5x5 matrix:" << endl << A << endl << endl;
|
|||||||
VectorXd diag(5);
|
VectorXd diag(5);
|
||||||
VectorXd subdiag(4);
|
VectorXd subdiag(4);
|
||||||
VectorXd hcoeffs(4); // Scratch space for householder reflector.
|
VectorXd hcoeffs(4); // Scratch space for householder reflector.
|
||||||
internal::tridiagonalization_inplace(A, diag, subdiag, hcoeffs, true);
|
VectorXd workspace(5);
|
||||||
|
internal::tridiagonalization_inplace(A, diag, subdiag, hcoeffs, workspace, true);
|
||||||
cout << "The orthogonal matrix Q is:" << endl << A << endl;
|
cout << "The orthogonal matrix Q is:" << endl << A << endl;
|
||||||
cout << "The diagonal of the tridiagonal matrix T is:" << endl << diag << endl;
|
cout << "The diagonal of the tridiagonal matrix T is:" << endl << diag << endl;
|
||||||
cout << "The subdiagonal of the tridiagonal matrix T is:" << endl << subdiag << endl;
|
cout << "The subdiagonal of the tridiagonal matrix T is:" << endl << subdiag << endl;
|
||||||
|
@ -2,6 +2,7 @@ static bool eigen_did_assert = false;
|
|||||||
#define eigen_assert(X) if(!eigen_did_assert && !(X)){ std::cout << "### Assertion raised in " << __FILE__ << ":" << __LINE__ << ":\n" #X << "\n### The following would happen without assertions:\n"; eigen_did_assert = true;}
|
#define eigen_assert(X) if(!eigen_did_assert && !(X)){ std::cout << "### Assertion raised in " << __FILE__ << ":" << __LINE__ << ":\n" #X << "\n### The following would happen without assertions:\n"; eigen_did_assert = true;}
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <cassert>
|
||||||
#include <Eigen/Eigen>
|
#include <Eigen/Eigen>
|
||||||
|
|
||||||
#ifndef M_PI
|
#ifndef M_PI
|
||||||
|
Loading…
x
Reference in New Issue
Block a user