PHP Classes

File: readme.txt

Recommend this page to a friend!
  Classes of Abhishek Shukla  >  PHP Find Prime Factors  >  readme.txt  >  Download  
File: readme.txt
Role: Documentation
Content type: text/plain
Description: readme
Class: PHP Find Prime Factors
Get the prime factors of a number upto 100 billion
Author: By
Last change:
Date: 6 years ago
Size: 1,350 bytes
 

Contents

Class file image Download
/////////////////////////////////////////////////////////////////////////////////////
//
// Class Prime Factors
// It finds factors of whole numbers upto 100 Billion very fast and accurate
// using a pre-existing data set. 
// (C) ABHISHEK SHUKLA
// Date Created : Jan 13, 2016
// Last Modified:
// Version 1.00
// This Software Should not be commercially used without prior and 
// explicit permission of the Author
//
/////////////////////////////////////////////////////////////////////////////////////
Usage is very simple
1) Include class script file 

	include("primefactors.php");

2) Initiate a new object of class prime_factors
	
	$test=new prime_factors;

3) Call factorize function passing the desired whole number in braces
		
	$test->factorize(13);
	
	The output is 'Finding factors of 13... 13';
	
	$test->factorize(1024);
	
	The output is 'Finding factors of 1024... 2,2,2,2,2,2,2,2,2';

4) By default class echoes the result, but setting $test->echo=0; will mute the echoes.

5) $factors=$test->factorize(N); syntax returns array of all prime factors of N.
	If N itself is prime array containing only one factor N is returned.

6) This class comes with a pre-existing data set used for speedy alogorithm which should 
	be kept intact for integrity of results.  Any changes in that data-set may result in 
	wiered or falsified results.
For more information send a message to info at phpclasses dot org.