本文整理汇总了C#中IEdgePredicate类的典型用法代码示例。如果您正苦于以下问题:C# IEdgePredicate类的具体用法?C# IEdgePredicate怎么用?C# IEdgePredicate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IEdgePredicate类属于命名空间,在下文中一共展示了IEdgePredicate类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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)
{
}
示例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)
{}
示例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)
{
}
示例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)
{
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
}