Skip to content

Commit 3e6c94f

Browse files
committed
fix spelling of Petersen graph
1 parent a678a49 commit 3e6c94f

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

src/Data/DiGraph.hs

+8-3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ module Data.DiGraph
8080
, diCycle
8181
, line
8282
, diLine
83+
, petersenGraph
8384
, petersonGraph
8485
, twentyChainGraph
8586
, hoffmanSingleton
@@ -540,15 +541,15 @@ diLine n = unsafeFromList [ (a, [ a + 1 | a /= int n - 1]) | a <- [0 .. int n -
540541
line :: Natural -> DiGraph Int
541542
line = symmetric . diLine
542543

543-
-- | The Peterson graph.
544+
-- | The Petersen graph.
544545
--
545546
-- * order: 10
546547
-- * size: 30
547548
-- * degree: 3
548549
-- * diameter: 2
549550
--
550-
petersonGraph :: DiGraph Int
551-
petersonGraph = DiGraph
551+
petersenGraph :: DiGraph Int
552+
petersenGraph = DiGraph
552553
[ (0, [2,3,5])
553554
, (1, [3,4,6])
554555
, (2, [4,0,7])
@@ -561,6 +562,10 @@ petersonGraph = DiGraph
561562
, (9, [4,8,5])
562563
]
563564

565+
petersonGraph :: DiGraph Int
566+
petersonGraph = petersenGraph
567+
{-# DEPRECATED petersonGraph "Use petersenGraph instead" #-}
568+
564569
-- | The "twenty chain" graph.
565570
--
566571
-- * order: 20

test/Data/DiGraph/Test.hs

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,16 @@ properties_singletonGraph = prefixProperties "singletonGraph: "
6262
where
6363
g = singleton
6464

65-
properties_petersonGraph :: [(String, Property)]
66-
properties_petersonGraph = prefixProperties "petersonGraph: "
65+
properties_petersenGraph :: [(String, Property)]
66+
properties_petersenGraph = prefixProperties "petersenGraph: "
6767
$ ("order == 10", order g === 10)
6868
: ("size == 15", symSize g === 15)
6969
: ("outDegree == 3", maxOutDegree g === 3)
7070
: ("isRegular", property $ isRegular g)
7171
: ("diameter == 2", diameter g === Just 2)
7272
: properties_undirected g
7373
where
74-
g = petersonGraph
74+
g = petersenGraph
7575

7676
properties_twentyChainGraph :: [(String, Property)]
7777
properties_twentyChainGraph = prefixProperties "twentyChainGraph: "
@@ -179,7 +179,7 @@ properties = (concat :: [[(String, Property)]] -> [(String, Property)])
179179
[ properties_emptyGraph 0
180180
, properties_emptyGraph 2
181181
, properties_singletonGraph
182-
, properties_petersonGraph
182+
, properties_petersenGraph
183183
, properties_twentyChainGraph
184184
, properties_hoffmanSingletonGraph
185185
, properties_pentagon

0 commit comments

Comments
 (0)