Login   Register  
PHP Classes
elePHPant
Icontem

Class: Random Lib

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Chao Xu  >  Random Lib  >  Download .tar.gz .zip  >  Support forum Support forum (1)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Random Lib
Base name: randomlib
Description: Pick a random items with probability weights
Related classes: , , , ,
Version: 1.4
PHP version: 4
License: GNU General Public License (GPL)
All time users: 605 users
All time rank: 4084
Week users: 1 user
Week rank: 2467
Picture of Chao Xu
Author: Chao Xu <e-mail contact>
Packages: 1 Browse this author's classes Browse this author's classes
Country: United States United States - PHP jobs in United States
Age: ???
All time rank: 2341306 in United States United States
Week rank: 1634 Up206 in United States United States Up


  Detailed description  
This class can be used to pick a random item from a collection.

It can add to a collection of items that can be values of any type: strings, numbers, objects, etc.. Each item may have a probability weight.

The class can pick one or more random items from the collection. When picking multiple items it may allow repetition of the same item or assure that all the picked items are unique.

It can also pick random items considering their probability weight, so those with greater weight are more likely to be picked.

 

  Groups  
Group folder image Algorithms Numerical and statistical algorithms View top rated classes

  Rate classes User ratings   Trackback   Applications   Files Files  

  User ratings  
There are not enough user ratings to display for this class.

  Trackback links  
Link Description
RandomLib - A class for randomness This is the first time I make a class . I start to make this class because I found my random functions are hard to manage...

  Applications that use this class  
No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Accessible without login Plain text file class.random.php Class The randomlib class
Plain text file example.php Example Show a example of how it works

Download all files: randomlib.tar.gz randomlib.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.