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

// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2009-2010 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_REPLICATE_H
#define EIGEN_REPLICATE_H

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

namespace Eigen {

namespace internal {
traits<Replicate<MatrixType, RowFactor, ColFactor>>;
}  // namespace internal

/**
 * \class Replicate
 * \ingroup Core_Module
 *
 * \brief Expression of the multiple replication of a matrix or vector
 *
 * \tparam MatrixType the type of the object we are replicating
 * \tparam RowFactor number of repetitions at compile time along the vertical direction, can be Dynamic.
 * \tparam ColFactor number of repetitions at compile time along the horizontal direction, can be Dynamic.
 *
 * This class represents an expression of the multiple replication of a matrix or vector.
 * It is the return type of DenseBase::replicate() and most of the time
 * this is the only way it is used.
 *
 * \sa DenseBase::replicate()
 */
template <typename MatrixType, int RowFactor, int ColFactor>
class Replicate : public internal::dense_xpr_base<Replicate<MatrixType, RowFactor, ColFactor> >::type {};

/**
 * \return an expression of the replication of \c *this
 *
 * Example: \include MatrixBase_replicate.cpp
 * Output: \verbinclude MatrixBase_replicate.out
 *
 * \sa VectorwiseOp::replicate(), DenseBase::replicate(Index,Index), class Replicate
 */
template <typename Derived>
template <int RowFactor, int ColFactor>
EIGEN_DEVICE_FUNC const Replicate<Derived, RowFactor, ColFactor> DenseBase<Derived>::replicate() const {}

/**
 * \return an expression of the replication of each column (or row) of \c *this
 *
 * Example: \include DirectionWise_replicate_int.cpp
 * Output: \verbinclude DirectionWise_replicate_int.out
 *
 * \sa VectorwiseOp::replicate(), DenseBase::replicate(), class Replicate
 */
template <typename ExpressionType, int Direction>
EIGEN_DEVICE_FUNC const typename VectorwiseOp<ExpressionType, Direction>::ReplicateReturnType
VectorwiseOp<ExpressionType, Direction>::replicate(Index factor) const {}

}  // end namespace Eigen

#endif  // EIGEN_REPLICATE_H