C# Класс Disruptor.Util

Set of common functions used by the Disruptor
Показать файл Открыть проект

Открытые методы

Метод Описание
CeilingNextPowerOfTwo ( this x ) : int

Calculate the next power of 2, greater than or equal to x.

GetMinimumSequence ( ISequence sequences, long minimum = long.MaxValue ) : long

Get the minimum sequence from an array of Sequences.

GetSequencesFor ( ) : ISequence[]

Get an array of Sequences for the passed IEventProcessors

IsPowerOf2 ( this x ) : bool

Test whether a given integer is a power of 2

Log2 ( int i ) : int

Calculate the log base 2 of the supplied integer, essentially reports the location of the highest bit.

Описание методов

CeilingNextPowerOfTwo() публичный статический Метод

Calculate the next power of 2, greater than or equal to x.
public static CeilingNextPowerOfTwo ( this x ) : int
x this Value to round up
Результат int

GetMinimumSequence() публичный статический Метод

Get the minimum sequence from an array of Sequences.
public static GetMinimumSequence ( ISequence sequences, long minimum = long.MaxValue ) : long
sequences ISequence sequences to compare.
minimum long an initial default minimum. If the array is empty this value will returned.
Результат long

GetSequencesFor() публичный статический Метод

Get an array of Sequences for the passed IEventProcessors
public static GetSequencesFor ( ) : ISequence[]
Результат ISequence[]

IsPowerOf2() публичный статический Метод

Test whether a given integer is a power of 2
public static IsPowerOf2 ( this x ) : bool
x this
Результат bool

Log2() публичный статический Метод

Calculate the log base 2 of the supplied integer, essentially reports the location of the highest bit.
public static Log2 ( int i ) : int
i int Value to calculate log2 for.
Результат int