binpack.m

From Spinach Documentation Wiki
Jump to: navigation, search

A simple 1D bin packing algorithm that groups the supplied box sizes into bins whose sums do not exceed the specified bin size; the algorithm is not optimal, but it is sufficient for its intended use.

Syntax

    bins=binpack(box_sizes,bin_size)

Parameters

   box_sizes - a row vector of box sizes

   bin_size  - an integer specifying the bin size

Outputs

   bins      - a cell array of index vectors specifying
               boxes allocated into each bin

See also

path_trace.m, reduce.m, scomponents.m, acomm.m, arnoldi.m, atranspose.m, aux_mat.m, cheap_norm.m, cheb_coeff.m, clean_up.m, dirdiff.m, eigenfields.m, expdrop.m, expmint.m, expmint2.m, fftdiff.m, fourdif.m, fourlap.m, frob_chop.m, gaussfun.m, hdot.m, herm_spline.m, jacobianest.m, keep_rank.m, krondelta.m, kronm_new.m, logfactorial.m, lorentzcon.m, lorentzfun.m, md5_hash.m, mprealloc.m, remncomm.m, remtrace.m, rspert.m, rspt_eig.m, snormpdf.m, svd_shrink.m, tikhoind.m, tikhonov.m, trapdiff.m, unit_oper.m, unit_state.m, vvpert.m, Kernel_utilities

Version 2.1, authors: Ilya Kuprov