Main MRPT website > C++ reference
MRPT logo

BlockMethods.h

Go to the documentation of this file.
00001 // This file is part of Eigen, a lightweight C++ template library
00002 // for linear algebra.
00003 //
00004 // Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
00005 // Copyright (C) 2006-2010 Benoit Jacob <jacob.benoit.1@gmail.com>
00006 //
00007 // Eigen is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU Lesser General Public
00009 // License as published by the Free Software Foundation; either
00010 // version 3 of the License, or (at your option) any later version.
00011 //
00012 // Alternatively, you can redistribute it and/or
00013 // modify it under the terms of the GNU General Public License as
00014 // published by the Free Software Foundation; either version 2 of
00015 // the License, or (at your option) any later version.
00016 //
00017 // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
00018 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00019 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
00020 // GNU General Public License for more details.
00021 //
00022 // You should have received a copy of the GNU Lesser General Public
00023 // License and a copy of the GNU General Public License along with
00024 // Eigen. If not, see <http://www.gnu.org/licenses/>.
00025 
00026 #ifndef EIGEN_BLOCKMETHODS_H
00027 #define EIGEN_BLOCKMETHODS_H
00028 
00029 #ifndef EIGEN_PARSED_BY_DOXYGEN
00030 
00031 /** \internal expression type of a column */
00032 typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ColXpr;
00033 typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ConstColXpr;
00034 /** \internal expression type of a row */
00035 typedef Block<Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowXpr;
00036 typedef const Block<const Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowXpr;
00037 /** \internal expression type of a block of whole columns */
00038 typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor> ColsBlockXpr;
00039 typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor> ConstColsBlockXpr;
00040 /** \internal expression type of a block of whole rows */
00041 typedef Block<Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowsBlockXpr;
00042 typedef const Block<const Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowsBlockXpr;
00043 /** \internal expression type of a block of whole columns */
00044 template<int N> struct NColsBlockXpr { typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor> Type; };
00045 template<int N> struct ConstNColsBlockXpr { typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor> Type; };
00046 /** \internal expression type of a block of whole rows */
00047 template<int N> struct NRowsBlockXpr { typedef Block<Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> Type; };
00048 template<int N> struct ConstNRowsBlockXpr { typedef const Block<const Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> Type; };
00049 
00050 
00051 #endif // not EIGEN_PARSED_BY_DOXYGEN
00052 
00053 /** \returns a dynamic-size expression of a block in *this.
00054   *
00055   * \param startRow the first row in the block
00056   * \param startCol the first column in the block
00057   * \param blockRows the number of rows in the block
00058   * \param blockCols the number of columns in the block
00059   *
00060   * Example: \include MatrixBase_block_int_int_int_int.cpp
00061   * Output: \verbinclude MatrixBase_block_int_int_int_int.out
00062   *
00063   * \note Even though the returned expression has dynamic size, in the case
00064   * when it is applied to a fixed-size matrix, it inherits a fixed maximal size,
00065   * which means that evaluating it does not cause a dynamic memory allocation.
00066   *
00067   * \sa class Block, block(Index,Index)
00068   */
00069 inline Block<Derived> block(Index startRow, Index startCol, Index blockRows, Index blockCols)
00070 {
00071   return Block<Derived>(derived(), startRow, startCol, blockRows, blockCols);
00072 }
00073 
00074 /** This is the const version of block(Index,Index,Index,Index). */
00075 inline const Block<const Derived> block(Index startRow, Index startCol, Index blockRows, Index blockCols) const
00076 {
00077   return Block<const Derived>(derived(), startRow, startCol, blockRows, blockCols);
00078 }
00079 
00080 
00081 
00082 
00083 /** \returns a dynamic-size expression of a top-right corner of *this.
00084   *
00085   * \param cRows the number of rows in the corner
00086   * \param cCols the number of columns in the corner
00087   *
00088   * Example: \include MatrixBase_topRightCorner_int_int.cpp
00089   * Output: \verbinclude MatrixBase_topRightCorner_int_int.out
00090   *
00091   * \sa class Block, block(Index,Index,Index,Index)
00092   */
00093 inline Block<Derived> topRightCorner(Index cRows, Index cCols)
00094 {
00095   return Block<Derived>(derived(), 0, cols() - cCols, cRows, cCols);
00096 }
00097 
00098 /** This is the const version of topRightCorner(Index, Index).*/
00099 inline const Block<const Derived> topRightCorner(Index cRows, Index cCols) const
00100 {
00101   return Block<const Derived>(derived(), 0, cols() - cCols, cRows, cCols);
00102 }
00103 
00104 /** \returns an expression of a fixed-size top-right corner of *this.
00105   *
00106   * The template parameters CRows and CCols are the number of rows and columns in the corner.
00107   *
00108   * Example: \include MatrixBase_template_int_int_topRightCorner.cpp
00109   * Output: \verbinclude MatrixBase_template_int_int_topRightCorner.out
00110   *
00111   * \sa class Block, block(Index,Index,Index,Index)
00112   */
00113 template<int CRows, int CCols>
00114 inline Block<Derived, CRows, CCols> topRightCorner()
00115 {
00116   return Block<Derived, CRows, CCols>(derived(), 0, cols() - CCols);
00117 }
00118 
00119 /** This is the const version of topRightCorner<int, int>().*/
00120 template<int CRows, int CCols>
00121 inline const Block<const Derived, CRows, CCols> topRightCorner() const
00122 {
00123   return Block<const Derived, CRows, CCols>(derived(), 0, cols() - CCols);
00124 }
00125 
00126 
00127 
00128 
00129 /** \returns a dynamic-size expression of a top-left corner of *this.
00130   *
00131   * \param cRows the number of rows in the corner
00132   * \param cCols the number of columns in the corner
00133   *
00134   * Example: \include MatrixBase_topLeftCorner_int_int.cpp
00135   * Output: \verbinclude MatrixBase_topLeftCorner_int_int.out
00136   *
00137   * \sa class Block, block(Index,Index,Index,Index)
00138   */
00139 inline Block<Derived> topLeftCorner(Index cRows, Index cCols)
00140 {
00141   return Block<Derived>(derived(), 0, 0, cRows, cCols);
00142 }
00143 
00144 /** This is the const version of topLeftCorner(Index, Index).*/
00145 inline const Block<const Derived> topLeftCorner(Index cRows, Index cCols) const
00146 {
00147   return Block<const Derived>(derived(), 0, 0, cRows, cCols);
00148 }
00149 
00150 /** \returns an expression of a fixed-size top-left corner of *this.
00151   *
00152   * The template parameters CRows and CCols are the number of rows and columns in the corner.
00153   *
00154   * Example: \include MatrixBase_template_int_int_topLeftCorner.cpp
00155   * Output: \verbinclude MatrixBase_template_int_int_topLeftCorner.out
00156   *
00157   * \sa class Block, block(Index,Index,Index,Index)
00158   */
00159 template<int CRows, int CCols>
00160 inline Block<Derived, CRows, CCols> topLeftCorner()
00161 {
00162   return Block<Derived, CRows, CCols>(derived(), 0, 0);
00163 }
00164 
00165 /** This is the const version of topLeftCorner<int, int>().*/
00166 template<int CRows, int CCols>
00167 inline const Block<const Derived, CRows, CCols> topLeftCorner() const
00168 {
00169   return Block<const Derived, CRows, CCols>(derived(), 0, 0);
00170 }
00171 
00172 
00173 
00174 /** \returns a dynamic-size expression of a bottom-right corner of *this.
00175   *
00176   * \param cRows the number of rows in the corner
00177   * \param cCols the number of columns in the corner
00178   *
00179   * Example: \include MatrixBase_bottomRightCorner_int_int.cpp
00180   * Output: \verbinclude MatrixBase_bottomRightCorner_int_int.out
00181   *
00182   * \sa class Block, block(Index,Index,Index,Index)
00183   */
00184 inline Block<Derived> bottomRightCorner(Index cRows, Index cCols)
00185 {
00186   return Block<Derived>(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
00187 }
00188 
00189 /** This is the const version of bottomRightCorner(Index, Index).*/
00190 inline const Block<const Derived> bottomRightCorner(Index cRows, Index cCols) const
00191 {
00192   return Block<const Derived>(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
00193 }
00194 
00195 /** \returns an expression of a fixed-size bottom-right corner of *this.
00196   *
00197   * The template parameters CRows and CCols are the number of rows and columns in the corner.
00198   *
00199   * Example: \include MatrixBase_template_int_int_bottomRightCorner.cpp
00200   * Output: \verbinclude MatrixBase_template_int_int_bottomRightCorner.out
00201   *
00202   * \sa class Block, block(Index,Index,Index,Index)
00203   */
00204 template<int CRows, int CCols>
00205 inline Block<Derived, CRows, CCols> bottomRightCorner()
00206 {
00207   return Block<Derived, CRows, CCols>(derived(), rows() - CRows, cols() - CCols);
00208 }
00209 
00210 /** This is the const version of bottomRightCorner<int, int>().*/
00211 template<int CRows, int CCols>
00212 inline const Block<const Derived, CRows, CCols> bottomRightCorner() const
00213 {
00214   return Block<const Derived, CRows, CCols>(derived(), rows() - CRows, cols() - CCols);
00215 }
00216 
00217 
00218 
00219 /** \returns a dynamic-size expression of a bottom-left corner of *this.
00220   *
00221   * \param cRows the number of rows in the corner
00222   * \param cCols the number of columns in the corner
00223   *
00224   * Example: \include MatrixBase_bottomLeftCorner_int_int.cpp
00225   * Output: \verbinclude MatrixBase_bottomLeftCorner_int_int.out
00226   *
00227   * \sa class Block, block(Index,Index,Index,Index)
00228   */
00229 inline Block<Derived> bottomLeftCorner(Index cRows, Index cCols)
00230 {
00231   return Block<Derived>(derived(), rows() - cRows, 0, cRows, cCols);
00232 }
00233 
00234 /** This is the const version of bottomLeftCorner(Index, Index).*/
00235 inline const Block<const Derived> bottomLeftCorner(Index cRows, Index cCols) const
00236 {
00237   return Block<const Derived>(derived(), rows() - cRows, 0, cRows, cCols);
00238 }
00239 
00240 /** \returns an expression of a fixed-size bottom-left corner of *this.
00241   *
00242   * The template parameters CRows and CCols are the number of rows and columns in the corner.
00243   *
00244   * Example: \include MatrixBase_template_int_int_bottomLeftCorner.cpp
00245   * Output: \verbinclude MatrixBase_template_int_int_bottomLeftCorner.out
00246   *
00247   * \sa class Block, block(Index,Index,Index,Index)
00248   */
00249 template<int CRows, int CCols>
00250 inline Block<Derived, CRows, CCols> bottomLeftCorner()
00251 {
00252   return Block<Derived, CRows, CCols>(derived(), rows() - CRows, 0);
00253 }
00254 
00255 /** This is the const version of bottomLeftCorner<int, int>().*/
00256 template<int CRows, int CCols>
00257 inline const Block<const Derived, CRows, CCols> bottomLeftCorner() const
00258 {
00259   return Block<const Derived, CRows, CCols>(derived(), rows() - CRows, 0);
00260 }
00261 
00262 
00263 
00264 /** \returns a block consisting of the top rows of *this.
00265   *
00266   * \param n the number of rows in the block
00267   *
00268   * Example: \include MatrixBase_topRows_int.cpp
00269   * Output: \verbinclude MatrixBase_topRows_int.out
00270   *
00271   * \sa class Block, block(Index,Index,Index,Index)
00272   */
00273 inline RowsBlockXpr topRows(Index n)
00274 {
00275   return RowsBlockXpr(derived(), 0, 0, n, cols());
00276 }
00277 
00278 /** This is the const version of topRows(Index).*/
00279 inline ConstRowsBlockXpr topRows(Index n) const
00280 {
00281   return ConstRowsBlockXpr(derived(), 0, 0, n, cols());
00282 }
00283 
00284 /** \returns a block consisting of the top rows of *this.
00285   *
00286   * \tparam N the number of rows in the block
00287   *
00288   * Example: \include MatrixBase_template_int_topRows.cpp
00289   * Output: \verbinclude MatrixBase_template_int_topRows.out
00290   *
00291   * \sa class Block, block(Index,Index,Index,Index)
00292   */
00293 template<int N>
00294 inline typename NRowsBlockXpr<N>::Type topRows()
00295 {
00296   return typename NRowsBlockXpr<N>::Type(derived(), 0, 0, N, cols());
00297 }
00298 
00299 /** This is the const version of topRows<int>().*/
00300 template<int N>
00301 inline typename ConstNRowsBlockXpr<N>::Type topRows() const
00302 {
00303   return typename ConstNRowsBlockXpr<N>::Type(derived(), 0, 0, N, cols());
00304 }
00305 
00306 
00307 
00308 /** \returns a block consisting of the bottom rows of *this.
00309   *
00310   * \param n the number of rows in the block
00311   *
00312   * Example: \include MatrixBase_bottomRows_int.cpp
00313   * Output: \verbinclude MatrixBase_bottomRows_int.out
00314   *
00315   * \sa class Block, block(Index,Index,Index,Index)
00316   */
00317 inline RowsBlockXpr bottomRows(Index n)
00318 {
00319   return RowsBlockXpr(derived(), rows() - n, 0, n, cols());
00320 }
00321 
00322 /** This is the const version of bottomRows(Index).*/
00323 inline ConstRowsBlockXpr bottomRows(Index n) const
00324 {
00325   return ConstRowsBlockXpr(derived(), rows() - n, 0, n, cols());
00326 }
00327 
00328 /** \returns a block consisting of the bottom rows of *this.
00329   *
00330   * \tparam N the number of rows in the block
00331   *
00332   * Example: \include MatrixBase_template_int_bottomRows.cpp
00333   * Output: \verbinclude MatrixBase_template_int_bottomRows.out
00334   *
00335   * \sa class Block, block(Index,Index,Index,Index)
00336   */
00337 template<int N>
00338 inline typename NRowsBlockXpr<N>::Type bottomRows()
00339 {
00340   return typename NRowsBlockXpr<N>::Type(derived(), rows() - N, 0, N, cols());
00341 }
00342 
00343 /** This is the const version of bottomRows<int>().*/
00344 template<int N>
00345 inline typename ConstNRowsBlockXpr<N>::Type bottomRows() const
00346 {
00347   return typename ConstNRowsBlockXpr<N>::Type(derived(), rows() - N, 0, N, cols());
00348 }
00349 
00350 
00351 
00352 /** \returns a block consisting of a range of rows of *this.
00353   *
00354   * \param startRow the index of the first row in the block
00355   * \param numRows the number of rows in the block
00356   *
00357   * Example: \include DenseBase_middleRows_int.cpp
00358   * Output: \verbinclude DenseBase_middleRows_int.out
00359   *
00360   * \sa class Block, block(Index,Index,Index,Index)
00361   */
00362 inline RowsBlockXpr middleRows(Index startRow, Index numRows)
00363 {
00364   return RowsBlockXpr(derived(), startRow, 0, numRows, cols());
00365 }
00366 
00367 /** This is the const version of middleRows(Index,Index).*/
00368 inline ConstRowsBlockXpr middleRows(Index startRow, Index numRows) const
00369 {
00370   return ConstRowsBlockXpr(derived(), startRow, 0, numRows, cols());
00371 }
00372 
00373 /** \returns a block consisting of a range of rows of *this.
00374   *
00375   * \tparam N the number of rows in the block
00376   * \param startRow the index of the first row in the block
00377   *
00378   * Example: \include DenseBase_template_int_middleRows.cpp
00379   * Output: \verbinclude DenseBase_template_int_middleRows.out
00380   *
00381   * \sa class Block, block(Index,Index,Index,Index)
00382   */
00383 template<int N>
00384 inline typename NRowsBlockXpr<N>::Type middleRows(Index startRow)
00385 {
00386   return typename NRowsBlockXpr<N>::Type(derived(), startRow, 0, N, cols());
00387 }
00388 
00389 /** This is the const version of middleRows<int>().*/
00390 template<int N>
00391 inline typename ConstNRowsBlockXpr<N>::Type middleRows(Index startRow) const
00392 {
00393   return typename ConstNRowsBlockXpr<N>::Type(derived(), startRow, 0, N, cols());
00394 }
00395 
00396 
00397 
00398 /** \returns a block consisting of the left columns of *this.
00399   *
00400   * \param n the number of columns in the block
00401   *
00402   * Example: \include MatrixBase_leftCols_int.cpp
00403   * Output: \verbinclude MatrixBase_leftCols_int.out
00404   *
00405   * \sa class Block, block(Index,Index,Index,Index)
00406   */
00407 inline ColsBlockXpr leftCols(Index n)
00408 {
00409   return ColsBlockXpr(derived(), 0, 0, rows(), n);
00410 }
00411 
00412 /** This is the const version of leftCols(Index).*/
00413 inline ConstColsBlockXpr leftCols(Index n) const
00414 {
00415   return ConstColsBlockXpr(derived(), 0, 0, rows(), n);
00416 }
00417 
00418 /** \returns a block consisting of the left columns of *this.
00419   *
00420   * \tparam N the number of columns in the block
00421   *
00422   * Example: \include MatrixBase_template_int_leftCols.cpp
00423   * Output: \verbinclude MatrixBase_template_int_leftCols.out
00424   *
00425   * \sa class Block, block(Index,Index,Index,Index)
00426   */
00427 template<int N>
00428 inline typename NColsBlockXpr<N>::Type leftCols()
00429 {
00430   return typename NColsBlockXpr<N>::Type(derived(), 0, 0, rows(), N);
00431 }
00432 
00433 /** This is the const version of leftCols<int>().*/
00434 template<int N>
00435 inline typename ConstNColsBlockXpr<N>::Type leftCols() const
00436 {
00437   return typename ConstNColsBlockXpr<N>::Type(derived(), 0, 0, rows(), N);
00438 }
00439 
00440 
00441 
00442 /** \returns a block consisting of the right columns of *this.
00443   *
00444   * \param n the number of columns in the block
00445   *
00446   * Example: \include MatrixBase_rightCols_int.cpp
00447   * Output: \verbinclude MatrixBase_rightCols_int.out
00448   *
00449   * \sa class Block, block(Index,Index,Index,Index)
00450   */
00451 inline ColsBlockXpr rightCols(Index n)
00452 {
00453   return ColsBlockXpr(derived(), 0, cols() - n, rows(), n);
00454 }
00455 
00456 /** This is the const version of rightCols(Index).*/
00457 inline ConstColsBlockXpr rightCols(Index n) const
00458 {
00459   return ConstColsBlockXpr(derived(), 0, cols() - n, rows(), n);
00460 }
00461 
00462 /** \returns a block consisting of the right columns of *this.
00463   *
00464   * \tparam N the number of columns in the block
00465   *
00466   * Example: \include MatrixBase_template_int_rightCols.cpp
00467   * Output: \verbinclude MatrixBase_template_int_rightCols.out
00468   *
00469   * \sa class Block, block(Index,Index,Index,Index)
00470   */
00471 template<int N>
00472 inline typename NColsBlockXpr<N>::Type rightCols()
00473 {
00474   return typename NColsBlockXpr<N>::Type(derived(), 0, cols() - N, rows(), N);
00475 }
00476 
00477 /** This is the const version of rightCols<int>().*/
00478 template<int N>
00479 inline typename ConstNColsBlockXpr<N>::Type rightCols() const
00480 {
00481   return typename ConstNColsBlockXpr<N>::Type(derived(), 0, cols() - N, rows(), N);
00482 }
00483 
00484 
00485 
00486 /** \returns a block consisting of a range of columns of *this.
00487   *
00488   * \param startCol the index of the first column in the block
00489   * \param numCols the number of columns in the block
00490   *
00491   * Example: \include DenseBase_middleCols_int.cpp
00492   * Output: \verbinclude DenseBase_middleCols_int.out
00493   *
00494   * \sa class Block, block(Index,Index,Index,Index)
00495   */
00496 inline ColsBlockXpr middleCols(Index startCol, Index numCols)
00497 {
00498   return ColsBlockXpr(derived(), 0, startCol, rows(), numCols);
00499 }
00500 
00501 /** This is the const version of middleCols(Index,Index).*/
00502 inline ConstColsBlockXpr middleCols(Index startCol, Index numCols) const
00503 {
00504   return ConstColsBlockXpr(derived(), 0, startCol, rows(), numCols);
00505 }
00506 
00507 /** \returns a block consisting of a range of columns of *this.
00508   *
00509   * \tparam N the number of columns in the block
00510   * \param startCol the index of the first column in the block
00511   *
00512   * Example: \include DenseBase_template_int_middleCols.cpp
00513   * Output: \verbinclude DenseBase_template_int_middleCols.out
00514   *
00515   * \sa class Block, block(Index,Index,Index,Index)
00516   */
00517 template<int N>
00518 inline typename NColsBlockXpr<N>::Type middleCols(Index startCol)
00519 {
00520   return typename NColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), N);
00521 }
00522 
00523 /** This is the const version of middleCols<int>().*/
00524 template<int N>
00525 inline typename ConstNColsBlockXpr<N>::Type middleCols(Index startCol) const
00526 {
00527   return typename ConstNColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), N);
00528 }
00529 
00530 
00531 
00532 /** \returns a fixed-size expression of a block in *this.
00533   *
00534   * The template parameters \a BlockRows and \a BlockCols are the number of
00535   * rows and columns in the block.
00536   *
00537   * \param startRow the first row in the block
00538   * \param startCol the first column in the block
00539   *
00540   * Example: \include MatrixBase_block_int_int.cpp
00541   * Output: \verbinclude MatrixBase_block_int_int.out
00542   *
00543   * \note since block is a templated member, the keyword template has to be used
00544   * if the matrix type is also a template parameter: \code m.template block<3,3>(1,1); \endcode
00545   *
00546   * \sa class Block, block(Index,Index,Index,Index)
00547   */
00548 template<int BlockRows, int BlockCols>
00549 inline Block<Derived, BlockRows, BlockCols> block(Index startRow, Index startCol)
00550 {
00551   return Block<Derived, BlockRows, BlockCols>(derived(), startRow, startCol);
00552 }
00553 
00554 /** This is the const version of block<>(Index, Index). */
00555 template<int BlockRows, int BlockCols>
00556 inline const Block<const Derived, BlockRows, BlockCols> block(Index startRow, Index startCol) const
00557 {
00558   return Block<const Derived, BlockRows, BlockCols>(derived(), startRow, startCol);
00559 }
00560 
00561 /** \returns an expression of the \a i-th column of *this. Note that the numbering starts at 0.
00562   *
00563   * Example: \include MatrixBase_col.cpp
00564   * Output: \verbinclude MatrixBase_col.out
00565   *
00566   * \sa row(), class Block */
00567 inline ColXpr col(Index i)
00568 {
00569   return ColXpr(derived(), i);
00570 }
00571 
00572 /** This is the const version of col(). */
00573 inline ConstColXpr col(Index i) const
00574 {
00575   return ConstColXpr(derived(), i);
00576 }
00577 
00578 /** \returns an expression of the \a i-th row of *this. Note that the numbering starts at 0.
00579   *
00580   * Example: \include MatrixBase_row.cpp
00581   * Output: \verbinclude MatrixBase_row.out
00582   *
00583   * \sa col(), class Block */
00584 inline RowXpr row(Index i)
00585 {
00586   return RowXpr(derived(), i);
00587 }
00588 
00589 /** This is the const version of row(). */
00590 inline ConstRowXpr row(Index i) const
00591 {
00592   return ConstRowXpr(derived(), i);
00593 }
00594 
00595 #endif // EIGEN_BLOCKMETHODS_H



Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:40:17 UTC 2011