예제 #1
0
 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未找到,出错!");
         }
     }
 }
예제 #2
0
 public void Remove(DBscanCluster dBscanCluster)
 {
     clusterIdList.Remove(dBscanCluster.ClusterId);
     dbscanClusterList.Remove(dBscanCluster);
 }
예제 #3
0
 public void Add(DBscanCluster dBscanCluster)
 {
     clusterIdList.Add(dBscanCluster.ClusterId);
     dbscanClusterList.Add(dBscanCluster);
 }
예제 #4
0
 //添加一个cluster
 public void UpdateCluster(long timeStamp, DBscanCluster cluster)
 {
     clusterList.Add(timeStamp, cluster);
     currentTimeStamp = timeStamp;
     currentCluster   = cluster;
 }