Double Frobenius algebras