Add bipartite graph class and export code.