Equal checks whether the two sets equal.
()
| 147 | |
| 148 | // Equal checks whether the two sets equal. |
| 149 | func ExampleIntSet_Equal() { |
| 150 | s1 := gset.NewIntSetFrom([]int{1, 2, 3}) |
| 151 | s2 := gset.NewIntSetFrom([]int{1, 2, 3, 4}) |
| 152 | fmt.Println(s2.Equal(s1)) |
| 153 | |
| 154 | s3 := gset.NewIntSetFrom([]int{1, 2, 3}) |
| 155 | s4 := gset.NewIntSetFrom([]int{1, 2, 3}) |
| 156 | fmt.Println(s3.Equal(s4)) |
| 157 | |
| 158 | // Output: |
| 159 | // false |
| 160 | // true |
| 161 | } |
| 162 | |
| 163 | // Intersect returns a new set which is the intersection from `set` to `other`. |
| 164 | // Which means, all the items in `newSet` are in `set` and also in `other`. |
nothing calls this directly
no test coverage detected
searching dependent graphs…