mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 11:49:02 +08:00
Fix some typos
This commit is contained in:
parent
555cec17ed
commit
81cb6a51d0
@ -136,7 +136,7 @@ const unsigned int LinearAccessBit = 0x10;
|
|||||||
* Means the expression has a coeffRef() method, i.e. is writable as its individual coefficients are directly addressable.
|
* Means the expression has a coeffRef() method, i.e. is writable as its individual coefficients are directly addressable.
|
||||||
* This rules out read-only expressions.
|
* This rules out read-only expressions.
|
||||||
*
|
*
|
||||||
* Note that DirectAccessBit and LvalueBit are mutually orthogonal, as there are examples of expression having one but note
|
* Note that DirectAccessBit and LvalueBit are mutually orthogonal, as there are examples of expression having one but not
|
||||||
* the other:
|
* the other:
|
||||||
* \li writable expressions that don't have a very simple memory layout as a strided array, have LvalueBit but not DirectAccessBit
|
* \li writable expressions that don't have a very simple memory layout as a strided array, have LvalueBit but not DirectAccessBit
|
||||||
* \li Map-to-const expressions, for example Map<const Matrix>, have DirectAccessBit but not LvalueBit
|
* \li Map-to-const expressions, for example Map<const Matrix>, have DirectAccessBit but not LvalueBit
|
||||||
|
@ -59,7 +59,7 @@ operator+(const Scalar& scalar, const MatrixBase<Derived>& mat)
|
|||||||
{ return CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const ConstantReturnType, Derived>(Constant(rows(),cols(),scalar), mat.derived()); }
|
{ return CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const ConstantReturnType, Derived>(Constant(rows(),cols(),scalar), mat.derived()); }
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
Then one can the following declaration in the config.h or whatever prerequisites header file of his project:
|
Then one can add the following declaration in the config.h or whatever prerequisites header file of his project:
|
||||||
\code
|
\code
|
||||||
#define EIGEN_MATRIXBASE_PLUGIN "MatrixBaseAddons.h"
|
#define EIGEN_MATRIXBASE_PLUGIN "MatrixBaseAddons.h"
|
||||||
\endcode
|
\endcode
|
||||||
|
@ -126,7 +126,7 @@ and contrary to what one might think at first, this implementation is fine unles
|
|||||||
MatrixXf x,y,z;
|
MatrixXf x,y,z;
|
||||||
MatrixXf C = cov(x,y+z);
|
MatrixXf C = cov(x,y+z);
|
||||||
\endcode
|
\endcode
|
||||||
In this special case, the example is fine and will be working because both parameters are declared as \e 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.
|
In this special case, the example is fine and will be working because both parameters are declared as \e const references. The compiler creates a temporary and evaluates the expression y+z into this temporary. Once the function is processed, the temporary is released and the result is assigned to C.
|
||||||
|
|
||||||
\b Note: Functions taking \e const references to Matrix (or Array) can process expressions at the cost of temporaries.
|
\b Note: Functions taking \e const references to Matrix (or Array) can process expressions at the cost of temporaries.
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ It is easy to perform arithmetic operations on sparse matrices provided that the
|
|||||||
\code
|
\code
|
||||||
perm.indices(); // Reference to the vector of indices
|
perm.indices(); // Reference to the vector of indices
|
||||||
sm1.twistedBy(perm); // Permute rows and columns
|
sm1.twistedBy(perm); // Permute rows and columns
|
||||||
sm2 = sm1 * perm; // Permute the columns
|
sm2 = sm1 * perm; // Permute the rows
|
||||||
sm2 = perm * sm1; // Permute the columns
|
sm2 = perm * sm1; // Permute the columns
|
||||||
\endcode
|
\endcode
|
||||||
</td>
|
</td>
|
||||||
|
@ -9,7 +9,7 @@ using Eigen::SparseMatrix;
|
|||||||
|
|
||||||
namespace Eigen {
|
namespace Eigen {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
// MatrixReplacement looks-like a SparseMatrix, so let's inherits its traits:
|
// MatrixReplacement looks-like a SparseMatrix, so let's inherit its traits:
|
||||||
template<>
|
template<>
|
||||||
struct traits<MatrixReplacement> : public Eigen::internal::traits<Eigen::SparseMatrix<double> >
|
struct traits<MatrixReplacement> : public Eigen::internal::traits<Eigen::SparseMatrix<double> >
|
||||||
{};
|
{};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user