Added asserts to the code to prevent usage of HERMITE with wrong parameters