|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.leeds.ccg.andyt.grids.utilities.Utilities
public class Utilities
This class holds miscellaneous general utility methods
Constructor Summary | |
---|---|
Utilities()
Creates a new instance of Utilities |
Method Summary | |
---|---|
static java.lang.String |
_ReportTime(long time)
Returns a string identifying the number of hours, minutes, seconds and milliseconds for the input _ReportTime in milliseconds. |
static double |
angle(double x1,
double y1,
double x2,
double y2)
Returns the clockwise angle in radians to the y axis of the line from x1, y1 to x2, y2 |
static java.lang.Object[] |
densityPlot(AbstractGrid2DSquareCell xGrid,
AbstractGrid2DSquareCell yGrid,
int divisions,
Grid2DSquareCellDoubleFactory gridFactory)
Returns a density plot of xGrid values against yGrid values. |
static double |
distance(double x1,
double y1,
double x2,
double y2)
Returns the distance between a pair of coordinates |
static java.awt.geom.Point2D.Double[] |
getSamplePoints(java.awt.geom.Point2D.Double point,
double angle,
double maxDistance,
double samplingDistance,
double samplingAngle,
int numberOfSamples)
TODO: documentation |
static java.awt.geom.Point2D.Double[] |
getSamplePoints(java.awt.geom.Point2D.Double point,
double angle,
double maxDistance,
int numberOfSamplingDistances,
int numberOfSamplingAngles)
TODO: documentation |
static double |
getValueALittleBitLarger(double value)
TODO: documentation |
static double |
getValueALittleBitSmaller(double value)
TODO: documentation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Utilities()
Method Detail |
---|
public static java.lang.String _ReportTime(long time)
public static double getValueALittleBitLarger(double value)
public static double getValueALittleBitSmaller(double value)
public static java.awt.geom.Point2D.Double[] getSamplePoints(java.awt.geom.Point2D.Double point, double angle, double maxDistance, int numberOfSamplingDistances, int numberOfSamplingAngles)
point
- point at centre of samplingangle
- angle in radians to the vertical (y axis) for first samplingmaxDistance
- the maximum sampling distancenumberOfSamplingDistances
- the number of sampling distances upto
maxDistancenumberOfSamplingAngles
- sets how many samplesPoints to take at each
sample distance. Always the first sample is at angle from the vertical
or y-axis. The angles at which samples are taken are all the same.public static java.awt.geom.Point2D.Double[] getSamplePoints(java.awt.geom.Point2D.Double point, double angle, double maxDistance, double samplingDistance, double samplingAngle, int numberOfSamples)
public static final double distance(double x1, double y1, double x2, double y2)
x1
- - the x coordinate of one pointy1
- - the y coordinate of one pointx2
- - the x coordinate of another pointy2
- - the y coordinate of another pointpublic static final double angle(double x1, double y1, double x2, double y2)
x1
- - the x coordinate of one pointy1
- - the y coordinate of one pointx2
- - the x coordinate of another pointy2
- - the y coordinate of another pointpublic static java.lang.Object[] densityPlot(AbstractGrid2DSquareCell xGrid, AbstractGrid2DSquareCell yGrid, int divisions, Grid2DSquareCellDoubleFactory gridFactory)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |