Esempio n. 1
0
 private void VisitOne(VertexFamily family)
 {
     if (!family.Visited)
     {
         MarkFamilyAsVisited(family);
         foreach (var child in family.Childrens)
         {
             VisitOne(ToFamily(child));
         }
     }
 }
Esempio n. 2
0
        private List <Edge> ToEdges(List <VertexFamily> S, VertexFamily familyStart)
        {
            var a = _edges
                    .Where(x =>
            {
                var heh = familyStart.Childrens.Except(S.Select(w => w.Parent));
                var ss  = x.Source == familyStart.Parent && heh.Contains(x.Target) || x.Target == familyStart.Parent && heh.Contains(x.Source);
                return(ss);
            }).ToList().OrderBy(x => x.Weight).ToList();

            return(a);
        }
Esempio n. 3
0
 private void MarkFamilyAsVisited(VertexFamily family)
 {
     family.Visit();
     _result.Add(family.Parent);
 }