DR3D1A, [DR3D1B, DR3D1C]

These functions use a three-role comparison and three-dimensional weight (wgt3dim) table.

Note: DR1D1B/C, DR2D1B/C, DR3D1B/C, DR4D1B/C accept 1, 2, 3, and 4 parameters which specify the maximum edit distance for each role. For example, if the parameters are 4, 5, 6 for DR3D1C and if the edit distance for role 1 is greater than 4, it is truncated to 4.
Number of roles
3
Number of dimensions
(in each role)
1
Weight table
mpi_wgthead, mpi_wgt3dim

If you use ZIP code, Address and Phone for comparison, you can use the three-dimensional edit-distance functions and refer to the wgt3dim weight table.

If the ZIP code returns a distance of 3, Address returns 2 and Phone returns 0, the value for (3,2,0) is looked up in the wgt3dim table.

This means that the ZIP code has an edit-distance of 2, Address has an edit-distance of 1, and Phone is missing. Remember, the lookup always adds 1 to the edit distance values.

Reading a 3dim table

Table 1. A sample 3dim table
Wgtcode wgtidx1 wgtidx2 wgtval0 wgtval1 wgtval2
CMPC-ZAP-DIST 0 0 0 334 332...
CMPC-ZAP-DIST 0 1 232 221 220...
….          
CMPC-ZAP-DIST 3(*) 0 101 100 99…
CMPC-ZAP-DIST 3(*) 1(#) 100 99 97
CMPC-ZAP-DIST 3(*) 2 99 98 …..

An edit distance of (2,0,1) for ZIP code, Address, and Phone refers to an index of (3,1,2).

In the 3-dim table, find the first index 3 in the wgtidx1 column(*). Within this index 3, find the value 1 in the second column wgtidx2(#). To get the last index 2, move along this same row until the column with wgtval2 is reached. The value in this column is the weight (in this case, 97).