| 1 | #cxx . . $ `<file>/dwsys/Index.h`/ifndef _Index_h_ |
| 2 | #define _Index_h_cxx . . $ `dwsys/Index.h:2:9`! |
| 3 | /* Index.h |
| 4 | * |
| 5 | * Copyright (C) 2005-2022 David Weenink |
| 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 2 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 "Collection.h"cxx . . $ `<file>/sys/Collection.h`/ |
| 22 | #include "NUM2.h"cxx . . $ `<file>/dwsys/NUM2.h`/ |
| 23 | #include "Strings_.h"cxx . . $ `<file>/sys/Strings_.h`/ |
| 24 | |
| 25 | #include "Index_def.h"cxx . . $ `<file>/dwsys/Index_def.h`/ |
| 26 | |
| 27 | |
| 28 | /* |
| 29 | An Index is a summary of an array of strings. |
| 30 | It has two parts: |
| 31 | 1 an OrderedSet of the different string classes that occur |
| 32 | 2 an item array with indexes in this OrderedSet |
| 33 | Example: |
| 34 | Suppose we have a Strings with 7 elements/items "u", "o", "a", "u", "u", "o", "a" |
| 35 | The Index derived from this Strings will have 3 elements in its sorted set "a", "o" and "u" |
| 36 | The item array with indices will have the following content: 3, 2, 1, 3, 3, 2, 1 |
| 37 | */ |
| 38 | |
| 39 | void Index_initcxx . . $ Index_init(f051bb8a01cef585). (Indexcxx . . $ Index# me, integercxx . . $ integer# numberOfElements); |
| 40 | |
| 41 | autoIndexcxx . . $ autoIndex# Index_extractPartcxx . . $ Index_extractPart(55ea2a2776ebc3d1). (Indexcxx . . $ Index# me, integercxx . . $ integer# from, integercxx . . $ integer# to); |
| 42 | |
| 43 | integercxx . . $ integer# Index_getClassIndexFromItemIndexcxx . . $ Index_getClassIndexFromItemIndex(4cf45ca05b4360be). (Indexcxx . . $ Index# me, integercxx . . $ integer# itemIndex); |
| 44 | |
| 45 | autoStringsIndexcxx . . $ autoStringsIndex# StringsIndex_createcxx . . $ StringsIndex_create(3d8cbadf5fb4569a). (integercxx . . $ integer# numberOfItems); |
| 46 | |
| 47 | autoStringsIndexcxx . . $ autoStringsIndex# StringsIndex_createFromSTRVECcxx . . $ StringsIndex_createFromSTRVEC(e4dff117608d2bea). (constSTRVECcxx . . $ constSTRVEC# const& strvec, kStrings_sortingcxx . . $ kStrings_sorting# sorting); |
| 48 | |
| 49 | int StringsIndex_getClassIndexFromClassLabelcxx . . $ StringsIndex_getClassIndexFromClassLabel(5f32844c753293ce). (StringsIndexcxx . . $ StringsIndex# me, conststring32cxx . . $ conststring32# classLabel); |
| 50 | |
| 51 | conststring32cxx . . $ conststring32# StringsIndex_getClassLabelFromClassIndexcxx . . $ StringsIndex_getClassLabelFromClassIndex(6e2612c4ff3e048e). (StringsIndexcxx . . $ StringsIndex# me, integercxx . . $ integer# classNumber); |
| 52 | |
| 53 | conststring32cxx . . $ conststring32# StringsIndex_getItemLabelFromItemIndexcxx . . $ StringsIndex_getItemLabelFromItemIndex(6e2612c4ff3e048e). (StringsIndexcxx . . $ StringsIndex# me, integercxx . . $ integer# itemNumber); |
| 54 | |
| 55 | autoSTRVECcxx . . $ autoSTRVEC# StringsIndex_listAllClassescxx . . $ StringsIndex_listAllClasses(76ba5f97afd1ff35). ( StringsIndexcxx . . $ StringsIndex# me); |
| 56 | |
| 57 | integercxx . . $ integer# StringsIndex_countItemscxx . . $ StringsIndex_countItems(e8cc7e7a1090a673). (StringsIndexcxx . . $ StringsIndex# me, integercxx . . $ integer# iclas); |
| 58 | |
| 59 | void StringsIndex_sortNumericallycxx . . $ StringsIndex_sortNumerically(2a9ae84b901a5ec6). (StringsIndexcxx . . $ StringsIndex# me); |
| 60 | |
| 61 | #endif /* _Index_h_ */ |