示例#1
0
        public OBJList Cluster(OBJList objs)
        {
            ObjectSet = objs;
            OrderFile = new OBJList();

            foreach (var obj in ObjectSet)
            {
                if (obj.Processed == false)
                {
                    ExpandClusterOrder(obj);
                }
            }

            return(OrderFile);
        }
示例#2
0
        private void UpdateOrderSeeds(OBJList neighbors, OBJ center)
        {
            var c_dist = center.CoreDistance.Value;

            foreach (OBJ obj in neighbors)
            {
                if (obj.Processed == false)
                {
                    var new_r_dist = Math.Max(c_dist, Distance.EuclideanDistance(center.Element, obj.Element));

                    if (obj.ReachabilityDistance == null)
                    {
                        obj.ReachabilityDistance = new_r_dist;
                        orderSeeds.Add(obj);
                    }
                    else if (new_r_dist < obj.ReachabilityDistance.Value)
                    {
                        obj.ReachabilityDistance = new_r_dist;
                        orderSeeds.Sort();
                    }
                }
            }
        }