allied force
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 433
Parallel Port Make 0.22
Parallel Port Make can build FreeBSD ports in parallel to fully take advantage of modern multi-core and processor machine. more>>
Parallel Port Make project is a tool to build FreeBSD ports in parallel to fully take advantage of modern multi-core and processor machines.
Default: pportmake.py --clean -- cleanup --install -job=2 [port1] [portn]
Example: pportmake.py irc/irssi irc/epic
Advanced: pportmake.py -rSvD -j 10 irc/irssi
-h --help Show this help usage message
-c --clean Clean port before compiling
-C --cleanup Clean port after compiling
-d --deinstall Deinstall ports, implied by reinstall
-f --force Force a port and all dependancies to be installed
-G --noconfig Dont recursively configure options
-i --install Install port (default)
-j n --jobs=n Number of threads to use, 1 or 2 per CPU core
is recommended
Default is 2
-O args --options=foo List of arguments to pass to make.
E.g. -O -DX11=yes -DFOO
-r --reinstall Reinstall port and ALL dependancies
-S --maxspeed Try and speed up by maximising CPU usuage.
This may break some ports, use with caution
-w --noclean Dont make clean before compiling
-W --nocleanup Dont make clean after compiling
-v --verbose Be extra verbose
-V --version Show version information
-D --debug Show some debugging info
-P --pretend Dont actually alter the ports
NOTES: It is currently only safe to run 1 copy of this and not have other ports compiling simultaneously
<<lessDefault: pportmake.py --clean -- cleanup --install -job=2 [port1] [portn]
Example: pportmake.py irc/irssi irc/epic
Advanced: pportmake.py -rSvD -j 10 irc/irssi
-h --help Show this help usage message
-c --clean Clean port before compiling
-C --cleanup Clean port after compiling
-d --deinstall Deinstall ports, implied by reinstall
-f --force Force a port and all dependancies to be installed
-G --noconfig Dont recursively configure options
-i --install Install port (default)
-j n --jobs=n Number of threads to use, 1 or 2 per CPU core
is recommended
Default is 2
-O args --options=foo List of arguments to pass to make.
E.g. -O -DX11=yes -DFOO
-r --reinstall Reinstall port and ALL dependancies
-S --maxspeed Try and speed up by maximising CPU usuage.
This may break some ports, use with caution
-w --noclean Dont make clean before compiling
-W --nocleanup Dont make clean after compiling
-v --verbose Be extra verbose
-V --version Show version information
-D --debug Show some debugging info
-P --pretend Dont actually alter the ports
NOTES: It is currently only safe to run 1 copy of this and not have other ports compiling simultaneously
Download (0.005MB)
Added: 2007-01-16 License: BSD License Price:
1013 downloads
Star Trek Voyager: Elite Force 1.36
Star Trek Voyager: Elite Force is a modification to the icculus.org maintained quake3 engine. more>>
Star Trek Voyager: Elite Force is a modification to the icculus.org maintained quake3 engine
to make it possible to run EliteForce holomatch. This means: you can *not* play single player missions with this project.
This engine has full compatibility for the newer _and_ the original EliteForce protocol, clients using the original engine can use newer servers, and clients using my engine can use old servers, too.
Now, the next few paragraphs are just some random blabla about the advantages of this release, but if you want to you can just skip it and go right to the installation instructions.
What was the motivation for me doing this project?
It actually started pretty small.. The Quake3 source has been released more than half a year ago and I got the crazy idea to try the quake3 engine with EliteForce on my trusted Gentoo Linux.
When I started the program first the screen went black and nothing happened... nearly nothing. I heard some sounds and when I moved the cursor I heard random click-clicks from the mouse going over some menu buttons. This meant this stuff is not completely incompatible after all, it didnt crash right away though that was exactly what I expected it to do. I digged in Ravens multiplayer source that they released (only the virtual machine stuff, to allow for building modifications) and compared it to quake3s virtual machines and realized that there was a small
incompatibility in one of the data structures used to pass information between engine and virtual machine. It was nothing big and after fixing this the menu worked!
There were some quirks here or there, but most of the menu really worked. So it got me thinking: If I fix all these incompatibilities.. maybe I can finally play my beloved multiplayer game Ive been clinging to for over 5 years on my favorite OS natively.. and IPv6 support for EliteForce would be pretty cool too...
So a crazy idea was turned into a serious project. I had to add support for Ravens models, playing mp3s, EliteForces own network protocol. My goal was to make this release as close to the original as possible. Most of the time, I only could guess what names and functions would mean to the engine or I had to compare the original game and then try to make it work the same way in my engine.
The quake3 game relies heavily on floating point operations. Unfortunately, the original EliteForce engine does non-ISO compliant rounding of floating point numbers to integers in the VMs. The game VM uses that flaw which will result in higher jumping for certain com_maxfps settings. As with the new engine there are many platforms that can be supported, there are probably many different ways one has to take to revert the rounding to the old behaviour. This is nearly impossible to do, so I had to use a different approach: build new VMs.
<<lessto make it possible to run EliteForce holomatch. This means: you can *not* play single player missions with this project.
This engine has full compatibility for the newer _and_ the original EliteForce protocol, clients using the original engine can use newer servers, and clients using my engine can use old servers, too.
Now, the next few paragraphs are just some random blabla about the advantages of this release, but if you want to you can just skip it and go right to the installation instructions.
What was the motivation for me doing this project?
It actually started pretty small.. The Quake3 source has been released more than half a year ago and I got the crazy idea to try the quake3 engine with EliteForce on my trusted Gentoo Linux.
When I started the program first the screen went black and nothing happened... nearly nothing. I heard some sounds and when I moved the cursor I heard random click-clicks from the mouse going over some menu buttons. This meant this stuff is not completely incompatible after all, it didnt crash right away though that was exactly what I expected it to do. I digged in Ravens multiplayer source that they released (only the virtual machine stuff, to allow for building modifications) and compared it to quake3s virtual machines and realized that there was a small
incompatibility in one of the data structures used to pass information between engine and virtual machine. It was nothing big and after fixing this the menu worked!
There were some quirks here or there, but most of the menu really worked. So it got me thinking: If I fix all these incompatibilities.. maybe I can finally play my beloved multiplayer game Ive been clinging to for over 5 years on my favorite OS natively.. and IPv6 support for EliteForce would be pretty cool too...
So a crazy idea was turned into a serious project. I had to add support for Ravens models, playing mp3s, EliteForces own network protocol. My goal was to make this release as close to the original as possible. Most of the time, I only could guess what names and functions would mean to the engine or I had to compare the original game and then try to make it work the same way in my engine.
The quake3 game relies heavily on floating point operations. Unfortunately, the original EliteForce engine does non-ISO compliant rounding of floating point numbers to integers in the VMs. The game VM uses that flaw which will result in higher jumping for certain com_maxfps settings. As with the new engine there are many platforms that can be supported, there are probably many different ways one has to take to revert the rounding to the old behaviour. This is nearly impossible to do, so I had to use a different approach: build new VMs.
Download (4.8MB)
Added: 2006-10-20 License: Freeware Price:
1185 downloads
vtmalloc 1.2
vtmalloc is a fast memory allocator for multi-threaded applications and Tcl. more>>
vtmalloc is a fast memory allocator for multi-threaded applications and Tcl. vtmalloc project provides low contention and the ability to return memory to the system.
Tcl
Replace exiting tclThreadAlloc. in the Tcl distribution and recompile with
--enable-threads option. Or use LD_PRELOAD=tclThreadAlloc.so before loading your application.
There is command Tcl_VTMallocCtlObjCmd which can be used in application to force deallocating global pages as well.
To use it in your Tcl program, link it with libvtmalloc.so and execute
extern Tcl_ObjProc Tcl_VTMallocCtlObjCmd;
Tcl_CreateObjCommand(interp, "vtmalloc_ctl", Tcl_VTMallocCtlObjCmd, NULL, NULL);
Enhancements:
- Greatly improved speed and memory usage.
<<lessTcl
Replace exiting tclThreadAlloc. in the Tcl distribution and recompile with
--enable-threads option. Or use LD_PRELOAD=tclThreadAlloc.so before loading your application.
There is command Tcl_VTMallocCtlObjCmd which can be used in application to force deallocating global pages as well.
To use it in your Tcl program, link it with libvtmalloc.so and execute
extern Tcl_ObjProc Tcl_VTMallocCtlObjCmd;
Tcl_CreateObjCommand(interp, "vtmalloc_ctl", Tcl_VTMallocCtlObjCmd, NULL, NULL);
Enhancements:
- Greatly improved speed and memory usage.
Download (0.013MB)
Added: 2007-01-17 License: MPL (Mozilla Public License) Price:
1011 downloads
Test::Differences 0.47
Test::Differences Perl module contains test strings and data structures and show differences if not ok. more>>
Test::Differences Perl module contains test strings and data structures and show differences if not ok.
SYNOPSIS
use Test; ## Or use Test::More
use Test::Differences;
eq_or_diff $got, "anbncn", "testing strings";
eq_or_diff @got, [qw( a b c )], "testing arrays";
## Passing options:
eq_or_diff $got, $expected, $name, { context => 300 }; ## options
## Using with DBI-like data structures
use DBI;
... open connection & prepare statement and @expected_... here...
eq_or_diff $sth->fetchall_arrayref, @expected_arrays "testing DBI arrays";
eq_or_diff $sth->fetchall_hashref, @expected_hashes, "testing DBI hashes";
## To force textual or data line numbering (text lines are numbered 1..):
eq_or_diff_text ...;
eq_or_diff_data ...;
<<lessSYNOPSIS
use Test; ## Or use Test::More
use Test::Differences;
eq_or_diff $got, "anbncn", "testing strings";
eq_or_diff @got, [qw( a b c )], "testing arrays";
## Passing options:
eq_or_diff $got, $expected, $name, { context => 300 }; ## options
## Using with DBI-like data structures
use DBI;
... open connection & prepare statement and @expected_... here...
eq_or_diff $sth->fetchall_arrayref, @expected_arrays "testing DBI arrays";
eq_or_diff $sth->fetchall_hashref, @expected_hashes, "testing DBI hashes";
## To force textual or data line numbering (text lines are numbered 1..):
eq_or_diff_text ...;
eq_or_diff_data ...;
Download (0.008MB)
Added: 2007-07-18 License: Perl Artistic License Price:
828 downloads
force-preview 1.0
force-preview plugin helps reduce comment spam on a Movable Type blog. more>> <<less
Download (0.006MB)
Added: 2006-11-20 License: GPL (GNU General Public License) Price:
1071 downloads
ShellTer 1.0
ShellTer is an iptables-based firewall. more>>
ShellTer is an iptables-based firewall. What sets it apart from the rest is that it has built-in SSH brute force protection.
ShellTer project is easy to configure and has an interactive CLI installer.
To install ShellTer, simply execute the "installer" file in this directory.
Enjoy and feel free to email me with questions/comments/patches/etc.
Enhancements:
- Simple bugfix
<<lessShellTer project is easy to configure and has an interactive CLI installer.
To install ShellTer, simply execute the "installer" file in this directory.
Enjoy and feel free to email me with questions/comments/patches/etc.
Enhancements:
- Simple bugfix
Download (0.010MB)
Added: 2007-07-17 License: GPL (GNU General Public License) Price:
830 downloads
Kickoff for Suse 10.1 0.1
Kickoff for Suse 10.1 contains some packages needed to run kickoff in Suse 10.1. more>>
Kickoff for Suse 10.1 contains some packages needed to run kickoff in Suse 10.1. I modified the spec file from package kdebase3 included in openSUSE 10.2 to force the compilation of Kickoff in Suse 10.1.
You must have installed KDE 3.5.5 and beagle in order to install and run it.
Use it at your own risk, I am not responsible of any damage that could cause if you install them.
The packages provided are: kdebase3, kdebase3-beagle and liblazy.
<<lessYou must have installed KDE 3.5.5 and beagle in order to install and run it.
Use it at your own risk, I am not responsible of any damage that could cause if you install them.
The packages provided are: kdebase3, kdebase3-beagle and liblazy.
Download (25MB)
Added: 2006-12-18 License: GPL (GNU General Public License) Price:
1044 downloads
SQLIer 0.8.2b
SQLIer is a script that uses brute force to crack passwords through more>>
SQLIer is a script that uses brute force to crack passwords through "true/false" SQL injection vulnerabilities. With "true/false" SQL injection vulnerabilities, you cannot actually query data out of the database, only ask a statement that is returned "true" or "false".
SQLIer takes each characters ASCII code and asks a "higher/lower" question to the database, eventually reaching the actual character code. This script also does not use quotes in the exploit to operate, meaning it will work for a wider range of sites.
An 8 character password (containing any character from decimal ASCII code 1-127) takes approximately 1 minute to crack.
Enhancements:
- This release removes the dependency on the "tempfile" command, which apparently is Debian/Debian-derivative specific.
- It should now work on most GNU/Unix platforms.
<<lessSQLIer takes each characters ASCII code and asks a "higher/lower" question to the database, eventually reaching the actual character code. This script also does not use quotes in the exploit to operate, meaning it will work for a wider range of sites.
An 8 character password (containing any character from decimal ASCII code 1-127) takes approximately 1 minute to crack.
Enhancements:
- This release removes the dependency on the "tempfile" command, which apparently is Debian/Debian-derivative specific.
- It should now work on most GNU/Unix platforms.
Download (MB)
Added: 2006-10-12 License: BSD License Price:
1111 downloads
Allied Intent Standalone Server 0.2 Alpha
Allied Intent is a Community War Game Mod for Battlefield 2. more>>
Allied Intent is a Community War Game Mod for Battlefield 2. New and updated maps, vehicles, weapons and kit items, skins and texture recolor, new weapon and explosion effects, new coding features, vehicle music, and a much-improved single player experience.
Allied Intent is a modification, a "mod" for the PC game Battlefield 2. BF2 is of the First Person Shooter game style, and Allied Intent is a free add-on for those who purchased BF2.
Allied Intent seeks to enhance the BF2 experience in every way, by adding new content and features, making changes to gameplay, and involving the community in the mods development. Allied Intent supports players of all ages, backgrounds, and gaming preferences. Allied Intent is for the BF2 player who likes single player and multiplayer matches. And Allied Intent actively engages the community in contributing content to be officially sanctioned in the mod releases. Allied Intent is a mod by the community, for the community.
We are a handful of modders, bot specialists, coders, artists, gamers, and forum members. We are always looking for talented developers to join the team. And as mentioned above, we want the community to know its contributions will be highly instrumental in making this mod a model for excellence. Allied Intent is in no way related to Digital Illusions CE (the development company) nor Electronic Arts (the publishing entity) of BF2, but we greatly appreciate their release of BF2 and will strive to make it even better with our mod.
Allied Intent is set in the modern era, present day, and near future. By combining elements of immersion, realism, and "fun" factor, Allied Intent provides a gaming environment only limited by the imagination of the developers and community contributors.
<<lessAllied Intent is a modification, a "mod" for the PC game Battlefield 2. BF2 is of the First Person Shooter game style, and Allied Intent is a free add-on for those who purchased BF2.
Allied Intent seeks to enhance the BF2 experience in every way, by adding new content and features, making changes to gameplay, and involving the community in the mods development. Allied Intent supports players of all ages, backgrounds, and gaming preferences. Allied Intent is for the BF2 player who likes single player and multiplayer matches. And Allied Intent actively engages the community in contributing content to be officially sanctioned in the mod releases. Allied Intent is a mod by the community, for the community.
We are a handful of modders, bot specialists, coders, artists, gamers, and forum members. We are always looking for talented developers to join the team. And as mentioned above, we want the community to know its contributions will be highly instrumental in making this mod a model for excellence. Allied Intent is in no way related to Digital Illusions CE (the development company) nor Electronic Arts (the publishing entity) of BF2, but we greatly appreciate their release of BF2 and will strive to make it even better with our mod.
Allied Intent is set in the modern era, present day, and near future. By combining elements of immersion, realism, and "fun" factor, Allied Intent provides a gaming environment only limited by the imagination of the developers and community contributors.
Download (115.6MB)
Added: 2006-07-11 License: Freeware Price:
1200 downloads
Games::Mastermind::Solver::BruteForce 0.02
Games::Mastermind::Solver::BruteForce is a Master Mind puzzle solver. more>>
Games::Mastermind::Solver::BruteForce is a Master Mind puzzle solver.
SYNOPSIS
# See Games::Mastermind::Solver
Games::Mastermind::Solver::BruteForce uses the classical brute-force algorithm for solving Master Mind puzzles.
METHODS
remaining
$number = $player->remaining;
The number of possible solutions given the knowledge the player has accumulated.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
<<lessSYNOPSIS
# See Games::Mastermind::Solver
Games::Mastermind::Solver::BruteForce uses the classical brute-force algorithm for solving Master Mind puzzles.
METHODS
remaining
$number = $player->remaining;
The number of possible solutions given the knowledge the player has accumulated.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Download (0.004MB)
Added: 2007-01-04 License: Perl Artistic License Price:
1041 downloads
TableTools 0.20
TableTools sorts, filters or copies any HTML table. more>>
TableTools supercedes the TableSort extension. TableTools sorts, filters or copies any HTML table (ctrl+alt+click sorts, ctrl+shift+click shows/hides filter, ctrl+z+click etc. allows copying in various formats).
Sorting/filtering are smart as they auto-detect the data types such as date/time stamps, numbers (including scientific notations), major currencies, IP addresses, or plain text.
Context menu allows users to force sorting column data as any of the predefined data types. Please check my demo page at http://www.mingyi.org/other/tabletools.html for the detailed feature list.
This extension is the perfect first-glance tool for HTML tables, providing better sorting and filtering capabilities than MS Excel (and directly in FF!), but if you need to make a graph or sth., just use the extension to copy the whole table into Excel!
<<lessSorting/filtering are smart as they auto-detect the data types such as date/time stamps, numbers (including scientific notations), major currencies, IP addresses, or plain text.
Context menu allows users to force sorting column data as any of the predefined data types. Please check my demo page at http://www.mingyi.org/other/tabletools.html for the detailed feature list.
This extension is the perfect first-glance tool for HTML tables, providing better sorting and filtering capabilities than MS Excel (and directly in FF!), but if you need to make a graph or sth., just use the extension to copy the whole table into Excel!
Download (0.036MB)
Added: 2007-07-31 License: MIT/X Consortium License Price:
817 downloads
OpenHIP for Linux 0.5.1
OpenHIP for Linux decouples network identity from network location. more>> OpenHIP is a free, open-source implementation of the Host Identity Protocol (HIP). HIP is being developed within the Internet Engineering Task Force (IETF) and the Internet Research Task Force (IRTF) to study and experiment with HIP and related protocols.
HIP is a specific proposal to decouple network identity from network location in the Internet protocol stack. Historically, IP addresses have served both functions. This dual use of IP addresses is becoming problematic, and there have been many research efforts aimed at studying the decoupling of identifier and locator in the network stack. HIP is a specific proposal that uses public/private key pairs as the host identifiers. Please see the Documentation section for more information about HIP and the HIP architecture.<<less
Download (410KB)
Added: 2009-03-31 License: Freeware Price: Free
206 downloads
Force Content-Type 1.2.1
Force Content-Type is an extension used to force the Content-Type of URLs. more>>
Force Content-Type is an extension used to force the Content-Type of URLs.
Its useful to avoid the tag soup when you are developing a XHTML webpage and want Firefox to use its internal XML parser. If the webserver is not correctly configured, it will serve the page with a text/html Content-Type (a tag soup), instead of sending it as application/xhtml+xml, and therefore avoiding Firefox to treat the page as pure XML.
Force Content-Type allows you to define the Content-Type of some URLs (using Regular Expressions), overriding the webservers incorrect Content-Type.
Supported locales:
- Basque
- English
- Spanish
<<lessIts useful to avoid the tag soup when you are developing a XHTML webpage and want Firefox to use its internal XML parser. If the webserver is not correctly configured, it will serve the page with a text/html Content-Type (a tag soup), instead of sending it as application/xhtml+xml, and therefore avoiding Firefox to treat the page as pure XML.
Force Content-Type allows you to define the Content-Type of some URLs (using Regular Expressions), overriding the webservers incorrect Content-Type.
Supported locales:
- Basque
- English
- Spanish
Download (0.035MB)
Added: 2007-04-03 License: MPL (Mozilla Public License) Price:
951 downloads
Rails History Plugin 0.2
Rails History Plugin is a Ruby on Rails plugin that stores user actions (i.e. URLs that the user has recently visited). more>>
Rails History Plugin is a Ruby on Rails plugin that stores user actions (i.e. URLs that the user has recently visited).
It avoids storage of POST and AJAX requests, and it provides a manual way to specify which actions not to store.
Installation:
Unpack into the vendor/plugin and that should be it.
Usage:
In your app/controllers/application_controller.rb, add a history line like this:
class ApplicationController < ActionController::Base
history :default => "http://default.url.com/",
:max => 10
end
The history function accepts a hash of options
:default, the default URL to redirect
:max, the maximum locations to remember (five by defaults).
None of the parameters are required. If somebody knows of a better way to obtain the default URL, he is welcomed to tell me how.
You can use the method history_skip in your controller if you want to avoid certain location to be stored in the history. By default, action resulting from a POST, PUT, DELETE request or an Ajax request are not stored in the history.
class FooController < ApplicationController
history_skip :action_to_skip
def action_to_skip
# I will not be stored in the history
end
end
In your actions, you can then use the following methods:
last_location: returns the last visited location, can be used with one numeric argument precising how many locations to go back in the history (1 by default),
peek_last_location: like last_location but dont remove it from the history,
redirect_back: redirect the user to the last location in history, it takes the same arguments as last_location,
store_location(force = false): stores the current location in the history, set force parameter to true to store location even if it would be skipped.
Note that if you want to use the plugin to create a "back" link on a page, you must go back two times. For example, using this controller
class HistoryController < ApplicationController
def foo
end
def bar
end
def back
redirect_back(2)
end
end
Ill try to explain clearly why. Lets say that in your bar view, you create a back link wich links to the back action. Now a user visits foo then bar. What you want is your user being redirected to foo when clicking your "back" link. Now your user hits the link. The controller will call the back action. From its point of view, you are in the back action so going back one time would take you to the bar action.
Enhancements:
- This release fixes a bug where a user variable was stored in a class variable instead of a session one, so a user going back would make another one skip a page in its history.
- The plugin no longer stores PUT and DELETE requests.
- A peek_last_location method was added to look at the history without modifying it, and a "force" parameter was added to the store_location method to force storing of a location even if it would normally be skipped.
<<lessIt avoids storage of POST and AJAX requests, and it provides a manual way to specify which actions not to store.
Installation:
Unpack into the vendor/plugin and that should be it.
Usage:
In your app/controllers/application_controller.rb, add a history line like this:
class ApplicationController < ActionController::Base
history :default => "http://default.url.com/",
:max => 10
end
The history function accepts a hash of options
:default, the default URL to redirect
:max, the maximum locations to remember (five by defaults).
None of the parameters are required. If somebody knows of a better way to obtain the default URL, he is welcomed to tell me how.
You can use the method history_skip in your controller if you want to avoid certain location to be stored in the history. By default, action resulting from a POST, PUT, DELETE request or an Ajax request are not stored in the history.
class FooController < ApplicationController
history_skip :action_to_skip
def action_to_skip
# I will not be stored in the history
end
end
In your actions, you can then use the following methods:
last_location: returns the last visited location, can be used with one numeric argument precising how many locations to go back in the history (1 by default),
peek_last_location: like last_location but dont remove it from the history,
redirect_back: redirect the user to the last location in history, it takes the same arguments as last_location,
store_location(force = false): stores the current location in the history, set force parameter to true to store location even if it would be skipped.
Note that if you want to use the plugin to create a "back" link on a page, you must go back two times. For example, using this controller
class HistoryController < ApplicationController
def foo
end
def bar
end
def back
redirect_back(2)
end
end
Ill try to explain clearly why. Lets say that in your bar view, you create a back link wich links to the back action. Now a user visits foo then bar. What you want is your user being redirected to foo when clicking your "back" link. Now your user hits the link. The controller will call the back action. From its point of view, you are in the back action so going back one time would take you to the bar action.
Enhancements:
- This release fixes a bug where a user variable was stored in a class variable instead of a session one, so a user going back would make another one skip a page in its history.
- The plugin no longer stores PUT and DELETE requests.
- A peek_last_location method was added to look at the history without modifying it, and a "force" parameter was added to the store_location method to force storing of a location even if it would normally be skipped.
Download (0.011MB)
Added: 2006-06-29 License: MIT/X Consortium License Price:
1213 downloads
Algorithm::Knapsack 0.02
Algorithm::Knapsack is a brute-force algorithm for the knapsack problem. more>>
Algorithm::Knapsack is a brute-force algorithm for the knapsack problem.
SYNOPSIS
use Algorithm::Knapsack;
my $knapsack = Algorithm::Knapsack->new(
capacity => $capacity,
weights => @weights,
);
$knapsack->compute();
foreach my $solution ($knapsack->solutions()) {
foreach my $index (@{$solution}) {
# do something with $weights[$index]
}
}
The knapsack problem asks, given a set of items of various weights, find a subset or subsets of items such that their total weight is no larger than some given capacity but as large as possible.
This module solves a special case of the 0-1 knapsack problem when the value of each item is equal to its weight. Capacity and weights are restricted to positive integers.
METHODS
new
my $knapsack = Algorithm::Knapsack->new(
capacity => $capacity,
weights => @weights,
);
Creates a new Algorith::Knapsack object. Value of $capacity is a positive integer and @weights is a reference to an array of positive integers, each of which is less than $capacity.
compute
$knapsack->compute();
Iterates over all possible combinations of weights to solve the knapsack problem. Note that the time to solve the problem grows exponentially with respect to the number of items (weights) to choose from.
solutions
my @solutions = $knapsack->solutions();
Returns a list of solutions. Each solution is a reference to an array of indexes to @weights.
<<lessSYNOPSIS
use Algorithm::Knapsack;
my $knapsack = Algorithm::Knapsack->new(
capacity => $capacity,
weights => @weights,
);
$knapsack->compute();
foreach my $solution ($knapsack->solutions()) {
foreach my $index (@{$solution}) {
# do something with $weights[$index]
}
}
The knapsack problem asks, given a set of items of various weights, find a subset or subsets of items such that their total weight is no larger than some given capacity but as large as possible.
This module solves a special case of the 0-1 knapsack problem when the value of each item is equal to its weight. Capacity and weights are restricted to positive integers.
METHODS
new
my $knapsack = Algorithm::Knapsack->new(
capacity => $capacity,
weights => @weights,
);
Creates a new Algorith::Knapsack object. Value of $capacity is a positive integer and @weights is a reference to an array of positive integers, each of which is less than $capacity.
compute
$knapsack->compute();
Iterates over all possible combinations of weights to solve the knapsack problem. Note that the time to solve the problem grows exponentially with respect to the number of items (weights) to choose from.
solutions
my @solutions = $knapsack->solutions();
Returns a list of solutions. Each solution is a reference to an array of indexes to @weights.
Download (0.004MB)
Added: 2007-05-16 License: Perl Artistic License Price:
540 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above allied force search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed