ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_search Module Reference

This module contains abstract and concrete derived types that are required for compile-time resolution of procedures within the generic interfaces of the ParaMonte library for various search operations.
Such procedures frequently need to work with a specific searching method within the algorithm implementation.
More...

Data Types

type  binary_type
 This is a concrete derived type whose instances are exclusively used to request binary search algorithm within an interface of a procedure of the ParaMonte library.
More...
 
type  linear_type
 This is a concrete derived type whose instances are exclusively used to request linear search algorithm within an interface of a procedure of the ParaMonte library.
More...
 
type  search_type
 This is an abstract derived type for constructing concrete derived types to distinguish various procedure signatures that require different search algorithms (linear, binary, ...).
More...
 

Variables

character(*, SK), parameter MODULE_NAME = "@pm_search"
 
type(linear_type), parameter linear = linear_type()
 This is a scalar parameter object of type linear_type that is exclusively used to request linear search algorithm within an interface of a procedure of the ParaMonte library.
More...
 
type(binary_type), parameter binary = binary_type()
 This is a scalar parameter object of type binary_type that is exclusively used to request binary search algorithm within an interface of a procedure of the ParaMonte library.
More...
 

Detailed Description

This module contains abstract and concrete derived types that are required for compile-time resolution of procedures within the generic interfaces of the ParaMonte library for various search operations.
Such procedures frequently need to work with a specific searching method within the algorithm implementation.

In computer science, a search algorithm is an algorithm designed to solve a search problem.
Search algorithms work to retrieve information stored within particular data structure, or calculated in the search space of a problem domain, with either discrete or continuous values.

Search algorithms can be classified based on their mechanism of searching into three types of algorithms:
Search algorithms are commonly evaluated by their computational complexity, or maximum theoretical run time.
Comparison search algorithms improve on linear searching by successively eliminating records based on comparisons of the keys until the target record is found, and can be applied on data structures with a defined order.
Digital search algorithms work based on the properties of digits in data structures by using numerical keys.
Finally, hashing directly maps keys to records based on a hash function.

  1. Linear search algorithms check every record for the one associated with a target key in a linear fashion.
  2. **Binary, or half-interval search algorithms repeatedly target the center of the search structure and divide the search space in half.
    1. Binary search algorithms have a maximum complexity of \(\mathcal{O}(\log n)\), or logarithmic time.
    2. In simple terms, the maximum number of operations needed to find the search target is a logarithmic function of the size of the search space.
  3. Hashing, search algorithms directly map keys to records based on a hash function.


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, September 1, 2017, 12:00 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas Austin

Variable Documentation

◆ binary

type(binary_type), parameter pm_search::binary = binary_type()

This is a scalar parameter object of type binary_type that is exclusively used to request binary search algorithm within an interface of a procedure of the ParaMonte library.

For example usage, see the documentation of the target procedure requiring this object.

See also
linear
binary
linear_type
binary_type
search_type


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, September 1, 2017, 12:00 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas Austin

Definition at line 184 of file pm_search.F90.

◆ linear

type(linear_type), parameter pm_search::linear = linear_type()

This is a scalar parameter object of type linear_type that is exclusively used to request linear search algorithm within an interface of a procedure of the ParaMonte library.

For example usage, see the documentation of the target procedure requiring this object.

See also
linear
binary
linear_type
binary_type
search_type


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, September 1, 2017, 12:00 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas Austin

Definition at line 131 of file pm_search.F90.

◆ MODULE_NAME

character(*,SK), parameter pm_search::MODULE_NAME = "@pm_search"

Definition at line 56 of file pm_search.F90.