compressor

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ForbiddenValue = -1

Variables

This section is empty.

Functions

This section is empty.

Types

type Compressor

type Compressor interface {
	Compress(orig *OriginalTable) error
	Lookup(row, col int) (int, error)
	OriginalTableSize() (int, int)
}

type OriginalTable

type OriginalTable struct {
	// contains filtered or unexported fields
}

func NewOriginalTable

func NewOriginalTable(entries []int, colCount int) (*OriginalTable, error)

type RowDisplacementTable

type RowDisplacementTable struct {
	OriginalRowCount int
	OriginalColCount int
	EmptyValue       int
	Entries          []int
	Bounds           []int
	RowDisplacement  []int
}

func NewRowDisplacementTable

func NewRowDisplacementTable(emptyValue int) *RowDisplacementTable

func (*RowDisplacementTable) Compress

func (tab *RowDisplacementTable) Compress(orig *OriginalTable) error

func (*RowDisplacementTable) Lookup

func (tab *RowDisplacementTable) Lookup(row int, col int) (int, error)

func (*RowDisplacementTable) OriginalTableSize

func (tab *RowDisplacementTable) OriginalTableSize() (int, int)

type UniqueEntriesTable

type UniqueEntriesTable struct {
	UniqueEntries    []int
	RowNums          []int
	OriginalRowCount int
	OriginalColCount int
}

func NewUniqueEntriesTable

func NewUniqueEntriesTable() *UniqueEntriesTable

func (*UniqueEntriesTable) Compress

func (tab *UniqueEntriesTable) Compress(orig *OriginalTable) error

func (*UniqueEntriesTable) Lookup

func (tab *UniqueEntriesTable) Lookup(row, col int) (int, error)

func (*UniqueEntriesTable) OriginalTableSize

func (tab *UniqueEntriesTable) OriginalTableSize() (int, int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL