document : { problem : Problem a, searches : List Search, visuals : List Visual, problemStateToHtml : Maybe (a -> Html (Msg a)) } -> Platform.Program () (Model a) (Msg a)
Visual dashboard. We can use this as the main
function in our application.
A whole appliaction could thus just look like this:
module Main exposing (..)
import Problem.Example exposing (..)
import Problem.Search.Dashboard as Dashboard exposing (Search(..), Visual(..))
main =
Dashboard.document
{ problem = mediumEightPuzzle
, problemStateToHtml = Just slidingPuzzleVisual
, searches = [ UniformCost, BestFirst, Greedy ]
, visuals = [ Scatter, Tree, TreeMap, Graph ]
}
This is the complete code for the first example.
Helper type for easily creating a visual dashboard.
Helper type for easily creating a visual dashboard.