Fix doc references for nullary expressions.

<!-- 
Thanks for contributing a merge request!

We recommend that first-time contributors read our [contribution guidelines](https://eigen.tuxfamily.org/index.php?title=Contributing_to_Eigen).

Before submitting the MR, please complete the following checks:
- Create one PR per feature or bugfix,
- Run the test suite to verify your changes.
  See our [test guidelines](https://eigen.tuxfamily.org/index.php?title=Tests).
- Add tests to cover the bug addressed or any new feature.
- Document new features.  If it is a substantial change, add it to the [Changelog](https://gitlab.com/libeigen/eigen/-/blob/master/CHANGELOG.md).
- Leave the following box checked when submitting: `Allow commits from members who can merge to the target branch`.
  This allows us to rebase and merge your change.

Note that we are a team of volunteers; we appreciate your patience during the review process.
-->

### Description
<!--Please explain your changes.-->

Fix doc references for nullary expressions.

### Reference issue
<!--
You can link to a specific issue using the gitlab syntax #<issue number>. 
If the MR fixes an issue, write "Fixes #<issue number>" to have the issue automatically closed on merge.
-->

Fixes #2997.

### Additional information
<!--Any additional information you think is important.-->

Closes #2997

See merge request libeigen/eigen!2054


(cherry picked from commit 04eb06b354)

31a2702e Fix doc references for nullary expressions.

Co-authored-by: Antonio Sánchez <cantonios@google.com>
This commit is contained in:
Antonio Sánchez
2025-11-03 18:54:35 +00:00
parent 691009cfa3
commit 284dcc122b

View File

@@ -94,7 +94,7 @@ class CwiseNullaryOp : public internal::dense_xpr_base<CwiseNullaryOp<NullaryOp,
* the returned matrix. Must be compatible with this MatrixBase type.
*
* This variant is meant to be used for dynamic-size matrix types. For fixed-size types,
* it is redundant to pass \a rows and \a cols as arguments, so Zero() should be used
* it is redundant to pass \a rows and \a cols as arguments, so NullaryExpr(const CustomNullaryOp&) should be used
* instead.
*
* The template parameter \a CustomNullaryOp is the type of the functor.
@@ -121,7 +121,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
* \only_for_vectors
*
* This variant is meant to be used for dynamic-size vector types. For fixed-size types,
* it is redundant to pass \a size as argument, so Zero() should be used
* it is redundant to pass \a size as argument, so NullaryExpr(const CustomNullaryOp&) should be used
* instead.
*
* The template parameter \a CustomNullaryOp is the type of the functor.
@@ -174,7 +174,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
* the returned matrix. Must be compatible with this DenseBase type.
*
* This variant is meant to be used for dynamic-size matrix types. For fixed-size types,
* it is redundant to pass \a rows and \a cols as arguments, so Zero() should be used
* it is redundant to pass \a rows and \a cols as arguments, so Constant(const Scalar&) should be used
* instead.
*
* The template parameter \a CustomNullaryOp is the type of the functor.
@@ -195,7 +195,7 @@ DenseBase<Derived>::Constant(Index rows, Index cols, const Scalar& value) {
* \only_for_vectors
*
* This variant is meant to be used for dynamic-size vector types. For fixed-size types,
* it is redundant to pass \a size as argument, so Zero() should be used
* it is redundant to pass \a size as argument, so Constant(const Scalar&) should be used
* instead.
*
* The template parameter \a CustomNullaryOp is the type of the functor.