-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdjListsGraph.ctxt
73 lines (73 loc) · 4.57 KB
/
AdjListsGraph.ctxt
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#BlueJ class context
comment0.target=AdjListsGraph
comment1.params=
comment1.target=AdjListsGraph()
comment1.text=\n\ Constructor.\ Creates\ an\ empty\ graph.\n
comment10.params=
comment10.target=boolean\ isUndirected()
comment10.text=\n\ Returns\ true\ IFF\ the\ graph\ is\ undirected,\ that\ is,\ for\ every\ \n\ \ \ \ pair\ of\ nodes\ i,j\ for\ which\ there\ is\ an\ arc,\ the\ opposite\ arc\n\ \ \ \ is\ also\ present\ in\ the\ graph.\ \ \n\ An\ empty\ graph\ is\ undirected\ \#\#\#\#is\ that\ all\ right?????\n
comment11.params=vertex
comment11.target=void\ addVertex(java.lang.Object)
comment12.params=index
comment12.target=java.lang.Object\ getVertex(int)
comment12.text=\ Returns\ the\ object\ associated\ with\ a\ vertex\ index.\nIf\ the\ vertex\ does\ not\ exist,\ a\ null\ is\ returned.
comment13.params=vertex
comment13.target=void\ removeVertex(java.lang.Object)
comment13.text=\n\ Removes\ a\ single\ vertex\ with\ the\ given\ value\ from\ the\ graph.\ \ \n\ Uses\ equals()\ for\ testing\ equality\n
comment14.params=index
comment14.target=void\ removeVertex(int)
comment14.text=\n\ \ \ \ Helper.\ Removes\ a\ vertex\ at\ the\ given\ index\ from\ the\ graph.\ \ \ \n\ \ \ \ Note\ that\ this\ may\ affect\ the\ index\ values\ of\ other\ vertices.\n
comment15.params=vertex1\ vertex2
comment15.target=void\ addEdge(java.lang.Object,\ java.lang.Object)
comment15.text=\n\ Inserts\ an\ edge\ between\ two\ vertices\ of\ the\ graph.\n\ If\ one\ or\ both\ vertices\ do\ not\ exist,\ ignores\ the\ addition.\n
comment16.params=source\ destination
comment16.target=void\ addArc(java.lang.Object,\ java.lang.Object)
comment16.text=\n\ Inserts\ an\ arc\ from\ v1\ to\ v2.\n\ If\ the\ vertices\ exist,\ else\ does\ not\ change\ the\ graph.\ \n
comment17.params=index1\ index2
comment17.target=void\ addArc(int,\ int)
comment18.params=vertex1\ vertex2
comment18.target=void\ removeEdge(java.lang.Object,\ java.lang.Object)
comment18.text=\n\ Removes\ an\ edge\ between\ two\ vertices\ of\ the\ graph.\n\ If\ one\ or\ both\ vertices\ do\ not\ exist,\ ignores\ the\ removal.\n
comment19.params=vertex1\ vertex2
comment19.target=void\ removeArc(java.lang.Object,\ java.lang.Object)
comment19.text=\n\ Removes\ an\ arc\ from\ vertex\ v1\ to\ vertex\ v2,\n\ if\ the\ vertices\ exist,\ else\ does\ not\ change\ the\ graph.\ \n
comment2.params=g
comment2.target=AdjListsGraph(AdjListsGraph)
comment20.params=index1\ index2
comment20.target=void\ removeArc(int,\ int)
comment20.text=\n\ Helper.\ Removes\ an\ arc\ from\ index\ v1\ to\ index\ v2.\n
comment21.params=vertex
comment21.target=java.util.LinkedList\ getPredecessors(java.lang.Object)
comment21.text=\n\ Retrieve\ from\ a\ graph\ the\ vertices\ x\ pointing\ to\ vertex\ v\ (x->v)\n\ and\ returns\ them\ onto\ a\ linked\ list\n
comment22.params=vertex
comment22.target=java.util.LinkedList\ getSuccessors(java.lang.Object)
comment22.text=\n\ Retrieve\ from\ a\ graph\ the\ vertices\ x\ following\ vertex\ v\ (v->x)\n\ and\ returns\ them\ onto\ a\ linked\ list\n
comment23.params=
comment23.target=java.lang.String\ toString()
comment24.params=fName
comment24.target=void\ saveToTGF(java.lang.String)
comment24.text=\n\ Saves\ the\ current\ graph\ into\ a\ .tgf\ file.\n\ If\ it\ cannot\ save\ the\ file,\ a\ message\ is\ printed.\ \n
comment25.params=args
comment25.target=void\ main(java.lang.String[])
comment3.params=tgf_file_name
comment3.target=AdjListsGraph\ AdjListsGraphFromFile(java.lang.String)
comment3.text=\n\ Creates\ and\ returns\ a\ new\ graph\ using\ the\ data\ found\ in\ the\ input\ file.\n\ If\ the\ file\ does\ not\ exist,\ a\ message\ is\ printed.\ \n
comment4.params=
comment4.target=boolean\ isEmpty()
comment4.text=\n\ Returns\ true\ if\ the\ graph\ is\ empty\ and\ false\ otherwise.\ \n
comment5.params=
comment5.target=int\ getNumVertices()
comment5.text=\n\ Returns\ the\ number\ of\ vertices\ in\ the\ graph.\n
comment6.params=
comment6.target=int\ getNumArcs()
comment6.text=\n\ Returns\ the\ number\ of\ arcs\ in\ the\ graph\ by\ counting\ them.\n
comment7.params=vertex
comment7.target=boolean\ containsVertex(java.lang.Object)
comment7.text=Returns\ true\ if\ this\ graph\ contains\ the\ vertex,\ false\ otherwise.
comment8.params=vertex1\ vertex2
comment8.target=boolean\ isArc(java.lang.Object,\ java.lang.Object)
comment8.text=\n\ Returns\ true\ iff\ a\ directed\ edge\ exists\ from\ v1\ to\ v2.\n
comment9.params=vertex1\ vertex2
comment9.target=boolean\ isEdge(java.lang.Object,\ java.lang.Object)
comment9.text=\n\ \ \ \ Returns\ true\ iff\ an\ edge\ exists\ between\ two\ given\ vertices\n\ \ \ \ which\ means\ that\ two\ corresponding\ arcs\ exist\ in\ the\ graph\n
numComments=26