//给定一个new moving cluster,把它连接到本new moving cluster之后 public void JointAnotherNMC(NewMovingCluster g) { foreach (KeyValuePair <long, DBscanCluster> pair in g.clusterList) { this.clusterList.Add(pair.Key, pair.Value); } this.currentCluster = g.CurrentCluster; this.currentTimeStamp = g.currentTimeStamp; dense = clusterList.Count / (currentTimeStamp - startTimeStamp); }
//复制构造函数 public NewMovingCluster(NewMovingCluster g) { this.clusterList = new SortedList <long, DBscanCluster>(); foreach (KeyValuePair <long, DBscanCluster> pair in g.clusterList) { this.clusterList.Add(pair.Key, pair.Value); } this.currentCluster = g.CurrentCluster; this.startTimeStamp = g.startTimeStamp; this.currentTimeStamp = g.currentTimeStamp; this.dense = g.dense; this.extended = true; this.extension = g.extension; }