public class MIMath extends Object
| 构造器 | 说明 |
|---|---|
MIMath() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static double[] |
arrayMinMax(double[] values) |
Get min, max of an array
|
static double[] |
arrayMinMax(Double[] values) |
Get min, max of an array
|
static void |
arrayReverse(double[] values) |
Array reverse
|
static void |
arrayReverse(Object[] values) |
Array reverse
|
static void |
arrayReverse(PointD[] points) |
Array reverse
|
static PointF |
calEllipseCoordByAngle(double x0,
double y0,
double a,
double b,
double angle) |
Calculate ellipse coordinate by angle
|
static double[] |
cartesianToPolar(double x,
double y) |
Convert cartesian to polar coordinate
|
static boolean |
doubleEquals(double a,
double b) |
Determine if two double data equal
|
static boolean |
doubleEquals_Abs(double a,
double b) |
Determine if two double data equal
|
static PointF |
getCrossPoint(PointF aP1,
PointF aP2,
PointF bP1,
PointF bP2) |
Get cross point of two line segments
|
static int |
getDecimalNum(double aData) |
Get decimal number of a double data for ToString() format
|
static int |
getDecimalNum_back(double aData) |
Get decimal number of a double data for ToString() format
|
static Extent |
getExtent(List<? extends Shape> shapes) |
Get extent of the shapes
|
static double[] |
getIntervalValues(double min,
double max) |
Create contour values by minimum and maximum values
|
static List<Object> |
getIntervalValues(double min,
double max,
boolean isExtend) |
Create contour values by minimum and maximum values
|
static double[] |
getIntervalValues(double min,
double max,
double interval) |
Create values by interval
|
static double[] |
getIntervalValues(double min,
double max,
int n) |
Get interval values
|
static double[] |
getIntervalValues_Log(double min,
double max) |
Create log interval values by minimum and maximum values
|
static double[] |
getIntervalValues_Log_bak(double min,
double max) |
Create log interval values by minimum and maximum values
|
static List<Object> |
getIntervalValues1(double min,
double max) |
Create contour values by minimum and maximum values
|
static Extent |
getLagerExtent(Extent aET,
Extent bET) |
Get maximum extent from two extent
|
static int[] |
getMinMaxInt(List S) |
Get mininum and maximum values
|
static double[] |
getMinMaxValue(double[] S,
double unDef) |
Get mininum and maximum values
|
static double[] |
getMinMaxValue(List S) |
Get mininum and maximum values
|
static double[] |
getMinMaxValue(List<Double> S,
double unDef) |
Get mininum and maximum values
|
static Extent |
getPointFsExtent(List<PointF> PList) |
Get extent from PointF list
|
static Extent |
getPointFsExtent(PointF[] PList) |
Get extent from PointF array
|
static Extent |
getPointsExtent(List<? extends PointD> PList) |
Get extent from point list
|
static Extent |
getSmallerExtent(Extent aET,
Extent bET) |
Get Minimum extent from two extent
|
static double |
getValue(double[] data,
float idx) |
Get value from one dimension double array by index
|
static Boolean |
isExtentCross(Extent aET,
Extent bET) |
Determine if two extent cross each other
|
static boolean |
isInclude(Rectangle aRect,
Rectangle bRect) |
Judge if a rectangle include another
|
static boolean |
isNumeric(String strNumber) |
Determine if a string is digital
|
static float |
lonAdd(float lon1,
float delta) |
Add longitude
|
static float |
lonDistance(float lon1,
float lon2) |
Longitude distance
|
static boolean |
pointInExtent(PointD aP,
Extent aET) |
Determine if a point is in an Extent
|
static boolean |
pointInExtent(PointF aP,
Extent aET) |
Determine if a point is in an Extent
|
static boolean |
pointInRectangle(Point aP,
Rectangle aRect) |
Determine if a point is in a rectangel
|
static boolean |
pointInRectangle(PointD aP,
Rectangle aRect) |
Determine if a point is in a rectangel
|
static boolean |
pointInRectangle(PointF aP,
Rectangle aRect) |
Determine if a point is in a rectangel
|
static double[] |
polarToCartesian(double B,
double r) |
Convert poar to cartesian coordinate
|
static Extent |
shiftExtentLon(Extent aET,
double lonShift) |
Shift extent with longitude
|
public static boolean doubleEquals(double a,
double b)
a - double ab - double bpublic static boolean doubleEquals_Abs(double a,
double b)
a - double ab - double bpublic static double[] getMinMaxValue(double[] S,
double unDef)
S - Data arrayunDef - Undefined datapublic static double[] getMinMaxValue(List<Double> S, double unDef)
S - Data listunDef - Undefined datapublic static double[] getMinMaxValue(List S)
S - Data listpublic static int[] getMinMaxInt(List S)
S - Data listpublic static boolean isNumeric(String strNumber)
strNumber - the stringpublic static Extent getPointsExtent(List<? extends PointD> PList)
PList - point listpublic static Extent getPointFsExtent(PointF[] PList)
PList - PointF arraypublic static Extent getPointFsExtent(List<PointF> PList)
PList - PointF listpublic static void arrayReverse(PointD[] points)
points - PointD arraypublic static void arrayReverse(double[] values)
values - Double arraypublic static void arrayReverse(Object[] values)
values - Object arraypublic static double[] arrayMinMax(double[] values)
values - arraypublic static double[] arrayMinMax(Double[] values)
values - arraypublic static PointF getCrossPoint(PointF aP1, PointF aP2, PointF bP1, PointF bP2)
aP1 - point 1 of line aaP2 - point 2 of line abP1 - point 1 of line bbP2 - point 2 of line bpublic static Extent shiftExtentLon(Extent aET, double lonShift)
aET - Input extentlonShift - Longitude shiftpublic static Extent getLagerExtent(Extent aET, Extent bET)
aET - Extent abET - Extent bpublic static Extent getSmallerExtent(Extent aET, Extent bET)
aET - Extent abET - Extent bpublic static Extent getExtent(List<? extends Shape> shapes)
shapes - public static Boolean isExtentCross(Extent aET, Extent bET)
aET - ExtentbET - Extentpublic static boolean pointInExtent(PointD aP, Extent aET)
aP - The pointaET - The extentpublic static boolean pointInExtent(PointF aP, Extent aET)
aP - The pointaET - The extentpublic static boolean pointInRectangle(PointF aP, Rectangle aRect)
aP - The pointaRect - The rectangelpublic static boolean pointInRectangle(Point aP, Rectangle aRect)
aP - The pointaRect - The rectangelpublic static boolean pointInRectangle(PointD aP, Rectangle aRect)
aP - The pointaRect - The rectangelpublic static boolean isInclude(Rectangle aRect, Rectangle bRect)
aRect - a rectanglebRect - b rectanglepublic static PointF calEllipseCoordByAngle(double x0, double y0, double a, double b, double angle)
x0 - Center xy0 - Center ya - Major semi axisb - Minor semi axisangle - Anglepublic static int getDecimalNum(double aData)
aData - Datapublic static int getDecimalNum_back(double aData)
aData - Datapublic static float lonDistance(float lon1,
float lon2)
lon1 - Longitude 1lon2 - Longitude 2public static float lonAdd(float lon1,
float delta)
lon1 - Longitude 1delta - Deltapublic static double getValue(double[] data,
float idx)
data - Dataidx - Indexpublic static double[] getIntervalValues(double min,
double max,
double interval)
min - Miminum valuemax - Maximum valueinterval - Interval valuepublic static double[] getIntervalValues(double min,
double max,
int n)
min - Minimum valuemax - Maximum valuen - Level numberpublic static double[] getIntervalValues(double min,
double max)
min - Minimum valuemax - Maximum valuepublic static List<Object> getIntervalValues1(double min, double max)
min - Minimum valuemax - Maximum valuepublic static List<Object> getIntervalValues(double min, double max, boolean isExtend)
min - Minimum valuemax - Maximum valueisExtend - If extend valuespublic static double[] getIntervalValues_Log(double min,
double max)
min - Minimum valuemax - Maximum valuepublic static double[] getIntervalValues_Log_bak(double min,
double max)
min - Minimum valuemax - Maximum valuepublic static double[] cartesianToPolar(double x,
double y)
x - Xy - Ypublic static double[] polarToCartesian(double B,
double r)
r - RadiusB - Angle in radiansCopyright © 2019. All rights reserved.