Functionals of finite Riemann surfaces (Princeton mathematical series, no.16)