Sha256: 4d0f02140378c8fd28bb05d2f13dc50dd867bdbc2dddce223fe37b82dbf17ab5

Contents?: true

Size: 1.66 KB

Versions: 23

Compression:

Stored size: 1.66 KB

Contents

// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

#ifndef EIGEN_SELFCWISEBINARYOP_H
#define EIGEN_SELFCWISEBINARYOP_H

namespace Eigen { 

// TODO generalize the scalar type of 'other'

template<typename Derived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::operator*=(const Scalar& other)
{
  internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::mul_assign_op<Scalar,Scalar>());
  return derived();
}

template<typename Derived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& ArrayBase<Derived>::operator+=(const Scalar& other)
{
  internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::add_assign_op<Scalar,Scalar>());
  return derived();
}

template<typename Derived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& ArrayBase<Derived>::operator-=(const Scalar& other)
{
  internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::sub_assign_op<Scalar,Scalar>());
  return derived();
}

template<typename Derived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::operator/=(const Scalar& other)
{
  internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::div_assign_op<Scalar,Scalar>());
  return derived();
}

} // end namespace Eigen

#endif // EIGEN_SELFCWISEBINARYOP_H

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
tomoto-0.5.1 vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h
tomoto-0.5.0 vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h
tomoto-0.4.1 vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h
umappp-0.2.0 vendor/Eigen/src/Core/SelfCwiseBinaryOp.h
tomoto-0.4.0 vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h
tomoto-0.3.3 vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h
tomoto-0.3.2 vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h
tomoto-0.3.1 vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h
umappp-0.1.6 vendor/Eigen/src/Core/SelfCwiseBinaryOp.h
umappp-0.1.5 vendor/Eigen/src/Core/SelfCwiseBinaryOp.h
umappp-0.1.4 vendor/Eigen/src/Core/SelfCwiseBinaryOp.h
umappp-0.1.3 vendor/Eigen/src/Core/SelfCwiseBinaryOp.h
umappp-0.1.2 vendor/Eigen/src/Core/SelfCwiseBinaryOp.h
tomoto-0.3.0 vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h
tomoto-0.2.3 vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h
tomoto-0.2.2 vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h
tomoto-0.2.1 vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h
tomoto-0.2.0 vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h
tomoto-0.1.4 vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h
tomoto-0.1.3 vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h