adds compute method for UndirectedMotifs