Generalized Gram–Hadamard inequality