| 1 | #cxx . . $ `<file>/dwtools/EditDistanceTable.h`/ifndef _EditDistanceTable_h_ |
| 2 | #define _EditDistanceTable_h_cxx . . $ `dwtools/EditDistanceTable.h:2:9`! |
| 3 | /* EditDistanceTable.h |
| 4 | * |
| 5 | * Copyright (C) 2012,2015-2017 David Weenink, 2025 Paul Boersma |
| 6 | * |
| 7 | * This code is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 3 of the License, or (at |
| 10 | * your option) any later version. |
| 11 | * |
| 12 | * This code is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | |
| 21 | #include "Strings_extensions.h"cxx . . $ `<file>/dwtools/Strings_extensions.h`/ |
| 22 | #include "TableOfReal.h"cxx . . $ `<file>/stat/TableOfReal.h`/ |
| 23 | |
| 24 | #define WARPING_fromLeftcxx . . $ `dwtools/EditDistanceTable.h:24:9`! 1 |
| 25 | #define WARPING_fromBelowcxx . . $ `dwtools/EditDistanceTable.h:25:9`! 2 |
| 26 | #define WARPING_fromDiagcxx . . $ `dwtools/EditDistanceTable.h:26:9`! 4 |
| 27 | |
| 28 | #include "EditDistanceTable_def.h"cxx . . $ `<file>/dwtools/EditDistanceTable_def.h`/ |
| 29 | |
| 30 | autoEditCostsTablecxx . . $ autoEditCostsTable# EditCostsTable_createcxx . . $ EditCostsTable_create(ffc855aaf21339ed). (integercxx . . $ integer# targetAlphabetSize, integercxx . . $ integer# sourceAlphabetSize); |
| 31 | /* |
| 32 | The insertion, deletion and substitution costs are specified in this table |
| 33 | 1..n-2 target symbols (target alphabet) |
| 34 | 1..m-2 source symbols (source alphabet) |
| 35 | row n-1 and col m-1 specify no-match symbols |
| 36 | cells [n] [1..m-1] specify insertion costs |
| 37 | cells [1..n-1] [m] specify deletion costs |
| 38 | cell [n-1] [m-1] no-match target == no-match source |
| 39 | cell [n] [m] no-match target != no-match source |
| 40 | */ |
| 41 | |
| 42 | void EditCostsTable_setDefaultCostscxx . . $ EditCostsTable_setDefaultCosts(ee656dafc0cf1553). (EditCostsTablecxx . . $ EditCostsTable# me, double insertionCosts, double deletionCosts, double substitutionCosts); |
| 43 | |
| 44 | integercxx . . $ integer# EditCostsTable_getTargetIndexcxx . . $ EditCostsTable_getTargetIndex(926aef4380384090). (EditCostsTablecxx . . $ EditCostsTable# me, conststring32cxx . . $ conststring32# symbol); |
| 45 | |
| 46 | integercxx . . $ integer# EditCostsTable_getSourceIndexcxx . . $ EditCostsTable_getSourceIndex(926aef4380384090). (EditCostsTablecxx . . $ EditCostsTable# me, conststring32cxx . . $ conststring32# symbol); |
| 47 | |
| 48 | double EditCostsTable_getInsertionCostcxx . . $ EditCostsTable_getInsertionCost(fbdb87be0d9cf51f). (EditCostsTablecxx . . $ EditCostsTable# me, conststring32cxx . . $ conststring32# symbol); |
| 49 | |
| 50 | void EditCostsTable_setInsertionCostscxx . . $ EditCostsTable_setInsertionCosts(153dee49473c418e). (EditCostsTablecxx . . $ EditCostsTable# me, conststring32cxx . . $ conststring32# targets, double cost); |
| 51 | |
| 52 | void EditCostsTable_setOthersCostscxx . . $ EditCostsTable_setOthersCosts(1a0fa8b55fd2cd2e). (EditCostsTablecxx . . $ EditCostsTable# me, double insertionCosts, double deletionCost, double substitutionCost_equal, double substitutionCost_unequal); |
| 53 | |
| 54 | double EditCostsTable_getOthersCostcxx . . $ EditCostsTable_getOthersCost(f899f17700254801). (EditCostsTablecxx . . $ EditCostsTable# me, int type); |
| 55 | |
| 56 | double EditCostsTable_getDeletionCostcxx . . $ EditCostsTable_getDeletionCost(fbdb87be0d9cf51f). (EditCostsTablecxx . . $ EditCostsTable# me, conststring32cxx . . $ conststring32# symbol); |
| 57 | |
| 58 | void EditCostsTable_setDeletionCostscxx . . $ EditCostsTable_setDeletionCosts(153dee49473c418e). (EditCostsTablecxx . . $ EditCostsTable# me, conststring32cxx . . $ conststring32# sources, double cost); |
| 59 | |
| 60 | double EditCostsTable_getSubstitutionCostcxx . . $ EditCostsTable_getSubstitutionCost(6f9442b9cfe3c120). (EditCostsTablecxx . . $ EditCostsTable# me, conststring32cxx . . $ conststring32# symbol, conststring32cxx . . $ conststring32# replacement); |
| 61 | |
| 62 | void EditCostsTable_setSubstitutionCostscxx . . $ EditCostsTable_setSubstitutionCosts(e334a315e33a476b). (EditCostsTablecxx . . $ EditCostsTable# me, conststring32cxx . . $ conststring32# targets, conststring32cxx . . $ conststring32# sources, double cost); |
| 63 | |
| 64 | autoTableOfRealcxx . . $ autoTableOfReal# EditCostsTable_to_TableOfRealcxx . . $ EditCostsTable_to_TableOfReal(af89b4e4b58c938a). (EditCostsTablecxx . . $ EditCostsTable# me); |
| 65 | |
| 66 | |
| 67 | autoEditDistanceTablecxx . . $ autoEditDistanceTable# EditDistanceTable_createcxx . . $ EditDistanceTable_create(4d283d556de37bde). (Stringscxx . . $ Strings# target, Stringscxx . . $ Strings# source); |
| 68 | |
| 69 | autoEditDistanceTablecxx . . $ autoEditDistanceTable# EditDistanceTable_createFromCharacterStringscxx . . $ EditDistanceTable_createFromCharacterStrings(9971b309185bfbf5). (const char32cxx . . $ char32# chars1 [], const char32cxx . . $ char32# chars2 []); |
| 70 | |
| 71 | void EditDistanceTable_drawcxx . . $ EditDistanceTable_draw(8a1d0b63098eba91). (EditDistanceTablecxx . . $ EditDistanceTable# me, Graphicscxx . . $ Graphics# graphics, int iformat, int precision, double angle); |
| 72 | |
| 73 | void EditDistanceTable_drawEditOperationscxx . . $ EditDistanceTable_drawEditOperations(f31b7533fcbdd08c). (EditDistanceTablecxx . . $ EditDistanceTable# me, Graphicscxx . . $ Graphics# graphics); |
| 74 | |
| 75 | void EditDistanceTable_setDefaultCostscxx . . $ EditDistanceTable_setDefaultCosts(3e96d30eecc5450e). (EditDistanceTablecxx . . $ EditDistanceTable# me, double insertionCosts, double deletionCosts, double substitutionCosts); |
| 76 | |
| 77 | void EditDistanceTable_findPathcxx . . $ EditDistanceTable_findPath(131af2e6037a1b10). (EditDistanceTablecxx . . $ EditDistanceTable# me, autoTableOfRealcxx . . $ autoTableOfReal# *directions); |
| 78 | |
| 79 | void EditDistanceTable_setEditCostscxx . . $ EditDistanceTable_setEditCosts(5b836fafd8690370). (EditDistanceTablecxx . . $ EditDistanceTable# me, EditCostsTablecxx . . $ EditCostsTable# thee); |
| 80 | |
| 81 | autoTableOfRealcxx . . $ autoTableOfReal# EditDistanceTable_to_TableOfReal_directionscxx . . $ EditDistanceTable_to_TableOfReal_directions(dbff689baef0b330). (EditDistanceTablecxx . . $ EditDistanceTable# me); |
| 82 | |
| 83 | autoTableOfRealcxx . . $ autoTableOfReal# EditDistanceTable_to_TableOfRealcxx . . $ EditDistanceTable_to_TableOfReal(dbff689baef0b330). (EditDistanceTablecxx . . $ EditDistanceTable# me); |
| 84 | |
| 85 | #endif /* _EditDistanceTable_h_ */ |