Skip to content

Commit c5e87ee

Browse files
committed
fix docs
1 parent 90adf88 commit c5e87ee

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-11
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ d:
99
- ldc-1.4.0
1010
- ldc-1.5.0
1111
- ldc-1.6.0
12+
- ldc-1.7.0
1213
- ldc
1314
- ldc-beta
1415
- dmd-nightly

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ environment:
88
DVersion: 2.078.1
99
arch: x86
1010
- DC: ldc
11-
DVersion: '1.4.0'
11+
DVersion: '1.7.0'
1212
arch: x64
1313

1414
matrix:

source/mir/graph/tarjan.d

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ module mir.graph.tarjan;
1515
import std.traits;
1616

1717
/++
18-
Tarjan's strongly connected components algorithm.
18+
Classic Tarjan's strongly connected components algorithm.
1919
2020
Tarjan's algorithm is an algorithm in graph theory for finding the strongly connected components of a graph.
2121
It runs in linear time, matching the time bound for alternative methods including Kosaraju's algorithm and the path-based strong component algorithm.
2222
23+
The implementation is loop based. It does not use recursion and does not have stack overflow issues.
24+
2325
Complexity: worst-case `O(|V| + |E|)`.
2426
2527
Params:
@@ -209,7 +211,7 @@ auto tarjan(G, I = Unqual!(ForeachType!(ForeachType!G)))(G graph)
209211
0 -> 1 -> 2 -> 3 -> 10 9 <---
210212
------
211213
+/
212-
@safe pure version(mir_test) unittest
214+
pure version(mir_test) unittest
213215
{
214216
import mir.graph.utility;
215217
import mir.ndslice.algorithm: each;
@@ -244,9 +246,9 @@ auto tarjan(G, I = Unqual!(ForeachType!(ForeachType!G)))(G graph)
244246
}
245247

246248
/++
247-
Tests that the graph `0 -> 1 -> 2 -> 3 -> 4`` returns 4 components.
249+
Tests that the graph `0 -> 1 -> 2 -> 3 -> 4` returns 4 components.
248250
+/
249-
@safe pure version(mir_test) unittest
251+
pure version(mir_test) unittest
250252
{
251253
import mir.graph.utility;
252254

@@ -276,7 +278,7 @@ Tests that the graph `0 -> 1 -> 2 -> 3 -> 4`` returns 4 components.
276278
1 <- 3 <-> 4 <-- 7 <--(links to self)
277279
----
278280
+/
279-
@safe pure version(mir_test) unittest
281+
pure version(mir_test) unittest
280282
{
281283
import mir.graph.utility;
282284
import mir.ndslice.algorithm: each;
@@ -313,7 +315,7 @@ Tests that the graph `0 -> 1 -> 2 -> 3 -> 4`` returns 4 components.
313315
0
314316
-----
315317
+/
316-
@safe pure version(mir_test) unittest
318+
pure version(mir_test) unittest
317319
{
318320
import mir.graph.utility;
319321
import mir.ndslice.algorithm: each;
@@ -341,7 +343,7 @@ This test demonstrates a hard to detect bug, where vertices
341343
were being marked 'off-stack' after they were first visited,
342344
not when they were actually removed from the stack
343345
+/
344-
@safe pure version(mir_test) unittest
346+
pure version(mir_test) unittest
345347
{
346348
import mir.graph.utility;
347349
import mir.ndslice.algorithm: each;

source/mir/graph/utility.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ alias GraphSeries(T, I) = Series!(T*, Contiguous, [1], GraphIterator!I);
2727
Param:
2828
aaGraph = graph that is represented as associative array
2929
Returns:
30-
A graph series composed of keys (`.index``) and arrays of indeces (`.d`)
30+
A graph series composed of keys (`.index`) and arrays of indeces (`.d`)
3131
Complexity: `O(log(V) (V + E))`
3232
+/
3333
GraphSeries!(T, uint) graphSeries(T, Range)(in Range[T] aaGraph)
@@ -62,7 +62,7 @@ GraphSeries!(T, uint) graphSeries(T, Range)(in Range[T] aaGraph)
6262
}
6363

6464
///
65-
@safe pure version(mir_test) unittest
65+
pure version(mir_test) unittest
6666
{
6767
auto gs = [
6868
"b" : ["a"],

source/mir/series.d

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,11 @@ ref V[K] insert(V, K, IndexIterator, SliceKind kind, size_t[] packs, Iterator)(r
13271327
assert(a.series == series([1, 2, 3, 4], [3.0, 20, 30, 2]));
13281328
}
13291329

1330+
1331+
static if (__VERSION__ < 2078)
13301332
//////////////////// OBJECT.d
1333+
{
1334+
13311335
private:
13321336

13331337
extern (C)
@@ -1348,7 +1352,8 @@ extern (C)
13481352
// alias _dg2_t = extern(D) int delegate(void*, void*);
13491353
// int _aaApply2(void* aa, size_t keysize, _dg2_t dg);
13501354

1351-
private struct AARange { void* impl; size_t idx; }
1355+
// private struct AARange { void* impl; size_t idx; }
1356+
alias AARange = ReturnType!(object._aaRange);
13521357
AARange _aaRange(void* aa) pure nothrow @nogc @safe;
13531358
bool _aaRangeEmpty(AARange r) pure nothrow @nogc @safe;
13541359
void* _aaRangeFrontKey(AARange r) pure nothrow @nogc @safe;
@@ -1412,3 +1417,5 @@ private AARange _aaToRange(T: V[K], K, V)(ref T aa) pure nothrow @nogc @safe
14121417
const(V[K]) realAA = aa;
14131418
return _aaRange(() @trusted { return cast(void*)realAA; } ());
14141419
}
1420+
1421+
}

0 commit comments

Comments
 (0)