# HG changeset patch
# User Mike Hansen <mhansen@gmail.com>
# Date 1190335166 18000
# Node ID 0ff81ae3b1ec90a00884957647c2d389d97f9094
# Parent 4afca09321dc91098ff3faae67fc146ba2f03744
Changed arcs to edges.
diff -r 4afca09321dc -r 0ff81ae3b1ec sage/combinat/permutation.py
a
|
b
|
class StandardPermutations_recoilsfiner( |
2402 | 2402 | pos = 1 |
2403 | 2403 | for part in recoils: |
2404 | 2404 | for i in range(part-1): |
2405 | | dag.add_arc(pos, pos+1) |
| 2405 | dag.add_edge(pos, pos+1) |
2406 | 2406 | pos += 1 |
2407 | 2407 | pos += 1 |
2408 | 2408 | |
… |
… |
class StandardPermutations_recoilsfatter |
2463 | 2463 | pos = 0 |
2464 | 2464 | for i in range(len(recoils)-1): |
2465 | 2465 | pos += recoils[i] |
2466 | | dag.add_arc(pos+1, pos) |
| 2466 | dag.add_edge(pos+1, pos) |
2467 | 2467 | |
2468 | 2468 | |
2469 | 2469 | rcf = [] |
… |
… |
class StandardPermutations_recoils(Combi |
2514 | 2514 | pos = 1 |
2515 | 2515 | for part in recoils: |
2516 | 2516 | for i in range(part-1): |
2517 | | dag.add_arc(pos, pos+1) |
| 2517 | dag.add_edge(pos, pos+1) |
2518 | 2518 | pos += 1 |
2519 | 2519 | pos += 1 |
2520 | 2520 | |
… |
… |
class StandardPermutations_recoils(Combi |
2522 | 2522 | pos = 0 |
2523 | 2523 | for i in range(len(recoils)-1): |
2524 | 2524 | pos += recoils[i] |
2525 | | dag.add_arc(pos+1, pos) |
| 2525 | dag.add_edge(pos+1, pos) |
2526 | 2526 | |
2527 | 2527 | rcf = [] |
2528 | 2528 | for le in dag.topological_sort_generator(): |
diff -r 4afca09321dc -r 0ff81ae3b1ec sage/combinat/skew_partition.py
a
|
b
|
class SkewPartition_class(CombinatorialO |
162 | 162 | |
163 | 163 | EXAMPLES: |
164 | 164 | sage: dag = SkewPartition([[3, 2, 1], [1, 1]]).to_dag() |
165 | | sage: dag.arcs() |
| 165 | sage: dag.edges() |
166 | 166 | [('0,1', '0,2', None), ('0,1', '1,1', None)] |
167 | 167 | sage: dag.vertices() |
168 | 168 | ['0,1', '0,2', '1,1', '2,0'] |
… |
… |
class SkewPartition_class(CombinatorialO |
185 | 185 | #Check to see if there is a node to the right |
186 | 186 | if column != len(skew[row]) - 1: |
187 | 187 | newstring = "%d,%d" % (row, column+1) |
188 | | G.add_arc(string, newstring) |
| 188 | G.add_edge(string, newstring) |
189 | 189 | |
190 | 190 | #Check to see if there is anything below |
191 | 191 | if row != len(skew) - 1: |
192 | 192 | if len(skew[row+1]) > column: |
193 | 193 | if skew[row+1][column] != None: |
194 | 194 | newstring = "%d,%d" % (row+1, column) |
195 | | G.add_arc(string, newstring) |
| 195 | G.add_edge(string, newstring) |
196 | 196 | return G |
197 | 197 | |
198 | 198 | |