IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
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
15IMPCORE_BEGIN_NAMESPACE
16
17//! An OpenCubicSpline
18/** See score_functor::OpenCubicSpline for docs. */
19class OpenCubicSpline
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
39 IMP_OBJECT_METHODS(OpenCubicSpline);
40};
41
42IMPCORE_END_NAMESPACE
43
44#endif /* IMPCORE_OPEN_CUBIC_SPLINE_H */
A Score on the distance between a pair of particles.
Single variable function.
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
IMP::Vector< Float > Floats
Standard way to pass a bunch of Float values.
Definition types.h:46
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
A Score on the distance between a pair of particles.