private void setMassAssignment() { QuickSort(this.disFuzzy.ValueSet, this.disFuzzy.MembershipSet, 0, this.disFuzzy.ValueSet.Count - 1); int n = this.disFuzzy.ValueSet.Count; List <Double> SortedSet; double m; int k; for (int i = 0; i < n; i++) { m = 0; k = 0; SortedSet = new List <Double>(); for (int j = 1; j <= i + 1; j++) { SortedSet.Add(this.disFuzzy.ValueSet[j - 1]); k++; } if (n == 1) { m = this.disFuzzy.MembershipSet[n - 1]; } else { if (k == n) { m = this.disFuzzy.MembershipSet[n - 1]; } else if (k == 1) { m = Math.Round((1 - this.disFuzzy.MembershipSet[i + 1]), 4); } else { m = Math.Round((this.disFuzzy.MembershipSet[i] - this.disFuzzy.MembershipSet[i + 1]), 4); } } if (m != 0.0) { ProbSubSetBLL pro = new ProbSubSetBLL(SortedSet, m); this.proSubset.Add(pro); } } }
public ProbSubSetBLL(ProbSubSetBLL pro) { this.subset = pro.subset; this.massSubset = pro.massSubset; }