Adaptive nonmonotone line search method for unconstrained optimization