Herglotz representation theorem