Package com.alibaba.graphscope.ds
Interface Bitset
-
- All Superinterfaces:
com.alibaba.fastffi.CXXPointer
,com.alibaba.fastffi.FFIPointer
,FFIType
,Serializable
- All Known Implementing Classes:
Bitset_cxx_0x2967d1e0
public interface Bitset extends com.alibaba.fastffi.FFIPointer, com.alibaba.fastffi.CXXPointer
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Bitset.Factory
Factory for BitSet.
-
Field Summary
Fields Modifier and Type Field Description static Bitset.Factory
factory
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
Clear this bitset.void
copy(Bitset other)
long
count()
The number of bits set to true.boolean
empty()
Check empty.long
get_word(long i)
Get the underlying representation word at index i.@com.alibaba.fastffi.FFINameAlias("get_bit") boolean
getBit(long i)
Get the flag at index i.void
init(long size)
Init the bitset with a initial size.long
partial_count(long begin, long end)
The number of bits set to true, in a specified range@com.alibaba.fastffi.FFINameAlias("partial_empty") boolean
partialEmpty(long begin, long end)
Check empty or not in parallel.void
resetBit(long i)
Reset bit at index i.@com.alibaba.fastffi.FFINameAlias("reset_bit_with_ret") boolean
resetBitWithRet(long i)
Reset with return value.void
setBit(long i)
Set the flag for index i to true@com.alibaba.fastffi.FFINameAlias("set_bit_with_ret") boolean
setBitWithRet(long i)
Set the bit at index i with returned result.void
swap(Bitset other)
Swap the underlying storage with another BitSet
-
-
-
Field Detail
-
factory
static final Bitset.Factory factory
-
-
Method Detail
-
init
void init(long size)
Init the bitset with a initial size.- Parameters:
size
- initial size.
-
clear
void clear()
Clear this bitset.
-
empty
boolean empty()
Check empty.- Returns:
- true if empty.
-
copy
void copy(Bitset other)
-
partialEmpty
@com.alibaba.fastffi.FFINameAlias("partial_empty") boolean partialEmpty(long begin, long end)
Check empty or not in parallel.- Parameters:
begin
- starting index.end
- ending index.- Returns:
- true if empty.
-
getBit
@com.alibaba.fastffi.FFINameAlias("get_bit") boolean getBit(long i)
Get the flag at index i.- Parameters:
i
- index- Returns:
- true if index i has been set to true.
-
setBit
void setBit(long i)
Set the flag for index i to true- Parameters:
i
- index
-
setBitWithRet
@com.alibaba.fastffi.FFINameAlias("set_bit_with_ret") boolean setBitWithRet(long i)
Set the bit at index i with returned result.- Parameters:
i
- index- Returns:
- result
-
resetBit
void resetBit(long i)
Reset bit at index i.- Parameters:
i
- index.
-
resetBitWithRet
@com.alibaba.fastffi.FFINameAlias("reset_bit_with_ret") boolean resetBitWithRet(long i)
Reset with return value.- Parameters:
i
- index- Returns:
- return value.
-
swap
void swap(Bitset other)
Swap the underlying storage with another BitSet- Parameters:
other
- the other bitset.
-
count
long count()
The number of bits set to true.- Returns:
- the number of trues.
-
partial_count
long partial_count(long begin, long end)
The number of bits set to true, in a specified range- Parameters:
begin
- begin index.end
- end index.- Returns:
- the count value.
-
get_word
long get_word(long i)
Get the underlying representation word at index i.- Parameters:
i
- index- Returns:
- 64-bit long
-
-