Go to the documentation of this file.
10 #ifndef EIGEN_NULLARY_FUNCTORS_H
11 #define EIGEN_NULLARY_FUNCTORS_H
17 template<
typename Scalar>
22 template<
typename PacketType>
26 template<
typename Scalar>
33 template<
typename IndexType>
36 template<
typename Scalar>
42 template <
typename Scalar>
48 m_low(low), m_high(high), m_size1(num_steps==1 ? 1 : num_steps-1), m_step(num_steps==1 ?
Scalar() :
Scalar((high-low)/
RealScalar(num_steps-1))),
49 m_flip(numext::
abs(high)<numext::
abs(low))
52 template<
typename IndexType>
60 template<
typename Packet,
typename IndexType>
71 return pselect<Packet>(mask,
res, pset1<Packet>(m_low));
79 return pselect<Packet>(mask,
res, pset1<Packet>(m_high));
90 template <
typename Scalar>
96 m_divisor(
convert_index<
Scalar>((high>=low?num_steps:-num_steps)+(high-low))/((numext::
abs(high-low)+1)==0?1:(numext::
abs(high-low)+1))),
97 m_use_divisor(num_steps>1 && (numext::
abs(high-low)+1)<num_steps)
100 template<
typename IndexType>
104 if(m_use_divisor)
return m_low + convert_index<Scalar>(
i)/m_divisor;
105 else return m_low + convert_index<Scalar>(
i)*m_multiplier;
130 template <
typename Scalar>
struct linspaced_op
133 :
impl((num_steps==1 ? high : low),high,num_steps)
136 template<
typename IndexType>
139 template<
typename Packet,
typename IndexType>
155 #if !( (EIGEN_COMP_MSVC>1600) || (EIGEN_GNUC_AT_LEAST(4,8)) || (EIGEN_COMP_ICC>=1600))
156 template<
typename Scalar,
typename IndexType>
158 template<
typename Scalar,
typename IndexType>
160 template<
typename Scalar,
typename IndexType>
163 template<
typename Scalar,
typename IndexType>
165 template<
typename Scalar,
typename IndexType>
167 template<
typename Scalar,
typename IndexType>
170 template<
typename Scalar,
typename IndexType>
172 template<
typename Scalar,
typename IndexType>
174 template<
typename Scalar,
typename IndexType>
177 template<
typename Scalar,
typename IndexType>
179 template<
typename Scalar,
typename IndexType>
181 template<
typename Scalar,
typename IndexType>
189 #endif // EIGEN_NULLARY_FUNCTORS_H
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Packet packetOp(IndexType i) const
#define EIGEN_EMPTY_STRUCT_CTOR(X)
#define EIGEN_DEVICE_FUNC
Namespace containing all symbols from the Eigen library.
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE PacketType packetOp() const
const linspaced_op_impl< Scalar, NumTraits< Scalar >::IsInteger > impl
EIGEN_STRONG_INLINE Packet4f pcmp_lt(const Packet4f &a, const Packet4f &b)
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
EIGEN_DEVICE_FUNC linspaced_op(const Scalar &low, const Scalar &high, Index num_steps)
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Packet packetOp(IndexType i) const
NumTraits< Scalar >::Real RealScalar
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar operator()() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE scalar_constant_op(const Scalar &other)
#define EIGEN_PREDICT_TRUE(x)
internal::enable_if< internal::valid_indexed_view_overload< RowIndices, ColIndices >::value &&internal::traits< typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::ReturnAsIndexedView, typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::type operator()(const RowIndices &rowIndices, const ColIndices &colIndices) EIGEN_INDEXED_VIEW_METHOD_CONST
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC linspaced_op_impl(const Scalar &low, const Scalar &high, Index num_steps)
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar operator()(IndexType row, IndexType col) const
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar operator()(IndexType i) const
EIGEN_DEVICE_FUNC IndexDest convert_index(const IndexSrc &idx)
NumTraits< Scalar >::Real RealScalar
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE scalar_constant_op(const scalar_constant_op &other)
EIGEN_DEVICE_FUNC linspaced_op_impl(const Scalar &low, const Scalar &high, Index num_steps)
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
const Scalar m_multiplier
EIGEN_DEVICE_FUNC Packet padd(const Packet &a, const Packet &b)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:33:51