Skip to content
Snippets Groups Projects
Commit 4525d50f authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Fixed derivatives in histogram

(backported from master, see commit 92717cb6)
parent e8ebfe2e
No related branches found
No related tags found
No related merge requests found
......@@ -190,8 +190,9 @@ double KernelFunctions::evaluate( const std::vector<Value*>& pos, std::vector<do
double r2=0;
if(diagonal){
for(unsigned i=0;i<ndim();++i){
derivatives[i]=pos[i]->difference( center[i] ) / width[i];
derivatives[i]=-pos[i]->difference( center[i] ) / width[i];
r2+=derivatives[i]*derivatives[i];
derivatives[i] /= width[i];
}
} else {
Matrix<double> mymatrix( getMatrix() );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment