Пример #1
0
        public Hypergraph <T> Tr()
        {
            var H = new Hypergraph <T>(new List <List <T> >()
            {
                new List <T>()
            });

            foreach (var e in E)
            {
                H = H.Product(EdgeHypergraph(e)).Min();
            }

            return(H);
        }
Пример #2
0
 public Hypergraph <T> Product(Hypergraph <T> other)
 {
     return(new Hypergraph <T>(E.SelectMany(e_i => other.E.Select(e_j => ListUtility.Union(e_i, e_j)).ToList()).ToList()));
 }
Пример #3
0
 public Hypergraph <T> Union(Hypergraph <T> other)
 {
     return(new Hypergraph <T>(E.Union(other.E).ToList()));
 }