00001 // This file is part of Eigen, a lightweight C++ template library 00002 // for linear algebra. 00003 // 00004 // Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com> 00005 // 00006 // Eigen is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 3 of the License, or (at your option) any later version. 00010 // 00011 // Alternatively, you can redistribute it and/or 00012 // modify it under the terms of the GNU General Public License as 00013 // published by the Free Software Foundation; either version 2 of 00014 // the License, or (at your option) any later version. 00015 // 00016 // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 00017 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00018 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 00019 // GNU General Public License for more details. 00020 // 00021 // You should have received a copy of the GNU Lesser General Public 00022 // License and a copy of the GNU General Public License along with 00023 // Eigen. If not, see <http://www.gnu.org/licenses/>. 00024 00025 #ifndef EIGEN_LAZY_H 00026 #define EIGEN_LAZY_H 00027 00028 /** \deprecated it is only used by lazy() which is deprecated 00029 * 00030 * \returns an expression of *this with added flags 00031 * 00032 * Example: \include MatrixBase_marked.cpp 00033 * Output: \verbinclude MatrixBase_marked.out 00034 * 00035 * \sa class Flagged, extract(), part() 00036 */ 00037 template<typename Derived> 00038 template<unsigned int Added> 00039 inline const Flagged<Derived, Added, 0> 00040 MatrixBase<Derived>::marked() const 00041 { 00042 return derived(); 00043 } 00044 00045 /** \deprecated use MatrixBase::noalias() 00046 * 00047 * \returns an expression of *this with the EvalBeforeAssigningBit flag removed. 00048 * 00049 * Example: \include MatrixBase_lazy.cpp 00050 * Output: \verbinclude MatrixBase_lazy.out 00051 * 00052 * \sa class Flagged, marked() 00053 */ 00054 template<typename Derived> 00055 inline const Flagged<Derived, 0, EvalBeforeAssigningBit> 00056 MatrixBase<Derived>::lazy() const 00057 { 00058 return derived(); 00059 } 00060 00061 00062 /** \internal 00063 * Overloaded to perform an efficient C += (A*B).lazy() */ 00064 template<typename Derived> 00065 template<typename ProductDerived, typename Lhs, typename Rhs> 00066 Derived& MatrixBase<Derived>::operator+=(const Flagged<ProductBase<ProductDerived, Lhs,Rhs>, 0, 00067 EvalBeforeAssigningBit>& other) 00068 { 00069 other._expression().derived().addTo(derived()); return derived(); 00070 } 00071 00072 /** \internal 00073 * Overloaded to perform an efficient C -= (A*B).lazy() */ 00074 template<typename Derived> 00075 template<typename ProductDerived, typename Lhs, typename Rhs> 00076 Derived& MatrixBase<Derived>::operator-=(const Flagged<ProductBase<ProductDerived, Lhs,Rhs>, 0, 00077 EvalBeforeAssigningBit>& other) 00078 { 00079 other._expression().derived().subTo(derived()); return derived(); 00080 } 00081 00082 #endif // EIGEN_LAZY_H
Page generated by Doxygen 1.7.1 for MRPT 0.9.4 SVN: at Mon Jan 10 23:33:19 UTC 2011 |