Layered graphs and their layouts, evaluations, and applications