davidpomerenke/elm-problem-solving/1.0.2

NOTE: the latest version is 1.0.3

Problem.Search.Dashboard

{ problem : Problem a
, searches : List Search
, visuals : List Visual
, problemStateToHtml : Maybe (a -> Html (Msg a))
}
-> 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.

type Visual
= Scatter
| Tree
| TreeMap
| Graph

Helper type for easily creating a visual dashboard.