Documentation ¶
Index ¶
- Variables
- func Bools(a, b []bool) int
- func Distance(v Interface) int
- func DistanceCosts(v Interface, cs Costs) int
- func MakeMatrix(v Interface, cs Costs) [][]int
- func PrintableMatrix(cs Costs, a, b []rune, prefix string) string
- func Recursive(v Interface) int
- func Runes(a, b []rune) int
- func Strings(a, b string) int
- type BoolSlices
- type Costs
- type Interface
- type RuneSlices
- type StringSlices
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultCosts = Costs{
InsCost: 1,
DelCost: 1,
SubCost: 1,
}
Functions ¶
func DistanceCosts ¶
func MakeMatrix ¶
Types ¶
type BoolSlices ¶
type BoolSlices [2][]bool
------------------------------------------------------------------------------
func (BoolSlices) Lens ¶
func (p BoolSlices) Lens() (ni, nj int)
func (BoolSlices) Match ¶
func (p BoolSlices) Match(i, j int) bool
type Costs ¶
type Costs struct { DelCost int // Delete cost InsCost int // Insert cost SubCost int // Substitution cost }
Weights
type RuneSlices ¶
type RuneSlices [2][]rune
------------------------------------------------------------------------------
func (RuneSlices) Lens ¶
func (p RuneSlices) Lens() (ni, nj int)
func (RuneSlices) Match ¶
func (p RuneSlices) Match(i, j int) bool
type StringSlices ¶
type StringSlices [2][]string
------------------------------------------------------------------------------
func (StringSlices) Lens ¶
func (p StringSlices) Lens() (ni, nj int)
func (StringSlices) Match ¶
func (p StringSlices) Match(i, j int) bool
Source Files ¶
Click to show internal directories.
Click to hide internal directories.