FMUTIL  0.1
Fortran Miscellaneous UTILities
search Module Reference

Search Module. More...

Data Types

interface  func
 Interface of the function whose root needs to be computed. More...
 

Functions/Subroutines

pure integer function, dimension(size(sortedx)) binarysearch (SortedX, SortedDataArray)
 Performs binary search on a provided sorted array. More...
 

Variables

integer, parameter max_iterations = 50
 Max iterations for the root-finding. More...
 

Detailed Description

Search Module.

This module provides functions for search utilities

Author
Bharat Mahajan
Date
Created: 07/31/2019
Module containing all the utility functions

Function/Subroutine Documentation

◆ binarysearch()

pure integer function, dimension(size(sortedx)) search::binarysearch ( real(wp), dimension(1:), intent(in)  SortedX,
real(wp), dimension(:), intent(in)  SortedDataArray 
)

Performs binary search on a provided sorted array.

TBD

Parameters
[in]sortedxElement to find
[in]sorteddataarrayAscending-order sorted vector

Definition at line 55 of file search.f90.

Variable Documentation

◆ max_iterations

integer, parameter search::max_iterations = 50

Max iterations for the root-finding.

Definition at line 38 of file search.f90.