Added templatized functions and functors to reduce the code of matrixFloat.cc
Added templatized functions and functors to reduce the code of matrixFloat.cc