public int GetSumOfWeights() { if (sumOfWeights < 0) { sumOfWeights = Literals.Aggregate(0, (acc, l) => acc + l.Weight); } return(sumOfWeights); }