Opened 8 years ago

Closed 8 years ago

#16666 closed enhancement (fixed)

Extend FiniteStateMachine.product_FiniteStateMachine and Transducer.cartesian_product to products of more than two machines

Reported by: cheuberg Owned by:
Priority: minor Milestone: sage-6.3
Component: finite state machines Keywords: finite_state_machine, product
Cc: skropf, dkrenn Merged in:
Authors: Clemens Heuberger Reviewers: Daniel Krenn
Report Upstream: N/A Work issues:
Branch: 45aa114 (Commits, GitHub, GitLab) Commit: 45aa114d143cc0f149302d50d0fcb872d7f7715f
Dependencies: Stopgaps:

Status badges


Previously, FiniteStateMachine.product_FiniteStateMachine and Transducer.cartesian_product were products of two finite state machines self and other, i.e., a product of two machines.

We now allow other to be a list of machines such that products of several machines can now be computed.

That would have been possible before by successive products, but the outcome would have been nested pairs, which would then have required some post-processing.

As a use case, think about looking for occurrences of several blocks (using transducers.CountSubblockOccurrences) simultaneously.

Change History (4)

comment:1 Changed 8 years ago by cheuberg

  • Status changed from new to needs_review

comment:2 Changed 8 years ago by dkrenn

  • Branch changed from u/cheuberg/fsm/product_fsm_multiple to u/dkrenn/fsm/product_fsm_multiple

comment:3 Changed 8 years ago by dkrenn

  • Commit changed from 865b3865be85f6ca6c835f1e8f8b7b43d9b4531e to 45aa114d143cc0f149302d50d0fcb872d7f7715f
  • Reviewers set to Daniel Krenn
  • Status changed from needs_review to positive_review

Patch is fine. Made two minor changes (spacing, ``...``) in docu.

New commits:

45aa114one spacing, one ``...`` in docu

comment:4 Changed 8 years ago by vbraun

  • Branch changed from u/dkrenn/fsm/product_fsm_multiple to 45aa114d143cc0f149302d50d0fcb872d7f7715f
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.