Show / Hide Table of Contents

Class SimpleBitVector32

Datastructure to hold upto 32 boolean values.

Inheritance
System.Object
SimpleBitVector32
Namespace: Edgar.Legacy.GeneralAlgorithms.DataStructures.Common
Assembly: Edgar.dll
Syntax
public sealed class SimpleBitVector32 : ValueType

Constructors

SimpleBitVector32(Int32)

Creates a vector from given integer.

Declaration
public SimpleBitVector32(int data)
Parameters
Type Name Description
System.Int32 data
Remarks

0-th position of the vectors equals to the least significant bit of the integer.

Properties

Data

Gets the vector as an integer.

Declaration
public int Data { get; }
Property Value
Type Description
System.Int32
Remarks

0-th position of the vectors equals to the least significant bit of the returned integer.

Item[Int32]

Gets or sets a value of a bit at a given position.

Declaration
public bool this[int position] { get; set; }
Parameters
Type Name Description
System.Int32 position
Property Value
Type Description
System.Boolean
Remarks

Position must be an integer between 0 and 31 (inclusive).

Length

Gets a length of the vector.

Declaration
public int Length { get; }
Property Value
Type Description
System.Int32

Methods

StartWithOnes(Int32)

Returns a vector where first x positions are ones.

Declaration
public static SimpleBitVector32 StartWithOnes(int count)
Parameters
Type Name Description
System.Int32 count

How many positions should be set to one.

Returns
Type Description
SimpleBitVector32
Back to top Generated by DocFX