Opened 6 years ago

Closed 5 years ago

#16142 closed enhancement (fixed)

transducers.add, transducers.sub, transducers.abs, transducer.operator: New common transducers

Reported by: cheuberg Owned by:
Priority: minor Milestone: sage-6.2
Component: combinatorics Keywords: finite_state_machine
Cc: Merged in:
Authors: Clemens Heuberger, Daniel Krenn, Sara Kropf Reviewers: Daniel Krenn
Report Upstream: N/A Work issues:
Branch: a5087f2 (Commits) Commit: a5087f259943b668dddd8cc23decb23568012be8
Dependencies: #16132, #16141 Stopgaps:

Description

In #16141, a class to collect common transducers was introduced. Here, we enhance this class by a few more transducers which are mainly meant to be used as readily available components in cartesian products and/or compositions.

We introduce four more common transducers, transducers.abs realizing absolute value, transducers.operator realizing binary operations, transducers.add, transducers.sub realizing addition and subtraction and at the same time illustrating the use of transducers.operator.

Change History (13)

comment:1 Changed 6 years ago by cheuberg

  • Status changed from new to needs_review

comment:2 Changed 6 years ago by git

  • Commit changed from 3110f9d53c199521168ed8b2df193c94ac3e8c88 to fdd778c80bc3c25f681ca05afc31c1a6117096fd

Branch pushed to git repo; I updated commit sha1. New commits:

fdd778cgenerators.operator: final state state

comment:3 Changed 6 years ago by dkrenn

  • Authors changed from Clemens Heuberger, Sara Kropf to Clemens Heuberger, Daniel Krenn, Sara Kropf
  • Branch changed from u/cheuberg/fsm/operator_transducers to u/dkrenn/fsm/operator_transducers
  • Cc dkrenn skropf removed
  • Commit changed from fdd778c80bc3c25f681ca05afc31c1a6117096fd to f344fd8f123082df19affa5d27776645fff57609
  • Reviewers set to Daniel Krenn

During review, I decided to extend .operator to arbirary opeators (not only binary). I've rewritten its docstring. I've also made a couple of changes in the docstings of .add, .sub, .abs.

The patch looks good; doctests pass; docs checked. So this is a positive review for me, but please review my changes first.


Last 10 new commits:

547968aFiniteStateMachine.product_FiniteStateMachine, composition: fix unhashable colors
d51be51Automaton.determinisation(): docstring on hashable colors
c5dd860Merge branch 'fsm/state_color' into fsm/process_output_new
70294bftrac ticket number added
4a53b09Merge branch '#16132' into fsm/count_subblock_occurrences
5d65767Edit doctests due to #16132 change.
e1bd1dfMerge branch 'fsm/count_subblock_occurrences' into fsm/operator_transducers
3110f9dEdit doctests due to #16132 change.
fdd778cgenerators.operator: final state state
f344fd8reviewer patch: improved function operator; extended and rewrote docstrings

comment:4 Changed 6 years ago by dkrenn

  • Dependencies set to #16141

comment:5 Changed 6 years ago by dkrenn

  • Branch changed from u/dkrenn/fsm/operator_transducers to u/dkrenn/fsm/operator_transducers-on-beta8
  • Commit changed from f344fd8f123082df19affa5d27776645fff57609 to 4a36b1af5a9ec87a2fc9eae8c92aef21414cd80b

The new branch is on beta8 + #16141. Positive from my side, but my changes (see above) have to be reviewed first.


Last 10 new commits:

70294bftrac ticket number added
ed93dd3Minor changes during review.
3820c49corrected whitespaceerror
a14dd81Merge remote-tracking branch 'origin/u/dkrenn/ticket/16132' into fsm/process_output_new-on-beta8
be59e47TransducerGenerators: New class, collecting common transducers
7a907acminor corrections
4a53b09Merge branch '#16132' into fsm/count_subblock_occurrences
5d65767Edit doctests due to #16132 change.
86f8452improved various docstrings in finite_state_machine_generators.py
4a36b1aMerge remote-tracking branch 'origin/u/dkrenn/fsm/count_subblock_occurrences' into fsm/count_subblock_occurrences-on-beta8

comment:6 Changed 6 years ago by git

  • Commit changed from 4a36b1af5a9ec87a2fc9eae8c92aef21414cd80b to 138132feb53498cffca9f9745705d7a33b7f4827

Branch pushed to git repo; I updated commit sha1. New commits:

973d4d3transducers.add, transducers.sub: New transducers
86be453generators.abs: new common Transducer: absolute Value
fdf3dc4TransducerGenerators.operator is now a public function
92a2b26operator in TOC, corrected docstring
9029a07Fixed doctest for operator
e1bd1dfMerge branch 'fsm/count_subblock_occurrences' into fsm/operator_transducers
3110f9dEdit doctests due to #16132 change.
fdd778cgenerators.operator: final state state
f344fd8reviewer patch: improved function operator; extended and rewrote docstrings
138132fMerge remote-tracking branch 'origin/u/dkrenn/fsm/operator_transducers' into fsm/example_gray_code-on-beta8

comment:7 Changed 6 years ago by dkrenn

Last 10 new commits:

973d4d3transducers.add, transducers.sub: New transducers
86be453generators.abs: new common Transducer: absolute Value
fdf3dc4TransducerGenerators.operator is now a public function
92a2b26operator in TOC, corrected docstring
9029a07Fixed doctest for operator
e1bd1dfMerge branch 'fsm/count_subblock_occurrences' into fsm/operator_transducers
3110f9dEdit doctests due to #16132 change.
fdd778cgenerators.operator: final state state
f344fd8reviewer patch: improved function operator; extended and rewrote docstrings
138132fMerge remote-tracking branch 'origin/u/dkrenn/fsm/operator_transducers' into fsm/example_gray_code-on-beta8

Last 10 new commits:

973d4d3transducers.add, transducers.sub: New transducers
86be453generators.abs: new common Transducer: absolute Value
fdf3dc4TransducerGenerators.operator is now a public function
92a2b26operator in TOC, corrected docstring
9029a07Fixed doctest for operator
e1bd1dfMerge branch 'fsm/count_subblock_occurrences' into fsm/operator_transducers
3110f9dEdit doctests due to #16132 change.
fdd778cgenerators.operator: final state state
f344fd8reviewer patch: improved function operator; extended and rewrote docstrings
138132fMerge remote-tracking branch 'origin/u/dkrenn/fsm/operator_transducers' into fsm/example_gray_code-on-beta8

comment:8 Changed 6 years ago by cheuberg

  • Dependencies changed from #16141 to #16132, #16141

comment:9 Changed 6 years ago by cheuberg

  • Branch changed from u/dkrenn/fsm/operator_transducers-on-beta8 to u/cheuberg/fsm/operator_transducers-on-beta8

comment:10 Changed 6 years ago by cheuberg

  • Commit changed from 138132feb53498cffca9f9745705d7a33b7f4827 to 1ae96e6c7d85ea45e1784c20c885c8acb0a1e782

cross reviewed your changes,fine with me, but added five small modifications in a few commits, please review again.


Last 10 new commits:

e1bd1dfMerge branch 'fsm/count_subblock_occurrences' into fsm/operator_transducers
3110f9dEdit doctests due to #16132 change.
fdd778cgenerators.operator: final state state
f344fd8reviewer patch: improved function operator; extended and rewrote docstrings
138132fMerge remote-tracking branch 'origin/u/dkrenn/fsm/operator_transducers' into fsm/example_gray_code-on-beta8
1fdedc5Remove superfluous line break in docstring
ef44f58replace lambda i: abs(i) by abs
2695293compare with buit-in abs
b1e7858link to builtin method .add
1ae96e6three modified docstrings

comment:11 Changed 6 years ago by git

  • Commit changed from 1ae96e6c7d85ea45e1784c20c885c8acb0a1e782 to a5087f259943b668dddd8cc23decb23568012be8

Branch pushed to git repo; I updated commit sha1. New commits:

a5087f2finite_state_machine_generators: acknowledge research grant

comment:12 Changed 5 years ago by dkrenn

  • Status changed from needs_review to positive_review

reviewed again, everything is fine :)

comment:13 Changed 5 years ago by vbraun

  • Branch changed from u/cheuberg/fsm/operator_transducers-on-beta8 to a5087f259943b668dddd8cc23decb23568012be8
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.