Trait hi_sparse_bitset::ops::BitSetOp
source · pub trait BitSetOp: Default + Copy + 'static {
const TRUSTED_HIERARCHY: bool;
const HIERARCHY_OPERANDS_CONTAIN_RESULT: bool;
// Required methods
fn hierarchy_op<T: BitBlock>(left: T, right: T) -> T;
fn data_op<T: BitBlock>(left: T, right: T) -> T;
}
Expand description
Binary operation interface for BitSetInterfaces.
Implement this trait for creating your own operation.
Pay attention to hierarchical nature of hi_sparse_bitset
- you
may need to apply “broader” operations to “hierarchical blocks”, then
to “data blocks”.
Required Associated Constants§
sourceconst TRUSTED_HIERARCHY: bool
const TRUSTED_HIERARCHY: bool
Will operation between two TRUSTED_HIERARCHY bitsets produce TRUSTED_HIERARCHY as well?
Enables some optimizations. False - is always safe value.
sourceconst HIERARCHY_OPERANDS_CONTAIN_RESULT: bool
const HIERARCHY_OPERANDS_CONTAIN_RESULT: bool
Does hierarchy_op operands contain result?
- left contains all bits from hierarchy_op result,
- right contains all bits from hierarchy_op result,
This is true for intersection, or narrower.
Enables some optimizations. False - is always safe value.
Required Methods§
sourcefn hierarchy_op<T: BitBlock>(left: T, right: T) -> T
fn hierarchy_op<T: BitBlock>(left: T, right: T) -> T
Operation applied to indirection/hierarchy level bitblock
Object Safety§
This trait is not object safe.