Resolved the undefined reference problem of Dff, template methods must be in the header file!