diff options
-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 |