edu.mssm.crover.domain2d
Class AlgorithmicLoopTemplate

java.lang.Object
  |
  +--edu.mssm.crover.domain2d.AbstractLoopTemplate
        |
        +--edu.mssm.crover.domain2d.AlgorithmicLoopTemplate
All Implemented Interfaces:
LoopTemplate

public class AlgorithmicLoopTemplate
extends AbstractLoopTemplate
implements LoopTemplate


Field Summary
protected  int notColinearMaxValue
           
 
Fields inherited from class edu.mssm.crover.domain2d.AbstractLoopTemplate
adapted, controls, entryDirection, exitDirection, FIT, glyph_pos, notFit, spacer, TIMEOUT_EXPIRED, TOO_MUCH_RESIDUES, UNDEFINED
 
Constructor Summary
AlgorithmicLoopTemplate(java.awt.geom.Point2D spacer, java.awt.geom.Point2D entryDirection, java.awt.geom.Point2D exitDirection)
           
 
Method Summary
protected  void adaptWithParameter(double l, java.awt.geom.Point2D[] array)
           
protected  double adjustParameter(double l, int fit)
           
protected  double initialParameter()
           
protected  boolean isParameterValid(double l)
           
protected  double parameterMaxValue()
          Maximum value the l parameter is allowed to reach.
protected  double parameterMinValue()
           
 void setNotColinearMaxValue(int maxValue)
          Sets the maximum value of the kmax parameter to be used when the entry and exit direction are not colinear.
 void setSpacer(java.awt.geom.Point2D newspacer)
          Instructs the template to adapt to a new spacer.
 
Methods inherited from class edu.mssm.crover.domain2d.AbstractLoopTemplate
adapt, distance, distance, getAdapted, getControls, getGlyphPositions, getP0, getPn, getSpacer, glyphsNotDisplayed, setPossibleEllipses, spaceResiduesOnAdaptedCurve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.mssm.crover.domain2d.LoopTemplate
adapt, getAdapted, getControls, getGlyphPositions, getP0, getPn, getSpacer, glyphsNotDisplayed, setPossibleEllipses
 

Field Detail

notColinearMaxValue

protected int notColinearMaxValue
Constructor Detail

AlgorithmicLoopTemplate

public AlgorithmicLoopTemplate(java.awt.geom.Point2D spacer,
                               java.awt.geom.Point2D entryDirection,
                               java.awt.geom.Point2D exitDirection)
Method Detail

setSpacer

public void setSpacer(java.awt.geom.Point2D newspacer)
Instructs the template to adapt to a new spacer. The control points are algorithmically adjusted to the spacer. There is no effect on the result of getControls() but subsequent calls to adapt create adapted points with this new spacer.

Specified by:
setSpacer in interface LoopTemplate
Specified by:
setSpacer in class AbstractLoopTemplate

initialParameter

protected double initialParameter()
Specified by:
initialParameter in class AbstractLoopTemplate

isParameterValid

protected boolean isParameterValid(double l)
Specified by:
isParameterValid in class AbstractLoopTemplate

adjustParameter

protected double adjustParameter(double l,
                                 int fit)
Specified by:
adjustParameter in class AbstractLoopTemplate

parameterMinValue

protected double parameterMinValue()
Specified by:
parameterMinValue in class AbstractLoopTemplate

parameterMaxValue

protected double parameterMaxValue()
Maximum value the l parameter is allowed to reach. It is harcoded to be 200 pixels or half of the length of the spacer when the entryDirection and exitDirection are colinear and in the same direction. This is the particular case where the loop can be used as a line to connect two domains that go in the same direction and sense. 3/5/99 F.C.

Specified by:
parameterMaxValue in class AbstractLoopTemplate

setNotColinearMaxValue

public void setNotColinearMaxValue(int maxValue)
Sets the maximum value of the kmax parameter to be used when the entry and exit direction are not colinear. When entry and exit directions are colinear, kmax is determined from the spacer.

See Also:
parameterMaxValue.

adaptWithParameter

protected void adaptWithParameter(double l,
                                  java.awt.geom.Point2D[] array)
Specified by:
adaptWithParameter in class AbstractLoopTemplate


Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.