Algorithm::Knapsack 0.02 
Date Added: October 17, 2010  Visits: 1.818 


Algorithm::Knapsack is a bruteforce 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 01 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..

License: Freeware  Size: 4.1 KB 
Development Tools

General Viterbi Algorithm 1.0
General implementation of matlab version of Viterbi algorithm specifically written for gene structure finding problem in mind. However, it can be modified to suit the goal of a user.Input:Transition Probability MatrixEmission Probability... 
10 KB  
Development Tools

Functions for the rectangular assignment problem 1.0
With this package, I provide some MATLABfunctions regarding the rectangular assignment problem. This problem appears for example in tracking applications, where one has M existing tracks and N new measurements. For each possible assignment, a... 
20.48 KB  
Development Tools

Use of pdepe and Laplace Transform to Solve Heat Conduction Problems 1.0
In the present program three methods are used to solve a heat conduction problem. This problem is given in M. N. doOCozisik, Heat Conduction, Wiley, New York, 1980. We use pdepe, short times solution based on analytical inversion of a Laplace... 
10 KB  
Development Tools

Finding a similar valid correlation matrix 1.0
Implementation of Nicholas J. Higham's algorithm "Computing the Nearest Correlation Matrix  A Problem from Finance", 2002.http://eprints.ma.man.ac.uk/232/01/covered...S_ep2006_70.pdf 
10 KB  
Development Tools

Simple Example of Simulated Annealing Optimization 1.0
Case of study: "Capacity Energy Storage Solution".Dual problem of SMES, replacing inductors with capacities. 
849.92 KB  
Libraries

Algorithm::Diff::Apply 0.2.3
Algorithm::Diff::Apply is a Perl module to apply one or more Algorithm::Diff diffs. SYNOPSIS ## Singlediff form: use Algorithm::Diff::Apply qw{apply_diff}; my @ary = ...; my @diff = ...; # some call to Algorithm::Diff::diff() my... 
12.29 KB  
Development Tools

SpeedyGA: A Fast Simple Genetic Algorithm 1.0
SpeedyGA is a vectorized implementation of a genetic algorithm in the Matlab programming language. Without bells and whistles, it faithfully implements the specification for a Simple GA given on pgs 10, 11 of M. Mitchell's GA book. See comments in... 
10 KB  
Utilities

XP Shutdown Alternative 1.0
I had this problem when I reinstalled Windows on a laptop where Windows XP would not show the shutdown dialog, when I googled for it I noticed more people had this problem. There are other solutions for it but this is by far the easiest and... 
552.96 KB  
Development Tools

THE FASTEST WAY TO SORT N NUMBERS: sortN library 1.0
Have you ever thought about the fastest way to sort N numbers?Last week I wrote a post about the fastest way to sort 3 numbers, this week I show you a tricky way to optimize the sort of N numbers.The problem of sorting an array of numbers is... 
10 KB  
Programming

SR2Sieve 1.8.11
SR2Sieve is a program developed by Geoffrey Reynolds to sieve composite numbers of the forms k*b^n+/1 or b^n+/k. It is used by PrimeGrid for a number of sieve subprojects, including the Prime Sierpinski Problem, Reisel Problem and 321 Prime... 
71.68 KB 
Programming

FLEXdb Digital Asset Manager 3.0.9
FLEXdb  an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEXdb has a JSP client, Java app server for file input and output and an EJB metadata... 
21.57 MB  
Programming

Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom ICR8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based.... 
20.48 KB  
Programming

dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and... 
327.68 KB  
Programming

Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations. 
471.04 KB  
Programming

libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems. 
143.36 KB  
Libraries

wolfSSL 3.12.2
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments  primarily because of its small size, speed, and feature set. It is commonly used in standard operating... 
2.73 MB  
Libraries

EuGTK 4.8.9
Makes it easy to develop good looking, fast, crossplatform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straightforward syntax. EuGTK allows programming in a clean, objectoriented... 
10.68 MB  
Libraries

Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable. 
5.35 KB  
Libraries

Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse>new( join("", ) ); $info = $parser>required;... 
8.19 KB  
Libraries

sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cppalike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also... 
10.24 KB 