monotone

monotone Mtn Source Tree

Root/src/lcs.hh

1// Copyright (C) 2002 Graydon Hoare <graydon@pobox.com>
2//
3// This program is made available under the GNU GPL version 2.0 or
4// greater. See the accompanying file COPYING for details.
5//
6// This program is distributed WITHOUT ANY WARRANTY; without even the
7// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8// PURPOSE.
9
10#ifndef __LCS_HH__
11#define __LCS_HH__
12
13#include <iterator>
14#include "vector.hh"
15#include "quick_alloc.hh"
16
17void
18longest_common_subsequence(std::vector<long, QA(long)>::const_iterator begin_a,
19 std::vector<long, QA(long)>::const_iterator end_a,
20 std::vector<long, QA(long)>::const_iterator begin_b,
21 std::vector<long, QA(long)>::const_iterator end_b,
22 std::back_insert_iterator< std::vector<long, QA(long)> > lcs);
23
24void
25edit_script(std::vector<long, QA(long)>::const_iterator begin_a,
26 std::vector<long, QA(long)>::const_iterator end_a,
27 std::vector<long, QA(long)>::const_iterator begin_b,
28 std::vector<long, QA(long)>::const_iterator end_b,
29 std::vector<long, QA(long)> & edits_out);
30
31#endif // __LCS_HH__
32
33// Local Variables:
34// mode: C++
35// fill-column: 76
36// c-file-style: "gnu"
37// indent-tabs-mode: nil
38// End:
39// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status