uk.ac.leeds.ccg.andyt.grids.examples
Class GenerateTestData
java.lang.Object
uk.ac.leeds.ccg.andyt.grids.utilities.ErrorHandler
uk.ac.leeds.ccg.andyt.grids.examples.Run
uk.ac.leeds.ccg.andyt.grids.examples.GenerateTestData
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Runnable
public class GenerateTestData
- extends Run
- implements java.lang.Runnable
TODO:
docs
- See Also:
- Serialized Form
Method Summary |
Grid2DSquareCellDouble[] |
generateCatchment()
|
Grid2DSquareCellDouble[] |
generateCircularData()
|
Grid2DSquareCellDouble[] |
generateSquareData()
|
java.util.HashSet |
getCellIDs(Grid2DSquareCellDouble grid,
long row,
long col,
double minRadius,
double maxRadius)
|
java.util.HashSet |
getCellIDsHashSet(Grid2DSquareCellDouble grid,
long row,
long col,
double radius)
|
long |
getRandomCol(long ncols,
double maxRadius)
|
long |
getRandomRow(long nrows,
double maxRadius)
|
static void |
main(java.lang.String[] args)
|
void |
printCircularFeatureInfo(java.io.PrintWriter pw,
double minRadius,
double maxRadius,
double height,
long row,
long col)
|
double |
random(double min,
double max)
|
void |
removeAll(java.util.HashSet cellIDHashSetToRemoveFrom,
java.util.HashSet cellIDHashSetToRemove)
Taken from HashSet.removeAll(Collection) |
void |
run()
|
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.examples.Run |
log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenerateTestData
public GenerateTestData()
- Creates new GenerateTestData.
GenerateTestData
public GenerateTestData(java.io.File workspace)
- Creates new GenerateTestData.
main
public static void main(java.lang.String[] args)
throws java.io.IOException
- Throws:
java.io.IOException
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
generateCircularData
public Grid2DSquareCellDouble[] generateCircularData()
printCircularFeatureInfo
public void printCircularFeatureInfo(java.io.PrintWriter pw,
double minRadius,
double maxRadius,
double height,
long row,
long col)
getCellIDs
public java.util.HashSet getCellIDs(Grid2DSquareCellDouble grid,
long row,
long col,
double minRadius,
double maxRadius)
removeAll
public void removeAll(java.util.HashSet cellIDHashSetToRemoveFrom,
java.util.HashSet cellIDHashSetToRemove)
- Taken from HashSet.removeAll(Collection)
getCellIDsHashSet
public java.util.HashSet getCellIDsHashSet(Grid2DSquareCellDouble grid,
long row,
long col,
double radius)
getRandomRow
public long getRandomRow(long nrows,
double maxRadius)
getRandomCol
public long getRandomCol(long ncols,
double maxRadius)
random
public double random(double min,
double max)
generateSquareData
public Grid2DSquareCellDouble[] generateSquareData()
generateCatchment
public Grid2DSquareCellDouble[] generateCatchment()