signature SURFACE_SIMPLIFY = sig structure Complex : SIMPLICIAL_COMPLEX (* need a better name for states *) type 'a contractibleComplex type number type contractionRecord = (* The list of vertices being replace, the (possibly new) vertex they're being replaced by, and a implementation-specific number denoting the error induced by this contraction. *) (Complex.Simplex.Vertex.vertex list * Complex.Simplex.Vertex.vertex * number) (* We have to have some way to peek under the hood, for debugging / regression testing purposes *) val writeContractionState : (TextIO.outstream * 'a contractibleComplex) -> unit (* Give flag set/test functions (for traverser) & complex, generate initial error metrics and other setup work *) val initialize : ('a option -> 'a option) * ('a option -> bool) -> 'a Complex.complex -> 'a contractibleComplex (* contract' provides an efficient way to track changes in the model; this allows logging or updates to a display engine *) val contract' : 'a contractibleComplex -> 'a contractibleComplex * contractionRecord * (Complex.Simplex.simplex Sequence.seq * Complex.Simplex.simplex Sequence.seq) val contract : 'a contractibleComplex -> 'a contractibleComplex val result : 'a contractibleComplex -> 'a Complex.complex val error : 'a contractibleComplex -> number end