本文整理汇总了Java中org.apache.commons.lang3.math.NumberUtils.max方法的典型用法代码示例。如果您正苦于以下问题:Java NumberUtils.max方法的具体用法?Java NumberUtils.max怎么用?Java NumberUtils.max使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.lang3.math.NumberUtils
的用法示例。
在下文中一共展示了NumberUtils.max方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isAmbiguitySingleBand
import org.apache.commons.lang3.math.NumberUtils; //导入方法依赖的package包/类
/**
*
* @param boat
* @param xPos
* @param yPos
* @param deltaAzimuth azimuth correction in pixels
* @param pxSize
* @param pySize
* @return
* @throws IOException
*/
protected boolean isAmbiguitySingleBand(Boat boat,int xPos, int yPos,int deltaAzimuth,double pxSize ,double pySize) throws IOException{
Window winUp=Window.createWindowFromAzimuth(xPos, yPos, deltaAzimuth,pxSize ,pySize,true);
// logger.info(new StringBuffer().append("\nSearch Window start from: ").append(winUp.x).append(" ").append(winUp.sizeY).append(" D Azimuth:").append(deltaAzimuth).toString());
int maxVal=getWindowMaxPixelValue(winUp.x,winUp.y,winUp.sizeX,winUp.sizeY,band[0]);
String bb=sumoImage.getBandName(band[0]);
int boatMaxValue=NumberUtils.max(boat.getStatMap().getMaxValue(bb));
if(maxVal>(boatMaxValue*AZIMUT_FACTOR)){
return true;
}else{
Window winDown=Window.createWindowFromAzimuth(xPos, yPos, deltaAzimuth,pxSize ,pySize,false);
maxVal=getWindowMaxPixelValue(winDown.x,winDown.y,winDown.sizeX,winDown.sizeY,band[0]);
if(maxVal>(boatMaxValue*AZIMUT_FACTOR)){
return true;
}
}
return false;
}
示例2: isAmbiguityMultipleBand
import org.apache.commons.lang3.math.NumberUtils; //导入方法依赖的package包/类
/**
*
* @param boat
* @param xPos
* @param yPos
* @param deltaAzimuth azimuth correction in pixels
* @param pxSize
* @param pySize
* @return
* @throws IOException
*/
protected boolean isAmbiguityMultipleBand(Boat boat,int xPos, int yPos,int deltaAzimuth,double pxSize ,double pySize) throws IOException{
for(int i=0;i<band.length;i++){
Window winUp=Window.createWindowFromAzimuth(xPos, yPos, deltaAzimuth,pxSize ,pySize,true);
// logger.info(new StringBuffer().append("\nSearch Window start from: ").append(winUp.x).append(" ").append(winUp.sizeY).append(" D Azimuth:").append(deltaAzimuth).toString());
int maxVal=getWindowMaxPixelValue(winUp.x,winUp.y,winUp.sizeX,winUp.sizeY,band[i]);
String bb=sumoImage.getBandName(band[i]);
int boatMaxValue=NumberUtils.max(boat.getStatMap().getMaxValue(bb));
if(maxVal>(boatMaxValue*AZIMUT_FACTOR)){
return true;
}else{
Window winDown=Window.createWindowFromAzimuth(xPos, yPos, deltaAzimuth,pxSize ,pySize,false);
maxVal=getWindowMaxPixelValue(winDown.x,winDown.y,winDown.sizeX,winDown.sizeY,band[i]);
if(maxVal>(boatMaxValue*AZIMUT_FACTOR)){
return true;
}
}
}
return false;
}