|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.charlesames.utility.common.Disposable
net.charlesames.utility.entity.Entity
net.charlesames.utility.entity.WriteableEntity
net.charlesames.utility.contour.RationalSegment<T>
T - Range class (origins and goals)public abstract class RationalSegment<T>
Base class defining a segment of a ContourFromRational collection.
For the RationalSegment class, the ordinates are Ratio instances.
| Constructor Summary | |
|---|---|
RationalSegment(ContourFromRational<T> contour)
Constructor for RationalSegment instances |
|
RationalSegment(ContourFromRational<T> contour,
Ratio left,
Ratio right,
T origin,
T goal)
Constructor for RationalSegment instances |
|
| Method Summary | |
|---|---|
boolean |
equals(RationalSegment<T> arg)
Compare the content of one ContourFromRational segment with another. |
ContourFromRational<T> |
getContainer()
Get the ContourFromRational containing this segment. |
T |
getGoal()
Get the final value of the segment. |
double |
getInterpolationFactor(Ratio ordinate)
|
Ratio |
getLeft()
Get the ordinate at the beginning of the segment. |
T |
getOrigin()
Get the initial value of the segment. |
int |
getPosition()
|
Ratio |
getRight()
Get the ordinate at the end of the segment. |
double |
getSplineFactor(Ratio ordinate)
Calculate a spline value for the indicated ordinate. |
Ratio |
getWidth()
Get the distance between the left and right ordinates. |
double |
interpolateValue(Ratio ordinate,
double origin,
double goal)
Calculate the segment value as of a specified ordinate. |
T |
valueAt(Ratio ordinate)
Interpolate between the origin and the goal, based on the position of the ordinate between the segment's left and right bounds. |
void |
wipe()
Clear all data in this Entity instance. |
| Methods inherited from class net.charlesames.utility.entity.WriteableEntity |
|---|
check, clearXmlSpecs, createXmlSpec, getTagName, getXmlData, getXmlSpec, getXmlSpec, initializeXsd, isPersistent, logError, logError, makeDirty, putXmlData, save, setID, setName, setPersistent, setStatus, toXmlNode |
| Methods inherited from class net.charlesames.utility.entity.Entity |
|---|
decrementReferenceCount, dereferenceHandle, dispose, equals, getHandle, getID, getName, getPath, getReferenceCount, getStatus, getText, hasContainer, incrementReferenceCount, isModifiable, methodHasOverride, predecessor, resequenceEntities, setContainer, setModifiable, shiftEntitiesDown, shiftEntityDown, shiftEntityUp, successor, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RationalSegment(ContourFromRational<T> contour)
RationalSegment instances
contour -
public RationalSegment(ContourFromRational<T> contour,
Ratio left,
Ratio right,
T origin,
T goal)
RationalSegment instances
contour - The ContourFromRational instance that holds this segment.left - The starting ordinate.right - The ending ordinate.origin - The starting value.goal - The ending value.| Method Detail |
|---|
public void wipe()
EntityEntity instance.
wipe in class Entitypublic ContourFromRational<T> getContainer()
ContourFromRational containing this segment.
getContainer in class WriteableEntityContourFromRational containing this segment.public int getPosition()
ContourFromRational.public Ratio getLeft()
Ratio.public Ratio getRight()
Ratio.public Ratio getWidth()
Ratio.public double getInterpolationFactor(Ratio ordinate)
ordinate -
public double getSplineFactor(Ratio ordinate)
ordinate - A value ranging from RealSegment.getLeft() to RealSegment.getRight().
java.lang.IllegalArgumentException - when ordinate falls outside range from RealSegment.getLeft() to RealSegment.getRight().public T getOrigin()
public T getGoal()
public T valueAt(Ratio ordinate)
ordinate - The input.
public double interpolateValue(Ratio ordinate,
double origin,
double goal)
ordinate - The specified ordinate expressed as a Ratio.origin - The beginning segment value.goal - The ending segment value.
public boolean equals(RationalSegment<T> arg)
ContourFromRational segment with another.
arg - The other ContourFromRational segment.
ContourFromRational segments have the same content; false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||