Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- GT_LIB v1.0 Reference Guide Release 1.0 - <b>alter the costing of the various operations for gt_levdist()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Alter the costing of the various operations for GT_LevDist()
------------------------------------------------------------------------------

 Syntax

         GT_LevCost(<aCosts>) --> aOldCosts

 Arguments:

       <aCosts>    -  An array of operation costs
                          aCosts[1] == cost of insertion
                          aCosts[2] == cost of deletion
                          aCosts[3] == cost of substitution

 Returns:

       aOldCosts   -  The old set of operation costs

 Description:

       Alter the costing of the various operations for GT_LevDist()

       For  some  applications  of  Levenshtein  distances  it is
       important to  alter the  cost of  the various  operations.
       For  example  if  analysing  DNA  insertions and deletions
       should  be  more  costly  than  substitutions.  However if
       trying to write voice recognition software the reverse  is
       true (sounds often vary in length)

       REFERENCE
       Doctor Dobb's Journal #187, April 1992

       IMPROVEMENTS
       The  main  improvements  in  this  routine will be made by
       introducing a more complex operation costing.

       ie. have three matrices that record the cost of adding  or
           deleting  a  specific   letter,  and  substituting   a
           specified letter with another.

       More improvements can be achieved  but at the loss of  the
       general purpose of the routine.

       This is left as an exercise for the foolhardy or brave.

 Examples:

 Source: LEVCOST.PRG

 Author:  Andy M Leighton

See Also: GT_LEVDIST()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson