..  IntSet([itr])

Construct a sorted set of positive ``Int``\ s generated by the given iterable
object, or an empty set. Implemented as a bit string, and therefore designed
for dense integer sets. Only ``Int``\ s greater than 0 can be stored. If the
set will be sparse (for example holding a few very large integers), use
:obj:`Set` instead.


In the Julia programming language, the function IntSet is used to construct a sorted set of positive Ints. It is implemented as a bit string and is designed for dense integer sets. Only Ints greater than 0 can be stored in an IntSet. If the set will be sparse or hold a few very large integers, it is recommended to use Set instead.

Construct an IntSet from an iterable:

julia> set = IntSet([1, 2, 3, 4, 5])
IntSet({1, 2, 3, 4, 5})

This example constructs an IntSet from the iterable [1, 2, 3, 4, 5].

Construct an empty IntSet:

julia> empty_set = IntSet()

This example constructs an empty IntSet.

However, please note that the IntSet function is not a built-in function in Julia. If you are looking for a similar functionality, you can consider using the Set data structure instead.

See Also

BigFloat, BigInt, Dict, eltype, fieldtype, Float32, Float64, IntSet, isa, isalnum, isalpha, isascii, iseltype, isequal, isgraph, isimmutable, isinteractive, isleaftype, isnull, ispunct, isspace, issubtype, keytype, Nullable, NullException, promote_type, typeintersect, typejoin, typemax, typemin, typeof, Val, valtype,

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field

Checking you are not a robot: