Code Monkey home page Code Monkey logo

patl's People

Stargazers

 avatar

Watchers

 avatar  avatar

patl's Issues

levenshtein_distance bug on vector

What steps will reproduce the problem?
1. use std::vector<int> for uxn::patl::levenshtein_distance
2. vector1: add vector1.resize(9,2). lookup: vector2: 1. vector2.resize(9,2) 
and vector2.resize(32, 4).
3. lookup vector2 with distance = 10.


What is the expected output? What do you see instead?
expected: not found.
output: found with distance = 14757395258967641292. (looks like uninit)

What version of the product are you using? On what operating system?
version129

Please provide any additional information below.
Looks like uninit.
Also, If I use std::string, std::wstring. It's working properly.

Original issue reported on code.google.com by [email protected] on 21 Feb 2012 at 2:51

problems while building trie_set with std::wstring

Hi,

first of all thanks a lot for a great library!

I have a build problem on MS VS 2005 for the following code:

typedef patl::trie_set<std::wstring> Wstring_set;
typedef patl::levenshtein_distance<Wstring_set, true> Leven_dist;
Wstring_set dict; 

^-- this line gives template instantiation error in debug build which
happens algorithm_generic::compact():

    word_t compact() const
    {
        return
#ifdef PATL_ALIGNHACK
            qq_;
#else
            qid_ | q_; <- here it fails, presumably because qid_ and q_
have incompatible types (int and pointer?)
#endif
    }

With PATL_ALIGNHACK it works fine. I didn't try it with anything else than
wstring so I don't know if this is wstring-specific.

Original issue reported on code.google.com by [email protected] on 18 Jul 2009 at 8:39

levenshtein iter run-time assertion

insider.cpp demo causes a run-time assertion: 'vector subscript out of range'
(MSVC 9)

on this line in insider.cpp:
        StringSet::const_partimator<leven_dist>
            it = test1.begin(ld),
            itEnd = test1.end(ld);
here in partial_base.hpp:
            // sort & remove duplicates
            std::sort(
                &states_[current_end],
                &states_[states_.size()]);

Original issue reported on code.google.com by theli.ua on 6 Sep 2010 at 8:32

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.