public interface unique
returns a new vector compring the unique elements of the input vector.
a faster implementation is provided for pre-sorted inputs.
Module Procedures
private pure function unique_i1(vec, sorted) result(res)
Arguments
Type | Intent | Optional | Attributes | | Name | |
integer(kind=i1), |
intent(in), |
| dimension(:), allocatable | :: |
vec | |
logical, |
intent(in) |
| | :: |
sorted | |
Return Value integer(kind=i1),dimension(:), allocatable
private pure function unique_i2(vec, sorted) result(res)
Arguments
Type | Intent | Optional | Attributes | | Name | |
integer(kind=i2), |
intent(in), |
| dimension(:), allocatable | :: |
vec | |
logical, |
intent(in) |
| | :: |
sorted | |
Return Value integer(kind=i2),dimension(:), allocatable
private pure function unique_i4(vec, sorted) result(res)
Arguments
Type | Intent | Optional | Attributes | | Name | |
integer(kind=i4), |
intent(in), |
| dimension(:), allocatable | :: |
vec | |
logical, |
intent(in) |
| | :: |
sorted | |
Return Value integer(kind=i4),dimension(:), allocatable
private pure function unique_i8(vec, sorted) result(res)
Arguments
Type | Intent | Optional | Attributes | | Name | |
integer(kind=i8), |
intent(in), |
| dimension(:), allocatable | :: |
vec | |
logical, |
intent(in) |
| | :: |
sorted | |
Return Value integer(kind=i8),dimension(:), allocatable
private pure function unique_r4(vec, sorted) result(res)
Arguments
Type | Intent | Optional | Attributes | | Name | |
real(kind=r4), |
intent(in), |
| dimension(:), allocatable | :: |
vec | |
logical, |
intent(in) |
| | :: |
sorted | |
Return Value real(kind=r4),dimension(:), allocatable
private pure function unique_r8(vec, sorted) result(res)
Arguments
Type | Intent | Optional | Attributes | | Name | |
real(kind=r8), |
intent(in), |
| dimension(:), allocatable | :: |
vec | |
logical, |
intent(in) |
| | :: |
sorted | |
Return Value real(kind=r8),dimension(:), allocatable
private pure function unique_r16(vec, sorted) result(res)
Arguments
Type | Intent | Optional | Attributes | | Name | |
real(kind=r16), |
intent(in), |
| dimension(:), allocatable | :: |
vec | |
logical, |
intent(in) |
| | :: |
sorted | |
Return Value real(kind=r16),dimension(:), allocatable
private pure function unique_c4(vec, sorted) result(res)
Arguments
Type | Intent | Optional | Attributes | | Name | |
complex(kind=r4), |
intent(in), |
| dimension(:), allocatable | :: |
vec | |
logical, |
intent(in) |
| | :: |
sorted | |
Return Value complex(kind=r4),dimension(:), allocatable
private pure function unique_c8(vec, sorted) result(res)
Arguments
Type | Intent | Optional | Attributes | | Name | |
complex(kind=r8), |
intent(in), |
| dimension(:), allocatable | :: |
vec | |
logical, |
intent(in) |
| | :: |
sorted | |
Return Value complex(kind=r8),dimension(:), allocatable
private pure function unique_c16(vec, sorted) result(res)
Arguments
Type | Intent | Optional | Attributes | | Name | |
complex(kind=r16), |
intent(in), |
| dimension(:), allocatable | :: |
vec | |
logical, |
intent(in) |
| | :: |
sorted | |
Return Value complex(kind=r16),dimension(:), allocatable
private pure function unique_str(vec, sorted) result(res)
Arguments
Type | Intent | Optional | Attributes | | Name | |
character, |
intent(in), |
| dimension(:), allocatable | :: |
vec | |
logical, |
intent(in) |
| | :: |
sorted | |
Return Value character,dimension(:), allocatable