Cream.DefaultSolver.GetSolutionWeight C# (CSharp) Method

GetSolutionWeight() private method

gets solution weight
private GetSolutionWeight ( ) : int
return int
        private int GetSolutionWeight()
        {
            var totalWeight = _softConstraints.Where(c => c.IsSatisfied()).Sum(c => c.Weight);

            BestSolutionWeight = totalWeight < BestSolutionWeight ? BestSolutionWeight : totalWeight;
            return totalWeight;
        }