Test_FactorCache Namespace Reference


Functions

def Test

Variables

int verbose = 0
tuple beg = time.time( )
tuple fin = time.time( )

Function Documentation

def Test_FactorCache::Test (  ) 

Definition at line 8 of file Test_FactorCache.py.

00008            :
00009 
00010     print "FactorCache.Test:"
00011 
00012     fc = FactorCache.FactorCache( )
00013     print "{%s}" % fc
00014 
00015     for i in ( 3, 5, 7, 11 ):
00016         fc.at_put( i, Factors.Factors( i * 121 * 169 ) )
00017     str = "%s" % fc
00018     print "{\n%s}\n" % str
00019 
00020     for i in ( 7, 6, 5, 4, 3 ):
00021         print "  %d %s" % ( i, fc.at( i ) )
00022 
00023     # FC.1: 35 57.95 39.20
00024     # FC.2: 0:  0.55  0.24
00025 
00026     if False:
00027         min = 1000001
00028         max = 2000000
00029         beg = time.time( )
00030         for n in range( min, max, 2 ):
00031             f = Factors.Factors( n )
00032             fc.at_put( n, f )
00033         fin = time.time( )
00034         print "  %s" % ( fin - beg )
00035 
00036         beg = time.time( )
00037         for n in range( min, max, 2 ):
00038             f = fc.at( n)
00039         fin = time.time( )
00040         print "  %s" % ( fin - beg )
00041 
if __name__ == '__main__':


Variable Documentation

tuple Test_FactorCache::beg = time.time( )

Definition at line 53 of file Test_FactorCache.py.

tuple Test_FactorCache::fin = time.time( )

Definition at line 59 of file Test_FactorCache.py.

Definition at line 46 of file Test_FactorCache.py.


Generated on Sun Mar 22 09:59:14 2009 for Multiperfect Number Generator by  doxygen 1.5.8