Struct IntegerFixedPartition
A lightweight representation of an enumerable partition of an ulong into specified number of parts.
public readonly struct IntegerFixedPartition : IReadOnlyCollection<ulong>, IEnumerable<ulong>, IEnumerable
- Implements
- Inherited Members
- Extension Methods
Constructors
IntegerFixedPartition(ulong, int)
Creates a new IntegerFixedPartition instance.
public IntegerFixedPartition(ulong value, int partCount)
Parameters
Exceptions
- ArgumentOutOfRangeException
When
partCount
is less than 0.
Properties
Count
Number of parts.
public int Count { get; }
Property Value
Quotient
Base value for each part.
public ulong Quotient { get; }
Property Value
Remainder
An auxiliary integer division remainder used for filling out irregularities.
public ulong Remainder { get; }
Property Value
Value
Value to partition.
public ulong Value { get; }
Property Value
Methods
GetEnumerator()
Creates a new IntegerFixedPartition.Enumerator instance for this partition.
[Pure]
public IntegerFixedPartition.Enumerator GetEnumerator()
Returns
- IntegerFixedPartition.Enumerator
New IntegerFixedPartition.Enumerator instance.
ToString()
Returns a string representation of this IntegerFixedPartition instance.
[Pure]
public override string ToString()
Returns
- string
String representation.