Added growth rate formulas in LaTeX format.
authorEevee <git@veekun.com>
Wed, 29 Jul 2009 05:45:55 +0000 (22:45 -0700)
committerEevee <git@veekun.com>
Wed, 29 Jul 2009 05:45:55 +0000 (22:45 -0700)
pokedex/data/csv/growth_rates.csv
pokedex/db/tables.py

index 74e20a9..523f509 100644 (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}"
index 096e678..1de7e7b 100644 (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'