Main > Free Download Search >

Free prime software for linux

prime

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 34
Primes 1.4

Primes 1.4


calculates the prime numbers 1..N, tells you if N is prime etc. Prints tables of primes. Computes the prime just below or above N. calculates the prime numbers 1..N, tells you if N is prime etc. It is useful in computing optimal Hashtable sizes. Java source included. more>>

Primes - calculates the prime numbers 1..N, tells you if N is prime etc.

Prints tables of primes.

Computes the prime just below or above N.

It is useful in computing optimal Hashtable sizes.

Java source included.


Enhancements:
Version 1.4

mostly cosmetic, more documentation, tidy source.


System Requirements:
<<less
Download (461Kb)
Added: 2006-03-06 License: Free Price: Free
15 downloads
Prime Mover 0.1.1

Prime Mover 0.1.1


Prime Mover is a build tool, not unlike make. more>>
Prime Mover is a build tool, not unlike make. It is designed to be small, portable, flexible, powerful, and is very easy to deploy.
Prime Mover can be distributed along with your application source code and does not require your end user to have anything other than a basic C compiler in order to use it.
Main features:
- Automatic dependency checking for C-like files
- Explicit dependency graphs
- Arbitrarily complex rules (its possible to clearly represent far more complex dependency graphs in pm than you can in make)
- Can handle multiple directories at the same time (no more recursive makefiles!)
- Highly scalable (pm can deal with very large builds as easily as very small ones)
- Easy cross-compilation (object files are stored in pms own object file cache, not in your build tree, so you dont have to worry about distinguishing them)
- Build multiple versions of the same application (pm remembers the compiler options used to build every file, and can tell different versions of the same object file apart)
- Easy deployment (all of pms core code consists of exactly file, which can be run on nearly any platform --- no installation or compilation needed!)
- Object oriented design (making it very easy to create your own rules by specialising one of the existing ones)
- A true programming language (if you need it, all the power of the Lua programming language is at your fingertips)
pm differs from make primarily in that all dependencies in pm are explicit. make will attempt to determine what needs to be done to build a file, based on a set of rules that tell it how to transform file types. This works well until you need to have different rules apply to two files of the same type... which then causes make to quickly become unmanageable.
pm avoids this by requiring all rules to be explicit. Thanks to the power of syntactic sugar, it is much less work than it sounds, never fear.
The best explanation is an example, and so here is an example pmfile that will build a simple C program:
-- load the C rules
include "c.pm"
-- default target builds a C program
default = cprogram {
-- cfile transforms a C source file into an object file
cfile "main.c",
cfile "utils.c",
cfile "aux.c",
-- once built, this makes the result available
install = pm.install("myprogram")
}
If this is saved as "pmfile" in the current directory, it can be invoked by simply doing:
./pm
...and it will run.
Enhancements:
- This is a bugfix release that corrects a few niggling issues with {PARENT, ...}, {REDIRECT, ...}, and improving portability.
<<less
Download (0.34MB)
Added: 2007-02-25 License: MIT/X Consortium License Price:
973 downloads
Javascript::Menu 2.02

Javascript::Menu 2.02


Javascript::Menu is a NumberedTree that generates HTML and Javascript code for a menu. more>>
Javascript::Menu is a NumberedTree that generates HTML and Javascript code for
a menu.

SYNOPSIS

use Javascript::Menu;

# Give it something to do (example changes the menus caption):

my $action = sub {
my $self = shift;
my ($level, $unique) = @_;

my $value = $self->getValue;
return "getElementById(caption_$unique).innerHTML=$value";
};


# Build the tree:

my $menu = Javascript::Menu->convert(tree => $otherTree, action => $action);

my $menu = Javascript::Menu->readDB(source_name => $table, source => $dbh,
action => $action);

my $menu = Javascript::Menu->new(value => Please select a parrot,
action => $action);

my $blue = $menu->append(value => Norwegian Blue);
$blue->append(value => Pushing up the daisies);
$menu->append(value => A Snail);

# Or maybe you just want a navigational menu?

my $menu = Javascript::Menu->new(value => Please select a prime minister);
$menu->append(value => Ariel Sharon,
URL => www.corruption.org/ariel_sharon.htm);

$menu->append(value => Benjamin Netanyahu,
URL => www.corruption.org/bibi.htm);

$menu->append(value => Shaul Mofaz, URL => www.martial_law.org);


# Print it out as a right-to-left menu:

my $css = $menu->buildCSS($menu->reasonableCSS);
print $cgi->start_html(-script => $menu->baseJS(rtl),
-style => $css); #CSS plays an important role.
print $tree->getHTML;

Javascript::Menu is an object that helps in creating the HTML, Javascript, and some of the CSS required for a table-based menu. There are a few other modules that deal with menus, But as I browsed through them, I found that none of them exactly fitted my needs. So I designed this module, with the following goals in mind:

Flexibility

The main feature of this module is the ability to supply all nodes or any specific node with a subroutine that is activated in time of the code generation to help decide what the item will do when it is clicked. This allows customisation far beyond associating a link with every item. Multy-level selection menus become very easy to do (and this is, in fact, what I needed when I started writing this).

I18n

Working with i18n (internationalization) can be a big headache. Working with Hebrew (or Arabic) forces you not only to change your charachters, but also to change your direction of writing. I incorporated into this module the ability to produce right-to-left menus and tested it using a legacy ASCII-based encoding (iso-8859-8).

Object Hierarchy

I designed the module to work with two other modules of mine, Tree::Numbered and Tree::Numbered::DB, which simplify the task of building the menu and allow for construction of a menu from database information.

The current version adds support for highlighting the item thats hovered over. Youll find that having made some preliminary steps, like tweaking the CSS to look the way you like it to, the rest is fairly easy.

<<less
Download (0.025MB)
Added: 2006-06-12 License: Perl Artistic License Price:
1235 downloads
GTP server simulator 0.1

GTP server simulator 0.1


GTP server simulator is a simple responder for the GTP (GTP prime) protocol. more>>
GTP server simulator is a simple responder for the GTP (GTP prime) protocol that works with the Cisco Content Services Gateway to provide per-user traffic limits.

GTP` (GTP prime) server simulator (it permits any content and provide quadrants for every operation) binaries for Linux (run under Fedora Core 4 and 5).

The binary was tested with Cisco CSG.
<<less
Download (0.017MB)
Added: 2006-12-19 License: Other/Proprietary License Price:
619 downloads
List::Maker 0.0.3

List::Maker 0.0.3


List::Maker is a Perl module that can generate more sophisticated lists than just $a..$b. more>>
List::Maker is a Perl module that can generate more sophisticated lists than just $a..$b.

SYNOPSIS

use List::Maker;

@list = < 1..10 >; # (1,2,3,4,5,6,7,8,9,10)

@list = < 10..1 >; # (10,9,8,7,6,5,4,3,2,1)

@list = < 1,3,..10 > # (1,3,5,7,9)
@list = < 1..10 x 2 > # (1,3,5,7,9)

@list = < 0..10 : prime N >; # (2,3,5,7)
@list = < 1,3,..30 : /7/ > # (7,17,27)

@words = < a list of words >; # (a, list, of, words)
@words = < a list "of words" >; # (a list, of words)

The List::Maker module hijacks Perls built-in file globbing syntax (< *.pl > and glob *.pl) and retargets it at list creation.

The rationale is simple: most people rarely if ever glob a set of files, but they have to create lists in almost every program they write. So the list construction syntax should be easier than the filename expansion syntax.

<<less
Download (0.007MB)
Added: 2007-06-27 License: Perl Artistic License Price:
852 downloads
GNoise 0.1.15

GNoise 0.1.15


GNoise is a wave file editor for Linux. more>>
GNoise is a wave file editor for Linux. Prime considerations were for it to be speedy and be able to handle big files. So far it can: load and display files, generate a display cache, play the file, cut, copy, paste, (unlimited) undo, mute, fade in/out, reverse, normalize, and more.
The primary design objectives are stability, speed, and the ability to handle big files (i.e. 70MB ripped CD tracks) easily. In fact GNoise is known to work with >500MB files although the author doesnt happen to have any wave files that size laying about.
See the TODO list for things Im considering adding/fixing in the near future. Feel free to send me patches or email, especially for any bugs you encounter.
The custom gtk widgets within GNoise support setting colors through the normal gtkrc mechanisms, there is a sample gtkrc file included, just drop it in ~/.gnoise and edit it to your likings.
Note that GNoise is a destructive editor: all editing operates directly on the soundfile, work on a copy of something you really dont want to lose. Note also that you should not mix the use of the disable undo option on different edits within an editing session (ie. if you start editing a file with undo disabled then leave undos disabled until you close the file, at which point you can turn undo on and re-open the file if you wish to edit with undo capability).
Enhancements:
- Finally did the markers/cue points. Add/delete markers that are saved in a standard cue chunk inside the wave file.
<<less
Download (0.069MB)
Added: 2006-07-18 License: GPL (GNU General Public License) Price:
1194 downloads
Gallipoli: The Game 0.7.0

Gallipoli: The Game 0.7.0


Gallipoli: The Game is a stunning recreation of Australias greatest military adventure. more>>
Gallipoli: The Game is a stunning recreation of Australias greatest military adventure. As a commander in the Great War (WWI), you take on the role of leading the prime of Australias armed forces as they launch an all-out assault on the Central Powers (the Germans, Austrians and the Ottomans).
Gameplay is similar to the hit PC game, Lemmings, except, instead of trying to save your soldiers, your mission, as an authentic WWI commander, is to wipe out as many diggers as possible ... the more gruesomely, the better!
Main features:
- Landing at Hell Spit (ANZAC cove)
- Russells Top
- The Sphinx
- Walkers Ridge
- The landing at Sulva Bay
- The third wave at the Nek
Enhancements:
- game much faster
- more options
- Battle of Pozyers level removed (no-one was playing it)
<<less
Download (15.4MB)
Added: 2006-04-13 License: GPL (GNU General Public License) Price:
1291 downloads
MultiGate beta2

MultiGate beta2


MultiGate is a multi-function security gateway (firewall). more>>
MultiGate is a multi-function security gateway (firewall). Built on Linux and Open Source components, it provides an easy and integrated solution designed to secure and protect networks. MultiGate contains SecurityPlugins that allow quick installation, configuration and operation of various Open Source security modules designed to enhance security and protection capabilities of the gateway.

Built on Linux and other Open Source components, it provides an easy and integrated solution designed to secure and protect networks. Developed in Java, the web server and controlling services provide all installation, configuration and administration functions for the system. The system has been developed with is prime focus being "Ease of Use" for the novice user. Majority of Open Source firewalls are complex to configure and daunting for the first-time user. MultiGate contains many wizards and simplified interface to get the user up and running securely in a short period of time. Advanced users can enable advanced options to allow a better setup of settings and configuration.

MultiGate includes SecurityPlugins that allow quick installation, configuration and operation of various Open Source security modules designed to enhance security and protection capabilities of the gateway. Built on a pluggable framework, extra components can be added or removed to accommodate the exact security requirements needed by the user.

<<less
Download (2.0MB)
Added: 2006-07-08 License: GPL (GNU General Public License) Price:
1203 downloads
LibTomMath 0.40

LibTomMath 0.40


LibTomMath is a library that provides highly optimized and portable math routines. more>>
LibTomMath is a free open source portable number theoretic multiple-precision integer library written entirely in C. The library is designed to provide a simple to work with API that provides fairly efficient routines that build out of the box without configuration.
The library builds out of the box with GCC 2.95 [and up] as well as Visual C++ v6.00 [with SP5] without configuration. The source code is arranged to make it easy to dive into a particular area very quickly.
The code is also littered with comments [This is one of the on going goals] that help explain the algorithms and their implementations. Ideally the code will serve as an educational tool in the future for CS students studying number theory.
Main features:
Simple Algebraic
- Addition
- Subtraction
- Multiplication
- Squaring
- Division
Digit Manipulation
- Shift left/right whole digits (mult by 2b by moving digits)
- Fast multiplication/division by 2 and 2k for k>1
- Binary AND, OR and XOR gates
Modular Reductions
- Barrett Reduction (fast for any p)
- Montgomery Reduction (faster for any odd p)
- DR Reduction (faster for any restricted p see manual)
- 2k Reduction (fast reduction modulo 2p - k for k < MP_MASK and for k > MP_MASK)
- The exptmod logic can use any of the five reduction algorithms when appropriate with a single function call.
Number Theoretic
- Greatest Common Divisor
- Least Common Multiple
- Jacobi Symbol Computation (falls back to Legendre for prime moduli)
- Multiplicative Inverse
- Extended Euclidean Algorithm
- Modular Exponentiation
- Fermat and Miller-Rabin Primality Tests, utility function such as is_prime and next_prime
Miscellaneous
- Root finding over Z
- Pseudo-random integers
- Signed and Unsigned comparisons
Optimizations
- Fast Comba based Multiplier, Squaring and Montgomery routines.
- Montgomery, Diminished Radix and Barrett based modular exponentiation.
- Karatsuba and Toom-Cook multiplication algorithms.
- Many pointer aliasing optimiztions throughout the entire library.
Enhancements:
- This release fixes one overflow and a minor build issue.
- Otherwise, the code is stable and unchanged.
<<less
Download (1.8MB)
Added: 2006-12-27 License: GPL (GNU General Public License) Price:
1036 downloads
Bit::Vector 6.4

Bit::Vector 6.4


Bit::Vector is an efficient bit vector, set of integers and big int math library. more>>
Bit::Vector is an efficient bit vector, set of integers and "big int" math library.

CLASS METHODS

Version

$version = Bit::Vector->Version();

Word_Bits
$bits = Bit::Vector->Word_Bits(); # bits in a machine word

Long_Bits
$bits = Bit::Vector->Long_Bits(); # bits in an unsigned long

new
$vector = Bit::Vector->new($bits); # bit vector constructor

@veclist = Bit::Vector->new($bits,$count);

new_Hex
$vector = Bit::Vector->new_Hex($bits,$string);

new_Bin
$vector = Bit::Vector->new_Bin($bits,$string);

new_Dec
$vector = Bit::Vector->new_Dec($bits,$string);

new_Enum
$vector = Bit::Vector->new_Enum($bits,$string);

Concat_List
$vector = Bit::Vector->Concat_List(@vectors);
OBJECT METHODS
new
$vec2 = $vec1->new($bits); # alternative call of constructor

@veclist = $vec->new($bits,$count);

Shadow
$vec2 = $vec1->Shadow(); # new vector, same size but empty

Clone
$vec2 = $vec1->Clone(); # new vector, exact duplicate

Concat
$vector = $vec1->Concat($vec2);

Concat_List
$vector = $vec1->Concat_List($vec2,$vec3,...);

Size
$bits = $vector->Size();

Resize
$vector->Resize($bits);
$vector->Resize($vector->Size()+5);
$vector->Resize($vector->Size()-5);

Copy
$vec2->Copy($vec1);

Empty
$vector->Empty();

Fill
$vector->Fill();

Flip
$vector->Flip();

Primes
$vector->Primes(); # Sieve of Erathostenes

Reverse
$vec2->Reverse($vec1);

Interval_Empty
$vector->Interval_Empty($min,$max);

Interval_Fill
$vector->Interval_Fill($min,$max);

Interval_Flip
$vector->Interval_Flip($min,$max);

Interval_Reverse
$vector->Interval_Reverse($min,$max);

Interval_Scan_inc
if (($min,$max) = $vector->Interval_Scan_inc($start))

Interval_Scan_dec
if (($min,$max) = $vector->Interval_Scan_dec($start))

Interval_Copy
$vec2->Interval_Copy($vec1,$offset2,$offset1,$length);

Interval_Substitute
$vec2->Interval_Substitute($vec1,$off2,$len2,$off1,$len1);

is_empty
if ($vector->is_empty())

is_full
if ($vector->is_full())

equal
if ($vec1->equal($vec2))

Lexicompare (unsigned)
if ($vec1->Lexicompare($vec2) == 0)
if ($vec1->Lexicompare($vec2) != 0)
if ($vec1->Lexicompare($vec2) < 0)
if ($vec1->Lexicompare($vec2) Lexicompare($vec2) > 0)
if ($vec1->Lexicompare($vec2) >= 0)

Compare (signed)
if ($vec1->Compare($vec2) == 0)
if ($vec1->Compare($vec2) != 0)
if ($vec1->Compare($vec2) < 0)
if ($vec1->Compare($vec2) Compare($vec2) > 0)
if ($vec1->Compare($vec2) >= 0)

to_Hex
$string = $vector->to_Hex();

from_Hex
$vector->from_Hex($string);

to_Bin
$string = $vector->to_Bin();

from_Bin
$vector->from_Bin($string);

to_Dec
$string = $vector->to_Dec();

from_Dec
$vector->from_Dec($string);

to_Enum
$string = $vector->to_Enum(); # e.g. "2,3,5-7,11,13-19"

from_Enum
$vector->from_Enum($string);

Bit_Off
$vector->Bit_Off($index);

Bit_On
$vector->Bit_On($index);

bit_flip
$bit = $vector->bit_flip($index);

bit_test
contains
$bit = $vector->bit_test($index);
$bit = $vector->contains($index);
if ($vector->bit_test($index))
if ($vector->contains($index))

Bit_Copy
$vector->Bit_Copy($index,$bit);

LSB (least significant bit)
$vector->LSB($bit);

MSB (most significant bit)
$vector->MSB($bit);

lsb (least significant bit)
$bit = $vector->lsb();

msb (most significant bit)
$bit = $vector->msb();

rotate_left
$carry = $vector->rotate_left();

rotate_right
$carry = $vector->rotate_right();

shift_left
$carry = $vector->shift_left($carry);

shift_right
$carry = $vector->shift_right($carry);

Move_Left
$vector->Move_Left($bits); # shift left "$bits" positions

Move_Right
$vector->Move_Right($bits); # shift right "$bits" positions

Insert
$vector->Insert($offset,$bits);

Delete
$vector->Delete($offset,$bits);

increment
$carry = $vector->increment();

decrement
$carry = $vector->decrement();

inc
$overflow = $vec2->inc($vec1);

dec
$overflow = $vec2->dec($vec1);

add
$carry = $vec3->add($vec1,$vec2,$carry);
($carry,$overflow) = $vec3->add($vec1,$vec2,$carry);

subtract
$carry = $vec3->subtract($vec1,$vec2,$carry);
($carry,$overflow) = $vec3->subtract($vec1,$vec2,$carry);

Neg
Negate
$vec2->Neg($vec1);
$vec2->Negate($vec1);

Abs
Absolute
$vec2->Abs($vec1);
$vec2->Absolute($vec1);

Sign
if ($vector->Sign() == 0)
if ($vector->Sign() != 0)
if ($vector->Sign() < 0)
if ($vector->Sign() Sign() > 0)
if ($vector->Sign() >= 0)

Multiply
$vec3->Multiply($vec1,$vec2);

Divide
$quot->Divide($vec1,$vec2,$rest);

GCD (Greatest Common Divisor)
$vecgcd->GCD($veca,$vecb);
$vecgcd->GCD($vecx,$vecy,$veca,$vecb);

Power
$vec3->Power($vec1,$vec2);

Block_Store
$vector->Block_Store($buffer);

Block_Read
$buffer = $vector->Block_Read();

Word_Size
$size = $vector->Word_Size(); # number of words in "$vector"

Word_Store
$vector->Word_Store($offset,$word);

Word_Read
$word = $vector->Word_Read($offset);

Word_List_Store
$vector->Word_List_Store(@words);

Word_List_Read
@words = $vector->Word_List_Read();

Word_Insert
$vector->Word_Insert($offset,$count);

Word_Delete
$vector->Word_Delete($offset,$count);

Chunk_Store
$vector->Chunk_Store($chunksize,$offset,$chunk);

Chunk_Read
$chunk = $vector->Chunk_Read($chunksize,$offset);

Chunk_List_Store
$vector->Chunk_List_Store($chunksize,@chunks);

Chunk_List_Read
@chunks = $vector->Chunk_List_Read($chunksize);

Index_List_Remove
$vector->Index_List_Remove(@indices);

Index_List_Store
$vector->Index_List_Store(@indices);

Index_List_Read
@indices = $vector->Index_List_Read();

Or
Union
$vec3->Or($vec1,$vec2);
$set3->Union($set1,$set2);

And
Intersection
$vec3->And($vec1,$vec2);
$set3->Intersection($set1,$set2);

AndNot
Difference
$vec3->AndNot($vec1,$vec2);
$set3->Difference($set1,$set2);

Xor
ExclusiveOr
$vec3->Xor($vec1,$vec2);
$set3->ExclusiveOr($set1,$set2);

Not
Complement
$vec2->Not($vec1);
$set2->Complement($set1);

subset
if ($set1->subset($set2)) # true if $set1 is subset of $set2

Norm
$norm = $set->Norm();
$norm = $set->Norm2();
$norm = $set->Norm3();

Min
$min = $set->Min();

Max
$max = $set->Max();

Multiplication
$matrix3->Multiplication($rows3,$cols3,
$matrix1,$rows1,$cols1,
$matrix2,$rows2,$cols2);

Product
$matrix3->Product($rows3,$cols3,
$matrix1,$rows1,$cols1,
$matrix2,$rows2,$cols2);

Closure
$matrix->Closure($rows,$cols);

Transpose
$matrix2->Transpose($rows2,$cols2,$matrix1,$rows1,$cols1);

<<less
Download (0.13MB)
Added: 2007-05-17 License: Perl Artistic License Price:
890 downloads
Mjpeg tools 1.8.0

Mjpeg tools 1.8.0


Mjpeg tools is a suite of programs which support video capture, basic editing, playback, and compression to MPEG-1/2 video. more>>
The mjpeg programs are a set of tools that can do recording of videos and playback, simple cut-and-paste editing and the MPEG compression of audio and video under Linux.
Recording is supported for the Zoran based cards like the Buz (Iomega), DC10 (MIRO, Pinnacle), Matrox Marvel cards and the LML33 (Linux Media Labs). See related pages to the right to find the right driver for your card.
The recorded videos can be converted to MPEG streams. The software playback of MPEG streams works with almost every player and every OS.
You can produce special forms of MPEG streams like VCD (Video CD) and SVCD for hardware playback.
A key design objective of the tools is interoperability with other video tools:
The tools can be used used to edit, playback and compress motion JPEG (MJPEG) AVIs captured using the xawtv package.
The tools can be used to edit playback and compress MJPEG streams created and editted with broadcast 2000. N.b. the current mpeg2movie high bit-rate MPEG encoder is in large part derived from an obsolescent snapshot of the mjpegtools MPEG encoder.
Enhancements:
- changes in YUV4MPEG2 API to offer support for multiple colorspaces (particularly useful for DV video), so that multiple planar YUV formats (also monochrome or alpha) are supported.
- most filtering tools have been adapted to support multiple YUV formats, so that you will not lose quality/precision in conversion steps.
- Many new or dramatically improved filters including (but not limited to):
*) yuvdenoise (denoising filter)
*) yuvdeinterlace (intelligent deinterlacing program)
*) y4munsharp (unsharp mask image sharpening program)
- Improvements in the IDCT/DCT routines in the MPEG-1/-2 encoder (much more exact now and not subject to overflow/truncation on the IA32 arch).
- MANY new utilties for importing/exporting data:
*) New and improved PGM/PNM conversion programs for dealing with PPM data.
*) Utilities to convert raw (headerless) YUV data to and from YUV4MPEG2 format. Useful when interfacing with other program suites.
*) Program (yuyvtoy4m) to convert 4:2:2 data from digital cameras into YUV4MPEG2 format for use with mjpegtools.
*) y4mstabilizer for stabilizing images with unsteady camera work
- Improvements and fixes in mplex for handling PCM audio (LPCM audio actually works now)
- DPME (Dual Prime Motion Estimation) in the encoder (mpeg2enc) is fully functional (it was present but buggy/artifacted in the earlier releases)
- Rate control in the encoder improved considerably.
- Much better Quicktime file handling (via libquicktime) especially the audio tracks.
- Besides the always-excellent x86 support, we now have full support for AMD64 (including MMX/SSE/etc. optimizations) and for PPC (e.g. Linux or OS/X), and win32 support is also available (via Cygwin/Mingw).
<<less
Download (2.1MB)
Added: 2005-09-26 License: GPL (GNU General Public License) Price:
1519 downloads
iFind 4.0

iFind 4.0


iFind is the prime internet search software for the people. more>>
iFind is the prime internet search software for the people.

iFind is the top internet search tool.
The real advantage of iFind 4.0 is, to deliver better results when searching for more than one word, like in names.

Best function - specific search, most result links might be related to query
More function - general search, most result links might not be related to query

Example search: Peter Parker
Example result links:
1: ... and the great historian Peter Parker can only be visited...
2: ... people called Peter and it helps to have a Parker pen...

"best" will only return the first result link
"more" will return both result links

<<less
Download (0.98MB)
Added: 2006-08-07 License: Freeware Price:
1173 downloads
cpphs 1.0

cpphs 1.0


cpphs is a Haskell re-implementation of cpp, the C pre-processor. more>>
cpphs is a liberalised re-implementation of cpp, the C pre-processor, in Haskell.
Why re-implement cpp? Rightly or wrongly, the C pre-processor is widely used in Haskell source code. It enables conditional compilation for different compilers, different versions of the same compiler, and different OS platforms.
It is also occasionally used for its macro language, which can enable certain forms of platform-specific detail-filling, such as the tedious boilerplate generation of instance definitions and FFI declarations. However, there are two problems with cpp, aside from the obvious aesthetic ones:
- For some Haskell systems, notably Hugs on Windows, a true cpp is not available by default. * Even for the other Haskell systems, the common cpp provided by the gcc 3.x series is changing subtly in ways that are incompatible with Haskells syntax. There have always been problems with, for instance, string gaps, and prime characters in identifiers. These problems are only going to get worse.
So, it seemed right to provide an alternative to cpp, both more compatible with Haskell, and itself written in Haskell so that it can be distributed with compilers.
This version of the C pre-processor is pretty-much feature-complete, and compatible with the -traditional style. It has two main modes:
- conditional compilation only (--nomacro),
- and full macro-expansion (default).
In --nomacro mode, cpphs performs only conditional compilation actions, namely #includes, #ifs, and #ifdefs are processed according to text-replacement definitions (both command-line and internal), but no parameterised macro expansion is performed. In full compatibility mode (the default), textual replacements and macro expansions are also processed in the remaining body of non-cpp text.
Working features:
#ifdef simple conditional compilation
#if the full boolean language of defined(), &&, ||, ==, etc.
#elif chained conditionals
#define in-line definitions (text replacements and macros)
#undef in-line revocation of definitions
#include file inclusion
#line line number directives
line continuations within all # directives
/**/ token catenation within a macro definition
## ANSI-style token catenation
# ANSI-style token stringisation
__FILE__ special text replacement for DIY error messages
__LINE__ special text replacement for DIY error messages
__DATE__ special text replacement
__TIME__ special text replacement
Macro expansion is recursive. Redefinition of a macro name does not generate a warning. Macros can be defined on the command-line with -D just like textual replacements. Macro names are permitted to be Haskell identifiers e.g. with the prime and backtick ` characters, which is slightly looser than in C, but they still may not include operator symbols.
Numbering of lines in the output is preserved so that any later processor can give meaningful error messages. When a file is #included, cpphs inserts #line directives for the same reason. Numbering should be correct even in the presence of line continuations. If you dont want #line directives in the final output, use the --noline option.
Any syntax errors in cpp directives gives a message to stderr and halts the program. Failure to find a #included file produces a warning to stderr, but processing continues.
Differences from cpp:
In general, cpphs is based on the -traditional behaviour, not ANSI C, and has the following main differences from the standard cpp.
General
- The # that introduces any cpp directive must be in the first column of a line (whereas ANSI permits whitespace before the #).
- Generates the #line n "filename" syntax, not the # n "filename" variant.
- C comments are only removed from within cpp directives. They are not stripped from other text. Consider for instance that in Haskell, all of the following are valid operator symbols: /* */ */* However, you can turn on C-comment removal with the --strip option.
- Macros are never expanded within Haskell comments, strings, or character constants, unless you give the --text option to disable lexing the input as Haskell.
- Macros are always expanded recursively, unlike ANSI, which detects and prevents self-recursion. For instance, #define foo x:foo expands foo once only to x:foo in ANSI, but in cpphs it becomes an infinite list x:x:x:x:..., i.e. cpphs does not terminate.
Macro definition language
- Accepts /**/ for token-pasting in a macro definition. However, /* */ (with any text between the open/close comment) inserts whitespace.
- The ANSI ## token-pasting operator is available with the --hashes flag. This is to avoid misinterpreting any valid Haskell operator of the same name.
- Replaces a macro formal parameter with the actual, even inside a string (double or single quoted). This is -traditional behaviour, not supported in ANSI.
- Recognises the # stringisation operator in a macro definition only if you use the --hashes option. (It is an ANSI addition, only needed because quoted stringisation (above) is prohibited by ANSI.)
- Preserves whitespace within a textual replacement definition exactly (modulo newlines), but leading and trailing space is eliminated.
- Preserves whitespace within a macro definition (and trailing it) exactly (modulo newlines), but leading space is eliminated.
- Preserves whitespace within macro call arguments exactly (including newlines), but leading and trailing space is eliminated.
- With the --layout option, line continuations in a textual replacement or macro definition are preserved as line-breaks in the macro call. (Useful for layout-sensitive code in Haskell.)
Enhancements:
- This release now includes a compatibility script for command line arguments to match the original cpp.
- There are several minor bugfixes, e.g. quotes around replacements for special macros like __FILE__, etc.
- Interaction with preprocessors like hsc2hs is also improved: if they allow non-cpp directives like #def, these are now passed through to the output with a warning to stderr, rather than halting with an error.
- Likewise, a #! line in a shell script is now ignored.
<<less
Download (0.039MB)
Added: 2005-10-18 License: LGPL (GNU Lesser General Public License) Price:
1467 downloads
Math::Numbers 0.000000001

Math::Numbers 0.000000001


Math::Numbers is a Perl module that contains methods for mathematical approaches of concepts of the number theory. more>>
Math::Numbers is a Perl module that contains methods for mathematical approaches of concepts of the number theory.

SYNOPSIS

use Math::Numbers;

my $a = 123;
my $b = 34;

my $numbers = Math::Numbers->new($a, $b [, ...]);

print "They are coprimes (relatively primes)!n" if $numbers->are_coprimes;
print "The greatest common divisor of these at least two numbers is ", $numbers->gcd;

my $number = Math::Numbers->new($a);

print "It is prime!n" if $number->is_prime;

my @divisors = $number->get_divisors;

print "$a is divisor of $b!n" if $number->is_divisor_of($b);

Math::Numbers is quite a simple module on matters of programming. What its interesting is the focus and approach it is intended to be made from the Number Theory basis for Perl beginners (like me) and also for young mathematicians (like me).

The normal topics of Number Theory include divisibility, prime numbers (which is separately intended to be covered by Math::Primes), congruences, quadratic residues, approximation for Real numbers, diophantine equations, etc. and all this is intended to be convered by the module on the concept on getting and setting values and also retriving the proof methods.

METHODS

new

# Some methods require more than only one argument.
my $numbers = Math::Numbers->new($p, $q, ...);

# Some methods require only one.
my $number = Math::Numbers->new($p);

Create a Math::Numbers object. Note that some of the methods will require objects created with only one or a defined numbers of arguments.

gcd
my $gcd = $numbers->gcd;

Calculation of the Greatest Common Divisor. This is made by two different methods which are described below: Blutos algorithm and Euclidean algorithm: The former is used when computing GCD for more than two integers; the latter is used when getting the GCD for two numbers to improve speed. See below for information on each.

Bluto_algorithm

You will mostly not require to call this method, but directly gcd(). Blutos algorithm uses a brute force calculation used by mathematicians to get divisors and then GCD also called Primality Test. Bluto takes some spinaches stolen from Popeye and starts dividing m all the way through 2 to m/2.

Euclidean_algorithm

Euclid rocks. I have a very nice Budgerigar (http://en.wikipedia.org/wiki/Budgerigar) called the same in honor of him (have to upload a pic of him).

As of now, this algorithm is only computed on two integers. From the Wikipedia entry: Given two natural numbers a and b: check if b is zero; if yes, a is the gcd. If not, repeat the process using (respectively) b, and the remainder after dividing a by b. This is exactly what our method does.
is_divisor_of

print "Yes, $p is divisor of $a...n" if $number->is_divisor_of($a);

Lets see if the number from the object is a divisor of $a, which means that the division $number/$a will return an integer (not necesarily a natural). If it does, itll return 1; 0, otherwise.

get_divisors
my @divisors = $number->get_divisors;

What are the divisors of the number brought by the object? This only includes the Natural numbers.

is_prime
print "$p is not prime!n" unless $number->is_prime

Returns 0 or 1 if the number from the object is prime or not, respectively. This method uses the, a bit slow, primality test.

are_coprimes
print "They are coprimes because their GCD is 1!n" if $numbers->are_coprimes;

Are the numbers from the object coprimes (relatively primes)? This means, the GCD is 1; (a, b, c, ...) = 1. Returns 1 or 0.

<<less
Download (0.004MB)
Added: 2007-07-13 License: Perl Artistic License Price:
833 downloads
MassSpec::CUtilities 0.04

MassSpec::CUtilities 0.04


MassSpec::CUtilities is a Perl extension containing C utilities for use in mass spectrometry. more>>
MassSpec::CUtilities is a Perl extension containing C utilities for use in mass spectrometry.

SYNOPSIS

MassSpec::CUtilities is an XS module so theres a chance that you or your target user might not get it to install cleanly on the target system; therefore its recommended to make its presence optional and to offer slower-performing Perl equivalents where practical.

Also note that this module uses a 19-letter amino alphabet rather than the traditional 20-letter alphabet, since the isobars Leucine(L) and Isoleucine(I) are represented instead by "X." Furthermore some portions of this module assume that their input peptides are internally in alphabetical order.

my $haveCUtilities;
if (eval require MassSpec::CUtilities) {
import MassSpec::CUtilities;
$haveCUtilities = 1;
} else {
$haveCUtilities = 0;
}
if ($haveCUtilities) {
my $candidate = MassSpec::CUtilities::encodeAsBitString("ACCGT");
my @shortPeptides = ("ACT","CCGM","ACCGTY","CCT");
my (@list,@answer);
foreach $_ (@shortPeptides) {
push @list, MassSpec::CUtilities::encodeAsBitString($_);
}
if (MassSpec::CUtilities::testManyBitStrings($candidate,@shortPeptides,@list,@answer)) {
# should print "ACT" and "CCT" only
print "Matched: " . join(,,@answer) . "n";
}
}

see API documentation for other available subroutines

ABSTRACT

An eclectic mix of C utilities originally used in a mass spectrometry denovo sequencing project at NIH. It includes a fast Huffman decoder suitable (with minor modifications) for use with the CPAN module Algorithm::Huffman, as well as a fast peptide mass calculator and methods for encoding peptides as products of prime numbers or as bitmaps.

An eclectic mix of C utilities originally used in a mass spectrometry denovo sequencing project at NIH. It includes a fast Huffman decoder suitable (with minor modifications) for use with the CPAN module Algorithm::Huffman, as well as a fast peptide mass calculator and methods for encoding peptides as products of prime numbers or as bitmaps.

<<less
Download (0.016MB)
Added: 2007-02-23 License: Perl Artistic License Price:
973 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 3
  • 1
  • 2
  • 3