Opened 7 years ago

Last modified 7 years ago

## #19345 needs_work enhancement

# Fast lexicographic iterator for module over ZZ/nZZ

Reported by: | Vincent Delecroix | Owned by: | |
---|---|---|---|

Priority: | major | Milestone: | sage-6.10 |

Component: | coding theory | Keywords: | |

Cc: | Johan Rosenkilde, David Lucas | Merged in: | |

Authors: | Vincent Delecroix | Reviewers: | |

Report Upstream: | N/A | Work issues: | |

Branch: | u/vdelecroix/19345 (Commits, GitHub, GitLab) | Commit: | 5773c780ccd2b6084dff464da084df12ade378f0 |

Dependencies: | #6452 | Stopgaps: |

### Description (last modified by )

We implement a reasonably fast lexicographic iterator for modules over `ZZ/nZZ`

. We integrate a `minimum_weight`

method that could be used as an alternative to GAP in some part of `sage.codings`

.

Setup

sage: R = IntegerModRing(6) sage: M = FreeModule(R, 4) sage: U = M.span([M((1,1,0,2)), M((2,2,3,0))])

Before

sage: timeit('for u in M: pass') 25 loops, best of 3: 9.11 ms per loop sage: timeit('for u in U: pass') 625 loops, best of 3: 641 µs per loop

After

sage: timeit('for u in M: pass') 625 loops, best of 3: 283 µs per loop sage: timeit('for u in U: pass') 625 loops, best of 3: 41.5 µs per loop

### Change History (6)

### comment:1 Changed 7 years ago by

Dependencies: | → u/vdelecroix/19345 |
---|---|

Status: | new → needs_review |

### comment:2 Changed 7 years ago by

Branch: | #6452 → u/vdelecroix/19345 |
---|---|

Commit: | → 9d7a2cd4ac10a2dc9a633308d2a07bf547b29cc9 |

Dependencies: | u/vdelecroix/19345 → #6452 |

### comment:3 Changed 7 years ago by

Commit: | 9d7a2cd4ac10a2dc9a633308d2a07bf547b29cc9 → 5773c780ccd2b6084dff464da084df12ade378f0 |
---|

### comment:5 Changed 7 years ago by

Description: | modified (diff) |
---|

**Note:**See TracTickets for help on using tickets.

New commits:

`Trac 6452: free module over ZZ/nZZ and submodules`

`Trac 6452: adapt some tests to facade`

`Trac 6452: fix a doctest`

`Trac 6452: cleaner code + more doc`

`Trac 6452: simplification + more tests`

`Trac 19345: iterator for vector_modn_dense`