monotone

monotone Mtn Source Tree

Root/lcs.hh

1#ifndef __LCS_HH__
2#define __LCS_HH__
3
4// Copyright (C) 2002 Graydon Hoare <graydon@pobox.com>
5//
6// This program is made available under the GNU GPL version 2.0 or
7// greater. See the accompanying file COPYING for details.
8//
9// This program is distributed WITHOUT ANY WARRANTY; without even the
10// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11// PURPOSE.
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 long p_lim,
23 std::back_insert_iterator< std::vector<long, QA(long)> > lcs);
24
25void
26edit_script(std::vector<long, QA(long)>::const_iterator begin_a,
27 std::vector<long, QA(long)>::const_iterator end_a,
28 std::vector<long, QA(long)>::const_iterator begin_b,
29 std::vector<long, QA(long)>::const_iterator end_b,
30 long p_lim,
31 std::vector<long, QA(long)> & edits_out);
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:
40
41#endif // __LCS_HH__

Archive Download this file

Branches

Tags

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