let gens = generators.group{ $0.AlexanderDegree } let d = GridComplex( type: .tilde, diagram: gridDiagram, generators: generators ).differential let alexs: [Int] = gens.keys.sorted() let H = alexs.flatMap { (i) -> [(Int, Int, Int)] in let gens = gens[i]! return self.graph(generators: gens, differential: d) .vertices .map{ $0.MaslovDegree } .countMultiplicities() .map{ (k, n) in (k, i, n) } } print(H)
MOS ranks for non-negative Alexander grading: 0 0 0 0 0 0 1 0 0 0 0 0 12 0 0 0 0 0 68 0 0 0 0 0 244 0 0 0
Link.init(..., quiet=false)
にしたら↑が出た