Make moments functions C functions and reuse centralized moments