SelfInformation

Description

sealed class Tinman.Core.Math.SelfInformation

Helper class for computing the Self-information (Shannon) of a chunk of data.

Public / Constructors

Self​Information


public constructor SelfInformation → ()

Creates a new instance of SelfInformation.

Public / Methods

Consume

2 overloads


public method Consume1 → (1)

buffer in : ByteBuffer

[not-null]
The byte buffer.

returns → SelfInformation

this

Consumes all remaining bytes in the given buffer.


public method Consume2 → (3)

buffer in : int8 [ ]

[not-null]
The array.

offset opt : int32 = 0

[0..buffer.Length]
Offset into buffer in to first byte to consume.

count opt : int32 = -1

[-1..buffer.Length-offset]
Number of bytes to consume. If -1, all remaining bytes will be consumed.

returns → SelfInformation

this

Consumes all bytes in the given array range.

Public / Attributes

Bits


public attribute Bits → (get)

value : float64

[>=0]
The amount of self-information, in bits.

Computes the amount of self-information.

Bytes


public attribute Bytes → (get)

value : float64

[>=0]
The amount of self-information, in bytes.

Computes the amount of self-information.