-
Notifications
You must be signed in to change notification settings - Fork 7
/
MutableGraph.php
36 lines (33 loc) · 976 Bytes
/
MutableGraph.php
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
<?php
namespace Gliph\Graph;
/**
* Describes an undirected graph that can be modified after initial creation.
*/
interface MutableGraph extends Graph, MutableVertexSet {
/**
* Adds an undirected edge to this graph.
*
* @param object $u
* One object vertex in the edge pair. The vertex will be added to
* the graph if it is not already present.
* @param object $v
* The other object vertex in the edge pair. The vertex will be added to
* the graph if it is not already present.
*
* @return MutableGraph
* The current graph instance.
*/
public function ensureEdge($u, $v);
/**
* Removes an undirected edge from the graph.
*
* @param $u
* One vertex in the edge pair to remove.
* @param $v
* The other vertex in the edge pair to remove.
*
* @return MutableGraph
* The current graph instance.
*/
public function removeEdge($u, $v);
}