packing

package
v0.0.0-...-ba7cae4 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PackChunks

func PackChunks(chunks []Chunk, maxCapacity uint64) ([][]uint, []uint64)

Implements offline first-fit decreasing (at most 4/3x bigger than the optimal packing). Note: If the longest chunk is bigger than the max capacity, the max capacity will be exceeded.

func ReverseSort

func ReverseSort(chunks []Chunk)

Types

type Chunk

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

func BuildEmbChunks

func BuildEmbChunks(corpus *corpus.Corpus) ([]Chunk, uint64)

func BuildUrlChunks

func BuildUrlChunks(corpus *corpus.Corpus) ([]Chunk, uint64)

Jump to

Keyboard shortcuts

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