Beispiel #1
0
        public bool HideEdge(TEdge e)
        {
            if (_graph.ContainsEdge(e) && !hiddenEdges.Contains(e))
            {
                _graph.RemoveEdge(e);
                hiddenEdges.Add(e);

                GetHiddenEdgeListOf(e.Source).Add(e);
                GetHiddenEdgeListOf(e.Target).Add(e);

                OnEdgeHidden(e);
                return(true);
            }

            return(false);
        }
        /// <inheritdoc />
        public bool HideEdge(TEdge edge)
        {
            if (_graph.ContainsEdge(edge) && !_hiddenEdges.Contains(edge))
            {
                _graph.RemoveEdge(edge);
                _hiddenEdges.Add(edge);

                GetHiddenEdgeListOf(edge.Source, true).Add(edge);
                if (!edge.IsSelfEdge())
                {
                    GetHiddenEdgeListOf(edge.Target, true).Add(edge);
                }

                OnEdgeHidden(edge);
                return(true);
            }

            return(false);
        }