Fix tensor documentation.

This commit is contained in:
Antonio Sánchez
2025-02-05 17:36:00 +00:00
parent 74264c391a
commit c079ee5e44
41 changed files with 272 additions and 329 deletions

View File

@@ -15,21 +15,6 @@
namespace Eigen {
/** \class TensorExpr
* \ingroup CXX11_Tensor_Module
*
* \brief 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.
*
*/
namespace internal {
template <typename NullaryOp, typename XprType>
struct traits<TensorCwiseNullaryOp<NullaryOp, XprType> > : traits<XprType> {
@@ -45,6 +30,14 @@ struct traits<TensorCwiseNullaryOp<NullaryOp, XprType> > : traits<XprType> {
} // end namespace internal
/**
* \ingroup CXX11_Tensor_Module
*
* \brief Tensor nullary expression.
*
* The TensorCwiseNullaryOp class applies a nullary operators to an expression.
* This is typically used to generate constants.
*/
template <typename NullaryOp, typename XprType>
class TensorCwiseNullaryOp : public TensorBase<TensorCwiseNullaryOp<NullaryOp, XprType>, ReadOnlyAccessors> {
public:
@@ -93,6 +86,14 @@ struct nested<TensorCwiseUnaryOp<UnaryOp, XprType>, 1, typename eval<TensorCwise
} // end namespace internal
/**
* \ingroup CXX11_Tensor_Module
*
* \brief Tensor unary expression.
*
* The TensorCwiseUnaryOp class represents an expression where a unary operator
* (e.g. cwiseSqrt) is applied to an expression.
*/
template <typename UnaryOp, typename XprType>
class TensorCwiseUnaryOp : public TensorBase<TensorCwiseUnaryOp<UnaryOp, XprType>, ReadOnlyAccessors> {
public:
@@ -157,6 +158,14 @@ struct nested<TensorCwiseBinaryOp<BinaryOp, LhsXprType, RhsXprType>, 1,
} // end namespace internal
/**
* \ingroup CXX11_Tensor_Module
*
* \brief Tensor binary expression.
*
* The TensorCwiseBinaryOp class represents an expression where a binary
* operator (e.g. addition) is applied to a lhs and a rhs expression.
*/
template <typename BinaryOp, typename LhsXprType, typename RhsXprType>
class TensorCwiseBinaryOp
: public TensorBase<TensorCwiseBinaryOp<BinaryOp, LhsXprType, RhsXprType>, ReadOnlyAccessors> {