Skip to content
  • Akim Demaille's avatar
    algos: compare · 0e7d978b
    Akim Demaille authored
    Stop exposing `less_than` and `are_equal` for automata and expressions
    in dyn: rather, expose only `compare` and let the layers on top of dyn
    deals with adding sugar.
    
    The reason is simple: avoid additional precompilations for trivial
    algorithms.
    
    * vcsn/algos/compare-automaton.hh, vcsn/algos/compare-expression.hh
    (less_than, are_equal): Remove the bridges.
    (compare): New bridges.
    * vcsn/dyn/algos.hh (compare): New.
    * vcsn/dyn/algos.hxx: New, providing `less_than` and `are_equal` as thin
    layers on top of `compare`.
    * vcsn/ctx/instantiate.hh: Adjust.
    
    * python/vcsn_cxx.cc: Bind only `compare`, not `less_than` and `is_equal`.
    * python/vcsn/automaton.py, python/vcsn/expression.py: Use then to
    define __lt__ and the like.
    * tests/python/less-than.py: Check them.
    0e7d978b
To find the state of this project's repository at the time of any of these versions, check out the tags.