SplineFwd.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 20010-2011 Hauke Heibel <hauke.heibel@gmail.com>
5 //
6 // This Source Code Form is subject to the terms of the Mozilla
7 // Public License v. 2.0. If a copy of the MPL was not distributed
8 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 
10 #ifndef EIGEN_SPLINES_FWD_H
11 #define EIGEN_SPLINES_FWD_H
12 
13 // IWYU pragma: private
14 #include "./InternalHeaderCheck.h"
15 #include "../../../../Eigen/Core"
16 
17 namespace Eigen {
18 template <typename Scalar, int Dim, int Degree = Dynamic>
19 class Spline;
20 
21 template <typename SplineType, int DerivativeOrder = Dynamic>
22 struct SplineTraits {};
23 
28 template <typename Scalar_, int Dim_, int Degree_>
29 struct SplineTraits<Spline<Scalar_, Dim_, Degree_>, Dynamic> {
30  typedef Scalar_ Scalar;
31  enum { Dimension = Dim_ };
32  enum { Degree = Degree_ };
33 
34  enum {
35  OrderAtCompileTime = Degree_ == Dynamic ? Dynamic : Degree_ + 1
36  };
37  enum {
38  NumOfDerivativesAtCompileTime = OrderAtCompileTime
39  };
40 
41  enum { DerivativeMemoryLayout = Dimension == 1 ? RowMajor : ColMajor };
42 
45 
49 
53 
56 
59 
62 
65 };
66 
73 template <typename Scalar_, int Dim_, int Degree_, int _DerivativeOrder>
74 struct SplineTraits<Spline<Scalar_, Dim_, Degree_>, _DerivativeOrder>
75  : public SplineTraits<Spline<Scalar_, Dim_, Degree_> > {
76  enum {
77  OrderAtCompileTime = Degree_ == Dynamic ? Dynamic : Degree_ + 1
78  };
79  enum {
80  NumOfDerivativesAtCompileTime =
81  _DerivativeOrder == Dynamic
82  ? Dynamic
83  : _DerivativeOrder + 1
84  };
85 
86  enum { DerivativeMemoryLayout = Dim_ == 1 ? RowMajor : ColMajor };
87 
91 
94 };
95 
98 
101 
104 
107 } // namespace Eigen
108 
109 #endif // EIGEN_SPLINES_FWD_H
General-purpose arrays with easy API for coefficient-wise operations.
Definition: Array.h:48
A class representing multi-dimensional spline curves.
Definition: Spline.h:37
@ ColMajor
Definition: Constants.h:318
@ RowMajor
Definition: Constants.h:320
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
Spline< float, 3 > Spline3f
3D float B-spline with dynamic degree.
Definition: SplineFwd.h:100
Spline< float, 2 > Spline2f
2D float B-spline with dynamic degree.
Definition: SplineFwd.h:97
Spline< double, 2 > Spline2d
2D double B-spline with dynamic degree.
Definition: SplineFwd.h:103
const int Dynamic
Definition: Constants.h:25
Spline< double, 3 > Spline3d
3D double B-spline with dynamic degree.
Definition: SplineFwd.h:106
Array< Scalar, Dynamic, Dynamic, RowMajor, NumOfDerivativesAtCompileTime, OrderAtCompileTime > BasisDerivativeType
The data type used to store the values of the basis function derivatives.
Definition: SplineFwd.h:48
Array< Scalar, 1, Dynamic > ParameterVectorType
The data type used to store parameter vectors.
Definition: SplineFwd.h:61
Array< Scalar, Dimension, 1 > PointType
The point type the spline is representing.
Definition: SplineFwd.h:55
Array< Scalar, 1, OrderAtCompileTime > BasisVectorType
The data type used to store non-zero basis functions.
Definition: SplineFwd.h:44
Array< Scalar, Dimension, Dynamic > ControlPointVectorType
The data type representing the spline's control points.
Definition: SplineFwd.h:64
Array< Scalar, Dimension, Dynamic, DerivativeMemoryLayout, Dimension, NumOfDerivativesAtCompileTime > DerivativeType
The data type used to store the spline's derivative values.
Definition: SplineFwd.h:52
Array< Scalar, 1, Dynamic > KnotVectorType
The data type used to store knot vectors.
Definition: SplineFwd.h:58
Array< Scalar_, Dynamic, Dynamic, RowMajor, NumOfDerivativesAtCompileTime, OrderAtCompileTime > BasisDerivativeType
The data type used to store the values of the basis function derivatives.
Definition: SplineFwd.h:90
Array< Scalar_, Dim_, Dynamic, DerivativeMemoryLayout, Dim_, NumOfDerivativesAtCompileTime > DerivativeType
The data type used to store the spline's derivative values.
Definition: SplineFwd.h:93
Definition: SplineFwd.h:22