Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Base ¶
type Base struct {
Scorer
}
func (*Base) FindPositionForNewNode ¶
func (b *Base) FindPositionForNewNode(box *Box, freeRects []*FreeSpaceBox) *Score
type BestAreaFit ¶
type BestAreaFit struct{}
type BestLongSide ¶
type BestLongSide struct{}
type BestShortSide ¶
type BestShortSide struct{}
type BestSimilarRatio ¶
type BestSimilarRatio struct{}
type Bin ¶
type Bin struct {
W, H float64
Boxes []*Box
FreeRectangles []*FreeSpaceBox
Heuristic *Base
}
type BottomLeft ¶
type BottomLeft struct{}
type FreeSpaceBox ¶
type FreeSpaceBox struct {
W, H, X, Y float64
}
type PackerOptions ¶
type PackerOptions struct {
// contains filtered or unexported fields
}
type Score ¶
type Score struct {
S1, S2 int
}
func NewScoreBlank ¶
func NewScoreBlank() *Score
func (*Score) DecreaseBy ¶
type ScoreBoard ¶
type ScoreBoard struct {
// contains filtered or unexported fields
}
func NewScoreBoard ¶
func NewScoreBoard(bins []*Bin, boxes []*Box) *ScoreBoard
type ScoreBoardEntry ¶
type ScoreBoardEntry struct {
// contains filtered or unexported fields
}
func NewScoreBoardEntry ¶
func NewScoreBoardEntry(bin *Bin, box *Box) *ScoreBoardEntry
Click to show internal directories.
Click to hide internal directories.