[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Wed Dec 15 14:00:01 2004 -->
- <!--x-from-r13: nggevry ng q20obneqf.arg (nggevry) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: [email protected] -->
- <!--x-reference: Pine.LNX.4.44.0412151055550.19702-10000 [email protected] -->
- <!--x-reference: [email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: To: Jerry Yu... Re: [ale] 2 Perl questions ? -->
- <h1>to: Jerry Yu... Re: [ale] 2 Perl questions ?</h1>
- <li><em>date</em>: Wed Dec 15 14:00:01 2004</li>
- <li><em>from</em>: attriel at d20boards.net (attriel)</li>
- <li><em>in-reply-to</em>: <<a href="msg00545.html">[email protected]</a>></li>
- <li><em>references</em>: <<a href="msg00543.html">[email protected]</a>><Pine.LNX.4.44.0412151055550.19702-10000 [email protected]> <<a href="msg00545.html">[email protected]</a>></li>
- <li><em>subject</em>: To: Jerry Yu... Re: [ale] 2 Perl questions ?</li>
- <title>to: Jerry Yu... Re: [ale] 2 Perl questions ?</title>
I always learned it as the box-packing algorithm, which is NP-complete
only as regards an "optimal" solution.
As long as non "optimal" is acceptable, geoff's solution should work, or
just:
Total size/media size
Sort by size.
Add files to "media" as they fit. Largest into first "media", second
largest into first if it fits still, else it goes to second. Third tries
first, tries second, goes to third, etc.
Non-optimal probably, and not the most "efficient" manner, but it'll work,
and I don't imagine it would be too bad. You could also set it to keep
directories together "when possible" (IE -- when you go through the full
"media" list and you can't fit the dir anymore, break it and do it
file-by-file)
--attriel
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00550" href="msg00550.html">To: Jerry Yu... Re: [ale] 2 Perl questions ?</a></strong>
<ul><li><em>From:</em> esoteric at 3times25.net (Geoffrey)</li></ul></li>
<li><strong><a name="00554" href="msg00554.html">To: Jerry Yu... Re: [ale] 2 Perl questions ?</a></strong>
<ul><li><em>From:</em> sriad at uab.edu (Aditya Srinivasan)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00543" href="msg00543.html">To: Jerry Yu... Re: [ale] 2 Perl questions ?</a></strong>
<ul><li><em>From:</em> ccthomas at joimail.com (Courtney Thomas)</li></ul></li>
<li><strong><a name="00545" href="msg00545.html">To: Jerry Yu... Re: [ale] 2 Perl questions ?</a></strong>
<ul><li><em>From:</em> jasonday at worldnet.att.net (Jason Day)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00548.html">To: Jerry Yu... Re: [ale] 2 Perl questions ?</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00550.html">To: Jerry Yu... Re: [ale] 2 Perl questions ?</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00546.html">To: Jerry Yu... Re: [ale] 2 Perl questions ?</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00550.html">To: Jerry Yu... Re: [ale] 2 Perl questions ?</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00549"><strong>Date</strong></a></li>
<li><a href="threads.html#00549"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>