Gradient-type methods: a unified perspective in Computer Science and Numerical Analysis