MOAB
4.9.3pre
|
00001 // This file is part of Eigen, a lightweight C++ template library 00002 // for linear algebra. 00003 // 00004 // Copyright (C) 2009-2010 Gael Guennebaud <[email protected]> 00005 // 00006 // This Source Code Form is subject to the terms of the Mozilla 00007 // Public License v. 2.0. If a copy of the MPL was not distributed 00008 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 00009 00010 #ifndef EIGEN_SELFCWISEBINARYOP_H 00011 #define EIGEN_SELFCWISEBINARYOP_H 00012 00013 namespace Eigen { 00014 00015 template<typename Derived> 00016 EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::operator*=(const Scalar& other) 00017 { 00018 typedef typename Derived::PlainObject PlainObject; 00019 internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::mul_assign_op<Scalar>()); 00020 return derived(); 00021 } 00022 00023 template<typename Derived> 00024 EIGEN_STRONG_INLINE Derived& ArrayBase<Derived>::operator+=(const Scalar& other) 00025 { 00026 typedef typename Derived::PlainObject PlainObject; 00027 internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::add_assign_op<Scalar>()); 00028 return derived(); 00029 } 00030 00031 template<typename Derived> 00032 EIGEN_STRONG_INLINE Derived& ArrayBase<Derived>::operator-=(const Scalar& other) 00033 { 00034 typedef typename Derived::PlainObject PlainObject; 00035 internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::sub_assign_op<Scalar>()); 00036 return derived(); 00037 } 00038 00039 template<typename Derived> 00040 EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::operator/=(const Scalar& other) 00041 { 00042 typedef typename Derived::PlainObject PlainObject; 00043 internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::div_assign_op<Scalar>()); 00044 return derived(); 00045 } 00046 00047 } // end namespace Eigen 00048 00049 #endif // EIGEN_SELFCWISEBINARYOP_H