insertion sort
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 1051
Archive sort 0.1
Archive sort is a bash script that sorts directories into manageable 4.4GB directories for the purpose of archiving onto DVDs. more>>
Archive sort is a bash script that sorts directories into manageable 4.4GB directories for the purpose of archiving onto DVDs.
It is useful if you have several tens or hundreds of GBs of data to archive. It can also be configured to sort into 700MB directories for archiving onto CDs.
Usage: ./archive-sort [-h] [-s SIZE] [-t] [-v] SOURCE DEST
Archive files from directory DEST to new directory SOURCE in 4.4GB chunks,
or any SIZE specified by the user.
This script has not been tested extensively, so it is recommended that you make a copy of the directory you want to archive, then run the script on that directory. Always use the -t (test) option first and carefully read the output before using the script.
Optional arguments.
-h Print this help message.
-s Size of the archive media (default 4.4 GB)
-t Test run with verbose messages.
-v Verbose
Examples:
First cd to directory containing directories to be archived:
cd /home/user/archive
archive-sort . ../disc01
This is useful if you have several large directories under /home/user/archive, but no files. The archive directory will not be included in disc01.
If you have a directory full of lots of files, then cd to the parent directory of the directory that needs to be archived:
cd /home/user
archive-sort archive disc01
<<lessIt is useful if you have several tens or hundreds of GBs of data to archive. It can also be configured to sort into 700MB directories for archiving onto CDs.
Usage: ./archive-sort [-h] [-s SIZE] [-t] [-v] SOURCE DEST
Archive files from directory DEST to new directory SOURCE in 4.4GB chunks,
or any SIZE specified by the user.
This script has not been tested extensively, so it is recommended that you make a copy of the directory you want to archive, then run the script on that directory. Always use the -t (test) option first and carefully read the output before using the script.
Optional arguments.
-h Print this help message.
-s Size of the archive media (default 4.4 GB)
-t Test run with verbose messages.
-v Verbose
Examples:
First cd to directory containing directories to be archived:
cd /home/user/archive
archive-sort . ../disc01
This is useful if you have several large directories under /home/user/archive, but no files. The archive directory will not be included in disc01.
If you have a directory full of lots of files, then cd to the parent directory of the directory that needs to be archived:
cd /home/user
archive-sort archive disc01
Download (0.006MB)
Added: 2006-07-24 License: GPL (GNU General Public License) Price:
1188 downloads
MediaSort 1.2
MediaSort is a tool that indexes, sorts, and renames media files such as pictures and MP3s. more>>
MediaSort is a tool that indexes, sorts, and renames media files such as pictures and MP3s based on any of their metadata attributes.
For example, you can sort your pictures by date, size, or other EXIF attributes, or MP3s by author, album, or other ID3 tag values. MediaSort is also a "sorting" Ant FileMapper that can be used with any other Ant tasks to achieve more complex work.
Enhancements:
- Solve major incompatibility with JDK 1.4
<<lessFor example, you can sort your pictures by date, size, or other EXIF attributes, or MP3s by author, album, or other ID3 tag values. MediaSort is also a "sorting" Ant FileMapper that can be used with any other Ant tasks to achieve more complex work.
Enhancements:
- Solve major incompatibility with JDK 1.4
Download (2.4MB)
Added: 2007-05-24 License: GPL (GNU General Public License) Price:
884 downloads
Genre-sort 1.0
Genre-sort is a script that parses ID3 tags for all MP3 files in a directory. more>>
Genre-sort is a handy Python script that will move/copy mp3s based on their id3 genre tag.
Main features:
- Written in Python
- Uses the eyeD3 library http://eyed3.nicfit.net/
- Currently only works on mp3 but ogg vorbis and flac support is planned
Examples:
./genre-sort.py /dir/to/files -p
Will run in pretend mode and show you what the script plans to do.
./genre-sort.py /dir/to/files -c
Will make copies of the files in the correct directories and leave the originals behind.
./genre-sort.py /dir/to/files
Default behavior will move files to the correct directories and delete the originals.
<<lessMain features:
- Written in Python
- Uses the eyeD3 library http://eyed3.nicfit.net/
- Currently only works on mp3 but ogg vorbis and flac support is planned
Examples:
./genre-sort.py /dir/to/files -p
Will run in pretend mode and show you what the script plans to do.
./genre-sort.py /dir/to/files -c
Will make copies of the files in the correct directories and leave the originals behind.
./genre-sort.py /dir/to/files
Default behavior will move files to the correct directories and delete the originals.
Download (0.002MB)
Added: 2005-09-15 License: GPL (GNU General Public License) Price:
1502 downloads
Download Sort 2.5.7
Download Sort is a Firefox extension that automatically saves downloaded files to different directories. more>>
Download Sort is a Firefox extension that automatically saves downloaded files to different directories when using "Save Link As..." or "Save Image as..."
<<less Download (0.025MB)
Added: 2007-07-16 License: MPL (Mozilla Public License) Price:
876 downloads
File::Sort 1.01
File::Sort is a Perl module to sort a file or merge sort multiple files. more>>
File::Sort is a Perl module to sort a file or merge sort multiple files.
SYNOPSIS
use File::Sort qw(sort_file);
sort_file({
I => [qw(file_1 file_2)],
o => file_new, k => 5.3,5.5rn, -t => |
});
sort_file(file1, file1.sorted);
This module sorts text files by lines (or records). Comparisons are based on one or more sort keys extracted from each line of input, and are performed lexicographically. By default, if keys are not given, sort regards each input line as a single field. The sort is a merge sort. If you dont like that, feel free to change it.
Options
The following options are available, and are passed in the hash reference passed to the function in the format:
OPTION => VALUE
Where an option can take multiple values (like I, k, and pos), values may be passed via an anonymous array:
OPTION => [VALUE1, VALUE2]
Where the OPTION is a switch, it should be passed a boolean VALUE of 1 or 0.
This interface will always be supported, though a more perlish interface may be offered in the future, as well. This interface is basically a mapping of the command-line options to the Unix sort utility.
I INPUT
Pass in the input file(s). This can be either a single string with the filename, or an array reference containing multiple filename strings.
c
Check that single input fle is ordered as specified by the arguments and the collating sequence of the current locale. No output is produced; only the exit code is affected.
m
Merge only; the input files are assumed to already be sorted.
o OUTPUT
Specify the name of an OUTPUT file to be used instead of the standard output.
u
Unique: Suppresses all but one in each set of lines having equal keys. If used with the c option check that there are no lines with consecutive lines with duplicate keys, in addition to checking that the input file is sorted.
y MAX_SORT_RECORDS
Maximum number of lines (records) read before writing to temp file. Default is 200,000. This may eventually change to be kbytes instead of lines. Lines was easier to implement. Can also specify with MAX_SORT_RECORDS environment variable.
F MAX_SORT_FILES
Maximum number of temp files to be held open at once. Default to 40, as older Windows ports had quite a small limit. Can also specify with MAX_SORT_FILES environment variable. No temp files will be used at all if MAX_SORT_RECORDS is never reached.
D
Send debugging information to STDERR. Behavior subject to change.
The following options override the default ordering rules. When ordering options appear independent of any key field specifications, the requested field ordering rules are applied globally to all sort keys. When attached to a specific key (see k), the specified ordering options override all global ordering options for that key.
d
Specify that only blank characters and alphanumeric characters, according to the current locale setting, are significant in comparisons. d overrides i.
f
Consider all lower-case characters that have upper-case equivalents, according to the current locale setting, to be the upper-case equivalent for the purposes of comparison.
i
Ignores all characters that are non-printable, according to the current locale setting.
n
Does numeric instead of string compare, using whatever perl considers to be a number in numeric comparisons.
r
Reverse the sense of the comparisons.
b
Ignore leading blank characters when determining the starting and ending positions of a restricted sort key. If the b option is specified before the first k option, it is applied to all k options. Otherwise, the b option can be attached indepently to each field_start or field_end option argument (see below).
t STRING
Use STRING as the field separator character; char is not considered to be part of a field (although it can be included in a sort key). Each occurrence of char is significant (for example, delimits an empty field). If t is not specified, blank characters are used as default field separators; each maximal non-empty sequence of blank characters that follows a non-blank character is a field separator.
X STRING
Same as t, but STRING is interpreted as a Perl regular expression instead. Do not escape any characters (/ characters need to be escaped internally, and will be escaped for you).
The string matched by STRING is not included in the fields themselves, unless demanded by perls regex and split semantics (e.g., regexes in parentheses will add that matched expression as an extra field). See perlre and "split" in perlfunc.
R STRING
Record separator, defaults to newline.
k pos1[,pos2]
The keydef argument is a restricted sort key field definition. The format of this definition is:
field_start[.first_char][type][,field_end[.last_char][type]]
where field_start and field_end define a key field restricted to a portion of the line, and type is a modifier from the list of characters b, d, f, i, n, r. The b modifier behaves like the b option, but applies only to the field_start or field_end to which it is attached. The other modifiers behave like the corresponding options, but apply only to the key field to which they are attached; they have this effect if specified with field_start, field_end, or both. If any modifier is attached to a field_start or a field_end, no option applies to either.
Occurrences of the k option are significant in command line order. If no k option is specified, a default sort key of the entire line is used. When there are multiple keys fields, later keys are compared only after all earlier keys compare equal.
Except when the u option is specified, lines that otherwise compare equal are ordered as if none of the options d, f, i, n or k were present (but with r still in effect, if it was specified) and with all bytes in the lines significant to the comparison. The order in which lines that still compare equal are written is unspecified.
pos +pos1 [-pos2]
Similar to k, these are mostly obsolete switches, but some people like them and want to use them. Usage is:
+field_start[.first_char][type] [-field_end[.last_char][type]]
Where field_end in k specified the last position to be included, it specifes the last position to NOT be included. Also, numbers are counted from 0 instead of 1. pos2 must immediately follow corresponding +pos1. The rest should be the same as the k option.
Mixing +pos1 pos2 with k is allowed, but will result in all of the +pos1 pos2 options being ordered AFTER the k options. It is best if you Dont Do That. Pick one and stick with it.
Here are some equivalencies:
pos => +1 -2 -> k => 2,2
pos => +1.1 -1.2 -> k => 2.2,2.2
pos => [+1 -2, +3 -5] -> k => [2,2, 4,5]
pos => [+2, +0b -1] -> k => [3, 1b,1]
pos => +2.1 -2.4 -> k => 3.2,3.4
pos => +2.0 -3.0 -> k => 3.1,4.0
<<lessSYNOPSIS
use File::Sort qw(sort_file);
sort_file({
I => [qw(file_1 file_2)],
o => file_new, k => 5.3,5.5rn, -t => |
});
sort_file(file1, file1.sorted);
This module sorts text files by lines (or records). Comparisons are based on one or more sort keys extracted from each line of input, and are performed lexicographically. By default, if keys are not given, sort regards each input line as a single field. The sort is a merge sort. If you dont like that, feel free to change it.
Options
The following options are available, and are passed in the hash reference passed to the function in the format:
OPTION => VALUE
Where an option can take multiple values (like I, k, and pos), values may be passed via an anonymous array:
OPTION => [VALUE1, VALUE2]
Where the OPTION is a switch, it should be passed a boolean VALUE of 1 or 0.
This interface will always be supported, though a more perlish interface may be offered in the future, as well. This interface is basically a mapping of the command-line options to the Unix sort utility.
I INPUT
Pass in the input file(s). This can be either a single string with the filename, or an array reference containing multiple filename strings.
c
Check that single input fle is ordered as specified by the arguments and the collating sequence of the current locale. No output is produced; only the exit code is affected.
m
Merge only; the input files are assumed to already be sorted.
o OUTPUT
Specify the name of an OUTPUT file to be used instead of the standard output.
u
Unique: Suppresses all but one in each set of lines having equal keys. If used with the c option check that there are no lines with consecutive lines with duplicate keys, in addition to checking that the input file is sorted.
y MAX_SORT_RECORDS
Maximum number of lines (records) read before writing to temp file. Default is 200,000. This may eventually change to be kbytes instead of lines. Lines was easier to implement. Can also specify with MAX_SORT_RECORDS environment variable.
F MAX_SORT_FILES
Maximum number of temp files to be held open at once. Default to 40, as older Windows ports had quite a small limit. Can also specify with MAX_SORT_FILES environment variable. No temp files will be used at all if MAX_SORT_RECORDS is never reached.
D
Send debugging information to STDERR. Behavior subject to change.
The following options override the default ordering rules. When ordering options appear independent of any key field specifications, the requested field ordering rules are applied globally to all sort keys. When attached to a specific key (see k), the specified ordering options override all global ordering options for that key.
d
Specify that only blank characters and alphanumeric characters, according to the current locale setting, are significant in comparisons. d overrides i.
f
Consider all lower-case characters that have upper-case equivalents, according to the current locale setting, to be the upper-case equivalent for the purposes of comparison.
i
Ignores all characters that are non-printable, according to the current locale setting.
n
Does numeric instead of string compare, using whatever perl considers to be a number in numeric comparisons.
r
Reverse the sense of the comparisons.
b
Ignore leading blank characters when determining the starting and ending positions of a restricted sort key. If the b option is specified before the first k option, it is applied to all k options. Otherwise, the b option can be attached indepently to each field_start or field_end option argument (see below).
t STRING
Use STRING as the field separator character; char is not considered to be part of a field (although it can be included in a sort key). Each occurrence of char is significant (for example, delimits an empty field). If t is not specified, blank characters are used as default field separators; each maximal non-empty sequence of blank characters that follows a non-blank character is a field separator.
X STRING
Same as t, but STRING is interpreted as a Perl regular expression instead. Do not escape any characters (/ characters need to be escaped internally, and will be escaped for you).
The string matched by STRING is not included in the fields themselves, unless demanded by perls regex and split semantics (e.g., regexes in parentheses will add that matched expression as an extra field). See perlre and "split" in perlfunc.
R STRING
Record separator, defaults to newline.
k pos1[,pos2]
The keydef argument is a restricted sort key field definition. The format of this definition is:
field_start[.first_char][type][,field_end[.last_char][type]]
where field_start and field_end define a key field restricted to a portion of the line, and type is a modifier from the list of characters b, d, f, i, n, r. The b modifier behaves like the b option, but applies only to the field_start or field_end to which it is attached. The other modifiers behave like the corresponding options, but apply only to the key field to which they are attached; they have this effect if specified with field_start, field_end, or both. If any modifier is attached to a field_start or a field_end, no option applies to either.
Occurrences of the k option are significant in command line order. If no k option is specified, a default sort key of the entire line is used. When there are multiple keys fields, later keys are compared only after all earlier keys compare equal.
Except when the u option is specified, lines that otherwise compare equal are ordered as if none of the options d, f, i, n or k were present (but with r still in effect, if it was specified) and with all bytes in the lines significant to the comparison. The order in which lines that still compare equal are written is unspecified.
pos +pos1 [-pos2]
Similar to k, these are mostly obsolete switches, but some people like them and want to use them. Usage is:
+field_start[.first_char][type] [-field_end[.last_char][type]]
Where field_end in k specified the last position to be included, it specifes the last position to NOT be included. Also, numbers are counted from 0 instead of 1. pos2 must immediately follow corresponding +pos1. The rest should be the same as the k option.
Mixing +pos1 pos2 with k is allowed, but will result in all of the +pos1 pos2 options being ordered AFTER the k options. It is best if you Dont Do That. Pick one and stick with it.
Here are some equivalencies:
pos => +1 -2 -> k => 2,2
pos => +1.1 -1.2 -> k => 2.2,2.2
pos => [+1 -2, +3 -5] -> k => [2,2, 4,5]
pos => [+2, +0b -1] -> k => [3, 1b,1]
pos => +2.1 -2.4 -> k => 3.2,3.4
pos => +2.0 -3.0 -> k => 3.1,4.0
Download (0.032MB)
Added: 2007-04-30 License: Perl Artistic License Price:
909 downloads
pingmon 2.2
pingmon is a small PING monitor, it just pings a server 5 times and displays the results. more>>
pingmon is a small PING monitor, it just pings a server 5 times and displays the results.
Dont really know how usefull it will be to anyone, but here it is!
Change the .theme file to change the labels and the servers... ill try to do some sort of "click to change" thing later.
<<lessDont really know how usefull it will be to anyone, but here it is!
Change the .theme file to change the labels and the servers... ill try to do some sort of "click to change" thing later.
Download (0.003MB)
Added: 2007-05-17 License: GPL (GNU General Public License) Price:
891 downloads
XML::Filter::Sort 1.01
XML::Filter::Sort is a SAX filter for sorting elements in XML. more>>
XML::Filter::Sort is a SAX filter for sorting elements in XML.
SYNOPSIS
use XML::Filter::Sort;
use XML::SAX::Machines qw( :all );
my $sorter = XML::Filter::Sort->new(
Record => person,
Keys => [
[ lastname, alpha, asc ],
[ firstname, alpha, asc ],
[ @age, num, desc]
],
);
my $filter = Pipeline( $sorter => *STDOUT );
$filter->parse_file(*STDIN);
Or from the command line:
xmlsort
This module is a SAX filter for sorting records in XML documents (including documents larger than available memory). The xmlsort utility which is included with this distribution can be used to sort an XML file from the command line without writing Perl code (see perldoc xmlsort).
<<lessSYNOPSIS
use XML::Filter::Sort;
use XML::SAX::Machines qw( :all );
my $sorter = XML::Filter::Sort->new(
Record => person,
Keys => [
[ lastname, alpha, asc ],
[ firstname, alpha, asc ],
[ @age, num, desc]
],
);
my $filter = Pipeline( $sorter => *STDOUT );
$filter->parse_file(*STDIN);
Or from the command line:
xmlsort
This module is a SAX filter for sorting records in XML documents (including documents larger than available memory). The xmlsort utility which is included with this distribution can be used to sort an XML file from the command line without writing Perl code (see perldoc xmlsort).
Download (0.025MB)
Added: 2006-09-06 License: Perl Artistic License Price:
1145 downloads
Robsort Sorting Algorithm 1.0
Robsort Sorting Algorithm is a sorting algorithm which uses random numbers. more>>
Robsort in a GNU public license sorting algorithm devleloped by Robert Thompson. Robsort uses random number generation to sort arrays of integers. It is claimed to be the worlds least efficient sorting algorithm.
Scientists have calculated the robsort algorithm to approach an order of [n!] (n factorial) inefficiency, however this inefficiency could only theoretically be obtained by using truly random numbers.
<<lessScientists have calculated the robsort algorithm to approach an order of [n!] (n factorial) inefficiency, however this inefficiency could only theoretically be obtained by using truly random numbers.
Download (0.10MB)
Added: 2005-06-06 License: GPL (GNU General Public License) Price:
1601 downloads
ps: Aero AIO plugin 1.0.2
ps: Aero AIO is a plugin for Aero AIO that show the 6 most resource intensive processes. more>>
ps: Aero AIO is a plugin for Aero AIO that show the 6 most resource intensive processes. You can choose whether to sort on CPU, mem or elapsed time.
Usage:
- Install the plugin via the Aero-AIO config dialog. The columns have headings
<<lessUsage:
- Install the plugin via the Aero-AIO config dialog. The columns have headings
Download (0.011MB)
Added: 2006-06-20 License: GPL (GNU General Public License) Price:
1225 downloads
TextSort 1.0.3
TextSort application allows you to sort the lines of a a text alphabetically. more>>
TextSort application allows you to sort the lines of a text alphabetically.
This program is released under the GPL license.
Main features:
- Case sensitive or insensitive
- Trim lines, remove empty lines
- Remove duplicates
<<lessThis program is released under the GPL license.
Main features:
- Case sensitive or insensitive
- Trim lines, remove empty lines
- Remove duplicates
Download (0.009MB)
Added: 2007-07-27 License: GPL (GNU General Public License) Price:
498 downloads
PdfLicenseManager 2.2
PdfLicenseManager aims to be a simple tool to manage PDF licensing information. more>>
PdfLicenseManager aims to be a simple tool to manage PDF licensing information.
In particular, it is focused on inserting and managing Creative Commons licensing information in the XMP stream.
The program can both show the licensing information associated with a PDF file (which is contained in the XMP stream) or it can embed a Creative Commons License into the file. Metadata which are already present in the file are kept unaltered as much as possible.
Please note that the program, even if it works in a number of different cases, is still in its first stages, so always keep all your original files.
This program DOES NOT add any image, logo or text on the first page of the PDF file. If you want to mark your file with the insertion of the "Some Rights Reserved" logo and/or the text "This work is released under..." you need to do it by yourself (see the Creative Commons website for more details).
<<lessIn particular, it is focused on inserting and managing Creative Commons licensing information in the XMP stream.
The program can both show the licensing information associated with a PDF file (which is contained in the XMP stream) or it can embed a Creative Commons License into the file. Metadata which are already present in the file are kept unaltered as much as possible.
Please note that the program, even if it works in a number of different cases, is still in its first stages, so always keep all your original files.
This program DOES NOT add any image, logo or text on the first page of the PDF file. If you want to mark your file with the insertion of the "Some Rights Reserved" logo and/or the text "This work is released under..." you need to do it by yourself (see the Creative Commons website for more details).
Download (0.062MB)
Added: 2007-02-12 License: GPL (GNU General Public License) Price:
984 downloads
Tie::Hash::Sorted 0.10
Tie::Hash::Sorted Perl module presents hashes in sorted order. more>>
Tie::Hash::Sorted Perl module presents hashes in sorted order.
SYNOPSIS
use Tie::Hash::Sorted;
my %ages = (
John => 33,
Jacob => 29,
Jingle => 15,
Heimer => 48,
Smitz => 12,
);
my $sort_by_numeric_value = sub {
my $hash = shift;
[ sort {$hash->{$b} $hash->{$a}} keys %$hash ];
};
tie my %sorted_ages, Tie::Hash::Sorted,
Hash => %ages,
Sort_Routine => $sort_by_numeric_value;
for my $name ( keys %sorted_ages ) {
print "$name is $sorted_ages{$name} years old.n";
}
### OUTPUT ###
Heimer is 48 ears old.
John is 33 ears old.
Jacob is 29 ears old.
Jingle is 15 ears old.
Smitz is 12 ears old.
<<lessSYNOPSIS
use Tie::Hash::Sorted;
my %ages = (
John => 33,
Jacob => 29,
Jingle => 15,
Heimer => 48,
Smitz => 12,
);
my $sort_by_numeric_value = sub {
my $hash = shift;
[ sort {$hash->{$b} $hash->{$a}} keys %$hash ];
};
tie my %sorted_ages, Tie::Hash::Sorted,
Hash => %ages,
Sort_Routine => $sort_by_numeric_value;
for my $name ( keys %sorted_ages ) {
print "$name is $sorted_ages{$name} years old.n";
}
### OUTPUT ###
Heimer is 48 ears old.
John is 33 ears old.
Jacob is 29 ears old.
Jingle is 15 ears old.
Smitz is 12 ears old.
Download (0.008MB)
Added: 2007-07-13 License: Perl Artistic License Price:
833 downloads
Domino Javadoc Generator 0.4
Domino Javadoc Generator project aims to create a documentation to the Lotus Notes API for Java. more>>
Domino Javadoc Generator project aims to create a documentation to the Lotus Notes API for Java in a standard format common in the Java comunity and accepted by the most IDEs for Java.
The Lotus Notes API is delivered as a Java archive together with the original documentation in the native format of a Domino database with the IBM Domino Designer. The documentation can be read only in the Lotus Notes. Java-oriented tools cannot use it to display a description of a Java class, to browse classes and their methods or to offer an automatic code insertion based on a Java object and its class.
The goal is to create a Javadoc documentation together with a pseudo-source code of the Lotus Notes API. The documentation can be viewed, indexed and integrated to IDEs. The pseudo-source code can be integrated to IDEs to support object browsing and automatic source code insertion.
<<lessThe Lotus Notes API is delivered as a Java archive together with the original documentation in the native format of a Domino database with the IBM Domino Designer. The documentation can be read only in the Lotus Notes. Java-oriented tools cannot use it to display a description of a Java class, to browse classes and their methods or to offer an automatic code insertion based on a Java object and its class.
The goal is to create a Javadoc documentation together with a pseudo-source code of the Lotus Notes API. The documentation can be viewed, indexed and integrated to IDEs. The pseudo-source code can be integrated to IDEs to support object browsing and automatic source code insertion.
Download (0.38MB)
Added: 2006-08-10 License: BSD License Price:
1179 downloads
XML::Filter::Sort::Buffer 1.01
XML::Filter::Sort::Buffer is an implementation class used by XML::Filter::Sort. more>>
XML::Filter::Sort::Buffer is an implementation class used by XML::Filter::Sort.
The documentation is targetted at developers wishing to extend or replace this class. For user documentation, see XML::Filter::Sort.
For an overview of the classes and methods used for buffering, see XML::Filter::Sort::BufferMgr.
BUFFER LIFE CYCLE
A XML::Filter::Sort::Buffer object is created by a XML::Filter::Sort::BufferMgr object using the new() method.
The XML::Filter::Sort object will then propagate any SAX events it receives, to the buffer object until the end of the record is reached. As each element is added to the buffer, its contents are compared to the sort key paths and the sort key values are extracted.
When the end of the record is reached, the close() method is called. The return value from this method is the list of sort keys.
The buffer manager will store the buffer until the end of the record sequence is reached. Then it will retrieve each buffer in order of the sort key values and call the buffers to_sax() method to send all buffered events to the downstream handler.
Following the call to to_sax(), the buffer is discarded. No destructor method is used - everything is handled by Perls garbage collector.
<<lessThe documentation is targetted at developers wishing to extend or replace this class. For user documentation, see XML::Filter::Sort.
For an overview of the classes and methods used for buffering, see XML::Filter::Sort::BufferMgr.
BUFFER LIFE CYCLE
A XML::Filter::Sort::Buffer object is created by a XML::Filter::Sort::BufferMgr object using the new() method.
The XML::Filter::Sort object will then propagate any SAX events it receives, to the buffer object until the end of the record is reached. As each element is added to the buffer, its contents are compared to the sort key paths and the sort key values are extracted.
When the end of the record is reached, the close() method is called. The return value from this method is the list of sort keys.
The buffer manager will store the buffer until the end of the record sequence is reached. Then it will retrieve each buffer in order of the sort key values and call the buffers to_sax() method to send all buffered events to the downstream handler.
Following the call to to_sax(), the buffer is discarded. No destructor method is used - everything is handled by Perls garbage collector.
Download (0.025MB)
Added: 2006-09-06 License: Perl Artistic License Price:
1146 downloads
Text::WagnerFischer 0.04
Text::WagnerFischer is an implementation of the Wagner-Fischer edit distance. more>>
Text::WagnerFischer is an implementation of the Wagner-Fischer edit distance.
SYNOPSIS
use Text::WagnerFischer qw(distance);
print distance("foo","four");# prints "2"
print distance([0,1,2],"foo","four");# prints "3"
my @words=("four","foo","bar");
my @distances=distance("foo",@words);
print "@distances"; # prints "2 0 3"
@distances=distance([0,2,1],"foo",@words);
print "@distances"; # prints "3 0 3"
This module implements the Wagner-Fischer dynamic programming technique, used here to calculate the edit distance of two strings. The edit distance is a measure of the degree of proximity between two strings, based on "edits": the operations of substitutions, deletions or insertions needed to transform the string into the other one (and vice versa). A cost (weight) is needed for every of the operation defined above:
/ a if x=y (cost for letter match)
w(x,y) = | b if x=- or y=- (cost for insertion/deletion operation)
c if x!=y (cost for letter mismatch)
These costs are given through an array reference as first argument of the distance subroutine: [a,b,c]. If the costs are not given, a default array cost is used: [0,1,1] that is the case of the Levenshtein edit distance:
/ 0 if x=y (cost for letter match)
w(x,y) = | 1 if x=- or y=- (cost for insertion/deletion operation)
1 if x!=y (cost for letter mismatch)
This particular distance is the exact number of edit needed to transform the string into the other one (and vice versa). When two strings have distance 0, they are the same. Note that the distance is calculated to reach the _minimum_ cost, i.e. choosing the most economic operation for each edit.
<<lessSYNOPSIS
use Text::WagnerFischer qw(distance);
print distance("foo","four");# prints "2"
print distance([0,1,2],"foo","four");# prints "3"
my @words=("four","foo","bar");
my @distances=distance("foo",@words);
print "@distances"; # prints "2 0 3"
@distances=distance([0,2,1],"foo",@words);
print "@distances"; # prints "3 0 3"
This module implements the Wagner-Fischer dynamic programming technique, used here to calculate the edit distance of two strings. The edit distance is a measure of the degree of proximity between two strings, based on "edits": the operations of substitutions, deletions or insertions needed to transform the string into the other one (and vice versa). A cost (weight) is needed for every of the operation defined above:
/ a if x=y (cost for letter match)
w(x,y) = | b if x=- or y=- (cost for insertion/deletion operation)
c if x!=y (cost for letter mismatch)
These costs are given through an array reference as first argument of the distance subroutine: [a,b,c]. If the costs are not given, a default array cost is used: [0,1,1] that is the case of the Levenshtein edit distance:
/ 0 if x=y (cost for letter match)
w(x,y) = | 1 if x=- or y=- (cost for insertion/deletion operation)
1 if x!=y (cost for letter mismatch)
This particular distance is the exact number of edit needed to transform the string into the other one (and vice versa). When two strings have distance 0, they are the same. Note that the distance is calculated to reach the _minimum_ cost, i.e. choosing the most economic operation for each edit.
Download (0.004MB)
Added: 2007-08-22 License: Perl Artistic License Price:
793 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 insertion sort 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