# ISEqualUnsorted
Compares if two index sets have the same indices. 
## Synopsis
```
#include "petscis.h"  
PetscErrorCode ISEqualUnsorted(IS is1, IS is2, PetscBool *flg)
```
Collective on is1


## Input Parameters

- ***is1, is2 -*** The index sets being compared



## Output Parameters

- ***flg -*** output flag, either `PETSC_TRUE` (if both index sets have the
same indices), or `PETSC_FALSE` if the index sets differ by size
or by the set of indices)





## Note
Unlike ISEqual(), this routine does NOT sort the contents of the index sets before
the comparison is made, i.e., the order of indices is important.

Each MPI rank must have the same indices.


## See Also
 [](sec_scatter), `IS`, `ISEqual()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/is/utils/iscomp.c.html#ISEqualUnsorted">src/vec/is/is/utils/iscomp.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/is/is/utils/iscomp.c)


[Index of all IS routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
