Skip to contents

Individual distances are based on kanjidist.

Usage

kanjidistmat(
  klist,
  klist2 = NULL,
  compo_seg_depth = 3,
  p = 1,
  C = 0.2,
  approx = c("grid", "pc", "pcweighted"),
  type = c("rtt", "unbalanced", "balanced"),
  size = 48,
  lwd = 2.5,
  density = 30,
  verbose = FALSE
)

Arguments

klist

a list of kanjimat objects.

klist2

an optional second list of kanjimat objects.

compo_seg_depth

integer \(\geq 1\). Specifies for all kanji the deepest level included for component matching. If 1, only the kanji itself is used.

p, C, type, approx, size, lwd, density, verbose

the same as for the function kanjidist.

Value

A matrix of dimension length(klist) x length(klist2) having as its \((i,j)\)-th entry the distance between klist[[i]] and klist2[[j]]. If klist2 is not provided it is assumed to be equal to klist, but computation is more efficient as only the upper triangular part is computed and then symmetrized with diagonal zero.

Warning

[Experimental]
The same precautions apply as for kanjidist.

Examples

# \donttest{
kanjidistmat(fivebetas)
#>            [,1]       [,2]       [,3]      [,4]       [,5]
#> [1,] 0.00000000 0.15094547 0.07293262 0.1636467 0.20118739
#> [2,] 0.15094547 0.00000000 0.12190813 0.1880648 0.06598192
#> [3,] 0.07293262 0.12190813 0.00000000 0.1941102 0.17341509
#> [4,] 0.16364669 0.18806484 0.19411024 0.0000000 0.17756932
#> [5,] 0.20118739 0.06598192 0.17341509 0.1775693 0.00000000
# }