P50

ninetynine.P50
object P50

P50 - Huffman code.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
P50.type

Members list

Type members

Classlikes

case class Node[T](symbol: T, freq: Int, left: Option[Node[T]], right: Option[Node[T]])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def huffman(text: String): Set[(Char, String)]

Attributes

Returns

a set of tuples containing the character and the code to represent it (for the given text).

def huffman[T : Ordering](frequencies: Set[(T, Int)]): Set[(T, String)]

Attributes

Returns

a set of tuples containing the character and the code to represent it (for the given frequencies).

Concrete fields

val logger: Logger