• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IEdgePredicate类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IEdgePredicate的典型用法代码示例。如果您正苦于以下问题:C# IEdgePredicate类的具体用法?C# IEdgePredicate怎么用?C# IEdgePredicate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IEdgePredicate类属于命名空间,在下文中一共展示了IEdgePredicate类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: FilteredBidirectionalGraph

 /// <summary>
 /// Construct a filtered graph with an edge and a vertex predicate.
 /// </summary>
 /// <param name="g">graph to filter</param>
 /// <param name="edgePredicate">edge predicate</param>
 /// <param name="vertexPredicate">vertex predicate</param>
 /// <exception cref="ArgumentNullException">
 /// g, edgePredicate or vertexPredicate are null
 /// </exception>
 public FilteredBidirectionalGraph(
     IBidirectionalGraph g,
     IEdgePredicate edgePredicate,
     IVertexPredicate vertexPredicate)
     : base(g,edgePredicate,vertexPredicate)
 {
 }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:16,代码来源:FilteredBidirectionalGraph.cs


示例2: FilteredEdgeListGraph

		/// <summary>
		/// Construct a graph that filters edges
		/// </summary>
		/// <param name="g">graph to filter</param>
		/// <param name="edgePredicate">edge predicate</param>
		/// <param name="vertexPredicate">vertex predicate</param>
		/// <exception cref="ArgumentNullException">
		/// g or edgePredicate or vertexPredicate is null
		/// </exception>
		public FilteredEdgeListGraph(
			IEdgeListGraph g, 
			IEdgePredicate edgePredicate,
			IVertexPredicate vertexPredicate
			)
			: base(g,edgePredicate,vertexPredicate)
		{}
开发者ID:timonela,项目名称:mb-unit,代码行数:16,代码来源:FilteredEdgeListGraph.cs


示例3: FilteredIncidenceGraph

 /// <summary>
 /// Construct a filtered graph with an edge and a vertex predicate.
 /// </summary>
 /// <param name="g">graph to filter</param>
 /// <param name="edgePredicate">edge predicate</param>
 /// <param name="vertexPredicate">vertex predicate</param>
 /// <exception cref="ArgumentNullException">
 /// g, edgePredicate or vertexPredicate are null
 /// </exception>
 public FilteredIncidenceGraph(
     IIncidenceGraph g,
     IEdgePredicate edgePredicate,
     IVertexPredicate vertexPredicate)
     : base(g,edgePredicate,vertexPredicate)
 {
 }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:16,代码来源:FilteredIncidenceGraph.cs


示例4: FilteredVertexListGraph

 /// <summary>
 /// Construct a graph that filters in-edges
 /// </summary>
 /// <param name="g">graph to filter</param>
 /// <param name="edgePredicate">edge predicate</param>
 /// <exception cref="ArgumentNullException">
 /// g or edgePredicate is null
 /// </exception>
 public FilteredVertexListGraph(
     IVertexListGraph g,
     IEdgePredicate edgePredicate
     )
     : base(g,edgePredicate)
 {
 }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:15,代码来源:FilteredVertexListGraph.cs


示例5: FilteredEdgeListAndIncidenceGraph

 /// <summary>
 /// Construct a graph that filters edges and out-edges
 /// </summary>
 /// <param name="g">graph to filter</param>
 /// <param name="edgePredicate">edge predicate</param>
 /// <param name="vertexPredicate"></param>
 /// <exception cref="ArgumentNullException">
 /// g or edgePredicate is null
 /// </exception>
 public FilteredEdgeListAndIncidenceGraph(
     IEdgeListAndIncidenceGraph g,
     IEdgePredicate edgePredicate,
     IVertexPredicate vertexPredicate
     )
     : base(g,edgePredicate,vertexPredicate)
 {
     m_FilteredIncidenceGraph = new FilteredIncidenceGraph(g,edgePredicate,vertexPredicate);
 }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:18,代码来源:FilteredEdgeListAndIncidenceGraph.cs


示例6: FilteredGraph

 /// <summary>
 /// Construct a filtered graph with an edge and a vertex predicate.
 /// </summary>
 /// <param name="g">graph to filter</param>
 /// <param name="edgePredicate">edge predicate</param>
 /// <param name="vertexPredicate">vertex predicate</param>
 /// <exception cref="ArgumentNullException">
 /// g, edgePredicate or vertexPredicate are null
 /// </exception>
 public FilteredGraph(
     IGraph g,
     IEdgePredicate edgePredicate,
     IVertexPredicate vertexPredicate)
 {
     Graph = g;
     EdgePredicate = edgePredicate;
     VertexPredicate = vertexPredicate;
 }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:18,代码来源:FilteredGraph.cs


示例7: FilteredVertexAndEdgeListGraph

		/// <summary>
		/// Construct a graph that filters edges and vertices
		/// </summary>
		/// <param name="g">graph to filter</param>
		/// <param name="edgePredicate">edge predicate</param>
		/// <param name="vertexPredicate"></param>
		/// <exception cref="ArgumentNullException">
		/// g or edgePredicate is null
		/// </exception>
		public FilteredVertexAndEdgeListGraph(
			IVertexAndEdgeListGraph g,
			IEdgePredicate edgePredicate,
			IVertexPredicate vertexPredicate
			)
			: base(g,edgePredicate,vertexPredicate)
		{
			this.filteredEdgeList = new FilteredEdgeListGraph(g,edgePredicate);
		}
开发者ID:timonela,项目名称:mb-unit,代码行数:18,代码来源:FilteredVertexAndEdgeListGraph.cs


示例8: FilteredEdgeEnumerable

        /// <summary>
        /// Filtered edge collection
        /// </summary>
        /// <param name="ec">base collection</param>
        /// <param name="ep">filtering predicate</param>
        public FilteredEdgeEnumerable(EdgeCollection ec, IEdgePredicate ep)
        {
            if (ec == null)
                throw new ArgumentNullException("edge collection");
            if (ep == null)
                throw new ArgumentNullException("edge predicate");

            m_EdgeCollection = ec;
            m_EdgePredicate = ep;
        }
开发者ID:taoxiease,项目名称:asegrp,代码行数:15,代码来源:FilteredEdgeEnumerable.cs


示例9: InEdgePredicate

        /// <summary>
        /// Construct a new predicate.
        /// </summary>
        /// <param name="ep">the edge predicate</param>
        /// <param name="vp">the source vertex predicate</param>
        /// <exception cref="ArgumentNullException">ep or vp is null</exception>
        public InEdgePredicate(IEdgePredicate ep, IVertexPredicate vp)
        {
            if (ep == null)
                throw new ArgumentNullException("Edge predicate");
            if (vp == null)
                throw new ArgumentNullException("Vertex predicate");

            m_EdgePredicate = ep;
            m_VertexPredicate = vp;
        }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:16,代码来源:InEdgePredicate.cs


示例10: SelectOutEdges

 /// <summary>
 /// 
 /// </summary>
 /// <param name="v"></param>
 /// <param name="ep"></param>
 /// <returns></returns>
 public IEdgeEnumerable SelectOutEdges(IVertex v, IEdgePredicate ep)
 {
     return Wrapped.SelectOutEdges(v,ep);
 }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:10,代码来源:ClusteredAdjacencyGraph.cs


示例11: InEdge

 /// <summary>
 /// Creates a predicate that check the edge and the edge source
 /// </summary>
 /// <param name="ep">edge predicate to apply to the edge</param>
 /// <param name="vp">vertex predicate to apply to the edge source</param>
 /// <returns>in-edge predicate</returns>
 public static InEdgePredicate InEdge(IEdgePredicate ep, IVertexPredicate vp)
 {
     return new InEdgePredicate(ep,vp);
 }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:10,代码来源:Preds.cs


示例12: OutEdge

 /// <summary>
 /// Creates a predicate that check the edge and the edge target
 /// </summary>
 /// <param name="ep">edge predicate to apply to the edge</param>
 /// <param name="vp">vertex predicate to apply to the edge target</param>
 /// <returns>out-edge predicate</returns>
 public static OutEdgePredicate OutEdge(IEdgePredicate ep, IVertexPredicate vp)
 {
     return new OutEdgePredicate(ep,vp);
 }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:10,代码来源:Preds.cs


示例13:

 /// <summary>
 /// 
 /// </summary>
 /// <param name="v"></param>
 /// <param name="ep"></param>
 /// <returns></returns>
 IEdgeEnumerable IFilteredBidirectionalGraph.SelectInEdges(IVertex v, IEdgePredicate ep)
 {
     return this.SelectInEdges(v,ep);
 }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:10,代码来源:BidirectionalGraph.cs


示例14: Enumerator

 /// <summary>
 /// 
 /// </summary>
 /// <param name="e"></param>
 /// <param name="p"></param>
 public Enumerator(EdgeCollection.Enumerator e, IEdgePredicate p)
 {
     m_Enumerator = e;
     m_Predicate = p;
 }
开发者ID:taoxiease,项目名称:asegrp,代码行数:10,代码来源:FilteredEdgeEnumerable.cs


示例15: RemoveEdgeIf

 public virtual void RemoveEdgeIf(IEdgePredicate pred)
 {
     if (pred == null)
     {
         throw new ArgumentNullException("predicate");
     }
     EdgeCollection edges = new EdgeCollection();
     VertexEdgesEnumerator enumerator = this.Edges.GetEnumerator();
     while (enumerator.MoveNext())
     {
         IEdge edge = enumerator.get_Current();
         if (pred.Test(edge))
         {
             edges.Add(edge);
         }
     }
     EdgeCollection.Enumerator enumerator2 = edges.GetEnumerator();
     while (enumerator2.MoveNext())
     {
         IEdge e = enumerator2.get_Current();
         this.RemoveEdge(e);
     }
 }
开发者ID:NigelThorne,项目名称:ndependencyinjection,代码行数:23,代码来源:AdjacencyGraph.cs


示例16: SelectOutEdges

        /// <summary>
        /// Returns the collection of out-edges that matches the predicate
        /// </summary>
        /// <param name="v"></param>
        /// <param name="ep">Edge predicate</param>
        /// <returns>enumerable colleciton of vertices that matches the 
        /// criteron</returns>
        /// <exception cref="ArgumentNullException">v or ep is null</exception>
        public FilteredEdgeEnumerable SelectOutEdges(IVertex v, IEdgePredicate ep)
        {
            if (v==null)
                throw new ArgumentNullException("vertex");
            if (ep==null)
                throw new ArgumentNullException("edge predicate");

            return new FilteredEdgeEnumerable(OutEdges(v),ep);
        }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:17,代码来源:PetriGraph.cs


示例17: RemoveOutEdgeIf

        /// <summary>
        /// Remove all the out-edges of vertex u for which the predicate pred 
        /// returns true.
        /// </summary>
        /// <param name="u">vertex</param>
        /// <param name="pred">edge predicate</param>
        public virtual void RemoveOutEdgeIf(IVertex u, IEdgePredicate pred)
        {
            if (u==null)
                throw new ArgumentNullException("vertex u");
            if (pred == null)
                throw new ArgumentNullException("predicate");

            EdgeCollection edges = VertexOutEdges[u];
            EdgeCollection removedEdges = new EdgeCollection();
            foreach(IEdge e in edges)
                if (pred.Test(e))
                    removedEdges.Add(e);

            foreach(IEdge e in removedEdges)
                RemoveEdge(e);
        }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:22,代码来源:PetriGraph.cs


示例18:

 /// <summary>
 /// 
 /// </summary>
 /// <param name="v"></param>
 /// <param name="ep"></param>
 /// <returns></returns>
 IEdgeEnumerable IFilteredIncidenceGraph.SelectOutEdges(IVertex v, IEdgePredicate ep)
 {
     return this.SelectOutEdges(v,ep);
 }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:10,代码来源:PetriGraph.cs


示例19: SelectEdges

 /// <summary>
 /// Gets a filtered <see cref="IEdgeEnumerable"/> collection of edges.
 /// </summary>
 /// <param name="ep">edge predicate</param>
 /// <returns>filetered collection</returns>
 public IEdgeEnumerable SelectEdges(IEdgePredicate ep)
 {
     return Wrapped.SelectEdges(ep);
 }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:9,代码来源:ClusteredAdjacencyGraph.cs


示例20: RemoveOutEdgeIf

        /// <summary>
        /// Remove out edge satisfying the predicate
        /// </summary>
        /// <param name="v"></param>
        /// <param name="ep"></param>
        public virtual void RemoveOutEdgeIf(IVertex v, IEdgePredicate ep)
        {
            if (v==null)
                throw new ArgumentNullException("v");
            if (ep==null)
                throw new ArgumentNullException("ep");

            Wrapped.RemoveOutEdgeIf(v,ep);
            if (Parent!=null)
                Parent.RemoveOutEdgeIf(v,ep);
        }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:16,代码来源:ClusteredAdjacencyGraph.cs



注:本文中的IEdgePredicate类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IEditableRoot类代码示例发布时间:2022-05-24
下一篇:
C# IEdge类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap