コード例 #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()));
 }