001 /* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 package org.apache.commons.math3.geometry.partitioning; 018 019 import org.apache.commons.math3.geometry.Space; 020 021 /** Class holding boundary attributes. 022 * <p>This class is used for the attributes associated with the 023 * nodes of region boundary shell trees returned by the {@link 024 * Region#getTree Region.getTree}. It contains the 025 * parts of the node cut sub-hyperplane that belong to the 026 * boundary.</p> 027 * <p>This class is a simple placeholder, it does not provide any 028 * processing methods.</p> 029 * @param <S> Type of the space. 030 * @see Region#getTree 031 * @version $Id: BoundaryAttribute.java 1416643 2012-12-03 19:37:14Z tn $ 032 * @since 3.0 033 */ 034 public class BoundaryAttribute<S extends Space> { 035 036 /** Part of the node cut sub-hyperplane that belongs to the 037 * boundary and has the outside of the region on the plus side of 038 * its underlying hyperplane (may be null). 039 */ 040 private final SubHyperplane<S> plusOutside; 041 042 /** Part of the node cut sub-hyperplane that belongs to the 043 * boundary and has the inside of the region on the plus side of 044 * its underlying hyperplane (may be null). 045 */ 046 private final SubHyperplane<S> plusInside; 047 048 /** Simple constructor. 049 * @param plusOutside part of the node cut sub-hyperplane that 050 * belongs to the boundary and has the outside of the region on 051 * the plus side of its underlying hyperplane (may be null) 052 * @param plusInside part of the node cut sub-hyperplane that 053 * belongs to the boundary and has the inside of the region on the 054 * plus side of its underlying hyperplane (may be null) 055 */ 056 public BoundaryAttribute(final SubHyperplane<S> plusOutside, 057 final SubHyperplane<S> plusInside) { 058 this.plusOutside = plusOutside; 059 this.plusInside = plusInside; 060 } 061 062 /** Get the part of the node cut sub-hyperplane that belongs to the 063 * boundary and has the outside of the region on the plus side of 064 * its underlying hyperplane. 065 * @return part of the node cut sub-hyperplane that belongs to the 066 * boundary and has the outside of the region on the plus side of 067 * its underlying hyperplane 068 */ 069 public SubHyperplane<S> getPlusOutside() { 070 return plusOutside; 071 } 072 073 /** Get the part of the node cut sub-hyperplane that belongs to the 074 * boundary and has the inside of the region on the plus side of 075 * its underlying hyperplane. 076 * @return part of the node cut sub-hyperplane that belongs to the 077 * boundary and has the inside of the region on the plus side of 078 * its underlying hyperplane 079 */ 080 public SubHyperplane<S> getPlusInside() { 081 return plusInside; 082 } 083 084 }