TUV-x
Loading...
Searching...
No Matches
Data Types | Functions/Subroutines
musica_array Module Reference

Functions for working with allocatable arrays. More...

Data Types

interface  find_string_in_array
 
interface  find_string_in_split_array
 

Functions/Subroutines

logical function find_string_in_array_char (array, string, id, case_sensitive)
 Finds a string in a string array (case insensitive by default) More...
 
logical function find_string_in_array_string (array, string, id, case_sensitive)
 Finds a string in an array ( case insensitive by default) More...
 
logical function find_string_in_split_array_char (array, string, splitter, element_id, id, case_sensitive)
 Find a string in an array of strings after splitting the array elements. More...
 
logical function find_string_in_split_array_string (array, string, splitter, element_id, id, case_sensitive)
 Find a string in an array of strings after splitting the array elements. More...
 
real(kind=musica_dk) function, dimension(:), allocatable, public merge_series (a, b, with_bounds_from)
 Merge two sets of values into a single set without duplicates. More...
 
real(kind=musica_dk) function, dimension(:), allocatable, public calculate_linear_array (minimum, maximum, number_of_elements)
 Allocates and calculates an array of linearly increasing value with specified minimum and maximum values and number of elements. More...
 
real(kind=musica_dk) function, dimension(:), allocatable, public calculate_logarithmic_array (minimum, maximum, number_of_elements)
 Allocates and calculates an array of logarithmically increasing value with specified minimum and maximum values and number of elements. More...
 

Detailed Description

Functions for working with allocatable arrays.

Function/Subroutine Documentation

◆ calculate_linear_array()

real(kind=musica_dk) function, dimension(:), allocatable, public musica_array::calculate_linear_array ( real(kind=musica_dk), intent(in)  minimum,
real(kind=musica_dk), intent(in)  maximum,
integer(kind=musica_ik), intent(in)  number_of_elements 
)

Allocates and calculates an array of linearly increasing value with specified minimum and maximum values and number of elements.

Returns
Calculated array
Parameters
[in]minimumMinimum array value
[in]maximumMaximum array value
[in]number_of_elementsNumber of array elements

◆ calculate_logarithmic_array()

real(kind=musica_dk) function, dimension(:), allocatable, public musica_array::calculate_logarithmic_array ( real(kind=musica_dk), intent(in)  minimum,
real(kind=musica_dk), intent(in)  maximum,
integer(kind=musica_ik), intent(in)  number_of_elements 
)

Allocates and calculates an array of logarithmically increasing value with specified minimum and maximum values and number of elements.

Returns
Calculated array
Parameters
[in]minimumMinimum array value
[in]maximumMaximum array value
[in]number_of_elementsNumber of array elements

◆ find_string_in_array_char()

logical function musica_array::find_string_in_array_char ( type(string_t), dimension(:), intent(in)  array,
character(len=*), intent(in)  string,
integer(kind=musica_ik), intent(out)  id,
logical, intent(in), optional  case_sensitive 
)
private

Finds a string in a string array (case insensitive by default)

Parameters
[in]arrayArray to search
[in]stringString to search for
[out]idIndex of located string
[in]case_sensitiveDo a case sensitive search

◆ find_string_in_array_string()

logical function musica_array::find_string_in_array_string ( type(string_t), dimension(:), intent(in)  array,
type(string_t), intent(in)  string,
integer(kind=musica_ik), intent(out)  id,
logical, intent(in), optional  case_sensitive 
)

Finds a string in an array ( case insensitive by default)

Parameters
[in]arrayArray to search
[in]stringString to search for
[out]idIndex of located string
[in]case_sensitiveDo a case sensitive search

◆ find_string_in_split_array_char()

logical function musica_array::find_string_in_split_array_char ( type(string_t), dimension(:), intent(in)  array,
character(len=*), intent(in)  string,
character(len=*), intent(in)  splitter,
integer(kind=musica_ik), intent(in)  element_id,
integer(kind=musica_ik), intent(out)  id,
logical, intent(in), optional  case_sensitive 
)

Find a string in an array of strings after splitting the array elements.

Case insensitive by default

Parameters
[in]arrayArray to search
[in]stringString to search for
[in]splitterSplitting characters
[in]element_idElement to compare in split strings
[out]idIndex of located string
[in]case_sensitiveDo a case sensitive search

◆ find_string_in_split_array_string()

logical function musica_array::find_string_in_split_array_string ( type(string_t), dimension(:), intent(in)  array,
type(string_t), intent(in)  string,
character(len=*), intent(in)  splitter,
integer(kind=musica_ik), intent(in)  element_id,
integer(kind=musica_ik), intent(out)  id,
logical, intent(in), optional  case_sensitive 
)

Find a string in an array of strings after splitting the array elements.

Case insensitive by default

Parameters
[in]arrayArray to search
[in]stringString to search for
[in]splitterSplitting characters
[in]element_idElement to compare in split strings
[out]idIndex of located string
[in]case_sensitiveDo a case sensitive search

◆ merge_series()

real(kind=musica_dk) function, dimension(:), allocatable, public musica_array::merge_series ( real(kind=musica_dk), dimension(:), intent(in)  a,
real(kind=musica_dk), dimension(:), intent(in)  b,
real(kind=musica_dk), dimension(:), intent(in), optional  with_bounds_from 
)

Merge two sets of values into a single set without duplicates.

Both sets must be arranged in increasing order

Returns
New series
Parameters
[in]aFirst series
[in]bSecond series
[in]with_bounds_fromRestricts series to bounds in this array