header file of LDA core functions.