mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Reduce usage of reserved names
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
c61b3cb0db
commit
8d81a2339c
@@ -10,8 +10,8 @@
|
||||
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
|
||||
#ifndef EIGEN_MINRES_H_
|
||||
#define EIGEN_MINRES_H_
|
||||
#ifndef EIGEN_MINRES_H
|
||||
#define EIGEN_MINRES_H
|
||||
|
||||
|
||||
#include "./InternalHeaderCheck.h"
|
||||
|
||||
@@ -24,20 +24,20 @@ template<typename Packet> inline static Packet pasin(Packet a) { return std::asi
|
||||
|
||||
template<> EIGEN_DONT_INLINE Packet4f pasin(Packet4f x)
|
||||
{
|
||||
_EIGEN_DECLARE_CONST_Packet4f(half, 0.5);
|
||||
_EIGEN_DECLARE_CONST_Packet4f(minus_half, -0.5);
|
||||
_EIGEN_DECLARE_CONST_Packet4f(3half, 1.5);
|
||||
EIGEN_DECLARE_CONST_Packet4f(half, 0.5);
|
||||
EIGEN_DECLARE_CONST_Packet4f(minus_half, -0.5);
|
||||
EIGEN_DECLARE_CONST_Packet4f(3half, 1.5);
|
||||
|
||||
_EIGEN_DECLARE_CONST_Packet4f_FROM_INT(sign_mask, 0x80000000);
|
||||
EIGEN_DECLARE_CONST_Packet4f_FROM_INT(sign_mask, 0x80000000);
|
||||
|
||||
_EIGEN_DECLARE_CONST_Packet4f(pi, 3.141592654);
|
||||
_EIGEN_DECLARE_CONST_Packet4f(pi_over_2, 3.141592654*0.5);
|
||||
EIGEN_DECLARE_CONST_Packet4f(pi, 3.141592654);
|
||||
EIGEN_DECLARE_CONST_Packet4f(pi_over_2, 3.141592654*0.5);
|
||||
|
||||
_EIGEN_DECLARE_CONST_Packet4f(asin1, 4.2163199048E-2);
|
||||
_EIGEN_DECLARE_CONST_Packet4f(asin2, 2.4181311049E-2);
|
||||
_EIGEN_DECLARE_CONST_Packet4f(asin3, 4.5470025998E-2);
|
||||
_EIGEN_DECLARE_CONST_Packet4f(asin4, 7.4953002686E-2);
|
||||
_EIGEN_DECLARE_CONST_Packet4f(asin5, 1.6666752422E-1);
|
||||
EIGEN_DECLARE_CONST_Packet4f(asin1, 4.2163199048E-2);
|
||||
EIGEN_DECLARE_CONST_Packet4f(asin2, 2.4181311049E-2);
|
||||
EIGEN_DECLARE_CONST_Packet4f(asin3, 4.5470025998E-2);
|
||||
EIGEN_DECLARE_CONST_Packet4f(asin4, 7.4953002686E-2);
|
||||
EIGEN_DECLARE_CONST_Packet4f(asin5, 1.6666752422E-1);
|
||||
|
||||
Packet4f a = pabs(x);//got the absolute value
|
||||
|
||||
|
||||
@@ -31,14 +31,14 @@ struct decrement_if_fixed_size
|
||||
|
||||
#endif
|
||||
|
||||
template< typename Scalar_, int _Deg >
|
||||
template< typename Scalar_, int Deg_ >
|
||||
class companion
|
||||
{
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_Deg==Dynamic ? Dynamic : _Deg)
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,Deg_==Dynamic ? Dynamic : Deg_)
|
||||
|
||||
enum {
|
||||
Deg = _Deg,
|
||||
Deg = Deg_,
|
||||
Deg_1=decrement_if_fixed_size<Deg>::ret
|
||||
};
|
||||
|
||||
@@ -49,7 +49,7 @@ class companion
|
||||
typedef Matrix<Scalar, Deg_1, 1> BottomLeftDiagonal;
|
||||
|
||||
typedef Matrix<Scalar, Deg, Deg> DenseCompanionMatrixType;
|
||||
typedef Matrix< Scalar, _Deg, Deg_1 > LeftBlock;
|
||||
typedef Matrix< Scalar, Deg_, Deg_1 > LeftBlock;
|
||||
typedef Matrix< Scalar, Deg_1, Deg_1 > BottomLeftBlock;
|
||||
typedef Matrix< Scalar, 1, Deg_1 > LeftBlockFirstRow;
|
||||
|
||||
@@ -132,9 +132,9 @@ class companion
|
||||
|
||||
|
||||
|
||||
template< typename Scalar_, int _Deg >
|
||||
template< typename Scalar_, int Deg_ >
|
||||
inline
|
||||
bool companion<Scalar_,_Deg>::balanced( RealScalar colNorm, RealScalar rowNorm,
|
||||
bool companion<Scalar_,Deg_>::balanced( RealScalar colNorm, RealScalar rowNorm,
|
||||
bool& isBalanced, RealScalar& colB, RealScalar& rowB )
|
||||
{
|
||||
if( RealScalar(0) == colNorm || RealScalar(0) == rowNorm
|
||||
@@ -186,9 +186,9 @@ bool companion<Scalar_,_Deg>::balanced( RealScalar colNorm, RealScalar rowNorm,
|
||||
}
|
||||
}
|
||||
|
||||
template< typename Scalar_, int _Deg >
|
||||
template< typename Scalar_, int Deg_ >
|
||||
inline
|
||||
bool companion<Scalar_,_Deg>::balancedR( RealScalar colNorm, RealScalar rowNorm,
|
||||
bool companion<Scalar_,Deg_>::balancedR( RealScalar colNorm, RealScalar rowNorm,
|
||||
bool& isBalanced, RealScalar& colB, RealScalar& rowB )
|
||||
{
|
||||
if( RealScalar(0) == colNorm || RealScalar(0) == rowNorm ){ return true; }
|
||||
@@ -213,8 +213,8 @@ bool companion<Scalar_,_Deg>::balancedR( RealScalar colNorm, RealScalar rowNorm,
|
||||
}
|
||||
|
||||
|
||||
template< typename Scalar_, int _Deg >
|
||||
void companion<Scalar_,_Deg>::balance()
|
||||
template< typename Scalar_, int Deg_ >
|
||||
void companion<Scalar_,Deg_>::balance()
|
||||
{
|
||||
using std::abs;
|
||||
EIGEN_STATIC_ASSERT( Deg == Dynamic || 1 < Deg, YOU_MADE_A_PROGRAMMING_MISTAKE );
|
||||
|
||||
@@ -27,16 +27,16 @@ namespace Eigen {
|
||||
* It stores the set of roots as a vector of complexes.
|
||||
*
|
||||
*/
|
||||
template< typename Scalar_, int _Deg >
|
||||
template< typename Scalar_, int Deg_ >
|
||||
class PolynomialSolverBase
|
||||
{
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_Deg==Dynamic ? Dynamic : _Deg)
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,Deg_==Dynamic ? Dynamic : Deg_)
|
||||
|
||||
typedef Scalar_ Scalar;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
typedef std::complex<RealScalar> RootType;
|
||||
typedef Matrix<RootType,_Deg,1> RootsType;
|
||||
typedef Matrix<RootType,Deg_,1> RootsType;
|
||||
|
||||
typedef DenseIndex Index;
|
||||
|
||||
@@ -309,8 +309,8 @@ class PolynomialSolverBase
|
||||
* Computes the complex roots of a real polynomial.
|
||||
*
|
||||
* \param Scalar_ the scalar type, i.e., the type of the polynomial coefficients
|
||||
* \param _Deg the degree of the polynomial, can be a compile time value or Dynamic.
|
||||
* Notice that the number of polynomial coefficients is _Deg+1.
|
||||
* \param Deg_ the degree of the polynomial, can be a compile time value or Dynamic.
|
||||
* Notice that the number of polynomial coefficients is Deg_+1.
|
||||
*
|
||||
* This class implements a polynomial solver and provides convenient methods such as
|
||||
* - real roots,
|
||||
@@ -329,16 +329,16 @@ class PolynomialSolverBase
|
||||
* However, almost always, correct accuracy is reached even in these cases for 64bit
|
||||
* (double) floating types and small polynomial degree (<20).
|
||||
*/
|
||||
template<typename Scalar_, int _Deg>
|
||||
class PolynomialSolver : public PolynomialSolverBase<Scalar_,_Deg>
|
||||
template<typename Scalar_, int Deg_>
|
||||
class PolynomialSolver : public PolynomialSolverBase<Scalar_,Deg_>
|
||||
{
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_Deg==Dynamic ? Dynamic : _Deg)
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,Deg_==Dynamic ? Dynamic : Deg_)
|
||||
|
||||
typedef PolynomialSolverBase<Scalar_,_Deg> PS_Base;
|
||||
typedef PolynomialSolverBase<Scalar_,Deg_> PS_Base;
|
||||
EIGEN_POLYNOMIAL_SOLVER_BASE_INHERITED_TYPES( PS_Base )
|
||||
|
||||
typedef Matrix<Scalar,_Deg,_Deg> CompanionMatrixType;
|
||||
typedef Matrix<Scalar,Deg_,Deg_> CompanionMatrixType;
|
||||
typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
|
||||
ComplexEigenSolver<CompanionMatrixType>,
|
||||
EigenSolver<CompanionMatrixType> >::type EigenSolverType;
|
||||
@@ -353,7 +353,7 @@ class PolynomialSolver : public PolynomialSolverBase<Scalar_,_Deg>
|
||||
eigen_assert( poly.size() > 1 );
|
||||
if(poly.size() > 2 )
|
||||
{
|
||||
internal::companion<Scalar,_Deg> companion( poly );
|
||||
internal::companion<Scalar,Deg_> companion( poly );
|
||||
companion.balance();
|
||||
m_eigenSolver.compute( companion.denseMatrix() );
|
||||
m_roots = m_eigenSolver.eigenvalues();
|
||||
|
||||
@@ -25,22 +25,22 @@ struct SkylineProductReturnType {
|
||||
template<typename LhsNested, typename RhsNested, int ProductMode>
|
||||
struct internal::traits<SkylineProduct<LhsNested, RhsNested, ProductMode> > {
|
||||
// clean the nested types:
|
||||
typedef typename internal::remove_all<LhsNested>::type _LhsNested;
|
||||
typedef typename internal::remove_all<RhsNested>::type _RhsNested;
|
||||
typedef typename _LhsNested::Scalar Scalar;
|
||||
typedef typename internal::remove_all<LhsNested>::type LhsNested_;
|
||||
typedef typename internal::remove_all<RhsNested>::type RhsNested_;
|
||||
typedef typename LhsNested_::Scalar Scalar;
|
||||
|
||||
enum {
|
||||
LhsCoeffReadCost = _LhsNested::CoeffReadCost,
|
||||
RhsCoeffReadCost = _RhsNested::CoeffReadCost,
|
||||
LhsFlags = _LhsNested::Flags,
|
||||
RhsFlags = _RhsNested::Flags,
|
||||
LhsCoeffReadCost = LhsNested_::CoeffReadCost,
|
||||
RhsCoeffReadCost = RhsNested_::CoeffReadCost,
|
||||
LhsFlags = LhsNested_::Flags,
|
||||
RhsFlags = RhsNested_::Flags,
|
||||
|
||||
RowsAtCompileTime = _LhsNested::RowsAtCompileTime,
|
||||
ColsAtCompileTime = _RhsNested::ColsAtCompileTime,
|
||||
InnerSize = internal::min_size_prefer_fixed(_LhsNested::ColsAtCompileTime, _RhsNested::RowsAtCompileTime),
|
||||
RowsAtCompileTime = LhsNested_::RowsAtCompileTime,
|
||||
ColsAtCompileTime = RhsNested_::ColsAtCompileTime,
|
||||
InnerSize = internal::min_size_prefer_fixed(LhsNested_::ColsAtCompileTime, RhsNested_::RowsAtCompileTime),
|
||||
|
||||
MaxRowsAtCompileTime = _LhsNested::MaxRowsAtCompileTime,
|
||||
MaxColsAtCompileTime = _RhsNested::MaxColsAtCompileTime,
|
||||
MaxRowsAtCompileTime = LhsNested_::MaxRowsAtCompileTime,
|
||||
MaxColsAtCompileTime = RhsNested_::MaxColsAtCompileTime,
|
||||
|
||||
EvalToRowMajor = (RhsFlags & LhsFlags & RowMajorBit),
|
||||
ResultIsSkyline = ProductMode == SkylineTimeSkylineProduct,
|
||||
@@ -69,8 +69,8 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
typedef typename traits<SkylineProduct>::_LhsNested _LhsNested;
|
||||
typedef typename traits<SkylineProduct>::_RhsNested _RhsNested;
|
||||
typedef typename traits<SkylineProduct>::LhsNested_ LhsNested_;
|
||||
typedef typename traits<SkylineProduct>::RhsNested_ RhsNested_;
|
||||
|
||||
public:
|
||||
|
||||
@@ -80,11 +80,11 @@ public:
|
||||
eigen_assert(lhs.cols() == rhs.rows());
|
||||
|
||||
enum {
|
||||
ProductIsValid = _LhsNested::ColsAtCompileTime == Dynamic
|
||||
|| _RhsNested::RowsAtCompileTime == Dynamic
|
||||
|| int(_LhsNested::ColsAtCompileTime) == int(_RhsNested::RowsAtCompileTime),
|
||||
AreVectors = _LhsNested::IsVectorAtCompileTime && _RhsNested::IsVectorAtCompileTime,
|
||||
SameSizes = EIGEN_PREDICATE_SAME_MATRIX_SIZE(_LhsNested, _RhsNested)
|
||||
ProductIsValid = LhsNested_::ColsAtCompileTime == Dynamic
|
||||
|| RhsNested_::RowsAtCompileTime == Dynamic
|
||||
|| int(LhsNested_::ColsAtCompileTime) == int(RhsNested_::RowsAtCompileTime),
|
||||
AreVectors = LhsNested_::IsVectorAtCompileTime && RhsNested_::IsVectorAtCompileTime,
|
||||
SameSizes = EIGEN_PREDICATE_SAME_MATRIX_SIZE(LhsNested_, RhsNested_)
|
||||
};
|
||||
// note to the lost user:
|
||||
// * for a dot product use: v1.dot(v2)
|
||||
@@ -104,11 +104,11 @@ public:
|
||||
return m_rhs.cols();
|
||||
}
|
||||
|
||||
EIGEN_STRONG_INLINE const _LhsNested& lhs() const {
|
||||
EIGEN_STRONG_INLINE const LhsNested_& lhs() const {
|
||||
return m_lhs;
|
||||
}
|
||||
|
||||
EIGEN_STRONG_INLINE const _RhsNested& rhs() const {
|
||||
EIGEN_STRONG_INLINE const RhsNested_& rhs() const {
|
||||
return m_rhs;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ EIGEN_STRONG_INLINE Derived& operator Op(const Other& scalar) \
|
||||
EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, *=) \
|
||||
EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, /=)
|
||||
|
||||
#define _EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived, BaseClass) \
|
||||
#define EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE_(Derived, BaseClass) \
|
||||
typedef BaseClass Base; \
|
||||
typedef typename Eigen::internal::traits<Derived>::Scalar Scalar; \
|
||||
typedef typename Eigen::NumTraits<Scalar>::Real RealScalar; \
|
||||
@@ -60,13 +60,13 @@ EIGEN_STRONG_INLINE Derived& operator Op(const Other& scalar) \
|
||||
enum { Flags = Eigen::internal::traits<Derived>::Flags, };
|
||||
|
||||
#define EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived) \
|
||||
_EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived, Eigen::SkylineMatrixBase<Derived>)
|
||||
EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE_(Derived, Eigen::SkylineMatrixBase<Derived>)
|
||||
|
||||
template<typename Derived> class SkylineMatrixBase;
|
||||
template<typename Scalar_, int _Flags = 0> class SkylineMatrix;
|
||||
template<typename Scalar_, int _Flags = 0> class DynamicSkylineMatrix;
|
||||
template<typename Scalar_, int _Flags = 0> class SkylineVector;
|
||||
template<typename Scalar_, int _Flags = 0> class MappedSkylineMatrix;
|
||||
template<typename Scalar_, int Flags_ = 0> class SkylineMatrix;
|
||||
template<typename Scalar_, int Flags_ = 0> class DynamicSkylineMatrix;
|
||||
template<typename Scalar_, int Flags_ = 0> class SkylineVector;
|
||||
template<typename Scalar_, int Flags_ = 0> class MappedSkylineMatrix;
|
||||
|
||||
namespace internal {
|
||||
|
||||
@@ -77,11 +77,11 @@ template<typename T> class eval<T,IsSkyline>
|
||||
{
|
||||
typedef typename traits<T>::Scalar Scalar_;
|
||||
enum {
|
||||
_Flags = traits<T>::Flags
|
||||
Flags_ = traits<T>::Flags
|
||||
};
|
||||
|
||||
public:
|
||||
typedef SkylineMatrix<Scalar_, _Flags> type;
|
||||
typedef SkylineMatrix<Scalar_, Flags_> type;
|
||||
};
|
||||
|
||||
} // end namespace internal
|
||||
|
||||
@@ -29,17 +29,17 @@ namespace Eigen
|
||||
*
|
||||
* \tparam Scalar_ The underlying data type (typically float or double)
|
||||
* \tparam Dim_ The curve dimension (e.g. 2 or 3)
|
||||
* \tparam _Degree Per default set to Dynamic; could be set to the actual desired
|
||||
* \tparam Degree_ Per default set to Dynamic; could be set to the actual desired
|
||||
* degree for optimization purposes (would result in stack allocation
|
||||
* of several temporary variables).
|
||||
**/
|
||||
template <typename Scalar_, int Dim_, int _Degree>
|
||||
template <typename Scalar_, int Dim_, int Degree_>
|
||||
class Spline
|
||||
{
|
||||
public:
|
||||
typedef Scalar_ Scalar; /*!< The spline curve's scalar type. */
|
||||
enum { Dimension = Dim_ /*!< The spline curve's dimension. */ };
|
||||
enum { Degree = _Degree /*!< The spline curve's degree. */ };
|
||||
enum { Degree = Degree_ /*!< The spline curve's degree. */ };
|
||||
|
||||
/** \brief The point type the spline is representing. */
|
||||
typedef typename SplineTraits<Spline>::PointType PointType;
|
||||
@@ -225,18 +225,18 @@ namespace Eigen
|
||||
|
||||
template <typename DerivativeType>
|
||||
static void BasisFunctionDerivativesImpl(
|
||||
const typename Spline<Scalar_, Dim_, _Degree>::Scalar u,
|
||||
const typename Spline<Scalar_, Dim_, Degree_>::Scalar u,
|
||||
const DenseIndex order,
|
||||
const DenseIndex p,
|
||||
const typename Spline<Scalar_, Dim_, _Degree>::KnotVectorType& U,
|
||||
const DenseIndex p,
|
||||
const typename Spline<Scalar_, Dim_, Degree_>::KnotVectorType& U,
|
||||
DerivativeType& N_);
|
||||
};
|
||||
|
||||
template <typename Scalar_, int Dim_, int _Degree>
|
||||
DenseIndex Spline<Scalar_, Dim_, _Degree>::Span(
|
||||
typename SplineTraits< Spline<Scalar_, Dim_, _Degree> >::Scalar u,
|
||||
template <typename Scalar_, int Dim_, int Degree_>
|
||||
DenseIndex Spline<Scalar_, Dim_, Degree_>::Span(
|
||||
typename SplineTraits< Spline<Scalar_, Dim_, Degree_> >::Scalar u,
|
||||
DenseIndex degree,
|
||||
const typename SplineTraits< Spline<Scalar_, Dim_, _Degree> >::KnotVectorType& knots)
|
||||
const typename SplineTraits< Spline<Scalar_, Dim_, Degree_> >::KnotVectorType& knots)
|
||||
{
|
||||
// Piegl & Tiller, "The NURBS Book", A2.1 (p. 68)
|
||||
if (u <= knots(0)) return degree;
|
||||
@@ -244,12 +244,12 @@ namespace Eigen
|
||||
return static_cast<DenseIndex>( std::distance(knots.data(), pos) - 1 );
|
||||
}
|
||||
|
||||
template <typename Scalar_, int Dim_, int _Degree>
|
||||
typename Spline<Scalar_, Dim_, _Degree>::BasisVectorType
|
||||
Spline<Scalar_, Dim_, _Degree>::BasisFunctions(
|
||||
typename Spline<Scalar_, Dim_, _Degree>::Scalar u,
|
||||
template <typename Scalar_, int Dim_, int Degree_>
|
||||
typename Spline<Scalar_, Dim_, Degree_>::BasisVectorType
|
||||
Spline<Scalar_, Dim_, Degree_>::BasisFunctions(
|
||||
typename Spline<Scalar_, Dim_, Degree_>::Scalar u,
|
||||
DenseIndex degree,
|
||||
const typename Spline<Scalar_, Dim_, _Degree>::KnotVectorType& knots)
|
||||
const typename Spline<Scalar_, Dim_, Degree_>::KnotVectorType& knots)
|
||||
{
|
||||
const DenseIndex p = degree;
|
||||
const DenseIndex i = Spline::Span(u, degree, knots);
|
||||
@@ -278,23 +278,23 @@ namespace Eigen
|
||||
return N;
|
||||
}
|
||||
|
||||
template <typename Scalar_, int Dim_, int _Degree>
|
||||
DenseIndex Spline<Scalar_, Dim_, _Degree>::degree() const
|
||||
template <typename Scalar_, int Dim_, int Degree_>
|
||||
DenseIndex Spline<Scalar_, Dim_, Degree_>::degree() const
|
||||
{
|
||||
if (_Degree == Dynamic)
|
||||
if (Degree_ == Dynamic)
|
||||
return m_knots.size() - m_ctrls.cols() - 1;
|
||||
else
|
||||
return _Degree;
|
||||
return Degree_;
|
||||
}
|
||||
|
||||
template <typename Scalar_, int Dim_, int _Degree>
|
||||
DenseIndex Spline<Scalar_, Dim_, _Degree>::span(Scalar u) const
|
||||
template <typename Scalar_, int Dim_, int Degree_>
|
||||
DenseIndex Spline<Scalar_, Dim_, Degree_>::span(Scalar u) const
|
||||
{
|
||||
return Spline::Span(u, degree(), knots());
|
||||
}
|
||||
|
||||
template <typename Scalar_, int Dim_, int _Degree>
|
||||
typename Spline<Scalar_, Dim_, _Degree>::PointType Spline<Scalar_, Dim_, _Degree>::operator()(Scalar u) const
|
||||
template <typename Scalar_, int Dim_, int Degree_>
|
||||
typename Spline<Scalar_, Dim_, Degree_>::PointType Spline<Scalar_, Dim_, Degree_>::operator()(Scalar u) const
|
||||
{
|
||||
enum { Order = SplineTraits<Spline>::OrderAtCompileTime };
|
||||
|
||||
@@ -339,28 +339,28 @@ namespace Eigen
|
||||
}
|
||||
}
|
||||
|
||||
template <typename Scalar_, int Dim_, int _Degree>
|
||||
typename SplineTraits< Spline<Scalar_, Dim_, _Degree> >::DerivativeType
|
||||
Spline<Scalar_, Dim_, _Degree>::derivatives(Scalar u, DenseIndex order) const
|
||||
template <typename Scalar_, int Dim_, int Degree_>
|
||||
typename SplineTraits< Spline<Scalar_, Dim_, Degree_> >::DerivativeType
|
||||
Spline<Scalar_, Dim_, Degree_>::derivatives(Scalar u, DenseIndex order) const
|
||||
{
|
||||
typename SplineTraits< Spline >::DerivativeType res;
|
||||
derivativesImpl(*this, u, order, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
template <typename Scalar_, int Dim_, int _Degree>
|
||||
template <typename Scalar_, int Dim_, int Degree_>
|
||||
template <int DerivativeOrder>
|
||||
typename SplineTraits< Spline<Scalar_, Dim_, _Degree>, DerivativeOrder >::DerivativeType
|
||||
Spline<Scalar_, Dim_, _Degree>::derivatives(Scalar u, DenseIndex order) const
|
||||
typename SplineTraits< Spline<Scalar_, Dim_, Degree_>, DerivativeOrder >::DerivativeType
|
||||
Spline<Scalar_, Dim_, Degree_>::derivatives(Scalar u, DenseIndex order) const
|
||||
{
|
||||
typename SplineTraits< Spline, DerivativeOrder >::DerivativeType res;
|
||||
derivativesImpl(*this, u, order, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
template <typename Scalar_, int Dim_, int _Degree>
|
||||
typename SplineTraits< Spline<Scalar_, Dim_, _Degree> >::BasisVectorType
|
||||
Spline<Scalar_, Dim_, _Degree>::basisFunctions(Scalar u) const
|
||||
template <typename Scalar_, int Dim_, int Degree_>
|
||||
typename SplineTraits< Spline<Scalar_, Dim_, Degree_> >::BasisVectorType
|
||||
Spline<Scalar_, Dim_, Degree_>::basisFunctions(Scalar u) const
|
||||
{
|
||||
return Spline::BasisFunctions(u, degree(), knots());
|
||||
}
|
||||
@@ -368,16 +368,16 @@ namespace Eigen
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
template <typename Scalar_, int Dim_, int _Degree>
|
||||
template <typename Scalar_, int Dim_, int Degree_>
|
||||
template <typename DerivativeType>
|
||||
void Spline<Scalar_, Dim_, _Degree>::BasisFunctionDerivativesImpl(
|
||||
const typename Spline<Scalar_, Dim_, _Degree>::Scalar u,
|
||||
void Spline<Scalar_, Dim_, Degree_>::BasisFunctionDerivativesImpl(
|
||||
const typename Spline<Scalar_, Dim_, Degree_>::Scalar u,
|
||||
const DenseIndex order,
|
||||
const DenseIndex p,
|
||||
const typename Spline<Scalar_, Dim_, _Degree>::KnotVectorType& U,
|
||||
const typename Spline<Scalar_, Dim_, Degree_>::KnotVectorType& U,
|
||||
DerivativeType& N_)
|
||||
{
|
||||
typedef Spline<Scalar_, Dim_, _Degree> SplineType;
|
||||
typedef Spline<Scalar_, Dim_, Degree_> SplineType;
|
||||
enum { Order = SplineTraits<SplineType>::OrderAtCompileTime };
|
||||
|
||||
const DenseIndex span = SplineType::Span(u, p, U);
|
||||
@@ -473,32 +473,32 @@ namespace Eigen
|
||||
}
|
||||
}
|
||||
|
||||
template <typename Scalar_, int Dim_, int _Degree>
|
||||
typename SplineTraits< Spline<Scalar_, Dim_, _Degree> >::BasisDerivativeType
|
||||
Spline<Scalar_, Dim_, _Degree>::basisFunctionDerivatives(Scalar u, DenseIndex order) const
|
||||
template <typename Scalar_, int Dim_, int Degree_>
|
||||
typename SplineTraits< Spline<Scalar_, Dim_, Degree_> >::BasisDerivativeType
|
||||
Spline<Scalar_, Dim_, Degree_>::basisFunctionDerivatives(Scalar u, DenseIndex order) const
|
||||
{
|
||||
typename SplineTraits<Spline<Scalar_, Dim_, _Degree> >::BasisDerivativeType der;
|
||||
typename SplineTraits<Spline<Scalar_, Dim_, Degree_> >::BasisDerivativeType der;
|
||||
BasisFunctionDerivativesImpl(u, order, degree(), knots(), der);
|
||||
return der;
|
||||
}
|
||||
|
||||
template <typename Scalar_, int Dim_, int _Degree>
|
||||
template <typename Scalar_, int Dim_, int Degree_>
|
||||
template <int DerivativeOrder>
|
||||
typename SplineTraits< Spline<Scalar_, Dim_, _Degree>, DerivativeOrder >::BasisDerivativeType
|
||||
Spline<Scalar_, Dim_, _Degree>::basisFunctionDerivatives(Scalar u, DenseIndex order) const
|
||||
typename SplineTraits< Spline<Scalar_, Dim_, Degree_>, DerivativeOrder >::BasisDerivativeType
|
||||
Spline<Scalar_, Dim_, Degree_>::basisFunctionDerivatives(Scalar u, DenseIndex order) const
|
||||
{
|
||||
typename SplineTraits< Spline<Scalar_, Dim_, _Degree>, DerivativeOrder >::BasisDerivativeType der;
|
||||
typename SplineTraits< Spline<Scalar_, Dim_, Degree_>, DerivativeOrder >::BasisDerivativeType der;
|
||||
BasisFunctionDerivativesImpl(u, order, degree(), knots(), der);
|
||||
return der;
|
||||
}
|
||||
|
||||
template <typename Scalar_, int Dim_, int _Degree>
|
||||
typename SplineTraits<Spline<Scalar_, Dim_, _Degree> >::BasisDerivativeType
|
||||
Spline<Scalar_, Dim_, _Degree>::BasisFunctionDerivatives(
|
||||
const typename Spline<Scalar_, Dim_, _Degree>::Scalar u,
|
||||
template <typename Scalar_, int Dim_, int Degree_>
|
||||
typename SplineTraits<Spline<Scalar_, Dim_, Degree_> >::BasisDerivativeType
|
||||
Spline<Scalar_, Dim_, Degree_>::BasisFunctionDerivatives(
|
||||
const typename Spline<Scalar_, Dim_, Degree_>::Scalar u,
|
||||
const DenseIndex order,
|
||||
const DenseIndex degree,
|
||||
const typename Spline<Scalar_, Dim_, _Degree>::KnotVectorType& knots)
|
||||
const typename Spline<Scalar_, Dim_, Degree_>::KnotVectorType& knots)
|
||||
{
|
||||
typename SplineTraits<Spline>::BasisDerivativeType der;
|
||||
BasisFunctionDerivativesImpl(u, order, degree, knots, der);
|
||||
|
||||
@@ -23,14 +23,14 @@ namespace Eigen
|
||||
* \ingroup Splines_Module
|
||||
* \brief Compile-time attributes of the Spline class for Dynamic degree.
|
||||
**/
|
||||
template <typename Scalar_, int Dim_, int _Degree>
|
||||
struct SplineTraits< Spline<Scalar_, Dim_, _Degree>, Dynamic >
|
||||
template <typename Scalar_, int Dim_, int Degree_>
|
||||
struct SplineTraits< Spline<Scalar_, Dim_, Degree_>, Dynamic >
|
||||
{
|
||||
typedef Scalar_ Scalar; /*!< The spline curve's scalar type. */
|
||||
enum { Dimension = Dim_ /*!< The spline curve's dimension. */ };
|
||||
enum { Degree = _Degree /*!< The spline curve's degree. */ };
|
||||
enum { Degree = Degree_ /*!< The spline curve's degree. */ };
|
||||
|
||||
enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 /*!< The spline curve's order at compile-time. */ };
|
||||
enum { OrderAtCompileTime = Degree_==Dynamic ? Dynamic : Degree_+1 /*!< The spline curve's order at compile-time. */ };
|
||||
enum { NumOfDerivativesAtCompileTime = OrderAtCompileTime /*!< The number of derivatives defined for the current spline. */ };
|
||||
|
||||
enum { DerivativeMemoryLayout = Dimension==1 ? RowMajor : ColMajor /*!< The derivative type's memory layout. */ };
|
||||
@@ -63,10 +63,10 @@ namespace Eigen
|
||||
*
|
||||
* The traits class inherits all attributes from the SplineTraits of Dynamic degree.
|
||||
**/
|
||||
template < typename Scalar_, int Dim_, int _Degree, int _DerivativeOrder >
|
||||
struct SplineTraits< Spline<Scalar_, Dim_, _Degree>, _DerivativeOrder > : public SplineTraits< Spline<Scalar_, Dim_, _Degree> >
|
||||
template < typename Scalar_, int Dim_, int Degree_, int _DerivativeOrder >
|
||||
struct SplineTraits< Spline<Scalar_, Dim_, Degree_>, _DerivativeOrder > : public SplineTraits< Spline<Scalar_, Dim_, Degree_> >
|
||||
{
|
||||
enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 /*!< The spline curve's order at compile-time. */ };
|
||||
enum { OrderAtCompileTime = Degree_==Dynamic ? Dynamic : Degree_+1 /*!< The spline curve's order at compile-time. */ };
|
||||
enum { NumOfDerivativesAtCompileTime = _DerivativeOrder==Dynamic ? Dynamic : _DerivativeOrder+1 /*!< The number of derivatives defined for the current spline. */ };
|
||||
|
||||
enum { DerivativeMemoryLayout = Dim_==1 ? RowMajor : ColMajor /*!< The derivative type's memory layout. */ };
|
||||
|
||||
Reference in New Issue
Block a user