Added a graph interface (using boost graph library).