Giter VIP home page Giter VIP logo

haydi's People

Contributors

gavento avatar kobzol avatar msurkovsky avatar spirali avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

haydi's Issues

test_parallel.py::test_too_many_splits pass with an exception

A problem still prevails in tests: after py.test -v

... SNIP
test_parallel.py::test_too_many_splits PASSEDTraceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/queues.py", line 268, in _feed

test_parallel.py::test_parallel_take     send(obj)
IOError: [Errno 32] Broken pipe
PASSED
... SNIP

Bug: BFS compute in LTS

Does using xrange in this peace of code for i in xrange(self.actions_size): any sense? Why not to use actions directly: for action in self.actions? Because it stop works when the actions are not numbers.

Filters directly on domains.

It could be useful to have a possibility to filter values directly on domains.

states = qit.Range(N)
actions = qit.Range(M)
delta = qit.Mapping(states * actions, states)
final_states = qit.Mapping(states, qit.Range(2)).filter(
    lambda mapping: any(map(lambda (k, v): v == 1, mapping.iteritems())))

# now I can use it as follows and dont care about filtering values
fa = states * final_states * delta
fa.iterate() ...

Iterable basictypes

Is there any reason why haydi's basic types like set/map are not iterable?

Named domains

Having a possibility to use names for product elements.

a = qit.Range(3)
b = qit.Range(10)
c = ("a", a) * ("b", b)

# possible access
c.a
c["a"]

Maybe all of the domains could be named. e.g.

a = qit.Range(3, "a")
b = qit.Range(10, "b")
c = a * b;

# `c` elements can be accessed in the same way.

If the names were propagated everywhere, the functions like is_witness_pair from the example could look nicer:

def is_witness_pair (conf_depth_pair):
  c1 = conf_depth_pair.dpda1.stack_size
  c2 = conf_depth_pair.dpda2.stack_size

such code is much readable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.