mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-03 18:50:39 +08:00
Fixed issue #734 (thanks to Philipp Büttgenbach for reporting the issue and proposing a fix).
Kept ColMajor layout if possible in order to keep derivatives of the same order adjacent in memory. (grafted from e722f36ffa80f131e19428bab275dbc2df522093 )
This commit is contained in:
parent
84a65f996f
commit
4ecd782c31
@ -31,6 +31,8 @@ namespace Eigen
|
|||||||
|
|
||||||
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 { NumOfDerivativesAtCompileTime = OrderAtCompileTime /*!< The number of derivatives defined for the current spline. */ };
|
||||||
|
|
||||||
|
enum { DerivativeMemoryLayout = Dimension==1 ? RowMajor : ColMajor /*!< The derivative type's memory layout. */ };
|
||||||
|
|
||||||
/** \brief The data type used to store non-zero basis functions. */
|
/** \brief The data type used to store non-zero basis functions. */
|
||||||
typedef Array<Scalar,1,OrderAtCompileTime> BasisVectorType;
|
typedef Array<Scalar,1,OrderAtCompileTime> BasisVectorType;
|
||||||
@ -39,7 +41,7 @@ namespace Eigen
|
|||||||
typedef Array<Scalar,Dynamic,Dynamic,RowMajor,NumOfDerivativesAtCompileTime,OrderAtCompileTime> BasisDerivativeType;
|
typedef Array<Scalar,Dynamic,Dynamic,RowMajor,NumOfDerivativesAtCompileTime,OrderAtCompileTime> BasisDerivativeType;
|
||||||
|
|
||||||
/** \brief The data type used to store the spline's derivative values. */
|
/** \brief The data type used to store the spline's derivative values. */
|
||||||
typedef Array<Scalar,Dimension,Dynamic,ColMajor,Dimension,NumOfDerivativesAtCompileTime> DerivativeType;
|
typedef Array<Scalar,Dimension,Dynamic,DerivativeMemoryLayout,Dimension,NumOfDerivativesAtCompileTime> DerivativeType;
|
||||||
|
|
||||||
/** \brief The point type the spline is representing. */
|
/** \brief The point type the spline is representing. */
|
||||||
typedef Array<Scalar,Dimension,1> PointType;
|
typedef Array<Scalar,Dimension,1> PointType;
|
||||||
@ -67,7 +69,7 @@ namespace Eigen
|
|||||||
typedef Array<_Scalar,Dynamic,Dynamic,RowMajor,NumOfDerivativesAtCompileTime,OrderAtCompileTime> BasisDerivativeType;
|
typedef Array<_Scalar,Dynamic,Dynamic,RowMajor,NumOfDerivativesAtCompileTime,OrderAtCompileTime> BasisDerivativeType;
|
||||||
|
|
||||||
/** \brief The data type used to store the spline's derivative values. */
|
/** \brief The data type used to store the spline's derivative values. */
|
||||||
typedef Array<_Scalar,_Dim,Dynamic,ColMajor,_Dim,NumOfDerivativesAtCompileTime> DerivativeType;
|
typedef Array<_Scalar,_Dim,Dynamic,DerivativeMemoryLayout,_Dim,NumOfDerivativesAtCompileTime> DerivativeType;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \brief 2D float B-spline with dynamic degree. */
|
/** \brief 2D float B-spline with dynamic degree. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user