@@ -111,7 +111,7 @@ public WuQuantizer(Configuration configuration, QuantizerOptions options)
111
111
public QuantizerOptions Options { get ; }
112
112
113
113
/// <inheritdoc/>
114
- public ReadOnlyMemory < TPixel > Palette
114
+ public readonly ReadOnlyMemory < TPixel > Palette
115
115
{
116
116
get
117
117
{
@@ -362,7 +362,7 @@ private static Moment Top(ref Box cube, int direction, int position, ReadOnlySpa
362
362
/// </summary>
363
363
/// <param name="source">The source data.</param>
364
364
/// <param name="bounds">The bounds within the source image to quantize.</param>
365
- private void Build3DHistogram ( Buffer2D < TPixel > source , Rectangle bounds )
365
+ private readonly void Build3DHistogram ( Buffer2D < TPixel > source , Rectangle bounds )
366
366
{
367
367
Span < Moment > momentSpan = this . momentsOwner . GetSpan ( ) ;
368
368
@@ -393,7 +393,7 @@ private void Build3DHistogram(Buffer2D<TPixel> source, Rectangle bounds)
393
393
/// Converts the histogram into moments so that we can rapidly calculate the sums of the above quantities over any desired box.
394
394
/// </summary>
395
395
/// <param name="allocator">The memory allocator used for allocating buffers.</param>
396
- private void Get3DMoments ( MemoryAllocator allocator )
396
+ private readonly void Get3DMoments ( MemoryAllocator allocator )
397
397
{
398
398
using IMemoryOwner < Moment > volume = allocator . Allocate < Moment > ( IndexCount * IndexAlphaCount ) ;
399
399
using IMemoryOwner < Moment > area = allocator . Allocate < Moment > ( IndexAlphaCount ) ;
@@ -462,7 +462,7 @@ private void Get3DMoments(MemoryAllocator allocator)
462
462
/// </summary>
463
463
/// <param name="cube">The cube.</param>
464
464
/// <returns>The <see cref="float"/>.</returns>
465
- private double Variance ( ref Box cube )
465
+ private readonly double Variance ( ref Box cube )
466
466
{
467
467
ReadOnlySpan < Moment > momentSpan = this . momentsOwner . GetSpan ( ) ;
468
468
@@ -503,7 +503,7 @@ private double Variance(ref Box cube)
503
503
/// <param name="cut">The cutting point.</param>
504
504
/// <param name="whole">The whole moment.</param>
505
505
/// <returns>The <see cref="float"/>.</returns>
506
- private float Maximize ( ref Box cube , int direction , int first , int last , out int cut , Moment whole )
506
+ private readonly float Maximize ( ref Box cube , int direction , int first , int last , out int cut , Moment whole )
507
507
{
508
508
ReadOnlySpan < Moment > momentSpan = this . momentsOwner . GetSpan ( ) ;
509
509
Moment bottom = Bottom ( ref cube , direction , momentSpan ) ;
@@ -634,7 +634,7 @@ private bool Cut(ref Box set1, ref Box set2)
634
634
/// </summary>
635
635
/// <param name="cube">The cube.</param>
636
636
/// <param name="label">A label.</param>
637
- private void Mark ( ref Box cube , byte label )
637
+ private readonly void Mark ( ref Box cube , byte label )
638
638
{
639
639
Span < byte > tagSpan = this . tagsOwner . GetSpan ( ) ;
640
640
0 commit comments