aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Eigen/src/plugins/ReshapedMethods.h30
-rw-r--r--doc/snippets/MatrixBase_reshaped_all.cpp4
-rw-r--r--doc/snippets/MatrixBase_reshaped_to_vector.cpp4
3 files changed, 13 insertions, 25 deletions
diff --git a/Eigen/src/plugins/ReshapedMethods.h b/Eigen/src/plugins/ReshapedMethods.h
index 5366e2711..574eb987b 100644
--- a/Eigen/src/plugins/ReshapedMethods.h
+++ b/Eigen/src/plugins/ReshapedMethods.h
@@ -25,7 +25,7 @@
/// AutoSize does preserve compile-time sizes when possible, i.e., when the sizes of the input are known at compile time \b and
/// that the other size is passed at compile-time using Eigen::fix<N> as above.
///
-/// \sa operator()(all), class Reshaped, fix, fix<N>(int)
+/// \sa class Reshaped, fix, fix<N>(int)
///
template<int Order = ColMajor, typename NRowsType, typename NColsType>
EIGEN_DEVICE_FUNC
@@ -40,22 +40,24 @@ reshaped(NRowsType nRows, NColsType nCols) const;
/// \returns an expression of \c *this with columns (or rows) stacked to a linear column (or row) vector
///
-/// \tparam Order specifies whether to glue columns or rows, and returns a column or row vector.
-/// Possible values are ColMajor, RowMajor or AutoOrder. The default is ColMajor.
+/// \tparam Order specifies whether to stack columns to a column-vector (ColMajor) or
+/// to cat rows to a row-vector (RowMajor). The default is ColMajor.
///
/// If Order==ColMajor (the default), then it returns a column vector from the stacked columns of \c *this.
-/// This is equivalent to \code A(all) \endcode and \code A.reshaped<RowMajor>(fix<1>,AutoSize) \endcode.
+/// This is equivalent to `A.reshaped<ColMajor>(AutoSize,fix<1>)`.
///
/// If Order==RowMajor, then it returns a row vector from the glued rows of \c *this.
-/// This is equivalent to \code A.reshaped<RowMajor>(fix<1>,AutoSize) \endcode.
+/// This is equivalent to `A.reshaped<RowMajor>(fix<1>,AutoSize)`.
///
-/// If Order=AutoOrder, the it returns the same expression as \code A.reshaped<storage_order_of_A>() \endcode
+/// Example:
+/// \include MatrixBase_reshaped_to_vector.cpp
+/// Output: \verbinclude MatrixBase_reshaped_to_vector.out
///
/// If you want more control, you can still fall back to reshaped(NRowsType,NColsType).
/// For instance, to return a column vector with element stacked following the storage order,
/// you can do: \code A.reshaped<AutoOrder>(AutoSize,fix<1>) \endcode
///
-/// \sa operator()(all), reshaped(NRowsType,NColsType), class Reshaped
+/// \sa reshaped(NRowsType,NColsType), class Reshaped
///
template<int Order = ColMajor>
EIGEN_DEVICE_FUNC
@@ -68,20 +70,6 @@ EIGEN_DEVICE_FUNC
inline const Reshaped<const Derived,...>
reshaped() const;
-/// \returns as expression of \c *this with columns stacked to a linear column vector
-///
-/// This overload is essentially a shortcut for
-/// \code this->reshape(AutoSize,fix<1>) \endcode
-///
-/// Example:
-/// \include MatrixBase_reshaped_all.cpp
-/// Output: \verbinclude MatrixBase_reshaped_all.out
-///
-/// \sa reshaped()
-EIGEN_DEVICE_FUNC
-inline Reshaped<Derived,SizeAtCompileTime,1>
-operator()(all);
-
#else
// This file is automatically included twice to generate const and non-const versions
diff --git a/doc/snippets/MatrixBase_reshaped_all.cpp b/doc/snippets/MatrixBase_reshaped_all.cpp
deleted file mode 100644
index a4841834f..000000000
--- a/doc/snippets/MatrixBase_reshaped_all.cpp
+++ /dev/null
@@ -1,4 +0,0 @@
-Matrix4i m = Matrix4i::Random();
-cout << "Here is the matrix m:" << endl << m << endl;
-cout << "Here is m(all).transpose():" << endl << m(all).transpose() << endl;
-cout << "Here is m.reshaped(fix<1>,AutoSize):" << endl << m.reshaped(fix<1>,AutoSize) << endl;
diff --git a/doc/snippets/MatrixBase_reshaped_to_vector.cpp b/doc/snippets/MatrixBase_reshaped_to_vector.cpp
new file mode 100644
index 000000000..ee844c203
--- /dev/null
+++ b/doc/snippets/MatrixBase_reshaped_to_vector.cpp
@@ -0,0 +1,4 @@
+Matrix4i m = Matrix4i::Random();
+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>(): " << endl << m.reshaped<RowMajor>() << endl;