/* * calcEnergy.cpp * * * Created by Arne Pommerening on 12/01/2013. * Copyright 2013 by Philodendron International. All rights reserved. * */ #include using namespace Rcpp; // [[Rcpp::export]] double calcEnergy(double CEcurrent, double CEtarget) { return (CEcurrent - CEtarget) * (CEcurrent - CEtarget); }