Skip to content

Commit eb5fd1f

Browse files
author
Jegors Cemisovs
committed
Updated documentation
1 parent 7293280 commit eb5fd1f

13 files changed

+33
-264
lines changed

algorithm/src/test/groovy/BreadthFirstSearchSpec.groovy renamed to algorithm/src/test/groovy/lv/id/jc/algorithm/graph/BreadthFirstSearchSpec.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package lv.id.jc.algorithm.graph
2+
13
import lv.id.jc.algorithm.graph.BreadthFirstSearch
24
import lv.id.jc.algorithm.graph.Graph
35
import spock.lang.*

algorithm/src/test/groovy/DijkstrasAlgorithmSpec.groovy renamed to algorithm/src/test/groovy/lv/id/jc/algorithm/graph/DijkstrasAlgorithmSpec.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package lv.id.jc.algorithm.graph
2+
13
import lv.id.jc.algorithm.graph.DijkstrasAlgorithm
24
import lv.id.jc.algorithm.graph.Graph
35
import spock.lang.*

algorithm/src/test/groovy/GraphSpec.groovy renamed to algorithm/src/test/groovy/lv/id/jc/algorithm/graph/GraphSpec.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package lv.id.jc.algorithm.graph
2+
13
import lv.id.jc.algorithm.graph.Graph
24
import spock.lang.Narrative
35
import spock.lang.Specification

algorithm/src/test/groovy/SearchAlgorithmSpec.groovy renamed to algorithm/src/test/groovy/lv/id/jc/algorithm/graph/SearchAlgorithmSpec.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package lv.id.jc.algorithm.graph
2+
13
import lv.id.jc.algorithm.graph.BreadthFirstSearch
24
import lv.id.jc.algorithm.graph.DijkstrasAlgorithm
35
import lv.id.jc.algorithm.graph.Graph

algorithm/src/test/resources/SpockConfig.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
spockReports {
22

33
set(['com.athaydes.spockframework.report.showCodeBlocks' : true,
4-
'com.athaydes.spockframework.report.outputDir' : 'docs/spock-reports',
4+
'com.athaydes.spockframework.report.outputDir' : '../docs/spock-reports',
55
'com.athaydes.spockframework.report.projectName' : 'Graph search algorithms',
66
'com.athaydes.spockframework.report.projectVersion' : 1.1,
77
'com.athaydes.spockframework.report.internal.HtmlReportCreator.enabled': true,

docs/inspection/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/spock-reports/aggregated_report.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/spock-reports/index.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ <h2>Specification run results</h2>
8484
</div>
8585
<div class='summary-report'>
8686
<h3>Specifications summary:</h3>
87-
<div class='date-test-ran'>Created on Tue Jan 04 19:56:49 EET 2022 by jegors.cemisovs</div>
87+
<div class='date-test-ran'>Created on Thu Jan 06 23:11:33 EET 2022 by jegors.cemisovs</div>
8888
<table class='summary-table'>
8989
<thead>
9090
<tr>
@@ -111,7 +111,7 @@ <h3>Specifications summary:</h3>
111111
<td>0</td>
112112
<td>0</td>
113113
<td>100.0%</td>
114-
<td>0.158 seconds</td>
114+
<td>0.148 seconds</td>
115115
</tr>
116116
</tbody>
117117
</table>
@@ -133,7 +133,7 @@ <h3>Specifications:</h3>
133133
<tbody>
134134
<tr>
135135
<td>
136-
<a href='graph.BreadthFirstSearchSpec.html'>graph.BreadthFirstSearchSpec</a>
136+
<a href='lv.id.jc.algorithm.graph.BreadthFirstSearchSpec.html'>lv.id.jc.algorithm.graph.BreadthFirstSearchSpec</a>
137137
<div class='spec-title'>Breadth First Search Algorithm</div>
138138
</td>
139139
<td>4</td>
@@ -142,11 +142,11 @@ <h3>Specifications:</h3>
142142
<td>0</td>
143143
<td>0</td>
144144
<td>100.0%</td>
145-
<td>0.053 seconds</td>
145+
<td>0.065 seconds</td>
146146
</tr>
147147
<tr>
148148
<td>
149-
<a href='graph.DijkstrasAlgorithmSpec.html'>graph.DijkstrasAlgorithmSpec</a>
149+
<a href='lv.id.jc.algorithm.graph.DijkstrasAlgorithmSpec.html'>lv.id.jc.algorithm.graph.DijkstrasAlgorithmSpec</a>
150150
<div class='spec-title'>Dijkstra's Algorithm</div>
151151
</td>
152152
<td>5</td>
@@ -155,11 +155,11 @@ <h3>Specifications:</h3>
155155
<td>0</td>
156156
<td>0</td>
157157
<td>100.0%</td>
158-
<td>0.037 seconds</td>
158+
<td>0.024 seconds</td>
159159
</tr>
160160
<tr>
161161
<td>
162-
<a href='graph.GraphSpec.html'>graph.GraphSpec</a>
162+
<a href='lv.id.jc.algorithm.graph.GraphSpec.html'>lv.id.jc.algorithm.graph.GraphSpec</a>
163163
<div class='spec-title'>Generic Graph</div>
164164
</td>
165165
<td>5</td>
@@ -168,11 +168,11 @@ <h3>Specifications:</h3>
168168
<td>0</td>
169169
<td>0</td>
170170
<td>100.0%</td>
171-
<td>0.053 seconds</td>
171+
<td>0.047 seconds</td>
172172
</tr>
173173
<tr>
174174
<td>
175-
<a href='graph.SearchAlgorithmSpec.html'>graph.SearchAlgorithmSpec</a>
175+
<a href='lv.id.jc.algorithm.graph.SearchAlgorithmSpec.html'>lv.id.jc.algorithm.graph.SearchAlgorithmSpec</a>
176176
<div class='spec-title'>Comparison of two algorithms</div>
177177
</td>
178178
<td>1</td>
@@ -181,7 +181,7 @@ <h3>Specifications:</h3>
181181
<td>0</td>
182182
<td>0</td>
183183
<td>100.0%</td>
184-
<td>0.015 seconds</td>
184+
<td>0.012 seconds</td>
185185
</tr>
186186
</tbody>
187187
</table>

docs/spock-reports/graph.BreadthFirstSearchSpec.html renamed to docs/spock-reports/lv.id.jc.algorithm.graph.BreadthFirstSearchSpec.html

Lines changed: 3 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -244,14 +244,14 @@
244244
</style>
245245
</head>
246246
<body>
247-
<h2>Report for graph.BreadthFirstSearchSpec</h2>
247+
<h2>Report for lv.id.jc.algorithm.graph.BreadthFirstSearchSpec</h2>
248248
<hr></hr>
249249
<div class='back-link'>
250250
<a href='index.html'>&lt;&lt; Back</a>
251251
</div>
252252
<div class='summary-report'>
253253
<h3>Summary:</h3>
254-
<div class='date-test-ran'>Created on Tue Jan 04 19:56:48 EET 2022 by jegors.cemisovs</div>
254+
<div class='date-test-ran'>Created on Thu Jan 06 23:11:33 EET 2022 by jegors.cemisovs</div>
255255
<table class='summary-table'>
256256
<thead>
257257
<tr>
@@ -272,7 +272,7 @@ <h3>Summary:</h3>
272272
<td>0</td>
273273
<td>0</td>
274274
<td>100.0%</td>
275-
<td>0.053 seconds</td>
275+
<td>0.065 seconds</td>
276276
</tr>
277277
</tbody>
278278
</table>
@@ -323,12 +323,6 @@ <h3>Features:</h3>
323323
<div class='block-kind'>Given:</div>
324324
</td>
325325
<td>
326-
<div class='block-text'>A simple graph</div>
327-
</td>
328-
</tr>
329-
<tr>
330-
<td></td>
331-
<td>
332326
<pre class='block-source'>def graph = Graph.of([
333327
A: [B: 7, C: 2],
334328
B: [A: 3, C: 5],
@@ -341,12 +335,6 @@ <h3>Features:</h3>
341335
<div class='block-kind'>When:</div>
342336
</td>
343337
<td>
344-
<div class='block-text'>we use Breadth First Search algorithm to find a path</div>
345-
</td>
346-
</tr>
347-
<tr>
348-
<td></td>
349-
<td>
350338
<pre class='block-source'>def path = algorithm.findPath(graph, source, target)</pre>
351339
</td>
352340
</tr>
@@ -355,12 +343,6 @@ <h3>Features:</h3>
355343
<div class='block-kind'>Then:</div>
356344
</td>
357345
<td>
358-
<div class='block-text'>we get the shortest path</div>
359-
</td>
360-
</tr>
361-
<tr>
362-
<td></td>
363-
<td>
364346
<pre class='block-source'>path == shortest</pre>
365347
</td>
366348
</tr>
@@ -369,12 +351,6 @@ <h3>Features:</h3>
369351
<div class='block-kind'>And:</div>
370352
</td>
371353
<td>
372-
<div class='block-text'>the distance calculated correctly</div>
373-
</td>
374-
</tr>
375-
<tr>
376-
<td></td>
377-
<td>
378354
<pre class='block-source'>graph.getDistance(path) == time as double</pre>
379355
</td>
380356
</tr>
@@ -445,12 +421,6 @@ <h3>Features:</h3>
445421
<div class='block-kind'>Given:</div>
446422
</td>
447423
<td>
448-
<div class='block-text'>A complex graph</div>
449-
</td>
450-
</tr>
451-
<tr>
452-
<td></td>
453-
<td>
454424
<pre class='block-source'>def graph = Graph.of([
455425
A: [B: 1],
456426
B: [A: 1, D: 1],
@@ -465,12 +435,6 @@ <h3>Features:</h3>
465435
<div class='block-kind'>When:</div>
466436
</td>
467437
<td>
468-
<div class='block-text'>we use Breadth First Search algorithm to find a path</div>
469-
</td>
470-
</tr>
471-
<tr>
472-
<td></td>
473-
<td>
474438
<pre class='block-source'>def path = algorithm.findPath(graph, source, target)</pre>
475439
</td>
476440
</tr>
@@ -479,12 +443,6 @@ <h3>Features:</h3>
479443
<div class='block-kind'>Then:</div>
480444
</td>
481445
<td>
482-
<div class='block-text'>we get the shortest path</div>
483-
</td>
484-
</tr>
485-
<tr>
486-
<td></td>
487-
<td>
488446
<pre class='block-source'>path == shortest</pre>
489447
</td>
490448
</tr>
@@ -493,12 +451,6 @@ <h3>Features:</h3>
493451
<div class='block-kind'>And:</div>
494452
</td>
495453
<td>
496-
<div class='block-text'>the distance calculated correctly</div>
497-
</td>
498-
</tr>
499-
<tr>
500-
<td></td>
501-
<td>
502454
<pre class='block-source'>graph.getDistance(path) == time as double</pre>
503455
</td>
504456
</tr>
@@ -598,12 +550,6 @@ <h3>Features:</h3>
598550
<div class='block-kind'>Given:</div>
599551
</td>
600552
<td>
601-
<div class='block-text'>an empty graph</div>
602-
</td>
603-
</tr>
604-
<tr>
605-
<td></td>
606-
<td>
607553
<pre class='block-source'>def graph = Graph.of([:])</pre>
608554
</td>
609555
</tr>
@@ -612,12 +558,6 @@ <h3>Features:</h3>
612558
<div class='block-kind'>When:</div>
613559
</td>
614560
<td>
615-
<div class='block-text'>we use Dijkstra's algorithm to find a path</div>
616-
</td>
617-
</tr>
618-
<tr>
619-
<td></td>
620-
<td>
621561
<pre class='block-source'>algorithm.findPath(graph, 'A', 'B')</pre>
622562
</td>
623563
</tr>
@@ -626,12 +566,6 @@ <h3>Features:</h3>
626566
<div class='block-kind'>Then:</div>
627567
</td>
628568
<td>
629-
<div class='block-text'>the exception was thrown</div>
630-
</td>
631-
</tr>
632-
<tr>
633-
<td></td>
634-
<td>
635569
<pre class='block-source'>thrown NullPointerException</pre>
636570
</td>
637571
</tr>
@@ -664,12 +598,6 @@ <h3>Features:</h3>
664598
<div class='block-kind'>When:</div>
665599
</td>
666600
<td>
667-
<div class='block-text'>we use Breadth First Search algorithm to find a path</div>
668-
</td>
669-
</tr>
670-
<tr>
671-
<td></td>
672-
<td>
673601
<pre class='block-source'>def path = algorithm.findPath(graph, 'A', 'B')</pre>
674602
</td>
675603
</tr>
@@ -678,12 +606,6 @@ <h3>Features:</h3>
678606
<div class='block-kind'>Then:</div>
679607
</td>
680608
<td>
681-
<div class='block-text'>we get an empty path</div>
682-
</td>
683-
</tr>
684-
<tr>
685-
<td></td>
686-
<td>
687609
<pre class='block-source'>path == []</pre>
688610
</td>
689611
</tr>

0 commit comments

Comments
 (0)