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 interfaceBitset.FactoryFactory for BitSet.
-
Field Summary
Fields Modifier and Type Field Description static Bitset.Factoryfactory
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Clear this bitset.voidcopy(Bitset other)longcount()The number of bits set to true.booleanempty()Check empty.longget_word(long i)Get the underlying representation word at index i.@com.alibaba.fastffi.FFINameAlias("get_bit") booleangetBit(long i)Get the flag at index i.voidinit(long size)Init the bitset with a initial size.longpartial_count(long begin, long end)The number of bits set to true, in a specified range@com.alibaba.fastffi.FFINameAlias("partial_empty") booleanpartialEmpty(long begin, long end)Check empty or not in parallel.voidresetBit(long i)Reset bit at index i.@com.alibaba.fastffi.FFINameAlias("reset_bit_with_ret") booleanresetBitWithRet(long i)Reset with return value.voidsetBit(long i)Set the flag for index i to true@com.alibaba.fastffi.FFINameAlias("set_bit_with_ret") booleansetBitWithRet(long i)Set the bit at index i with returned result.voidswap(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
-
-