forked from YaccConstructor/QuickGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIMutableIncidenceGraph.cs
More file actions
41 lines (38 loc) · 1.23 KB
/
IMutableIncidenceGraph.cs
File metadata and controls
41 lines (38 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using QuickGraph.Contracts;
namespace QuickGraph
{
/// <summary>
/// A mutable incidence graph
/// </summary>
/// <typeparam name="TVertex"></typeparam>
/// <typeparam name="TEdge"></typeparam>
[ContractClass(typeof(IMutableIncidenceGraphContract<,>))]
public interface IMutableIncidenceGraph<TVertex,TEdge>
: IMutableGraph<TVertex,TEdge>
, IIncidenceGraph<TVertex,TEdge>
where TEdge : IEdge<TVertex>
{
/// <summary>
/// Removes all out edges of <paramref name="v"/>
/// where <paramref name="predicate"/> evalutes to true.
/// </summary>
/// <param name="v"></param>
/// <param name="predicate"></param>
/// <returns></returns>
int RemoveOutEdgeIf(
TVertex v,
EdgePredicate<TVertex, TEdge> predicate);
/// <summary>
/// Trims the out edges of vertex <paramref name="v"/>
/// </summary>
/// <param name="v"></param>
void ClearOutEdges(TVertex v);
/// <summary>
/// Trims excess storage allocated for edges
/// </summary>
void TrimEdgeExcess();
}
}