Templated the SparseParameterVector class to allow to store weights as floats (as an alternative to doubles).