/** * @return simple rectangular {@link AreaEval} which fully encloses both areas * <tt>aeA</tt> and <tt>aeB</tt> */ private static AreaEval resolveRange(AreaEval aeA, AreaEval aeB) { int aeAfr = aeA.getFirstRow(); int aeAfc = aeA.getFirstColumn(); int top = Math.min(aeAfr, aeB.getFirstRow()); int bottom = Math.max(aeA.getLastRow(), aeB.getLastRow()); int left = Math.min(aeAfc, aeB.getFirstColumn()); int right = Math.max(aeA.getLastColumn(), aeB.getLastColumn()); return aeA.offset(top-aeAfr, bottom-aeAfr, left-aeAfc, right-aeAfc); }
/** * @return simple rectangular {@link AreaEval} which represents the intersection of areas * <tt>aeA</tt> and <tt>aeB</tt>. If the two areas do not intersect, the result is <code>null</code>. */ private static AreaEval resolveRange(AreaEval aeA, AreaEval aeB) { int aeAfr = aeA.getFirstRow(); int aeAfc = aeA.getFirstColumn(); int aeBlc = aeB.getLastColumn(); if (aeAfc > aeBlc) { return null; } int aeBfc = aeB.getFirstColumn(); if (aeBfc > aeA.getLastColumn()) { return null; } int aeBlr = aeB.getLastRow(); if (aeAfr > aeBlr) { return null; } int aeBfr = aeB.getFirstRow(); int aeAlr = aeA.getLastRow(); if (aeBfr > aeAlr) { return null; } int top = Math.max(aeAfr, aeBfr); int bottom = Math.min(aeAlr, aeBlr); int left = Math.max(aeAfc, aeBfc); int right = Math.min(aeA.getLastColumn(), aeBlc); return aeA.offset(top-aeAfr, bottom-aeAfr, left-aeAfc, right-aeAfc); }
public BaseRef(AreaEval ae) { _refEval = null; _areaEval = ae; _firstRowIndex = ae.getFirstRow(); _firstColumnIndex = ae.getFirstColumn(); _height = ae.getLastRow() - ae.getFirstRow() + 1; _width = ae.getLastColumn() - ae.getFirstColumn() + 1; }
/** * @return simple rectangular {@link AreaEval} which fully encloses both areas * <tt>aeA</tt> and <tt>aeB</tt> */ private static AreaEval resolveRange(AreaEval aeA, AreaEval aeB) { int aeAfr = aeA.getFirstRow(); int aeAfc = aeA.getFirstColumn(); int top = Math.min(aeAfr, aeB.getFirstRow()); int bottom = Math.max(aeA.getLastRow(), aeB.getLastRow()); int left = Math.min(aeAfc, aeB.getFirstColumn()); int right = Math.max(aeA.getLastColumn(), aeB.getLastColumn()); return aeA.offset(top-aeAfr, bottom-aeAfr, left-aeAfc, right-aeAfc); }
/** * @return simple rectangular {@link AreaEval} which fully encloses both areas * <tt>aeA</tt> and <tt>aeB</tt> */ private static AreaEval resolveRange(AreaEval aeA, AreaEval aeB) { int aeAfr = aeA.getFirstRow(); int aeAfc = aeA.getFirstColumn(); int top = Math.min(aeAfr, aeB.getFirstRow()); int bottom = Math.max(aeA.getLastRow(), aeB.getLastRow()); int left = Math.min(aeAfc, aeB.getFirstColumn()); int right = Math.max(aeA.getLastColumn(), aeB.getLastColumn()); return aeA.offset(top-aeAfr, bottom-aeAfr, left-aeAfc, right-aeAfc); }
/** * @return simple rectangular {@link AreaEval} which fully encloses both areas * <tt>aeA</tt> and <tt>aeB</tt> */ private static AreaEval resolveRange(AreaEval aeA, AreaEval aeB) { int aeAfr = aeA.getFirstRow(); int aeAfc = aeA.getFirstColumn(); int top = Math.min(aeAfr, aeB.getFirstRow()); int bottom = Math.max(aeA.getLastRow(), aeB.getLastRow()); int left = Math.min(aeAfc, aeB.getFirstColumn()); int right = Math.max(aeA.getLastColumn(), aeB.getLastColumn()); return aeA.offset(top-aeAfr, bottom-aeAfr, left-aeAfc, right-aeAfc); }
/** * @return simple rectangular {@link AreaEval} which represents the intersection of areas * <tt>aeA</tt> and <tt>aeB</tt>. If the two areas do not intersect, the result is <code>null</code>. */ private static AreaEval resolveRange(AreaEval aeA, AreaEval aeB) { int aeAfr = aeA.getFirstRow(); int aeAfc = aeA.getFirstColumn(); int aeBlc = aeB.getLastColumn(); if (aeAfc > aeBlc) { return null; } int aeBfc = aeB.getFirstColumn(); if (aeBfc > aeA.getLastColumn()) { return null; } int aeBlr = aeB.getLastRow(); if (aeAfr > aeBlr) { return null; } int aeBfr = aeB.getFirstRow(); int aeAlr = aeA.getLastRow(); if (aeBfr > aeAlr) { return null; } int top = Math.max(aeAfr, aeBfr); int bottom = Math.min(aeAlr, aeBlr); int left = Math.max(aeAfc, aeBfc); int right = Math.min(aeA.getLastColumn(), aeBlc); return aeA.offset(top-aeAfr, bottom-aeAfr, left-aeAfc, right-aeAfc); }
/** * @return simple rectangular {@link AreaEval} which represents the intersection of areas * <tt>aeA</tt> and <tt>aeB</tt>. If the two areas do not intersect, the result is <code>null</code>. */ private static AreaEval resolveRange(AreaEval aeA, AreaEval aeB) { int aeAfr = aeA.getFirstRow(); int aeAfc = aeA.getFirstColumn(); int aeBlc = aeB.getLastColumn(); if (aeAfc > aeBlc) { return null; } int aeBfc = aeB.getFirstColumn(); if (aeBfc > aeA.getLastColumn()) { return null; } int aeBlr = aeB.getLastRow(); if (aeAfr > aeBlr) { return null; } int aeBfr = aeB.getFirstRow(); int aeAlr = aeA.getLastRow(); if (aeBfr > aeAlr) { return null; } int top = Math.max(aeAfr, aeBfr); int bottom = Math.min(aeAlr, aeBlr); int left = Math.max(aeAfc, aeBfc); int right = Math.min(aeA.getLastColumn(), aeBlc); return aeA.offset(top-aeAfr, bottom-aeAfr, left-aeAfc, right-aeAfc); }
/** * @return simple rectangular {@link AreaEval} which represents the intersection of areas * <tt>aeA</tt> and <tt>aeB</tt>. If the two areas do not intersect, the result is <code>null</code>. */ private static AreaEval resolveRange(AreaEval aeA, AreaEval aeB) { int aeAfr = aeA.getFirstRow(); int aeAfc = aeA.getFirstColumn(); int aeBlc = aeB.getLastColumn(); if (aeAfc > aeBlc) { return null; } int aeBfc = aeB.getFirstColumn(); if (aeBfc > aeA.getLastColumn()) { return null; } int aeBlr = aeB.getLastRow(); if (aeAfr > aeBlr) { return null; } int aeBfr = aeB.getFirstRow(); int aeAlr = aeA.getLastRow(); if (aeBfr > aeAlr) { return null; } int top = Math.max(aeAfr, aeBfr); int bottom = Math.min(aeAlr, aeBlr); int left = Math.max(aeAfc, aeBfc); int right = Math.min(aeA.getLastColumn(), aeBlc); return aeA.offset(top-aeAfr, bottom-aeAfr, left-aeAfc, right-aeAfc); }
public BaseRef(AreaEval ae) { _refEval = null; _areaEval = ae; _firstRowIndex = ae.getFirstRow(); _firstColumnIndex = ae.getFirstColumn(); _height = ae.getLastRow() - ae.getFirstRow() + 1; _width = ae.getLastColumn() - ae.getFirstColumn() + 1; }
public BaseRef(AreaEval ae) { _refEval = null; _areaEval = ae; _firstRowIndex = ae.getFirstRow(); _firstColumnIndex = ae.getFirstColumn(); _height = ae.getLastRow() - ae.getFirstRow() + 1; _width = ae.getLastColumn() - ae.getFirstColumn() + 1; }
public BaseRef(AreaEval ae) { _refEval = null; _areaEval = ae; _firstRowIndex = ae.getFirstRow(); _firstColumnIndex = ae.getFirstColumn(); _height = ae.getLastRow() - ae.getFirstRow() + 1; _width = ae.getLastColumn() - ae.getFirstColumn() + 1; }