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:  sage6.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
 Status changed from new to needs_review
comment:2 Changed 6 years ago by
 Commit changed from 3110f9d53c199521168ed8b2df193c94ac3e8c88 to fdd778c80bc3c25f681ca05afc31c1a6117096fd
comment:3 Changed 6 years ago by
 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:
547968a  FiniteStateMachine.product_FiniteStateMachine, composition: fix unhashable colors

d51be51  Automaton.determinisation(): docstring on hashable colors

c5dd860  Merge branch 'fsm/state_color' into fsm/process_output_new

70294bf  trac ticket number added

4a53b09  Merge branch '#16132' into fsm/count_subblock_occurrences

5d65767  Edit doctests due to #16132 change.

e1bd1df  Merge branch 'fsm/count_subblock_occurrences' into fsm/operator_transducers

3110f9d  Edit doctests due to #16132 change.

fdd778c  generators.operator: final state state

f344fd8  reviewer patch: improved function operator; extended and rewrote docstrings

comment:4 Changed 6 years ago by
 Dependencies set to #16141
comment:5 Changed 6 years ago by
 Branch changed from u/dkrenn/fsm/operator_transducers to u/dkrenn/fsm/operator_transducersonbeta8
 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:
70294bf  trac ticket number added

ed93dd3  Minor changes during review.

3820c49  corrected whitespaceerror

a14dd81  Merge remotetracking branch 'origin/u/dkrenn/ticket/16132' into fsm/process_output_newonbeta8

be59e47  TransducerGenerators: New class, collecting common transducers

7a907ac  minor corrections

4a53b09  Merge branch '#16132' into fsm/count_subblock_occurrences

5d65767  Edit doctests due to #16132 change.

86f8452  improved various docstrings in finite_state_machine_generators.py

4a36b1a  Merge remotetracking branch 'origin/u/dkrenn/fsm/count_subblock_occurrences' into fsm/count_subblock_occurrencesonbeta8

comment:6 Changed 6 years ago by
 Commit changed from 4a36b1af5a9ec87a2fc9eae8c92aef21414cd80b to 138132feb53498cffca9f9745705d7a33b7f4827
Branch pushed to git repo; I updated commit sha1. New commits:
973d4d3  transducers.add, transducers.sub: New transducers

86be453  generators.abs: new common Transducer: absolute Value

fdf3dc4  TransducerGenerators.operator is now a public function

92a2b26  operator in TOC, corrected docstring

9029a07  Fixed doctest for operator

e1bd1df  Merge branch 'fsm/count_subblock_occurrences' into fsm/operator_transducers

3110f9d  Edit doctests due to #16132 change.

fdd778c  generators.operator: final state state

f344fd8  reviewer patch: improved function operator; extended and rewrote docstrings

138132f  Merge remotetracking branch 'origin/u/dkrenn/fsm/operator_transducers' into fsm/example_gray_codeonbeta8

comment:7 Changed 6 years ago by
Last 10 new commits:
973d4d3  transducers.add, transducers.sub: New transducers

86be453  generators.abs: new common Transducer: absolute Value

fdf3dc4  TransducerGenerators.operator is now a public function

92a2b26  operator in TOC, corrected docstring

9029a07  Fixed doctest for operator

e1bd1df  Merge branch 'fsm/count_subblock_occurrences' into fsm/operator_transducers

3110f9d  Edit doctests due to #16132 change.

fdd778c  generators.operator: final state state

f344fd8  reviewer patch: improved function operator; extended and rewrote docstrings

138132f  Merge remotetracking branch 'origin/u/dkrenn/fsm/operator_transducers' into fsm/example_gray_codeonbeta8

Last 10 new commits:
973d4d3  transducers.add, transducers.sub: New transducers

86be453  generators.abs: new common Transducer: absolute Value

fdf3dc4  TransducerGenerators.operator is now a public function

92a2b26  operator in TOC, corrected docstring

9029a07  Fixed doctest for operator

e1bd1df  Merge branch 'fsm/count_subblock_occurrences' into fsm/operator_transducers

3110f9d  Edit doctests due to #16132 change.

fdd778c  generators.operator: final state state

f344fd8  reviewer patch: improved function operator; extended and rewrote docstrings

138132f  Merge remotetracking branch 'origin/u/dkrenn/fsm/operator_transducers' into fsm/example_gray_codeonbeta8

comment:8 Changed 6 years ago by
 Dependencies changed from #16141 to #16132, #16141
comment:9 Changed 6 years ago by
 Branch changed from u/dkrenn/fsm/operator_transducersonbeta8 to u/cheuberg/fsm/operator_transducersonbeta8
comment:10 Changed 6 years ago by
 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:
e1bd1df  Merge branch 'fsm/count_subblock_occurrences' into fsm/operator_transducers

3110f9d  Edit doctests due to #16132 change.

fdd778c  generators.operator: final state state

f344fd8  reviewer patch: improved function operator; extended and rewrote docstrings

138132f  Merge remotetracking branch 'origin/u/dkrenn/fsm/operator_transducers' into fsm/example_gray_codeonbeta8

1fdedc5  Remove superfluous line break in docstring

ef44f58  replace lambda i: abs(i) by abs

2695293  compare with buitin abs

b1e7858  link to builtin method .add

1ae96e6  three modified docstrings

comment:11 Changed 6 years ago by
 Commit changed from 1ae96e6c7d85ea45e1784c20c885c8acb0a1e782 to a5087f259943b668dddd8cc23decb23568012be8
Branch pushed to git repo; I updated commit sha1. New commits:
a5087f2  finite_state_machine_generators: acknowledge research grant

comment:12 Changed 5 years ago by
 Status changed from needs_review to positive_review
reviewed again, everything is fine :)
comment:13 Changed 5 years ago by
 Branch changed from u/cheuberg/fsm/operator_transducersonbeta8 to a5087f259943b668dddd8cc23decb23568012be8
 Resolution set to fixed
 Status changed from positive_review to closed
Branch pushed to git repo; I updated commit sha1. New commits:
generators.operator: final state state