Eigne Matrix Class Library

Dependents:   Eigen_test Odometry_test AttitudeEstimation_usingTicker MPU9250_Quaternion_Binary_Serial ... more

Eigen Matrix Class Library for mbed.

Finally, you can use Eigen on your mbed!!!

Committer:
ykuroda
Date:
Thu Oct 13 04:07:23 2016 +0000
Revision:
0:13a5d365ba16
First commint, Eigne Matrix Class Library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ykuroda 0:13a5d365ba16 1 // This file is part of Eigen, a lightweight C++ template library
ykuroda 0:13a5d365ba16 2 // for linear algebra.
ykuroda 0:13a5d365ba16 3 //
ykuroda 0:13a5d365ba16 4 // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
ykuroda 0:13a5d365ba16 5 // Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>
ykuroda 0:13a5d365ba16 6 //
ykuroda 0:13a5d365ba16 7 // This Source Code Form is subject to the terms of the Mozilla
ykuroda 0:13a5d365ba16 8 // Public License v. 2.0. If a copy of the MPL was not distributed
ykuroda 0:13a5d365ba16 9 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
ykuroda 0:13a5d365ba16 10
ykuroda 0:13a5d365ba16 11 // This file is a base class plugin containing common coefficient wise functions.
ykuroda 0:13a5d365ba16 12
ykuroda 0:13a5d365ba16 13 /** \returns an expression of the difference of \c *this and \a other
ykuroda 0:13a5d365ba16 14 *
ykuroda 0:13a5d365ba16 15 * \note If you want to substract a given scalar from all coefficients, see Cwise::operator-().
ykuroda 0:13a5d365ba16 16 *
ykuroda 0:13a5d365ba16 17 * \sa class CwiseBinaryOp, operator-=()
ykuroda 0:13a5d365ba16 18 */
ykuroda 0:13a5d365ba16 19 EIGEN_MAKE_CWISE_BINARY_OP(operator-,internal::scalar_difference_op)
ykuroda 0:13a5d365ba16 20
ykuroda 0:13a5d365ba16 21 /** \returns an expression of the sum of \c *this and \a other
ykuroda 0:13a5d365ba16 22 *
ykuroda 0:13a5d365ba16 23 * \note If you want to add a given scalar to all coefficients, see Cwise::operator+().
ykuroda 0:13a5d365ba16 24 *
ykuroda 0:13a5d365ba16 25 * \sa class CwiseBinaryOp, operator+=()
ykuroda 0:13a5d365ba16 26 */
ykuroda 0:13a5d365ba16 27 EIGEN_MAKE_CWISE_BINARY_OP(operator+,internal::scalar_sum_op)
ykuroda 0:13a5d365ba16 28
ykuroda 0:13a5d365ba16 29 /** \returns an expression of a custom coefficient-wise operator \a func of *this and \a other
ykuroda 0:13a5d365ba16 30 *
ykuroda 0:13a5d365ba16 31 * The template parameter \a CustomBinaryOp is the type of the functor
ykuroda 0:13a5d365ba16 32 * of the custom operator (see class CwiseBinaryOp for an example)
ykuroda 0:13a5d365ba16 33 *
ykuroda 0:13a5d365ba16 34 * Here is an example illustrating the use of custom functors:
ykuroda 0:13a5d365ba16 35 * \include class_CwiseBinaryOp.cpp
ykuroda 0:13a5d365ba16 36 * Output: \verbinclude class_CwiseBinaryOp.out
ykuroda 0:13a5d365ba16 37 *
ykuroda 0:13a5d365ba16 38 * \sa class CwiseBinaryOp, operator+(), operator-(), cwiseProduct()
ykuroda 0:13a5d365ba16 39 */
ykuroda 0:13a5d365ba16 40 template<typename CustomBinaryOp, typename OtherDerived>
ykuroda 0:13a5d365ba16 41 EIGEN_STRONG_INLINE const CwiseBinaryOp<CustomBinaryOp, const Derived, const OtherDerived>
ykuroda 0:13a5d365ba16 42 binaryExpr(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other, const CustomBinaryOp& func = CustomBinaryOp()) const
ykuroda 0:13a5d365ba16 43 {
ykuroda 0:13a5d365ba16 44 return CwiseBinaryOp<CustomBinaryOp, const Derived, const OtherDerived>(derived(), other.derived(), func);
ykuroda 0:13a5d365ba16 45 }