Table of Contents

Struct ReadOnlyPartitionedSet<T>

Namespace
Jitter2.DataStructures
Assembly
Jitter2.dll

A read-only wrapper around PartitionedSet<T>.

public readonly struct ReadOnlyPartitionedSet<T> : IEnumerable<T>, IEnumerable where T : class, IPartitionedSetIndex

Type Parameters

T

The type of elements in the set.

Implements
Inherited Members
Extension Methods

Constructors

ReadOnlyPartitionedSet(PartitionedSet<T>)

A read-only wrapper around PartitionedSet<T>.

public ReadOnlyPartitionedSet(PartitionedSet<T> partitionedSet)

Parameters

partitionedSet PartitionedSet<T>

Properties

Active

Returns a read-only span of the active elements in the set.

public ReadOnlySpan<T> Active { get; }

Property Value

ReadOnlySpan<T>

ActiveCount

Gets the number of active elements.

public int ActiveCount { get; }

Property Value

int

Count

Gets the total number of elements.

public int Count { get; }

Property Value

int

Elements

Returns a read-only span of all elements in the set.

public ReadOnlySpan<T> Elements { get; }

Property Value

ReadOnlySpan<T>

Inactive

Returns a read-only span of the inactive elements in the set.

public ReadOnlySpan<T> Inactive { get; }

Property Value

ReadOnlySpan<T>

this[int]

Gets the element at the specified index.

public T this[int i] { get; }

Parameters

i int

Property Value

T

Methods

Contains(T)

Determines whether the set contains the specified element.

public bool Contains(T element)

Parameters

element T

Returns

bool

GetEnumerator()

public PartitionedSet<T>.Enumerator GetEnumerator()

Returns

PartitionedSet<T>.Enumerator

IsActive(T)

Determines whether the specified element is in the active partition.

public bool IsActive(T element)

Parameters

element T

Returns

bool