added example code using armadillo and nlopt.