Exemplo n.º 1
0
        /// <summary>
        /// 生成
        /// </summary>
        /// <returns></returns>
        public override List <GnssBaseLineName> Build()
        {
            var total = new TotalObsBaseLineBuilder(obsFilePaths).Build();
            SiteObsBaselineManager siteObsBaselines = new SiteObsBaselineManager(total);

            var graph = this.BuildGraph(siteObsBaselines.Values);
            MinCostSpanTreeBuilder builder = new MinCostSpanTreeBuilder(graph, new SiteObsBaselineWeighter(siteObsBaselines));

            var g = builder.Build();
            List <GnssBaseLineName> result = new List <GnssBaseLineName>();

            foreach (var item in g.Edges)
            {
                var line = siteObsBaselines.Get(item.NodeA.Id, item.NodeB.Id);
                if (line != null)
                {
                    result.Add(line.LineName);
                }
            }
            return(result);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="ObsBaseLineManager"></param>
 public SiteObsBaselineWeighter(SiteObsBaselineManager ObsBaseLineManager)
 {
     this.ObsBaseLineManager = ObsBaseLineManager;
 }