|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectch.epfl.scapetoad.CartogramGastner
public class CartogramGastner
This class implements Gastner's diffusion algorithm.
| Field Summary | |
|---|---|
CartogramWizard |
mCartogramWizard
|
int |
mProgressEnd
|
int |
mProgressStart
Attributes for the computation progress bar. |
java.lang.String |
mProgressText
|
| Constructor Summary | |
|---|---|
CartogramGastner(CartogramGrid grid)
The constructor takes the cartogram grid which contains the density values. |
|
| Method Summary | |
|---|---|
void |
compute(int gridSize)
Starts the cartogram computation using the given grid size. |
static double |
erf(double value)
Our wrapper function for the Jakarta Commons Math Erf.erf function. |
void |
gaussianBlur()
Performs au Gaussian blur on the density grid. |
boolean |
newt2(double h,
double[] ptappr,
double xguess,
double yguess,
int j,
int k)
|
void |
writeToShapefile(java.lang.String shapefile)
Writes the grid into the specified shape file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int mProgressStart
public int mProgressEnd
public java.lang.String mProgressText
public CartogramWizard mCartogramWizard
| Constructor Detail |
|---|
public CartogramGastner(CartogramGrid grid)
| Method Detail |
|---|
public void compute(int gridSize)
throws java.lang.InterruptedException
gridSize - the size of the grid used for computation. The
grid size must be a power of 2.
java.lang.InterruptedExceptionpublic void gaussianBlur()
public boolean newt2(double h,
double[] ptappr,
double xguess,
double yguess,
int j,
int k)
public static double erf(double value)
public void writeToShapefile(java.lang.String shapefile)
shapefile - the path to the shape file.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||