-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add failing test for not-skipping unused splits
- Loading branch information
Showing
7 changed files
with
408 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use crate::WidthHeightDepth; | ||
|
||
/// Incoming boxes are places into the smallest hole that will fit them. | ||
/// | ||
/// "small" vs. "large" is based on the heuristic function. | ||
/// | ||
/// A larger heuristic means that the box is larger. | ||
pub type BoxSizeHeuristicFn = dyn Fn(WidthHeightDepth) -> u128; | ||
|
||
/// The volume of the box | ||
pub fn volume_heuristic(whd: WidthHeightDepth) -> u128 { | ||
(whd.width * whd.height * whd.depth) as _ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.