|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.kernel.math.geom.comp.CdHarComp<V>
V
- the variable type.public class CdHarComp<V>
This class is an implemenation of a coordinate-direction hit-and-run algorithm.
Nested Class Summary | |
---|---|
class |
CdHarComp.Results
This class is used to represent the results of a random point computation. |
Constructor Summary | |
---|---|
CdHarComp(ConvexPolytope<V> polytope)
Constructs a new random point generator for the provided convex polytope. |
Method Summary | |
---|---|
double |
getConstraintTolerance()
Returns the constraint tolerance. |
double |
getMinChordLength()
Returns the minimum length a computed chord must have to be considered successful. |
ConvexPolytope<V> |
getPolytope()
Returns the convex polytope for which random points are generated. |
CdHarComp.Results |
next()
Computes and returns the next random interior point of the convex polytope. |
CdHarComp.Results |
next(int totalPoints)
Computes the specified number of random interior points, and returns the last one computed. |
CdHarComp.Results |
run(java.util.Map<? extends V,java.lang.Double> startPoint)
Computes and returns a random interior point of the convex polytope starting from the provided point. |
void |
setConstraintTolerance(double tolerance)
Sets the constraint tolerance. |
void |
setMinChordLength(double minChordLength)
Sets the minimum chord length. |
void |
setPoint(java.util.Map<? extends V,java.lang.Double> startPoint)
Sets the initial point. |
void |
setRandom(java.util.Random random)
Sets the random number generator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CdHarComp(ConvexPolytope<V> polytope)
polytope
- the convex polytope for which random interior points are
to be generated.
DimensionException
- if the dimension of the provided polytope is < 1.Method Detail |
---|
public void setPoint(java.util.Map<? extends V,java.lang.Double> startPoint)
startPoint
- variables mapped to their numerical values.
InvalidPointException
- if the provided point does not lie within
the polytope.public void setRandom(java.util.Random random)
random
- the random number generator with which all psuedorandom
numbers are to be produced.public void setConstraintTolerance(double tolerance)
tolerance
- the amount by which constaints can be violated. This
should be a small positive number, like 1E-9 for example.public void setMinChordLength(double minChordLength)
minChordLength
- the minimum length a chord must have to be
considered valid. This should be a small positive number, like 1E-9 for
example.public double getConstraintTolerance()
setConstraintTolerance(double)
public double getMinChordLength()
setMinChordLength(double)
public ConvexPolytope<V> getPolytope()
public CdHarComp.Results next()
public CdHarComp.Results next(int totalPoints)
Results
are the cumulative totals from all the random points
generated.
totalPoints
- the total number of random points to compute.
public CdHarComp.Results run(java.util.Map<? extends V,java.lang.Double> startPoint)
startPoint
- variables mapped to their numerical values.
InvalidPointException
- if the provided point does not lie within
the polytope.setPoint(Map)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |