Update functions.R

function: tresh, fistaProximal -- adaptive method