public func run() { let d = GridComplex( type: .tilde, diagram: gridDiagram, generators: generators ).differential let H = self.graph(generators: generators, differential: d) .vertices .map { x in [x.MaslovDegree, x.AlexanderDegree] } .countMultiplicities() .map{ (deg, n) in (deg[0], deg[1], n)} print(H) }
(edited)