slicebinpack

package
v0.0.0-...-953494f Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2021 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawBinPackResult

func DrawBinPackResult(dir string, id string, drawinfos []DrawBlock, width int, height int, scale_ratio int)

draw deployment of network slice requests

func Mkdir

func Mkdir(dir string)

create dir for new set of network slice requests

Types

type Bin

type Bin struct {
	Name   string
	Width  int
	Height int
	Slices []Slice
}

type Block

type Block struct {
	Name   string
	Width  int
	Height int
}

type ByNodeX

type ByNodeX []*node

ByTreeX implements sort.Interface based on the node.x field.

func (ByNodeX) Len

func (a ByNodeX) Len() int

func (ByNodeX) Less

func (a ByNodeX) Less(i, j int) bool

func (ByNodeX) Swap

func (a ByNodeX) Swap(i, j int)

type DrawBlock

type DrawBlock struct {
	TopLeftX   int
	TopLeftY   int
	DownRightX int
	DownRightY int
}

type Packer

type Packer struct {
	Bins         Bin
	AcceptSlices []Slice
	RejectSlices []Slice
	DeployInfos  []SliceDeploy
	DrawInfos    []DrawBlock
}

func (*Packer) Pack

func (p *Packer) Pack(algorithm string, concat bool)

type Slice

type Slice struct {
	Name     string
	Width    int
	Height   int
	Ngci     string
	SubBlock []Block
}

type SliceDeploy

type SliceDeploy struct {
	Name     string
	Ngci     string
	Start    int
	Duration int
	End      bool
	Resource int
}

Jump to

Keyboard shortcuts

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