packages feed

graph-rewriting-ski 0.4.5 → 0.4.7

raw patch · 2 files changed

+14/−16 lines, 2 filesdep −IndentParserdep ~graph-rewriting-gl

Dependencies removed: IndentParser

Dependency ranges changed: graph-rewriting-gl

Files

Main.hs view
@@ -36,18 +36,17 @@ 		ruleTree          -- The rule menu you will see in the top left corner of the window.  -- Here we specify the forces that are applied in each layout step. You can play around with the values, but strange things may happen (correction: strange things already DO happen).-layoutStep = do-	withNodes $ \n → do-		(cgf, cf, sf, rot) ← readOnly $ do-			cgf ← centralGravitation n -- this is needed in order to prevent unconnected subgraphs to drift apart infinitely-			cf ← coulombForce n        -- a repulsing force between each pair of nodes-			sf ← springForce 1.5 n     -- this tries to push nodes into the position as dictated by the edges connected to other nodes.-			rot ← angularMomentum n    -- this tries to rotate nodes such that the angular forces exercised by the edges upon the nodes are minimised.-			return (cgf, cf, sf, rot)-		-- combine all the forces specifying for each of them a function that maps the distance the force bridges to a strength.-		Unsafe.adjustNode (Position . sf (*0.9) . cgf (*0.01) . cf (\x → min (100/(x^2+0.1)) 10) . position) n-		-- We do not rotate our nodes here, since an SKI combinator graph can nicely be drawn top-down. Uncomment, if you like.-		-- Unsafe.adjustNode (rot (*0.9)) n+layoutStep n = do+	(cgf, cf, sf, rot) ← readOnly $ do+		cgf ← centralGravitation n -- this is needed in order to prevent unconnected subgraphs to drift apart infinitely+		cf ← coulombForce n        -- a repulsing force between each pair of nodes+		sf ← springForce 1.5 n     -- this tries to push nodes into the position as dictated by the edges connected to other nodes.+		rot ← angularMomentum n    -- this tries to rotate nodes such that the angular forces exercised by the edges upon the nodes are minimised.+		return (cgf, cf, sf, rot)+	-- combine all the forces specifying for each of them a function that maps the distance the force bridges to a strength.+	Unsafe.adjustNode (Position . sf (*0.9) . cgf (*0.01) . cf (\x → min (100/(x^2+0.1)) 10) . position) n+	-- We do not rotate our nodes here, since an SKI combinator graph can nicely be drawn top-down. Uncomment, if you like.+	-- Unsafe.adjustNode (rot (*0.9)) n  -- anyRule = anyOf [ eliminate, ruleI, ruleK0, ruleK1, ruleS0, ruleS1, ruleS2, ruleE0, ruleE1, ruleE2, ruleD0, ruleD1, ruleD2] 
graph-rewriting-ski.cabal view
@@ -1,5 +1,5 @@ Name:           graph-rewriting-ski-Version:        0.4.5+Version:        0.4.7 Copyright:      (c) 2010, Jan Rochel License:        BSD3 License-File:   LICENSE@@ -21,11 +21,10 @@ 	base-unicode-symbols >= 0.2 && < 0.3, 	graph-rewriting >= 0.4.4 && < 0.5, 	graph-rewriting-layout >= 0.4.1 && < 0.5,-	graph-rewriting-gl >= 0.5 && < 0.6,+	graph-rewriting-gl >= 0.6 && < 0.7, 	parsec >= 2.1 && < 2.2, 	GLUT >= 2.2 && < 2.3,-	OpenGL >= 2.4 && < 2.5,-	IndentParser >= 0.2 && < 0.3+	OpenGL >= 2.4 && < 2.5 Extensions: 	UnicodeSyntax 	FlexibleInstances