Ejemplo n.º 1
0
		static public IEnumerable<Set<T>> SubsetsUnions<T>(this Set<Set<T>> sigmaAlgebra)
		{


			Set<T> c=new Set<T>();

			foreach(bool[] combi in Combination.Combinations(sigmaAlgebra.Count)){

				for(int i=0;i<combi.Length;i++){
					if(combi[i]){
						c.UnionWith(sigmaAlgebra.ElementAt(i));
					}
				}
				yield return c;

			}
		}