|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.kernel.math.geom.HashConvexPolytope<V>
V
- the variable type.public class HashConvexPolytope<V>
This class is a concrete implemenation of ConvexPolytope.
Constructor Summary | |
---|---|
HashConvexPolytope(java.util.Set<ParallelHyperplanes<V>> boundingPlanes)
Constructs a new convex poltyope from the provided linear system solution and variable bounds. |
Method Summary | ||
---|---|---|
int |
dimensions()
Returns the dimensions of the space in which this polytope lies. |
|
UnmodifiableSet<ParallelHyperplanes<V>> |
getBoundingPlanes()
Returns the set of bounding hyperplanes that define this convex polytope. |
|
UnmodifiableSet<V> |
getVariables()
Returns the variables contained in the hyperplanes defining the bounding half-spaces. |
|
boolean |
isVariable(java.lang.Object variable)
Indicates if the provided object is a variable in the bounding hyperplanes of this convex polytope. |
|
boolean |
isWithin(java.util.Map<? extends V,java.lang.Double> point,
double tolerance)
Indicates if the provided point lies within this convex polytope. |
|
static
|
make(LinearSystemSolution<V> systemSolution,
java.util.Map<? extends V,Interval> variableBounds,
double tolerance)
Constructs a new convex poltyope from the provided linear system solution and variable bounds. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HashConvexPolytope(java.util.Set<ParallelHyperplanes<V>> boundingPlanes)
boundingPlanes
- the bounding hyperplanes.Method Detail |
---|
public static <V> HashConvexPolytope<V> make(LinearSystemSolution<V> systemSolution, java.util.Map<? extends V,Interval> variableBounds, double tolerance)
V
- the variable type.systemSolution
- a solution to a system of linear equations.variableBounds
- the bounds on each variable in that solution.tolerance
- the tolerance used to simplify the provided linear
system solution. See LinearSystemSolution.simplify(Map, double).
public UnmodifiableSet<V> getVariables()
getVariables
in interface ConvexPolytope<V>
public boolean isVariable(java.lang.Object variable)
isVariable
in interface ConvexPolytope<V>
variable
- the potential variable.
true
if the provided object is a variable in the bounding
hyperplanes of this convex polytope; false
otherwise.public UnmodifiableSet<ParallelHyperplanes<V>> getBoundingPlanes()
getBoundingPlanes
in interface ConvexPolytope<V>
public int dimensions()
dimensions
in interface ConvexPolytope<V>
public boolean isWithin(java.util.Map<? extends V,java.lang.Double> point, double tolerance)
isWithin
in interface ConvexPolytope<V>
point
- variables mapped to numerical values. Every key of this map
must be a variable of this polytope and every variable must be present.tolerance
- the amount by which a point may lay outside this
polytope, but still be considered within it. This should be a small
positive numer, like 1E-9 for example.
true
if the provided point lies within this polytope;
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |