/// <summary>
        /// 得到局部聚类的EdgeList
        /// </summary>
        /// <param name="subGraph"></param>
        /// <returns></returns>
        private List <ITinEdge> GetLocalEdgeList(ASCDTSubGraph subGraph)
        {
            List <ITinEdge> localEdge = new List <ITinEdge>();

            double mean1StDev = Mean1StDev(subGraph);

            for (int i = 0; i < subGraph.GetNodeList().Count; i++)
            {
                ITinNode localNode       = subGraph.GetNodeList()[i];
                double   local2Mean      = Local2Mean(localNode, subGraph);
                double   localConstraint = local2Mean + mean1StDev;

                ITinEdgeArray incidentEdges = localNode.GetIncidentEdges();
                for (int j = 0; j < incidentEdges.Count; j++)
                {
                    ITinEdge currenEdge = incidentEdges.get_Element(j);
                    if (IsInEdges(currenEdge, subGraph.GetEdgeList()) && currenEdge.Length < localConstraint)
                    {
                        localEdge.Add(currenEdge);
                    }
                }
            }
            //去掉多加的neighbor边
            localEdge = CompleteEdges(localEdge);
            return(localEdge);
        }
        /// <summary>
        /// 一阶邻接边长标准差平均值(子图)
        /// </summary>
        /// <param name="subGraph"></param>
        /// <returns></returns>
        private double Mean1StDev(ASCDTSubGraph subGraph)
        {
            List <ITinNode> globalNode = subGraph.GetNodeList();
            List <ITinEdge> globalEdge = subGraph.GetEdgeList();
            int             nodeCount  = globalNode.Count;
            double          a          = 0;

            for (int i = 0; i < nodeCount; i++)
            {
                ITinNode tinNode     = globalNode[i];
                double   local1Mean  = Local1Mean(tinNode, globalEdge);
                double   local1StDev = Local1StDev(tinNode, globalEdge, local1Mean);
                a = a + local1StDev;
            }
            return(a / (double)nodeCount);
        }
        /// <summary>
        /// 得到二阶邻接边
        /// </summary>
        /// <param name="currentNode"></param>
        /// <param name="subGraph"></param>
        /// <returns></returns>
        private List <ITinEdge> Get2IncidentEdges(ITinNode currentNode, ASCDTSubGraph subGraph)
        {
            List <ITinEdge> incidentEdges = new List <ITinEdge>();
            List <ITinEdge> subGraphEdge  = subGraph.GetEdgeList();
            List <ITinNode> subGraphNode  = subGraph.GetNodeList();

            //加入一阶邻接边
            ITinEdgeArray incEdges = currentNode.GetIncidentEdges();

            for (int j = 0; j < incEdges.Count; j++)
            {
                if (IsInEdges(incEdges.get_Element(j), subGraphEdge))
                {
                    incidentEdges.Add(incEdges.get_Element(j));
                }
            }
            //查找相邻点,加入二阶邻接边
            ITinNodeArray adjNodes = currentNode.GetAdjacentNodes();

            for (int j = 0; j < adjNodes.Count; j++)
            {
                if (!IsInNodes(adjNodes.get_Element(j), subGraphNode))
                {
                    continue;
                }
                ITinEdgeArray inc2Edges = adjNodes.get_Element(j).GetIncidentEdges();
                for (int k = 0; k < inc2Edges.Count; k++)
                {
                    ITinEdge edge = inc2Edges.get_Element(k);
                    if (IsInEdges(edge, incidentEdges))
                    {
                        continue;
                    }
                    if (IsInEdges(edge, subGraphEdge))
                    {
                        incidentEdges.Add(edge);
                    }
                }
            }

            return(incidentEdges);
        }
 /// <summary>
 /// 一阶邻接边长标准差平均值(子图)
 /// </summary>
 /// <param name="subGraph"></param>
 /// <returns></returns>
 private double Mean1StDev(ASCDTSubGraph subGraph)
 {
     List<ITinNode> globalNode = subGraph.GetNodeList();
     List<ITinEdge> globalEdge = subGraph.GetEdgeList();
     int nodeCount = globalNode.Count;
     double a = 0;
     for (int i = 0; i < nodeCount; i++)
     {
         ITinNode tinNode = globalNode[i];
         double local1Mean = Local1Mean(tinNode, globalEdge);
         double local1StDev = Local1StDev(tinNode, globalEdge, local1Mean);
         a = a + local1StDev;
     }
     return a / (double)nodeCount;
 }
        /// <summary>
        /// 得到局部聚类的EdgeList
        /// </summary>
        /// <param name="subGraph"></param>
        /// <returns></returns>
        private List<ITinEdge> GetLocalEdgeList(ASCDTSubGraph subGraph)
        {
            List<ITinEdge> localEdge = new List<ITinEdge>();

            double mean1StDev = Mean1StDev(subGraph);
            for (int i = 0; i < subGraph.GetNodeList().Count; i++)
            {
                ITinNode localNode = subGraph.GetNodeList()[i];
                double local2Mean = Local2Mean(localNode, subGraph);
                double localConstraint = local2Mean + mean1StDev;

                ITinEdgeArray incidentEdges = localNode.GetIncidentEdges();
                for (int j = 0; j < incidentEdges.Count; j++)
                {
                    ITinEdge currenEdge = incidentEdges.get_Element(j);
                    if (IsInEdges(currenEdge, subGraph.GetEdgeList()) && currenEdge.Length < localConstraint)
                        localEdge.Add(currenEdge);
                }
            }
            //去掉多加的neighbor边
            localEdge = CompleteEdges(localEdge);
            return localEdge;
        }
        /// <summary>
        /// 得到二阶邻接边
        /// </summary>
        /// <param name="currentNode"></param>
        /// <param name="subGraph"></param>
        /// <returns></returns>
        private List<ITinEdge> Get2IncidentEdges(ITinNode currentNode, ASCDTSubGraph subGraph)
        {
            List<ITinEdge> incidentEdges = new List<ITinEdge>();
            List<ITinEdge> subGraphEdge = subGraph.GetEdgeList();
            List<ITinNode> subGraphNode = subGraph.GetNodeList();

            //加入一阶邻接边
            ITinEdgeArray incEdges = currentNode.GetIncidentEdges();
            for (int j = 0; j < incEdges.Count; j++)
            {
                if (IsInEdges(incEdges.get_Element(j), subGraphEdge))
                    incidentEdges.Add(incEdges.get_Element(j));
            }
            //查找相邻点,加入二阶邻接边
            ITinNodeArray adjNodes = currentNode.GetAdjacentNodes();
            for (int j = 0; j < adjNodes.Count; j++)
            {
                if (!IsInNodes(adjNodes.get_Element(j), subGraphNode))
                    continue;
                ITinEdgeArray inc2Edges = adjNodes.get_Element(j).GetIncidentEdges();
                for (int k = 0; k < inc2Edges.Count; k++)
                {
                    ITinEdge edge = inc2Edges.get_Element(k);
                    if (IsInEdges(edge, incidentEdges))
                        continue;
                    if (IsInEdges(edge, subGraphEdge))
                        incidentEdges.Add(edge);
                }
            }

            return incidentEdges;
        }