Minor Improvement / Code Refactoring of MatrixOperations::greaterThanValue

templatizing MatrixOperations::greaterThanValue to do type check information once (as opposed to per inner loop iteration) and still have clean code