Checks if all vertices in edges really exist.

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.


Graph::checkForVertices(Edge, Vertex)


Graph::checkForVertices(Edge, Vertex) checks if all vertices out of Edge are in Vertex.


Example 1

What vertices are within the stated edges, but not in the vertex list?

Graph::checkForVertices([[a, b], [1, 2]], [a, 2])

Neither b nor 1 were in the second list. a was in the first edge and 2 in the second.

Example 2

A more complex example. The second list contains a vertex that does not exist in the graph at all. For the checking it does not matter though. Every vertex NOT in the second list is to be returned. In the end it does not matter if the vertex-list contains vertices that are not existent, because only existing vertices are returned.

G := Graph::createCompleteGraph(10):
Graph::checkForVertices(Graph::getEdges(G), [1, 2, 3, 11])



List of one or more Edges


List of one or more vertices

Return Values

List with the vertices out of the Edges that were not stated in Vertex.

Was this topic helpful?