Show / Hide Table of Contents

    Class BitString

    Inheritance
    Object
    BitString
    Namespace: Platform.Collections
    Assembly: Platform.Collections.dll
    Syntax
    public class BitString : IEquatable<BitString>
    Remarks

    А что если хранить карту значений, где каждый бит будет означать присутствует ли блок в 64 бит в массиве значений. 64 бита по 0 бит, будут означать отсутствие 64-х блоков по 64 бита. Т.е. упаковка 512 байт в 8 байт. Подобный принцип можно применять и к 64-ём блокам и т.п. По сути это карта значений. С помощью которой можно быстро проверять есть ли значения непосредственно далее (ниже по уровню). Или как таблица виртуальной памяти где номер блока означает его присутствие и адрес.

    Constructors

    | Improve this Doc View Source

    BitString(BitString)

    Initializes a new BitString instance.

    Declaration
    public BitString(BitString other)
    Parameters
    Type Name Description
    BitString other

    A other.

    | Improve this Doc View Source

    BitString(Int64)

    Initializes a new BitString instance.

    Declaration
    public BitString(long length)
    Parameters
    Type Name Description
    Int64 length

    A length.

    | Improve this Doc View Source

    BitString(Int64, Boolean)

    Initializes a new BitString instance.

    Declaration
    public BitString(long length, bool defaultValue)
    Parameters
    Type Name Description
    Int64 length

    A length.

    Boolean defaultValue

    A default value.

    Properties

    | Improve this Doc View Source

    Item[Int64]

    The value.

    Declaration
    public bool this[long index] { get; set; }
    Parameters
    Type Name Description
    Int64 index
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    Length

    Gets or sets the length value.

    Declaration
    public long Length { get; set; }
    Property Value
    Type Description
    Int64

    Methods

    | Improve this Doc View Source

    Add(Int64)

    Determines whether this instance add.

    Declaration
    public bool Add(long index)
    Parameters
    Type Name Description
    Int64 index

    The index.

    Returns
    Type Description
    Boolean

    The bool

    | Improve this Doc View Source

    And(BitString)

    Ands the other.

    Declaration
    public BitString And(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    BitString

    The bit string

    | Improve this Doc View Source

    CountCommonBits(BitString)

    Counts the common bits using the specified other.

    Declaration
    public long CountCommonBits(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    Int64

    The total.

    | Improve this Doc View Source

    CountSetBits()

    Counts the set bits.

    Declaration
    public long CountSetBits()
    Returns
    Type Description
    Int64

    The total.

    | Improve this Doc View Source

    Equals(BitString)

    Determines whether this instance equals.

    Declaration
    public bool Equals(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    Boolean

    The bool

    | Improve this Doc View Source

    Equals(Object)

    Determines whether this instance equals.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The obj.

    Returns
    Type Description
    Boolean

    The bool

    | Improve this Doc View Source

    Get(Int64)

    Determines whether this instance get.

    Declaration
    public bool Get(long index)
    Parameters
    Type Name Description
    Int64 index

    The index.

    Returns
    Type Description
    Boolean

    The bool

    | Improve this Doc View Source

    GetBitMaskFromIndex(Int64)

    Gets the bit mask from index using the specified index.

    Declaration
    public static long GetBitMaskFromIndex(long index)
    Parameters
    Type Name Description
    Int64 index

    The index.

    Returns
    Type Description
    Int64

    The long

    | Improve this Doc View Source

    GetCommonBorders(BitString, BitString, out UInt64, out UInt64)

    Gets the common borders using the specified left.

    Declaration
    public static void GetCommonBorders(BitString left, BitString right, out ulong from, out ulong to)
    Parameters
    Type Name Description
    BitString left

    The left.

    BitString right

    The right.

    UInt64 from

    The from.

    UInt64 to

    The to.

    | Improve this Doc View Source

    GetCommonIndices(BitString)

    Gets the common indices using the specified other.

    Declaration
    public List<long> GetCommonIndices(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    List<Int64>

    The result.

    | Improve this Doc View Source

    GetCommonInnerBorders(BitString, BitString, out Int64, out Int64)

    Gets the common inner borders using the specified left.

    Declaration
    public static void GetCommonInnerBorders(BitString left, BitString right, out long from, out long to)
    Parameters
    Type Name Description
    BitString left

    The left.

    BitString right

    The right.

    Int64 from

    The from.

    Int64 to

    The to.

    | Improve this Doc View Source

    GetCommonOuterBorders(BitString, BitString, out Int32, out Int32)

    Gets the common outer borders using the specified left.

    Declaration
    public static void GetCommonOuterBorders(BitString left, BitString right, out int from, out int to)
    Parameters
    Type Name Description
    BitString left

    The left.

    BitString right

    The right.

    Int32 from

    The from.

    Int32 to

    The to.

    | Improve this Doc View Source

    GetCommonOuterBorders(BitString, BitString, out Int64, out Int64)

    Gets the common outer borders using the specified left.

    Declaration
    public static void GetCommonOuterBorders(BitString left, BitString right, out long from, out long to)
    Parameters
    Type Name Description
    BitString left

    The left.

    BitString right

    The right.

    Int64 from

    The from.

    Int64 to

    The to.

    | Improve this Doc View Source

    GetCommonUInt64Indices(BitString)

    Gets the common u int 64 indices using the specified other.

    Declaration
    public List<ulong> GetCommonUInt64Indices(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    List<UInt64>

    The result.

    | Improve this Doc View Source

    GetFirstCommonBitIndex(BitString)

    Gets the first common bit index using the specified other.

    Declaration
    public long GetFirstCommonBitIndex(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    Int64

    The long

    | Improve this Doc View Source

    GetFirstSetBitIndex()

    Gets the first set bit index.

    Declaration
    public long GetFirstSetBitIndex()
    Returns
    Type Description
    Int64

    The long

    | Improve this Doc View Source

    GetHashCode()

    Gets the hash code.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    The int

    | Improve this Doc View Source

    GetLastCommonBitIndex(BitString)

    Gets the last common bit index using the specified other.

    Declaration
    public long GetLastCommonBitIndex(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    Int64

    The long

    | Improve this Doc View Source

    GetLastSetBitIndex()

    Gets the last set bit index.

    Declaration
    public long GetLastSetBitIndex()
    Returns
    Type Description
    Int64

    The long

    | Improve this Doc View Source

    GetSetIndices()

    Gets the set indices.

    Declaration
    public List<long> GetSetIndices()
    Returns
    Type Description
    List<Int64>

    The result.

    | Improve this Doc View Source

    GetSetUInt64Indices()

    Gets the set u int 64 indices.

    Declaration
    public List<ulong> GetSetUInt64Indices()
    Returns
    Type Description
    List<UInt64>

    The result.

    | Improve this Doc View Source

    GetWordIndexFromIndex(Int64)

    Gets the word index from index using the specified index.

    Declaration
    public static long GetWordIndexFromIndex(long index)
    Parameters
    Type Name Description
    Int64 index

    The index.

    Returns
    Type Description
    Int64

    The long

    | Improve this Doc View Source

    GetWordsCountFromIndex(Int64)

    Gets the words count from index using the specified index.

    Declaration
    public static long GetWordsCountFromIndex(long index)
    Parameters
    Type Name Description
    Int64 index

    The index.

    Returns
    Type Description
    Int64

    The long

    | Improve this Doc View Source

    HaveCommonBits(BitString)

    Determines whether this instance have common bits.

    Declaration
    public bool HaveCommonBits(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    Boolean

    The bool

    | Improve this Doc View Source

    Not()

    Nots this instance.

    Declaration
    public BitString Not()
    Returns
    Type Description
    BitString

    The bit string

    | Improve this Doc View Source

    Or(BitString)

    Ors the other.

    Declaration
    public BitString Or(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    BitString

    The bit string

    | Improve this Doc View Source

    ParallelAnd(BitString)

    Parallels the and using the specified other.

    Declaration
    public BitString ParallelAnd(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    BitString

    The bit string

    | Improve this Doc View Source

    ParallelNot()

    Parallels the not.

    Declaration
    public BitString ParallelNot()
    Returns
    Type Description
    BitString

    The bit string

    | Improve this Doc View Source

    ParallelOr(BitString)

    Parallels the or using the specified other.

    Declaration
    public BitString ParallelOr(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    BitString

    The bit string

    | Improve this Doc View Source

    ParallelVectorAnd(BitString)

    Parallels the vector and using the specified other.

    Declaration
    public BitString ParallelVectorAnd(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    BitString

    The bit string

    | Improve this Doc View Source

    ParallelVectorNot()

    Parallels the vector not.

    Declaration
    public BitString ParallelVectorNot()
    Returns
    Type Description
    BitString

    The bit string

    | Improve this Doc View Source

    ParallelVectorOr(BitString)

    Parallels the vector or using the specified other.

    Declaration
    public BitString ParallelVectorOr(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    BitString

    The bit string

    | Improve this Doc View Source

    ParallelVectorXor(BitString)

    Parallels the vector xor using the specified other.

    Declaration
    public BitString ParallelVectorXor(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    BitString

    The bit string

    | Improve this Doc View Source

    ParallelXor(BitString)

    Parallels the xor using the specified other.

    Declaration
    public BitString ParallelXor(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    BitString

    The bit string

    | Improve this Doc View Source

    Reset(Int64)

    Resets the index.

    Declaration
    public void Reset(long index)
    Parameters
    Type Name Description
    Int64 index

    The index.

    | Improve this Doc View Source

    ResetAll()

    Resets the all.

    Declaration
    public void ResetAll()
    | Improve this Doc View Source

    Set(Int64)

    Sets the index.

    Declaration
    public void Set(long index)
    Parameters
    Type Name Description
    Int64 index

    The index.

    | Improve this Doc View Source

    Set(Int64, Boolean)

    Sets the index.

    Declaration
    public void Set(long index, bool value)
    Parameters
    Type Name Description
    Int64 index

    The index.

    Boolean value

    The value.

    | Improve this Doc View Source

    SetAll()

    Sets the all.

    Declaration
    public void SetAll()
    | Improve this Doc View Source

    SetAll(Boolean)

    Sets the all using the specified value.

    Declaration
    public void SetAll(bool value)
    Parameters
    Type Name Description
    Boolean value

    The value.

    | Improve this Doc View Source

    ToString()

    Returns the string.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    The string

    | Improve this Doc View Source

    TryShrinkBorders()

    Determines whether this instance try shrink borders.

    Declaration
    public bool TryShrinkBorders()
    Returns
    Type Description
    Boolean

    The borders updated.

    | Improve this Doc View Source

    VectorAnd(BitString)

    Vectors the and using the specified other.

    Declaration
    public BitString VectorAnd(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    BitString

    The bit string

    | Improve this Doc View Source

    VectorNot()

    Vectors the not.

    Declaration
    public BitString VectorNot()
    Returns
    Type Description
    BitString

    The bit string

    | Improve this Doc View Source

    VectorOr(BitString)

    Vectors the or using the specified other.

    Declaration
    public BitString VectorOr(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    BitString

    The bit string

    | Improve this Doc View Source

    VectorXor(BitString)

    Vectors the xor using the specified other.

    Declaration
    public BitString VectorXor(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    BitString

    The bit string

    | Improve this Doc View Source

    Xor(BitString)

    Xors the other.

    Declaration
    public BitString Xor(BitString other)
    Parameters
    Type Name Description
    BitString other

    The other.

    Returns
    Type Description
    BitString

    The bit string

    Extension Methods

    BitStringExtensions.SetRandomBits(BitString)
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX