Skip to content

Commit

Permalink
Fixing issue brenden#1
Browse files Browse the repository at this point in the history
  • Loading branch information
brenden committed Apr 23, 2017
1 parent 379a9c9 commit 2a4c0d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions UkkonenAlgorithm.elm
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ insert' newChar state =
( getChar
(i - state.remainder + 2)
string
, edgeSteps - 1
, state.remainder - 2
)
}
else
Expand All @@ -222,7 +222,7 @@ insert' newChar state =
newState :: (insert' newChar newState)

Nothing ->
Debug.crash "active_edge is set to a nonexistent edge."
Debug.crash <| "active_edge is set to a nonexistent edge: " ++ (Basics.toString activePoint)


{-| Update the active point to reflect the next suffix to be inserted. If a
Expand Down Expand Up @@ -319,7 +319,7 @@ normalizeActivePoint state =
| activePoint =
{ activePoint
| nodeId = activeEdge.pointingTo
, edge = Just ( getChar (stringLen - state.remainder + 1) state.string, edgeSteps - activeEdgeLength )
, edge = Just ( getChar (stringLen - edgeSteps + activeEdgeLength - 1) state.string, edgeSteps - activeEdgeLength )
}
}

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
var treeGraph = document.getElementById('tree-graph');

// Set up d3 tree visualization
var width = 760;
var width = 960;
var height = 500;
var duration = 750;
var tree = d3.layout.tree()
Expand Down

0 comments on commit 2a4c0d1

Please sign in to comment.