Is there a priority queue implementation in ATS? [closed] - ats

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I need to do some sort of priority-based search. Could someone point me to a priority queue implementation in ATS?

You can readily base a priority queue on a binomial heap.
There are two implementations of binomial heaps in ATS. Here are some use-cases:
https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/ATSLIB/libats_linheap_binomial.dats
https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/ATSLIB/libats_linheap_binomial2.dats

I came up with some unsafe C-based max-heap (based on somebody else's gist). I think that it does show that interfacing with C code in ATS, while generally unsafe, is very easy to do.
See the full sample at Glot.io
EDIT: here's another implementation, this time in ATS. It's a bit of a hassle to use, though (too many indexes in the type!), but the key salient feature of this code is that it is type-safe while also being extremely close to a typical C implementation in terms of runtime behavior.

Related

A book that contains, Shor's algorithm, McEliece cryptosystem, Lattice-based cryptography, Discrete logarithm [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am looking for a book that contains descriptions of the topics: Shor's algorithm, McEliece cryptosystem, Lattice-based cryptography, Discrete logarithm; and possibly others.
Does anyone know a single book or a few that would contain there topics?
There is "Post-Quantum Cryptography" published by Daniel J. Bernstein. The book is more of a general overview and doesn't go that far into details.
It contains sections about lattice based, hash based and code based cryptography.
Shor's algorithm as well as discrete logarithm aren't handled in depth, but there is a general overview.
I think the best way to get into the details is by studying the respective scientific papers.

Where is a good place to learn data structures? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am interested in learning data structures. Where should I learn them?
I have looked around Coursera but not sure if I will understand them.
I am also interested in data structures. It is a good part of CS to learn after Python or Java or C++ (a recommendation of many).
A good place would be UDemy. It has great instructors and nice courses.
The best way to master data structures is practice. Just take problems,
Step 1. try it on your own
Step 2. if you are unable to get it, see the solution
Step 3. try to write code to it.
Step 4. If you still face problems, see the code,trace it. Write on
your own.
References to Data Structures and Algorithms Problems:
1.<http://geeksforgeeks.org>
2.<http://leetcode.com>
3.<https://codechef.com>

Looking for Connected Component Labelling algorithm implementation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am looking for an optimized 4-connectivity or 8-connectivity Connected Component Labelling source code in MATLAB or C++. I saw many implementation of connected component labelling (4-connectivity) in MATLAB.
One of the implementations that works faster is the recursive implementation explained here: http://www.mathworks.com/matlabcentral/fileexchange/38010-connected-component-labeling-like-bwlabel
MATLAB has a built-in bwlabeln or bwlabel, which is far more optimized. They claim to use union-find method from two-pass algorithm described in Sedgewick's Algorithms in C, Addison-Wesley. However, it is hard to find any source code of it. Does anyone have idea about it? An optimized code is really needed.
You can indeed work by scanning the image in scanline order and when you meet a component seed-fill it.
You will find two efficient (and very similar) algorithms in Graphics GEMS 1:
A SEED FILL ALGORITHM, Paul S. Heckbert
FILLING A REGION IN A FRAME BUFFER, Ken Fishkin
and with a little effort some implementations. (The papers give Pascal-like code which is easy to translate.)
They run in linear time, use an explicit stack and don't require union-find.

Hashmap data structure in CUDA [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am looking for a high performance data structure on GPU (preferably over CUDA). The CUDPP is something cool but it does not satisfy my requirements because I want my key to be fixed size int array. I need to query 10k+ queries per second over a KEY-VALUE store of size 1M+. Is there any library already providing such type of functionality. I tried alternates on CPU but they are not that good for the purpose.
I haven't used it, though I have heard about a hashmap extension for CUDA Thrust. Present here:
Cuda-thrust-extensions library

Has anybody used a proof assistant to prove soundness of a typed process calculus? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
...And have they published the results where I can afford to read them?
There are several people doing things along those lines. Look through the papers at John Rushbie's PVS site, and look at Coq's papers.
Searching Citeseer will probably do some good too — almost everyone nowadays publishes their preprints to Citeseer, so a little looking around will usually get you the same paper, or something very very similar to the paper published in the expensive journal.
Ah, there is a proof of soundness for the process calculus underlying the Pict programming language in David N.Turner's thesis.
The Archive of Formal Proofs has several entries in the category "Process Calculi" listed in its topics, such as CCS and Pi Calculus.

Resources