PHP Class DVDoug\BoxPacker\WeightRedistributor

Author: Doug Wright
Inheritance: implements Psr\Log\LoggerAwareInterface, use trait Psr\Log\LoggerAwareTrait
Show file Open project: dvdoug/boxpacker Class Usage Examples

Protected Properties

Property Type Description
$boxes DVDoug\BoxPacker\BoxList List of box sizes available to pack items into

Public Methods

Method Description
__construct ( DVDoug\BoxPacker\BoxList $boxList ) Constructor
redistributeWeight ( DVDoug\BoxPacker\PackedBoxList $originalBoxes ) : DVDoug\BoxPacker\PackedBoxList Given a solution set of packed boxes, repack them to achieve optimum weight distribution

Method Details

__construct() public method

Constructor
public __construct ( DVDoug\BoxPacker\BoxList $boxList )
$boxList DVDoug\BoxPacker\BoxList

redistributeWeight() public method

Given a solution set of packed boxes, repack them to achieve optimum weight distribution
public redistributeWeight ( DVDoug\BoxPacker\PackedBoxList $originalBoxes ) : DVDoug\BoxPacker\PackedBoxList
$originalBoxes DVDoug\BoxPacker\PackedBoxList
return DVDoug\BoxPacker\PackedBoxList

Property Details

$boxes protected property

List of box sizes available to pack items into
protected BoxList,DVDoug\BoxPacker $boxes
return DVDoug\BoxPacker\BoxList