diff options
author | quidtum <quidtum> | 2020-12-08 18:26:29 -0500 |
---|---|---|
committer | quidtum <quidtum> | 2020-12-08 18:26:29 -0500 |
commit | d284c94f04afc9321427e4d93480511b9452abd5 (patch) | |
tree | ea44c94bbc21a7e239a760e573e1dd0c1538dbb6 /src | |
parent | 76d101b58f1ea60ed9fe130718ba1bae39458bca (diff) |
adjust init nodes
Diffstat (limited to 'src')
-rw-r--r-- | src/Lib.hs | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 |