Salad  1.0.15
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
search.h
Go to the documentation of this file.
1 /*
2  * Salad - An assortment of useful C stuff
3  * Copyright (C) 2016 Lloyd Dilley
4  * http://www.dilley.me/
5  *
6  * This file is part of Salad.
7  *
8  * Salad is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; either version
11  * 3 of the License, or (at your option) any later version.
12  *
13  * Salad is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with Salad. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef SEARCH_H
23 #define SEARCH_H
24 
25 #include "salad/types.h"
26 
47 void *sld_search_binary(void *data_structure, void *search_criterion, SLD_DATA_STRUCTURE data_structure_type, SLD_DATA_TYPE search_criterion_type);
48 
61 void *sld_search_linear(void *data_structure, void *search_criterion, SLD_DATA_STRUCTURE data_structure_type, SLD_DATA_TYPE search_criterion_type);
62 
65 #endif /* SEARCH_H */
void * sld_search_binary(void *data_structure, void *search_criterion, SLD_DATA_STRUCTURE data_structure_type, SLD_DATA_TYPE search_criterion_type)
Searches through data with a &quot;divide and conquer&quot; approach.
SLD_DATA_STRUCTURE
Definition: types.h:70
void * sld_search_linear(void *data_structure, void *search_criterion, SLD_DATA_STRUCTURE data_structure_type, SLD_DATA_TYPE search_criterion_type)
Searches through data sequentially.
SLD_DATA_TYPE
Definition: types.h:83