Finite Directed Cubical Complexes and associated algorithms