add derivativeFuncVal initializer in ScalarMatrixFunc class. Fix the bugs in the operator overloading for ScalarMatrixFunc class. (derivativeFuncVal need to be instantiated first)