Create an undirected graph which stores edges as any type you like (instead of simply numeric values for weight/cost).