IMP logo
IMP Reference Guide  develop.158371bb53,2026/10/27
The Integrative Modeling Platform
core/OpenCubicSpline.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/OpenCubicSpline.h \brief Open cubic spline function.
3  *
4  * Copyright 2007-2026 IMP Inventors. All rights reserved.
5  */
6 
7 #ifndef IMPCORE_OPEN_CUBIC_SPLINE_H
8 #define IMPCORE_OPEN_CUBIC_SPLINE_H
9 
10 #include <IMP/core/core_config.h>
11 #include <IMP/UnaryFunction.h>
14 
15 IMPCORE_BEGIN_NAMESPACE
16 
17 //! An OpenCubicSpline
18 /** See score_functor::OpenCubicSpline for docs. */
20  : public score_functor::ScoreUnaryFunction<score_functor::OpenCubicSpline> {
23 
24  public:
25  OpenCubicSpline(const Floats &values, Float minrange, Float spacing,
26  bool extend = false)
27  : P(S(values, minrange, spacing, extend), "OpenCubicSpline%1%") {}
28 
29  Float get_minrange() const { return get_score().get_minrange(); }
30  Float get_spacing() const { return get_score().get_spacing(); }
31  Floats get_values() const { return get_score().get_values(); }
32  bool get_extend() const { return get_score().get_extend(); }
33 
34  //! Get the calculated second derivatives corresponding to the spline values
36  return get_score().get_second_derivatives();
37  }
38 
40 };
41 
42 IMPCORE_END_NAMESPACE
43 
44 #endif /* IMPCORE_OPEN_CUBIC_SPLINE_H */
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Single variable function.
A Score on the distance between a pair of particles.
Floats get_second_derivatives() const
Get the calculated second derivatives corresponding to the spline values.
double Float
Basic floating-point value (could be float, double...)
Definition: types.h:19
A Score on the distance between a pair of particles.