9 #ifndef IMPEM_KERNEL_PARAMETERS_H
10 #define IMPEM_KERNEL_PARAMETERS_H
13 #include <boost/scoped_array.hpp>
30 float sq2pi3,
float inv_rsigsq,
31 float rnormfac,
float rkdist);
33 void show(std::ostream& s = std::cout)
const;
35 inline float get_vsig()
const {
return vsig_; }
41 inline float get_sig()
const {
return sig_; }
47 vsig_ = std::numeric_limits<float>::quiet_NaN();
48 vsigsq_ = std::numeric_limits<float>::quiet_NaN();
49 inv_sigsq_ = std::numeric_limits<float>::quiet_NaN();
50 sig_ = std::numeric_limits<float>::quiet_NaN();
51 kdist_ = std::numeric_limits<float>::quiet_NaN();
52 normfac_ = std::numeric_limits<float>::quiet_NaN();
132 float rsig_, rsigsq_, timessig_, sq2pi3_, inv_rsigsq_, rnormfac_, rkdist_,
135 std::map<float, const RadiusDependentKernelParameters*> radii2params_;
136 void init(
float resolution);
141 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
142 class IMPEMEXPORT Kernel3D {
145 Kernel3D(
const Kernel3D& other) {
147 dim_ext_ = other.dim_ext_;
148 data_.reset(
new double[size_]);
149 std::copy(other.data_.get(), other.data_.get() + size_, data_.get());
151 Kernel3D(
int size,
int ext) {
154 data_.reset(
new double[size_]);
156 for (
int i = 0; i < size_; i++) data_[i] = 0.;
158 double* get_data()
const {
return data_.get(); }
159 int get_size()
const {
return size_; }
160 int get_extent()
const {
return dim_ext_; }
163 boost::scoped_array<double> data_;
168 Kernel3D create_3d_gaussian(
double sigma,
double sigma_factor);
170 Kernel3D create_3d_laplacian();
173 Kernel3D get_truncated(
double* data,
int extent,
double sigmap,
float get_sig() const
Gets the sigma value.
Import IMP/kernel/base_types.h in the namespace.
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
float get_rnormfac() const
Get the Gaussian normalization factor.
Calculates kernel parameters as a function of a specific radius.
float vsigsq_
square of vsig
Exception definitions and assertions.
float get_inv_sigsq() const
Gets the inverse sigma squared.
#define IMP_INTERNAL_CHECK(expr, message)
An assertion to check for internal errors in IMP. An IMP::ErrorException will be thrown.
float kdist_
the kernel distance (= elements for summation)
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
float get_rkdist() const
Get the length of the Gaussian (sigma*number_of_sigmas_used)
float get_lim() const
Gets the value of lim parameter.
float normfac_
normalization factor
float get_kdist() const
Gets the value of kdist parameter.
float inv_sigsq_
the inverse of sigma square
float get_vsig() const
Gets the value of the volume sigma.
float get_sq2pi3() const
Get the non-sigma portion of the Gaussian normalization factor.
float get_inv_rsigsq() const
Get the inverse of sigma squared.
void show(Hierarchy h, std::ostream &out=std::cout)
Print out a molecular hierarchy.
float get_normfac() const
Gets the value of normfac parameter.
float get_timessig() const
Gets the number of sigma used.
Logging and error reporting support.
float get_vsigsq() const
Gets the value of volume sigma squared.