Rosetta  2019.07
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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, N > dFdall (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, N > 
border_
 controls the behavior at x/y_0 and x/y_dim-1 More...
 
utility::fixedsizearray1< Real, N > start_
 
utility::fixedsizearray1< Real, N > delta_
 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 >, N > 
firstbe_
 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, N > LinCont_
 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

Constructor & Destructor Documentation

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

construct generic PolycubicSpline

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

copy constructor

Member Function Documentation

template<numeric::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.

template<Size N>
utility::fixedsizearray1< Real, N > numeric::interpolation::spline::PolycubicSpline< N >::dFdall ( utility::fixedsizearray1< Real, N > const &  xs) const
Returns
partial derivatives at (x1, x2, ... xn)

References test.T040_Types::values.

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

return partial derivative at certain (x, y, z) for x

Returns
partial derivative at (x1, x2, ... xn) for var i

References numeric::interpolation::spline::e_Periodic, test.T200_Scoring::ii, make_symmdef_file_denovo::pos, numeric::interpolation::spline::sqr(), and value.

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

template<numeric::Size N>
Size numeric::interpolation::spline::PolycubicSpline< N >::dimensionality ( ) const
inline
template<Size N>
double numeric::interpolation::spline::PolycubicSpline< N >::F ( utility::fixedsizearray1< Real, N > const &  xs) const
template<numeric::Size N>
utility::fixedsizearray1< Real, ( 1 << N ) > numeric::interpolation::spline::PolycubicSpline< N >::get_all_derivs ( utility::fixedsizearray1< Size, N > const &  indices)
inline
template<numeric::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 numeric::interpolation::spline::PolycubicSpline< N >::n_derivs_.

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 numeric::interpolation::spline::BicubicSpline::get_dsecox(), numeric::interpolation::spline::CubicSpline::get_dsecox(), numeric::interpolation::spline::BicubicSpline::get_dsecoxy(), numeric::interpolation::spline::BicubicSpline::get_dsecoy(), test.T200_Scoring::ii, basic::options::OptionKeys::flxbb::layer::layer, numeric::MathNTensor< T, N >::n_bins(), basic::options::OptionKeys::score::fiber_diffraction::p, p2, 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

template<numeric::Size N>
utility::fixedsizearray1< BorderFlag, N > numeric::interpolation::spline::PolycubicSpline< N >::border_
private

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

template<numeric::Size N>
utility::fixedsizearray1< Real, N > numeric::interpolation::spline::PolycubicSpline< N >::delta_
private

gives the arguments as a sequence of equidistant points

template<numeric::Size N>
utility::fixedsizearray1< std::pair< Real, Real>, N > numeric::interpolation::spline::PolycubicSpline< N >::firstbe_
private

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

template<numeric::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

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

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