-
Notifications
You must be signed in to change notification settings - Fork 1
/
vertex_set.cpp
50 lines (41 loc) · 1016 Bytes
/
vertex_set.cpp
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
42
43
44
45
46
47
48
49
#include "vertex_set.h"
#include <stdlib.h>
#include <string.h>
#include <cassert>
#include <stdio.h>
#include "mic.h"
/**
* Creates an empty VertexSet with the given type and capacity.
* numNodes is the total number of nodes in the graph.
*
* Student may interpret type however they wish. It may be helpful to
* use different representations of VertexSets under different
* conditions, and they different conditions can be indicated by 'type'
*/
VertexSet *newVertexSet(VertexSetType type, int capacity, int numNodes)
{
// TODO: Implement
return NULL;
}
void freeVertexSet(VertexSet *set)
{
// TODO: Implement
}
void addVertex(VertexSet *set, Vertex v)
{
// TODO: Implement
}
void removeVertex(VertexSet *set, Vertex v)
{
// TODO: Implement
}
/**
* Returns the union of sets u and v. Destroys u and v.
*/
VertexSet* vertexUnion(VertexSet *u, VertexSet* v)
{
// TODO: Implement
// STUDENTS WILL ONLY NEED TO IMPLEMENT THIS FUNCTION IN PART 3 OF
// THE ASSIGNMENT
return NULL;
}