tensort-0.2.0.3: Tunable sorting for responsive robustness and beyond!
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Tensort.Utils.Types

Synopsis

Documentation

type Bit = Int Source #

A Bit is a single element of the list to be sorted. For our current purposes that means it is an Int

NOTE: To Self: at this point it's likely simple enough to refactor this to sort any Ord, not just Ints. Consider using the Bit type synonym in the code, then changing this to alias Bit to Ord or a

type Byte = [Bit] Source #

A Byte is a list of Bits standardized to a fixed maximum length (Bytesize)

The length should be set either in or upstream of any function that uses Bytes

type Address = Int Source #

An Address is a index number pointing to data stored in Memory

type TopBit = Bit Source #

A TopBit contains a copy of the last (i.e. highest) Bit in a Byte or Tensor

type Record = (Address, TopBit) Source #

A Record is an element in a Tensor's Register containing an Address pointer and a TopBit value

A Record's Address is an index number pointing to a Byte or Tensor in the Tensor's Memory

A Record's TopBit is a copy of the last (i.e. highest) Bit in the Byte or Tensor that the Record references

type Register = [Record] Source #

A Register is a list of Records allowing for easy access to data in a Tensor's Memory

data Sortable Source #

We use a Sortable type sort between Bits and Records

In the future this may be expanded to include other data types and allow for sorting other types of besides Ints.

Constructors

SortBit [Bit] 
SortRec [Record] 

Instances

Instances details
Show Sortable Source # 
Instance details

Defined in Data.Tensort.Utils.Types

Eq Sortable Source # 
Instance details

Defined in Data.Tensort.Utils.Types

Ord Sortable Source # 
Instance details

Defined in Data.Tensort.Utils.Types

data Memory Source #

A Memory contains the data to be sorted, either in the form of Bytes or Tensors.

Constructors

ByteMem [Byte] 
TensorMem [Tensor] 

Instances

Instances details
Show Memory Source # 
Instance details

Defined in Data.Tensort.Utils.Types

Eq Memory Source # 
Instance details

Defined in Data.Tensort.Utils.Types

Methods

(==) :: Memory -> Memory -> Bool #

(/=) :: Memory -> Memory -> Bool #

Ord Memory Source # 
Instance details

Defined in Data.Tensort.Utils.Types

type Tensor = (Register, Memory) Source #

A Tensor contains data to be sorted in a structure allowing for easy access. It consists of a Register and its Memory.

The Memory is a list of the Bytes or other Tensors that this Tensor contains.

The Register is a list of Records referencing the top Bits in Memory.

type TensorStack = Tensor Source #

A TensorStack is a top-level Tensor. In the final stages of Tensort, the number of TensorStacks will equal the bytesize, but before that time there are expected to be many more TensorStacks.