HAMA-765: change name from apply to applyToElement for DoubleVector and
DoubleMatrix