Ignore:
Timestamp:
Sep 13, 2007, 9:36:50 PM (14 years ago)
Author:
Peter
Message:

adding function doing a SSEARCH between two strings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/Alignment.cc

    r865 r867  
    3333namespace yat {
    3434namespace utility {
     35
     36  unsigned int ssearch(std::string first, std::string second)
     37  {
     38    matrix m(first.size(), second.size());
     39    for (size_t i=0; i<first.size(); ++i)
     40      for (size_t j=0; j<second.size(); ++j)
     41        m(i,j) = (first[i]==second[j] ? 1 : 0);
     42    std::vector<std::pair<size_t, size_t> > path;
     43    return static_cast<unsigned int>(NeedlemanWunsch(m,path,0));
     44  }
     45
    3546
    3647  double NeedlemanWunsch(const utility::matrix& s,
Note: See TracChangeset for help on using the changeset viewer.