change the weight type(from Double to double) and add TargetCompare
method to AccumateVisitor class.