/** * Adds one matrix to another. * Addition is defined by taking the maximum dimension value of each position * in the summand matrices. * * @param im the matrix to add */ public void add(IntersectionMatrix im) { for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { setAtLeast(i, j, im.get(i, j)); } } }
setRelateLabel(relateII, im.get(Location.INTERIOR, Location.INTERIOR)); setRelateLabel(relateIB, im.get(Location.INTERIOR, Location.BOUNDARY)); setRelateLabel(relateIE, im.get(Location.INTERIOR, Location.EXTERIOR)); setRelateLabel(relateBI, im.get(Location.BOUNDARY, Location.INTERIOR)); setRelateLabel(relateBB, im.get(Location.BOUNDARY, Location.BOUNDARY)); setRelateLabel(relateBE, im.get(Location.BOUNDARY, Location.EXTERIOR)); setRelateLabel(relateEI, im.get(Location.EXTERIOR, Location.INTERIOR)); setRelateLabel(relateEB, im.get(Location.EXTERIOR, Location.BOUNDARY)); setRelateLabel(relateEE, im.get(Location.EXTERIOR, Location.EXTERIOR));