Skip to content

Commit f285265

Browse files
committed
typo fix with Claude Code
1 parent 495e7fa commit f285265

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+115
-115
lines changed

src/AtCoder/Extra/DynLazySegTree/Raw.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ import GHC.Stack (HasCallStack)
5656
import Prelude hiding (read)
5757

5858
-- | A dynamic, lazily propagated segment tree that covers a half-open interval \([l_0, r_0)\).
59-
-- The nodes are instantinated as needed.
59+
-- The nodes are instantiated as needed.
6060
--
6161
-- @since 1.2.1.0
6262
data DynLazySegTree s f a = DynLazySegTree
@@ -170,7 +170,7 @@ newSeqST dst@DynLazySegTree {..} !xs = do
170170
{-# INLINE newNodeInST #-}
171171
newNodeInST :: (HasCallStack, Monoid f, VU.Unbox f, Monoid a, VU.Unbox a) => DynLazySegTree s f a -> Int -> Int -> ST s P.Index
172172
newNodeInST dst@DynLazySegTree {initialProdLdst} l r = do
173-
let !_ = ACIA.runtimeAssert (r > l) $ "AtCoder.Extra.DynLazySegTree.Raw.nodeNodeInST: not empty or negative interval: " ++ show (l, r)
173+
let !_ = ACIA.runtimeAssert (r > l) $ "AtCoder.Extra.DynLazySegTree.Raw.newNodeInST: not empty or negative interval: " ++ show (l, r)
174174
newNodeST dst $! initialProdLdst l r
175175

176176
-- | \(O(\log L)\)
@@ -397,7 +397,7 @@ resetIntervalST dst@DynLazySegTree {..} root ql0 qr0
397397
| ql0 == qr0 = pure root
398398
| P.nullIndex root = pure P.undefIndex
399399
| ql0 == l0Ldst && qr0 == r0Ldst = do
400-
-- for the case of non-persistent segment tere, we should update the root in-place:
400+
-- for the case of non-persistent segment tree, we should update the root in-place:
401401
root' <- cloneOnWriteST dst root
402402
VGM.write xLdst (coerce root') $! initialProdLdst l0Ldst r0Ldst
403403
VGM.write lLdst (coerce root') P.undefIndex

src/AtCoder/Extra/DynSegTree.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ new ::
9292
Int ->
9393
-- | Right index boundary \(r_0\)
9494
Int ->
95-
-- | Dynamic propagated segment tree
95+
-- | Dynamic segment tree
9696
m (Raw.DynSegTree (PrimState m) a)
9797
new nDst l r = stToPrim $ Raw.newST False nDst l r (\_ _ -> mempty)
9898

src/AtCoder/Extra/DynSegTree/Raw.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ newSeqST dst@DynSegTree {..} !xs = do
156156
{-# INLINE newNodeInST #-}
157157
newNodeInST :: (HasCallStack, Monoid a, VU.Unbox a) => DynSegTree s a -> Int -> Int -> ST s P.Index
158158
newNodeInST dst@DynSegTree {initialProdDst} l r = do
159-
let !_ = ACIA.runtimeAssert (r > l) $ "AtCoder.Extra.DynSegTree.Raw.nodeNodeInST: not empty or negative interval: " ++ show (l, r)
159+
let !_ = ACIA.runtimeAssert (r > l) $ "AtCoder.Extra.DynSegTree.Raw.newNodeInST: not empty or negative interval: " ++ show (l, r)
160160
newNodeST dst $! initialProdDst l r
161161

162162
-- | \(O(\log L)\)
@@ -257,7 +257,7 @@ resetIntervalST dst@DynSegTree {..} root ql0 qr0
257257
| ql0 == qr0 = pure root
258258
| P.nullIndex root = pure P.undefIndex
259259
| ql0 == l0Dst && qr0 == r0Dst = do
260-
-- for the case of non-persistent segment tere, we should update the root in-place:
260+
-- for the case of non-persistent segment tree, we should update the root in-place:
261261
root' <- cloneOnWriteST dst root
262262
VGM.write xDst (coerce root') $! initialProdDst l0Dst r0Dst
263263
VGM.write lDst (coerce root') P.undefIndex

src/AtCoder/Extra/DynSparseSegTree.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
{-# LANGUAGE TypeFamilies #-}
44

55
-- | A dynamic, sparse segment tree that covers a half-open interval \([l_0, r_0)\). Nodes are
6-
-- instantinated as needed, with the required capacity being \(q\), where \(q\) is the number of
7-
-- mutable operations. The traid-off compared to the non-sparse variant is that initial monoid
6+
-- instantiated as needed, with the required capacity being \(q\), where \(q\) is the number of
7+
-- mutable operations. The trade-off compared to the non-sparse variant is that initial monoid
88
-- values are fixed at `mempty`.
99
--
1010
-- ==== __Example__
@@ -189,7 +189,7 @@ maxRightM dst (P.Handle handle) f = do
189189
root <- VGM.read handle 0
190190
Raw.maxRightM dst root f
191191

192-
-- | \(O(\log L)\) Claers all the nodes from the storage.
192+
-- | \(O(\log L)\) Clears all the nodes from the storage.
193193
--
194194
-- @since 1.2.2.0
195195
{-# INLINE clear #-}

src/AtCoder/Extra/DynSparseSegTree/Persistent.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
{-# LANGUAGE NamedFieldPuns #-}
33
{-# LANGUAGE TypeFamilies #-}
44

5-
-- | A dynamic, sparse, persitent segment tree that covers a half-open interval \([l_0, r_0)\). Nodes are
6-
-- instantinated as needed, with the required capacity being \(2q \log_2 L\), where \(q\) is the number of
7-
-- mutable operations. The traid-off compared to the non-sparse variant is that initial monoid
5+
-- | A dynamic, sparse, persistent segment tree that covers a half-open interval \([l_0, r_0)\). Nodes are
6+
-- instantiated as needed, with the required capacity being \(2q \log_2 L\), where \(q\) is the number of
7+
-- mutable operations. The trade-off compared to the non-sparse variant is that initial monoid
88
-- values are fixed at `mempty`.
99
--
1010
-- ==== __Example__
@@ -172,7 +172,7 @@ maxRightM :: (HasCallStack, PrimMonad m, Monoid a, VU.Unbox a) => Raw.DynSparseS
172172
maxRightM dst root f = do
173173
Raw.maxRightM dst root f
174174

175-
-- | \(O(\log L)\) Claers all the nodes from the storage.
175+
-- | \(O(\log L)\) Clears all the nodes from the storage.
176176
--
177177
-- @since 1.2.2.0
178178
{-# INLINE clear #-}

src/AtCoder/Extra/DynSparseSegTree/Raw.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ import Data.Vector.Unboxed.Mutable qualified as VUM
4444
import GHC.Stack (HasCallStack)
4545
import Prelude hiding (read)
4646

47-
-- | A dynamic, sparse segment tree that covers a half-open interval \([l_0, r_0)\). Is is dynamic
48-
-- in that the nodes are instantinated as needed.
47+
-- | A dynamic, sparse segment tree that covers a half-open interval \([l_0, r_0)\). It is dynamic
48+
-- in that the nodes are instantiated as needed.
4949
--
5050
-- @since 1.2.1.0
5151
data DynSparseSegTree s a = DynSparseSegTree

src/AtCoder/Extra/Graph.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ findCycleUndirected gr@Csr {..} =
379379
-- This is not optimal, but we need a dedicated `buildUndirected` function and different edge ID
380380
-- (not index) handling in CSR if we go with the optimal approach.
381381
--
382-
-- Note that the implementations are suspecious..
382+
-- Note that the implementations are suspicious..
383383
findCycleComplexUndirected gr <|> findCycleSimpleUndirected gr
384384

385385
{-# INLINEABLE findCycleComplexUndirected #-}
@@ -473,7 +473,7 @@ findCycleSimpleUndirected gr@Csr {..} = runST $ do
473473
es <- GV.new @_ @Int 16
474474
dep' <- VU.unsafeFreeze dep
475475

476-
-- Find edge with minimum depth difference, which makes up a loop (not used in the DFS forets):
476+
-- Find edge with minimum depth difference, which makes up a loop (not used in the DFS forests):
477477
minLen <- VUM.replicate 1 (maxBound `div` 2 :: Int)
478478
backE <- VUM.replicate 1 (-1 :: Int, -1 :: Int)
479479
for_ [0 .. nCsr - 1] $ \vA -> do
@@ -1308,7 +1308,7 @@ bellmanFordImpl {- !policy -} !trackPrev !nVerts !gr !undefW !sources = runST $
13081308
VGM.write dist v w
13091309
updated <- VUM.replicate 1 False
13101310

1311-
-- look around adjaenct vertices
1311+
-- look around adjacent vertices
13121312
let update v1 = do
13131313
d1 <- VGM.read dist v1
13141314
when (d1 /= undefW) $ do
@@ -1603,7 +1603,7 @@ updateEdgeFloydWarshall mat nVerts undefW a b w = do
16031603
prev <- VUM.replicate @_ @Int 0 (-1 :: Int)
16041604
stToPrim $ updateEdgeFloydWarshallST False mat prev nVerts undefW a b w
16051605

1606-
-- | \(O(n^2)\) Updates distance matrix of Floyd–Warshall on edge weight chaneg or new edge addition.
1606+
-- | \(O(n^2)\) Updates distance matrix of Floyd–Warshall on edge weight change or new edge addition.
16071607
--
16081608
-- ==== Constraints
16091609
-- - \(n \ge 1\)

src/AtCoder/Extra/HashMap.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{-# LANGUAGE RecordWildCards #-}
22

3-
-- original implementaion:
3+
-- original implementation:
44
-- <https://github.com/maspypy/library/blob/main/ds/hashmap.hpp>
55

66
-- | A dense, fast `Int` hash map with a fixed-sized `capacity` of \(n\). Most operations are

src/AtCoder/Extra/IntMap.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module AtCoder.Extra.IntMap
4747
member,
4848
notMember,
4949

50-
-- ** Compartive lookups
50+
-- ** Comparative lookups
5151
lookupGE,
5252
lookupGT,
5353
lookupLE,

src/AtCoder/Extra/IntSet.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module AtCoder.Extra.IntSet
4848
member,
4949
notMember,
5050

51-
-- ** Compartive lookups
51+
-- ** Comparative lookups
5252
lookupGE,
5353
lookupGT,
5454
lookupLE,

0 commit comments

Comments
 (0)