Skip to content

Commit 4845dcf

Browse files
authored
Use MathJax format for complexity annotations (#830)
1 parent b713930 commit 4845dcf

File tree

16 files changed

+469
-469
lines changed

16 files changed

+469
-469
lines changed

containers-tests/benchmarks/LookupGE/LookupGE_IntMap.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ lookupGE4 k t = k `seq` case t of
7272
-- Utilities
7373
-------------------------------------------------------------------------------
7474

75-
-- | /O(log n)/. The minimal key of the map.
75+
-- | \(O(\log n)\). The minimal key of the map.
7676
findMinMaybe :: IntMap a -> Maybe (Key, a)
7777
findMinMaybe m
7878
| null m = Nothing

containers/src/Data/IntMap.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
--
5151
-- Operation comments contain the operation time complexity in
5252
-- the Big-O notation <http://en.wikipedia.org/wiki/Big_O_notation>.
53-
-- Many operations have a worst-case complexity of /O(min(n,W))/.
53+
-- Many operations have a worst-case complexity of \(O(\min(n,W))\).
5454
-- This means that the operation can become linear in the number of
55-
-- elements with a maximum of /W/ -- the number of bits in an 'Int'
55+
-- elements with a maximum of \(W\) -- the number of bits in an 'Int'
5656
-- (32 or 64).
5757
-----------------------------------------------------------------------------
5858

containers/src/Data/IntMap/Internal.hs

Lines changed: 110 additions & 110 deletions
Large diffs are not rendered by default.

containers/src/Data/IntMap/Lazy.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
--
4141
-- == Detailed performance information
4242
--
43-
-- The amortized running time is given for each operation, with /n/ referring to
44-
-- the number of entries in the map and /W/ referring to the number of bits in
43+
-- The amortized running time is given for each operation, with \(n\) referring to
44+
-- the number of entries in the map and \(W\) referring to the number of bits in
4545
-- an 'Int' (32 or 64).
4646
--
4747
-- Benchmarks comparing "Data.IntMap.Lazy" with other dictionary

containers/src/Data/IntMap/Strict.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
--
4949
-- == Detailed performance information
5050
--
51-
-- The amortized running time is given for each operation, with /n/ referring to
52-
-- the number of entries in the map and /W/ referring to the number of bits in
51+
-- The amortized running time is given for each operation, with \(n\) referring to
52+
-- the number of entries in the map and \(W\) referring to the number of bits in
5353
-- an 'Int' (32 or 64).
5454
--
5555
-- Benchmarks comparing "Data.IntMap.Strict" with other dictionary

containers/src/Data/IntMap/Strict/Internal.hs

Lines changed: 48 additions & 48 deletions
Large diffs are not rendered by default.

containers/src/Data/IntSet.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
--
3232
-- == Performance information
3333
--
34-
-- Many operations have a worst-case complexity of /O(min(n,W))/.
34+
-- Many operations have a worst-case complexity of \(O(\min(n,W))\).
3535
-- This means that the operation can become linear in the number of
36-
-- elements with a maximum of /W/ -- the number of bits in an 'Int'
36+
-- elements with a maximum of \(W\) -- the number of bits in an 'Int'
3737
-- (32 or 64).
3838
--
3939
--

0 commit comments

Comments
 (0)