hirschberg

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(hybrid internal.Algorithm, length int, useReduce bool) internal.Algorithm

New creates a new Hirschberg diff algorithm (https://en.wikipedia.org/wiki/Hirschberg%27s_algorithm)

This allows for an optional diff (usually Wagner) to use when possible to hybrid the algorithm, to not use the optional diff pass in nil. The hybrid is used if it has enough memory preallocated, NoResizeNeeded returns true, otherwise Hirschberg will continue to divide the space until the hybrid can be used without causing it to reallocate memory.

The given length is the initial score vector size. If the vector is too small it will be reallocated to the larger size. Use -1 to not preallocate the vectors.

The useReduce flag indicates if the equal padding edges should be checked at each step of the algorithm or not.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL