-
Notifications
You must be signed in to change notification settings - Fork 1
/
CircuitSwitchingDP.ctxt
36 lines (36 loc) · 2.4 KB
/
CircuitSwitchingDP.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
#BlueJ class context
comment0.target=CircuitSwitchingDP
comment1.params=
comment1.target=CircuitSwitchingDP()
comment10.params=path
comment10.target=boolean\ checkIntersect(java.util.ArrayList)
comment11.params=path\ p
comment11.target=void\ visit(java.util.ArrayList,\ int)
comment12.params=path\ p
comment12.target=void\ unvisit(java.util.ArrayList,\ int)
comment13.params=finalPath
comment13.target=void\ finalise(java.util.ArrayList[])
comment14.params=
comment14.target=void\ printFinal()
comment15.params=
comment15.target=void\ main()
comment2.params=
comment2.target=void\ initAdjList()
comment3.params=
comment3.target=void\ addEdges()
comment3.text=\ The\ graph\ is\ transferred\ from\ a\ DDA\ to\ an\ Array\ of\ ArrayLists.\r\n\ This\ prevents\ checking\ of\ pairs\ of\ nodes\ that\ do\ not\ have\ any\ edge,\ thus\ improving\ speed\ in\ the\ following\ operations.\r\n
comment4.params=
comment4.target=void\ AltGraph()
comment4.text=\ In\ the\ alternate\ graph,\ all\ incoming\ edges\ of\ every\ Source\ node\ and\ all\ outgoing\ edges\ of\ every\ Destination\ node\ are\ eliminated.\r\n\ This\ reduces\ the\ number\ of\ edges\ that\ the\ program\ has\ to\ check,\ thus\ improving\ speed\ and\ efficiency.\r\n
comment5.params=s\ d
comment5.target=void\ getAllPaths(int,\ int)
comment6.params=u\ d\ isVisited\ localPathList\ distance
comment6.target=void\ getAllPathsUtil(java.lang.Integer,\ java.lang.Integer,\ boolean[],\ java.util.ArrayList,\ int)
comment7.params=
comment7.target=void\ sortPaths()
comment8.params=
comment8.target=void\ printPaths()
comment9.params=p\ max\ finalPath
comment9.target=void\ AltPaths(int,\ int,\ java.util.ArrayList[])
comment9.text=\ This\ is\ the\ function\ where\ the\ Dynamic\ Programming\ takes\ place.\r\n\ This\ function\ iterates\ through\ all\ possible\ combinations\ of\ paths.\r\n\ It\ returns\ the\ combination\ in\ which\ the\ Longest\ path\ is\ the\ smallest\ as\ compared\ to\ the\ Longest\ Paths\ in\ other\ combinations.\r\n\ Other\ conditions,\ such\ as\ Smallest\ Mean,\ Smallest\ Median\ or\ other\ statistical\ values\ using\ all\ paths\ in\ a\ combination,\ can\ also\ be\ used\ as\ required.\r\n\ The\ program\ will\ have\ to\ be\ modified\ to\ accomodate\ other\ or\ more\ conditions.\r\n\ The\ purpose\ of\ this\ function\ is\ to\ find\ the\ most\ optimal\ combination\ of\ paths\ as\ per\ the\ set\ condition\ for\ optimality.\r\n
numComments=16