summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorquidtum <quidtum>2020-12-08 18:26:29 -0500
committerquidtum <quidtum>2020-12-08 18:26:29 -0500
commitd284c94f04afc9321427e4d93480511b9452abd5 (patch)
treeea44c94bbc21a7e239a760e573e1dd0c1538dbb6
parent76d101b58f1ea60ed9fe130718ba1bae39458bca (diff)
adjust init nodes
-rw-r--r--src/Lib.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Lib.hs b/src/Lib.hs
index ca879f7..9dd42ec 100644
--- a/src/Lib.hs
+++ b/src/Lib.hs
@@ -303,9 +303,9 @@ handleDomainRead domainName (Just verseSpec@(VerseSpec lineIdens)) = do
handleDomainWrite :: DomainName -> Maybe LineIden -> Maybe LineIden -> Maybe () -> Handler DomainWriteView
handleDomainWrite domainName Nothing Nothing Nothing = do
(src, dst) <- liftIO $ dbFn domainName
- r <- liftIO $ randomRIO (0, 2) :: Handler Integer
- let srcLineIden = if r <= 1 then getLineIden <$> src else Nothing
- let dstLineIden = if r >= 1 then getLineIden <$> dst else Nothing
+ r <- liftIO $ randomRIO (0, 3) :: Handler Integer
+ let srcLineIden = if r <= 2 then getLineIden <$> src else Nothing
+ let dstLineIden = if r <= 1 || r == 3 then getLineIden <$> dst else Nothing
let initFlag = if isNothing srcLineIden && isNothing dstLineIden then Just () else Nothing
redirectTo $ domainWriteURI domainName srcLineIden dstLineIden initFlag
where
@@ -777,10 +777,10 @@ reduceSparsity g n numNewEdges arrows = do
numNodesInDefault :: Int
-numNodesInDefault = min 16 (length sampleLines)
+numNodesInDefault = min 7 (length sampleLines)
numExtraArrowsInDefault :: Int
-numExtraArrowsInDefault = 10
+numExtraArrowsInDefault = 7
makeDefaultGraphSpec :: StatefulGen g m => g -> m GraphSpec
makeDefaultGraphSpec g = do