|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmonotonic.Monotonic
monotonic.Concave
Generates concave monotonic functions.
Convace extends Monotonic which forces concavity rules on top of monotonicity rules when creating random points.
Field Summary |
Fields inherited from class monotonic.Monotonic |
lowerEnvelope, points, rand, sNear, upperEnvelope |
Constructor Summary | |
Concave()
Concave constructor with no envelopes and sNear = 0.01 |
|
Concave(double sNear)
Concave object constructor. |
|
Concave(Envelope upperEnvelope,
Envelope lowerEnvelope,
double sNear)
Creates a concave object with upper and lower envelopes and sNear parameter |
Method Summary | |
private double |
angleLeft(double r,
java.lang.Double b)
Generates a new point at the far left (begining) of the point list and returns its y value. |
private double |
angleRight(double r,
java.lang.Double c)
Creates a new point at far right of the point list and returns this new points' y value. |
double |
gety(double r)
Randomly generates a y value for the r value and stores it to the point list using MOCASSIM algorithm. |
private double |
interpolate(double r,
java.lang.Double b,
java.lang.Double c)
Starts an interpolation scheme where target value r
is approached step by step with halving the interval of left and
right of r . |
Methods inherited from class monotonic.Monotonic |
angleLeft, angleRight, deletePoints, getNumberOfPoints, getPoints, getSNear, hasBothEnvelopes, hasLowerEnvelope, hasUpperEnvelope, interpolate, leftOf, leftOf, passesThru, pointOnLine, pointOnLine, randomBetween, rightOf, rightOf, setLowerEnvelope, setSNear, setUpperEnvelope, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Concave(Envelope upperEnvelope, Envelope lowerEnvelope, double sNear)
upperEnvelope
- lowerEnvelope
- sNear
- minimum allowed distance between two points in the
point list created in interpolation. Has no effect on
extrapolation algorithms angleLeft and angleRight.public Concave(double sNear)
sNear
- minimum allowed distance between two points in the
point list created in interpolation. Has no effect on
extrapolation algorithms.public Concave()
Method Detail |
public double gety(double r)
Monotonic
gety
in class Monotonic
r
- x coordinate where the new point will be created
private double angleRight(double r, java.lang.Double c)
r
- x coordinate of the new point to be createdc
- is the last point on the point list
r
which is
randomly created and obeys monotonicity and concavity rules.private double angleLeft(double r, java.lang.Double b)
y
value.
r
- x
coordinate of the new point to be created.b
- is the first point in the point list.
r
which is
randomly created and obeys monotonicity and concavity rules.private double interpolate(double r, java.lang.Double b, java.lang.Double c)
r
is approached step by step with halving the interval of left and
right of r
. All points created using this
algorithm are obeying monotonicity and concavity rules and
are randomly created. Step halving continues until
x
distance of first points on the left and right
of r
are less then sNear
.
r
- x
coordinate of the new point to be created.b
- first point to the left of r
c
- first point to the right of r
r
which is
found by drawing a line from the first points to the right
and left of r
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |