-
Notifications
You must be signed in to change notification settings - Fork 0
/
Collatz.html
56 lines (52 loc) · 3.86 KB
/
Collatz.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module Collatz</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>Collatz</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/Users/nari/Desktop/summer15/cs373/cs373-collatz/Collatz.py">/Users/nari/Desktop/summer15/cs373/cs373-collatz/Collatz.py</a></font></td></tr></table>
<p><tt># ---------------------------<br>
# projects/collatz/Collatz.py<br>
# Copyright (C) 2015<br>
# Glenn P. Downing<br>
# ---------------------------</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="sys.html">sys</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-collatz_eval"><strong>collatz_eval</strong></a>(i, j)</dt><dd><tt>i the beginning of the range, inclusive<br>
j the end of the range, inclusive<br>
return the max cycle length of the range [i, j]</tt></dd></dl>
<dl><dt><a name="-collatz_print"><strong>collatz_print</strong></a>(w, i, j, v)</dt><dd><tt>print three ints<br>
w a writer<br>
i the beginning of the range, inclusive<br>
j the end of the range, inclusive<br>
v the max cycle length</tt></dd></dl>
<dl><dt><a name="-collatz_read"><strong>collatz_read</strong></a>(s)</dt><dd><tt>read two ints<br>
s a string<br>
return a list of two ints, representing the beginning and end of a range, [i, j]</tt></dd></dl>
<dl><dt><a name="-collatz_solve"><strong>collatz_solve</strong></a>(r, w)</dt><dd><tt>r a reader<br>
w a writer</tt></dd></dl>
<dl><dt><a name="-cycle_length"><strong>cycle_length</strong></a>(n)</dt><dd><tt>n: input to find the cycle_length <br>
returns the cycle_length of input value n</tt></dd></dl>
<dl><dt><a name="-find_max"><strong>find_max</strong></a>(min, max, max_cycle_length)</dt></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>cache2</strong> = [179, 182, 217, 238, 215, 236, 262, 252, 247, 260, 268, 250, 263, 276, 271, 271, 266, 279, 261, 274, ...]</td></tr></table>
</body></html>