chromium/third_party/eigen3/src/Eigen/src/Core/ArrayBase.h

// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2009 Gael Guennebaud <[email protected]>
//
// 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_ARRAYBASE_H
#define EIGEN_ARRAYBASE_H

// IWYU pragma: private
#include "./InternalHeaderCheck.h"

namespace Eigen {

template <typename ExpressionType>
class MatrixWrapper;

/** \class ArrayBase
 * \ingroup Core_Module
 *
 * \brief Base class for all 1D and 2D array, and related expressions
 *
 * An array is similar to a dense vector or matrix. While matrices are mathematical
 * objects with well defined linear algebra operators, an array is just a collection
 * of scalar values arranged in a one or two dimensional fashion. As the main consequence,
 * all operations applied to an array are performed coefficient wise. Furthermore,
 * arrays support scalar math functions of the c++ standard library (e.g., std::sin(x)), and convenient
 * constructors allowing to easily write generic code working for both scalar values
 * and arrays.
 *
 * This class is the base that is inherited by all array expression types.
 *
 * \tparam Derived is the derived type, e.g., an array or an expression type.
 *
 * This class can be extended with the help of the plugin mechanism described on the page
 * \ref TopicCustomizing_Plugins by defining the preprocessor symbol \c EIGEN_ARRAYBASE_PLUGIN.
 *
 * \sa class MatrixBase, \ref TopicClassHierarchy
 */
template <typename Derived>
class ArrayBase : public DenseBase<Derived> {};

/** replaces \c *this by \c *this - \a other.
 *
 * \returns a reference to \c *this
 */
template <typename Derived>
template <typename OtherDerived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& ArrayBase<Derived>::operator-=(const ArrayBase<OtherDerived>& other) {}

/** replaces \c *this by \c *this + \a other.
 *
 * \returns a reference to \c *this
 */
template <typename Derived>
template <typename OtherDerived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& ArrayBase<Derived>::operator+=(const ArrayBase<OtherDerived>& other) {}

/** replaces \c *this by \c *this * \a other coefficient wise.
 *
 * \returns a reference to \c *this
 */
template <typename Derived>
template <typename OtherDerived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& ArrayBase<Derived>::operator*=(const ArrayBase<OtherDerived>& other) {}

/** replaces \c *this by \c *this / \a other coefficient wise.
 *
 * \returns a reference to \c *this
 */
template <typename Derived>
template <typename OtherDerived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& ArrayBase<Derived>::operator/=(const ArrayBase<OtherDerived>& other) {}

}  // end namespace Eigen

#endif  // EIGEN_ARRAYBASE_H