C Library Functions  - setxor (3)

NAME

setxor(3f) - [M_sets] return setxor values in array A

CONTENTS

Synopsis
Description
Options
Example
Authors
License

SYNOPSIS

setxor(A,B, setOrder)

DESCRIPTION

Set exclusive OR of two arrays.
  C = setxor(A,B) returns the data of A and B that are not in their intersection (the symmetric difference), with no repetitions. That is, setxor(3f) returns the data that occurs in A or B, but not both. C is in sorted order.

OPTIONS

A input array
B input array
setOrder
  May be "sort" or "stable"

EXAMPLE

sample program:

   program demo_setxor
   use M_sets, only: setxor
   character(len=*),parameter :: g=’(*(g0,1x))’
   integer, allocatable      :: A(:)
   integer, allocatable      :: B(:)

write(*,g) ’SETXOR’,’Find values of A and B not in their intersection.’ A = [5,1,3,3,3] B = [4,1,2] write(*,g) ’A=’, A write(*,g) ’A=’, B write(*,g) setxor(A,B) write(*,g) setxor(A,B,’stable’)

end program demo_setxor

Results:

 > SETXOR Find values of A and B not in their intersection.
 > A= 5 1 3 3 3
 > A= 4 1 2
 > 2 3 4 5
 > 5 3 4 2

AUTHORS

John S. Urban, 2023-07-20

LICENSE

CC0-1.0


Nemo Release 3.1 setxor (3) July 22, 2023
Generated by manServer 1.08 from 2871c51a-d96f-4b4f-b0ca-1129bad9bd99 using man macros.