Exemple #1
0
void Mean::finish(){
  setOutputValue( getFinalValue(0) / getFinalValue(1) ); 
  double denom=getFinalValue(1);
  std::vector<double> df(2); 
  df[0] = 1.0 / denom; 
  if(diffweight) df[1] = -getFinalValue(0) / (denom*denom); 
  else df[1]=0.0;
  mergeFinalDerivatives( df );
}
Exemple #2
0
void ZpathVessel::finish(){
  double sum = getFinalValue(0); std::vector<double> df(2);
  setOutputValue( -invlambda*std::log( sum ) );
  df[0] = -invlambda / sum; df[1] = 0.0;
  mergeFinalDerivatives( df );
}
Exemple #3
0
void DHEnergy::finish(){
  setOutputValue( getFinalValue(0) ); 
  df[0]=1.0; df[1]=0.0;
  mergeFinalDerivatives( df );
}
Exemple #4
0
void Max::finish(){
  double valin=getFinalValue(0); double dist=beta*std::log( valin );
  setOutputValue( dist ); df[0]=beta/valin; df[1]=0.0;  
  mergeFinalDerivatives( df );
}