Added growth rate formulas in LaTeX format.

This commit is contained in:
Eevee 2009-07-28 22:45:55 -07:00
parent 398545a77f
commit 7566351ce1
2 changed files with 17 additions and 7 deletions

View file

@ -1,7 +1,16 @@
id,name,formula
1,slow,1.2x^3
1,slow,\frac{5x^3}{4}
2,medium,x^3
3,fast,0.8x^3
4,poly,?
5,superfast,?
6,superslow,?
3,fast,\frac{4x^3}{5}
4,medium slow,\frac{6x^3}{5} - 15x^2 + 100x - 140
5,slow then very fast,"\begin{cases}
\frac{ x^3 \left( 100 - x \right) }{50}, & \text{if } x \leq 50 \\
\frac{ x^3 \left( 150 - x \right) }{100}, & \text{if } 50 < x \leq 68 \\
\frac{ x^3 \left( 1274 + (x \bmod 3)^2 - 9 (x \bmod 3) - 20 \left\lfloor \frac{x}{3} \right\rfloor \right) }{1000}, & \text{if } 68 < x \leq 98 \\
\frac{ x^3 \left( 160 - x \right) }{100}, & \text{if } x > 98 \\
\end{cases}"
6,fast then very slow,"\begin{cases}
\frac{ x^3 \left( 24 + \left\lfloor \frac{x+1}{3} \right\rfloor \right) }{50}, & \text{if } x \leq 15 \\
\frac{ x^3 \left( 14 + x \right) }{50}, & \text{if } 15 < x \leq 35 \\
\frac{ x^3 \left( 32 + \left\lfloor \frac{x}{2} \right\rfloor \right ) }{50}, & \text{if } x > 35 \\
\end{cases}"

1 id name formula
2 1 slow 1.2x^3 \frac{5x^3}{4}
3 2 medium x^3
4 3 fast 0.8x^3 \frac{4x^3}{5}
5 4 poly medium slow ? \frac{6x^3}{5} - 15x^2 + 100x - 140
6 5 superfast slow then very fast ? \begin{cases} \frac{ x^3 \left( 100 - x \right) }{50}, & \text{if } x \leq 50 \\ \frac{ x^3 \left( 150 - x \right) }{100}, & \text{if } 50 < x \leq 68 \\ \frac{ x^3 \left( 1274 + (x \bmod 3)^2 - 9 (x \bmod 3) - 20 \left\lfloor \frac{x}{3} \right\rfloor \right) }{1000}, & \text{if } 68 < x \leq 98 \\ \frac{ x^3 \left( 160 - x \right) }{100}, & \text{if } x > 98 \\ \end{cases}
7 6 superslow fast then very slow ? \begin{cases} \frac{ x^3 \left( 24 + \left\lfloor \frac{x+1}{3} \right\rfloor \right) }{50}, & \text{if } x \leq 15 \\ \frac{ x^3 \left( 14 + x \right) }{50}, & \text{if } 15 < x \leq 35 \\ \frac{ x^3 \left( 32 + \left\lfloor \frac{x}{2} \right\rfloor \right ) }{50}, & \text{if } x > 35 \\ \end{cases}
8
9
10
11
12
13
14
15
16

View file

@ -127,10 +127,11 @@ class Generation(TableBase):
main_region = Column(Unicode(16), nullable=False)
class GrowthRate(TableBase):
"""`formula` is written in LaTeX math notation."""
__tablename__ = 'growth_rates'
id = Column(Integer, primary_key=True, nullable=False)
name = Column(Unicode(16), nullable=False)
formula = Column(Unicode(255), nullable=False)
name = Column(Unicode(20), nullable=False)
formula = Column(Unicode(500), nullable=False)
class Item(TableBase):
__tablename__ = 'items'