public ClusterBitList(DBscanCluster cluster) { objectList = new BitArray(bitListLength); foreach (string name in cluster.CabNameList) { int index = Program.cabNameList.IndexOf(name); if (index != -1) { if (!objectList[index]) { objectList[index] = true; } else { Console.WriteLine("在类" + cluster.ClusterId + "中,第" + index + "个物体出现两次,出错!"); } } else { Console.WriteLine("给定cabName未找到,出错!"); } } }
public void Remove(DBscanCluster dBscanCluster) { clusterIdList.Remove(dBscanCluster.ClusterId); dbscanClusterList.Remove(dBscanCluster); }
public void Add(DBscanCluster dBscanCluster) { clusterIdList.Add(dBscanCluster.ClusterId); dbscanClusterList.Add(dBscanCluster); }
//添加一个cluster public void UpdateCluster(long timeStamp, DBscanCluster cluster) { clusterList.Add(timeStamp, cluster); currentTimeStamp = timeStamp; currentCluster = cluster; }