IMP logo
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
IMP::em::CoarseCCatIntervals Class Reference

Detailed Description

Cross correlation coefficient calculator.

Store CCC and derivative values and recompute then every X steps.

+ Inheritance diagram for IMP::em::CoarseCCatIntervals:

List of all members.

Public Member Functions

 CoarseCCatIntervals (const int &ncd)
std::pair< double,
algebra::Vector3Ds
evaluate (DensityMap *em_map, SampledDensityMap *model_map, const algebra::Vector3Ds &deriv, float scalefac, bool lderiv, unsigned long eval_interval)
 Evaluate the cross-correlation value only every X calls to the function.

Static Public Member Functions

static CoarseCCatIntervalsget_from (IMP::base::Object *o)
- Static Public Member Functions inherited from IMP::em::CoarseCC
static double cross_correlation_coefficient (const DensityMap *grid1, const DensityMap *grid2, float grid2_voxel_data_threshold, bool allow_padding=false, FloatPair norm_factors=FloatPair(0., 0.))
 Calculates the cross correlation coefficient between two maps.
static float local_cross_correlation_coefficient (const DensityMap *em_map, DensityMap *model_map, float voxel_data_threshold)
 Local cross correlation function.

Protected Member Functions

void allocate_derivatives_array (int ncd)

Protected Attributes

int calls_counter_
 Number of times the evaluation has been called.
bool dv_memory_allocated_
float stored_cc_
 Stored correlation value.
double * stored_dvx_
 Stored derivative terms.
double * stored_dvy_
double * stored_dvz_

Additional Inherited Members


Member Function Documentation

std::pair<double,algebra::Vector3Ds> IMP::em::CoarseCCatIntervals::evaluate ( DensityMap em_map,
SampledDensityMap model_map,
const algebra::Vector3Ds deriv,
float  scalefac,
bool  lderiv,
unsigned long  eval_interval 
)

Evaluate the cross-correlation value only every X calls to the function.

Evaluates the value of the cross correlation term but only at given intervals to save computation time. Otherwise, the same value is returned
This function has an special behavior, as it does not return the true cross correlation coefficient ccc, but the value:
scalefac*(1-ccc)
The reason why is to use this term as part of an scoring function that is better the lower the term. If you want the cross correlation coefficient, use cross_correlation_coefficient() instead.

Parameters:
[in]em_mapexp EM map
Note:
correct RMSD and mean MUST be in the header!
Parameters:
[in]model_mapan empty map that will contain the sampled particles in the access_p
[in]dvxto contain the x partial derivatives
[in]dvyto contain the y partial derivatives
[in]dvzto contain the z partial derivatives
[in]scalefacscale factor to apply to the value of the cross correlation term
[in]lderivif true, the derivatives of the term are computed
[in]eval_intervalthe number of times the function is going to return the same value before computing the values again
Returns:
the value of the cross correlation term: scalefac * (1-CCC)

Member Data Documentation

int IMP::em::CoarseCCatIntervals::calls_counter_
protected

Number of times the evaluation has been called.

The evaluation is only performed the first time and when calls_counter reaches eval_interval. Otherwise the stored_cc_ value is returned

float IMP::em::CoarseCCatIntervals::stored_cc_
protected

Stored correlation value.

double* IMP::em::CoarseCCatIntervals::stored_dvx_
protected

Stored derivative terms.


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

Generated on Tue May 22 2012 23:33:33 for IMP by doxygen 1.8.1