Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | empty_int(0) | = | [integer::] |
Check if V is sorted.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | V(:) | |||
logical, | intent(in), | optional | :: | ascending |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | V(:) | |||
logical, | intent(in), | optional | :: | ascending |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | V(:) | |||
logical, | intent(in), | optional | :: | ascending |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | V(:) | |||
logical, | intent(in), | optional | :: | ascending |
Check if A and B are disjoint.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:) | |||
integer(kind=int64), | intent(in) | :: | B(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:) | |||
integer(kind=int32), | intent(in) | :: | B(:) |
Create a set out of A
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | V(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | V(:) |
Check if a given array is a set (ordered and unique elements)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | V(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | V(:) |
Check if A is a subset of B.
Check if A is a subset of B
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:) | |||
integer(kind=int64), | intent(in) | :: | B(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:) | |||
integer(kind=int32), | intent(in) | :: | B(:) |
Calculate the union A ∪ B
Return A ∪ B Assume: 1. A and B are sorted. The result will be sorted.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:) | |||
integer(kind=int64), | intent(in) | :: | B(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:) | |||
integer(kind=int32), | intent(in) | :: | B(:) |
Calculate the intersection A ∩ B
Return A ∩ B Assume: 1. A and B are sorted. The result will be sorted.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:) | |||
integer(kind=int64), | intent(in) | :: | B(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:) | |||
integer(kind=int32), | intent(in) | :: | B(:) |
Calculate the complement A / B
Return A / B Assume: 1. A and B are sorted. The result will be sorted.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:) | |||
integer(kind=int64), | intent(in) | :: | B(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:) | |||
integer(kind=int32), | intent(in) | :: | B(:) |
Check if element is contained in set.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | element | |||
integer(kind=int64), | intent(in) | :: | set(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | element | |||
integer(kind=int32), | intent(in) | :: | set(:) |
Check if element is not contained in set.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | element | |||
integer(kind=int64), | intent(in) | :: | set(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | element | |||
integer(kind=int32), | intent(in) | :: | set(:) |
Specialiced function with assumptions that speed up performance. Merge B into A and remove values that are in C. The result can be written with set notation as A ∪ B / C. Preconditions (not tested!): 1. C is a subset of A 2. A and B are disjoint 3. B and C are disjoint 4. A, B, and C are sorted. The result will be sorted.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:) | |||
integer(kind=int64), | intent(in) | :: | B(:) | |||
integer(kind=int64), | intent(in) | :: | C(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:) | |||
integer(kind=int32), | intent(in) | :: | B(:) | |||
integer(kind=int32), | intent(in) | :: | C(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | V(:) | |||
logical, | intent(in), | optional | :: | ascending |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | V(:) | |||
logical, | intent(in), | optional | :: | ascending |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | V(:) | |||
logical, | intent(in), | optional | :: | ascending |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | V(:) | |||
logical, | intent(in), | optional | :: | ascending |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | V(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | V(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | V(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | V(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:) | |||
integer(kind=int64), | intent(in) | :: | B(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:) | |||
integer(kind=int32), | intent(in) | :: | B(:) |
Check if A is a subset of B
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:) | |||
integer(kind=int64), | intent(in) | :: | B(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:) | |||
integer(kind=int32), | intent(in) | :: | B(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:) | |||
integer(kind=int64), | intent(in) | :: | B(:) | |||
integer(kind=int64), | intent(in) | :: | C(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:) | |||
integer(kind=int32), | intent(in) | :: | B(:) | |||
integer(kind=int32), | intent(in) | :: | C(:) |
Return A ∪ B Assume: 1. A and B are sorted. The result will be sorted.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:) | |||
integer(kind=int64), | intent(in) | :: | B(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:) | |||
integer(kind=int32), | intent(in) | :: | B(:) |
Return A ∩ B Assume: 1. A and B are sorted. The result will be sorted.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:) | |||
integer(kind=int64), | intent(in) | :: | B(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:) | |||
integer(kind=int32), | intent(in) | :: | B(:) |
Return A / B Assume: 1. A and B are sorted. The result will be sorted.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:) | |||
integer(kind=int64), | intent(in) | :: | B(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:) | |||
integer(kind=int32), | intent(in) | :: | B(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | element | |||
integer(kind=int64), | intent(in) | :: | set(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | element | |||
integer(kind=int32), | intent(in) | :: | set(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | element | |||
integer(kind=int64), | intent(in) | :: | set(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | element | |||
integer(kind=int32), | intent(in) | :: | set(:) |