gn (graphs and networks) algorithm / adt templates for JavaScript