8#ifndef IMPSCORE_FUNCTOR_SCORE_WITH_CACHE_H
9#define IMPSCORE_FUNCTOR_SCORE_WITH_CACHE_H
11#include <IMP/score_functor/score_functor_config.h>
18IMPSCOREFUNCTOR_BEGIN_NAMESPACE
24struct ScoreWithCache {
39 template <
unsigned int D>
41 double distance)
const;
49 template <
unsigned int D>
52 double distance)
const;
61 template <
unsigned int D>
64 double squared_distance)
const {
72 template <
unsigned int D>
77 return std::numeric_limits<double>::infinity();
86 void show(std::ostream &)
const {}
89IMPSCOREFUNCTOR_END_NAMESPACE
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
A class to store a fixed array of same-typed values.
Class for storing model, its restraints, constraints, and particles.
ParticlesTemp get_particles(Model *m, const ParticleIndexes &ps)
Get the particles from a list of indexes.
Vector< ParticleIndex, std::allocator< ParticleIndex > > ParticleIndexes
A list of particles, each identified by its ParticleIndex.
std::pair< double, double > DerivativePair
A pair representing a function value with its first derivative.
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Functions and adaptors for dealing with particle indexes.
double get_maximum_range(Model *m, const Array< D, ParticleIndex > &p) const
DerivativePair get_score_and_derivative_with_cache(Model *m, const Array< D, ParticleIndex > &p, double distance) const
Return the score and derivative at the passed feature size (eg distance).
void check_cache_valid(Model *m) const
Make sure the cache is up to date.
ModelObjectsTemp get_inputs(Model *m, const ParticleIndexes &pis) const
bool get_is_trivially_zero_with_cache(Model *m, const Array< D, ParticleIndex > &p, double squared_distance) const
double get_score_with_cache(Model *m, const Array< D, ParticleIndex > &p, double distance) const
Return the score at the passed feature size (eg distance).
Macros to control compiler warnings.
#define IMP_UNUSED(variable)