14 #ifndef QMCPLUSPLUS_CUBIC_B_SPLINE_GRID_H 15 #define QMCPLUSPLUS_CUBIC_B_SPLINE_GRID_H 27 template<
class T,
unsigned GRIDTYPE,
unsigned BC>
39 point_type GridStart, GridEnd, GridDelta, GridDeltaInv, GridDeltaInv2, L,
Linv;
54 i =
static_cast<int>(delta * GridDeltaInv);
73 GridDelta = L /
static_cast<T
>(
N);
74 GridDeltaInv = 1.0 / GridDelta;
75 GridDeltaInv2 = 1.0 / GridDelta / GridDelta;
90 using size_t = std::size_t;
93 point_type GridStart, GridEnd, GridDelta, GridDeltaInv, GridDeltaInv2, L,
Linv;
100 if (x < GridStart || x > GridEnd)
104 i =
static_cast<int>(delta * GridDeltaInv);
123 GridDelta = L /
static_cast<point_type>(Npts - 1);
124 GridDeltaInv = 1.0 / GridDelta;
125 GridDeltaInv2 = 1.0 / GridDelta / GridDelta;
132 setGrid(start, end, data.size());
136 bcLower[3] = data[1] - data[0];
137 bcUpper[3] = data[Npts - 1] - data[Npts - 2];
148 setGrid(start, end, data.size());
152 bcLower[3] = startDeriv * GridDelta;
153 bcUpper[3] = endDeriv * GridDelta;
bool getGridPoint(point_type x, int &i)
std::vector< T > container_type
void spline(point_type start, point_type end, value_type startDeriv, value_type endDeriv, const container_type &data, container_type &p)
dummy declaration to be specialized
void spline(point_type start, point_type end, const container_type &data, container_type &p, bool closed)
typename GridTraits< T >::point_type point_type
std::vector< T > container_type
void setGrid(point_type start, point_type end, size_t n)
set linear grid
void spline(point_type start, point_type end, const container_type &data, container_type &p, bool closed)
bool getGridPoint(point_type x, int &i)
Define data types for any GridType.
typename GridTraits< T >::point_type point_type
typename GridTraits< T >::value_type value_type
typename GridTraits< T >::value_type value_type
MakeReturn< UnaryNode< FnFloor, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t floor(const Vector< T1, C1 > &l)