Dynamic maintenance of directed hypergraphs