add getDimensionOfWeights()
improve WeightVector