/// <summary> /// false: go on with the research of DominantSet. Else consider the rest all singleton; /// </summary> /// <returns></returns> public override bool StoppingCriterium(List <int> l) { if (l.Count == reservedMatrix.ColumnCount) { return(false); } List <int> lp = new List <int>(); foreach (int id in l) { lp.Add(reservedIndexes.IndexOf(id)); } for (int i = 0; i < reservedMatrix.ColumnCount; i++) { if (!lp.Contains(i)) { lp.Add(i); Matrix <double> m = WeightedAffinity.convertListToMatrix(lp, reservedMatrix); if (WeightedAffinity.Weight(m, lp.Count - 1) > 0) { return(true); } lp.Remove(i); } } return(false); }
public virtual void RemoveDominantGroup(List <int> lp, List <int> values) { indexes.RemoveAll(x => values.Contains(x)); List <int> temp = Enumerable.Range(0, matrix.ColumnCount).Except(lp).ToList(); if (temp.Count != 0) { matrix = WeightedAffinity.convertListToMatrix(temp, matrix); ResetVector(); } }