Rosetta
Public Types | Public Member Functions | Private Attributes | List of all members
numeric::interpolation::spline::PolycubicSpline< N > Class Template Reference

#include <PolycubicSpline.hh>

Inheritance diagram for numeric::interpolation::spline::PolycubicSpline< N >:
Inheritance graph
[legend]

Public Types

typedef PolycubicSplineBase parent
 
- Public Types inherited from numeric::interpolation::spline::PolycubicSplineBase
typedef numeric::Size Size
 

Public Member Functions

 PolycubicSpline ()
 construct generic PolycubicSpline More...
 
 PolycubicSpline (PolycubicSpline const &src)
 copy constructor More...
 
PolycubicSplineBaseOP clone () const override
 Implementation of pure virtual clone() function from base class: returns an owning pointer to a copy of this object. More...
 
MathNTensor< Real, N > const & get_deriv (Size n) const
 
Size dimensionality () const
 
utility::fixedsizearray1< Real,(1<< N) > get_all_derivs (utility::fixedsizearray1< Size, N > const &indices)
 
Real F (utility::fixedsizearray1< Real, N > const &xs) const
 return value at certain (x, y, z) More...
 
Real dFdxi (Size n, utility::fixedsizearray1< Real, N > const &xs) const
 return partial derivative at certain (x, y, z) for x More...
 
utility::fixedsizearray1< Real, NdFdall (utility::fixedsizearray1< Real, N > const &xs) const
 
void train (utility::fixedsizearray1< BorderFlag, N > const &BORDER, utility::fixedsizearray1< double, N > const &START, utility::fixedsizearray1< double, N > const &DELTA, MathNTensor< Real, N > const &RESULTS, utility::fixedsizearray1< bool, N > const &LINCONT, utility::fixedsizearray1< std::pair< Real, Real >, N > const &FIRSTBE)
 Train PolycubicSpline. More...
 
- Public Member Functions inherited from numeric::interpolation::spline::PolycubicSplineBase
 PolycubicSplineBase ()
 Construct generic PolycubicSplineBase. More...
 
 PolycubicSplineBase (Size const dimensionality_in)
 Initialization constructor. More...
 
virtual ~PolycubicSplineBase ()
 Virtual destructor needed for polymorphism. More...
 
Size dimensionality () const
 Get the dimensionality of the derived class. More...
 

Private Attributes

utility::fixedsizearray1< BorderFlag, Nborder_
 controls the behavior at x/y_0 and x/y_dim-1 More...
 
utility::fixedsizearray1< Real, Nstart_
 
utility::fixedsizearray1< Real, Ndelta_
 gives the arguments as a sequence of equidistant points More...
 
utility::fixedsizearray1< MathNTensor< Real, N >,(1<< N) > n_derivs_
 
utility::fixedsizearray1< std::pair< Real, Real >, Nfirstbe_
 first order derivative at x_0/dim-1, y_0/dim-1, z_0/dim-1 can be set for BorderFlag FIRSTDER More...
 
utility::fixedsizearray1< bool, NLinCont_
 if the argument x is outside the range decide if the spline should be continued linearly More...
 

Additional Inherited Members

- Protected Member Functions inherited from numeric::interpolation::spline::PolycubicSplineBase
void set_dimensionality (Size const dimensionality_in)
 Allow derived class to set the dimensionality. More...
 

Member Typedef Documentation

◆ parent

Constructor & Destructor Documentation

◆ PolycubicSpline() [1/2]

construct generic PolycubicSpline

◆ PolycubicSpline() [2/2]

template<Size N>
numeric::interpolation::spline::PolycubicSpline< N >::PolycubicSpline ( PolycubicSpline< N > const &  src)
inline

copy constructor

Member Function Documentation

◆ clone()

template<Size N>
PolycubicSplineBaseOP numeric::interpolation::spline::PolycubicSpline< N >::clone ( ) const
inlineoverridevirtual

Implementation of pure virtual clone() function from base class: returns an owning pointer to a copy of this object.

Implements numeric::interpolation::spline::PolycubicSplineBase.

◆ dFdall()

◆ dFdxi()

template<Size N>
double numeric::interpolation::spline::PolycubicSpline< N >::dFdxi ( Size  n,
utility::fixedsizearray1< Real, N > const &  xs 
) const

◆ dimensionality()

template<Size N>
Size numeric::interpolation::spline::PolycubicSpline< N >::dimensionality ( ) const
inline

References N.

◆ F()

template<Size N>
double numeric::interpolation::spline::PolycubicSpline< N >::F ( utility::fixedsizearray1< Real, N > const &  xs) const

◆ get_all_derivs()

template<Size N>
utility::fixedsizearray1< Real, ( 1 << N ) > numeric::interpolation::spline::PolycubicSpline< N >::get_all_derivs ( utility::fixedsizearray1< Size, N > const &  indices)
inline

◆ get_deriv()

template<Size N>
MathNTensor< Real, N > const& numeric::interpolation::spline::PolycubicSpline< N >::get_deriv ( Size  n) const
inline

get the second order derivatives of the spline for 3 dimensions, you would pass 1-8 and get values, z, y, yz, x, xz, xy, xyz

References kmeans_adaptive_kernel_density_bb_dependent_rotlib::n, and numeric::interpolation::spline::PolycubicSpline< N >::n_derivs_.

◆ train()

template<Size N>
void numeric::interpolation::spline::PolycubicSpline< N >::train ( utility::fixedsizearray1< BorderFlag, N > const &  BORDER,
utility::fixedsizearray1< double, N > const &  START,
utility::fixedsizearray1< double, N > const &  DELTA,
MathNTensor< Real, N > const &  RESULTS,
utility::fixedsizearray1< bool, N > const &  LINCONT,
utility::fixedsizearray1< std::pair< Real, Real >, N > const &  FIRSTBE 
)

Train PolycubicSpline.

train PolycubicSpline

Returns
value and derivative at (x, y)

This initializes the PolycubicSpline, given a MathNTensor of data and various other objects that provide some setup information. This is necessary before using the PolycubicSpline for interpolation.

Parameters
[in]BORDERA vector of enums specifying whether each dimension terminates or wraps around. See numeric/interpolation/spline/CubicSpline.fwd.hh for the enum options.
[in]STARTThe start values – i.e. the coordinates of the first point, used to specify an offset from 0 if the grid points aren't aligned to {0,0,0...,0}.
[in]DELTAThe dimensions of each bin.
[in]RESULTSThe training data, as an N-dimensional tensor (where N >= 3).
[in]LINCONTA vector of booleans that determines what should happen if coordinates are outside of the range of RESULTS. If true, a dimension is extrapolated linearly.
[in]FIRSTBEIn the case of non-periodic first-derivative-smoothed ends to the range, the first derivatives for each dimension at the edges can be specified as a vector of pairs of Reals. Pass a vector of pairs of {0, 0} if unused.

References enumerate_junctions::bool, lactamize::cs, numeric::interpolation::spline::BicubicSpline::get_dsecox(), numeric::interpolation::spline::CubicSpline::get_dsecox(), numeric::interpolation::spline::BicubicSpline::get_dsecoxy(), numeric::interpolation::spline::BicubicSpline::get_dsecoy(), create_a3b_hbs::i, create_a3b_hbs::ii, internal_coordinates::indices, beta_nonlocal::jj, basic::options::OptionKeys::flxbb::layer::layer, N, numeric::MathNTensor< T, N >::n_bins(), kmeans_adaptive_kernel_density_bb_dependent_rotlib::p, p2, dummy-distribution::row, basic::options::OptionKeys::cutoutdomain::start, numeric::interpolation::spline::CubicSpline::train(), numeric::interpolation::spline::BicubicSpline::train(), and test.T040_Types::values.

Referenced by numeric::interpolation::spline::hokey_template_workaround().

Member Data Documentation

◆ border_

controls the behavior at x/y_0 and x/y_dim-1

◆ delta_

gives the arguments as a sequence of equidistant points

◆ firstbe_

first order derivative at x_0/dim-1, y_0/dim-1, z_0/dim-1 can be set for BorderFlag FIRSTDER

◆ LinCont_

template<Size N>
utility::fixedsizearray1< bool, N > numeric::interpolation::spline::PolycubicSpline< N >::LinCont_
private

if the argument x is outside the range decide if the spline should be continued linearly

◆ n_derivs_

template<Size N>
utility::fixedsizearray1< MathNTensor< Real, N >, ( 1 << N ) > numeric::interpolation::spline::PolycubicSpline< N >::n_derivs_
private

◆ start_


The documentation for this class was generated from the following files: