|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Object
|
+--SquareWell
|
+--MultipleWells
A piecewise-constant function with a number of equally spaced square wells, each of equal width and depth.
| Field Summary | |
static int |
DEFAULT_NWELLS
The default number of wells |
static double |
DEFAULT_PERIOD
The default period |
static double |
DEFAULT_PERIODIC_WIDTH
The default width when there is more than one well |
protected int |
nWells
The number of wells |
protected double |
period
The period |
| Fields inherited from class SquareWell |
DEFAULT_DEPTH,
DEFAULT_SHIFT,
DEFAULT_WIDTH,
depth,
shift,
width |
| Constructor Summary | |
MultipleWells()
Creates a new set of wells with default parameters. |
|
MultipleWells(double depth,
double width,
double shift,
double period,
int nWells)
Creates a new set of wells |
|
MultipleWells(double depth,
double width,
double period,
int nWells)
Creates a new set of wells, centred on the origin. |
|
MultipleWells(int nWells)
Creates a new set of wells with default parameters. |
|
| Method Summary | |
double |
evaluate(double x)
|
double |
getHigh()
Returns the maximum value this function can take |
double |
getLow()
Returns the minimum value this function can take |
double[] |
getMarkers(double minX,
double maxX)
Returns an array containing x coordinates of all discontinuities within the specified interval. |
double |
getPeriod()
Returns the period |
int |
getWellCount()
Returns the number of wells |
void |
reCentre()
Adjusts the shift parameter so that the wells are
centered on the origin. |
void |
setPeriod(double d)
Sets the period |
void |
setWellCount(int i)
Sets the number of wells, and calls reCentre() if
the number jas changed. |
| Methods inherited from class SquareWell |
getDepth,
getLeft,
getRight,
getShift,
getWidth,
setDepth,
setShift,
setWidth |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected double period
protected int nWells
public static double DEFAULT_PERIODIC_WIDTH
public static double DEFAULT_PERIOD
public static int DEFAULT_NWELLS
| Constructor Detail |
public MultipleWells(double depth,
double width,
double shift,
double period,
int nWells)
depth - The depth of the wellswidth - The width of each wellshift - The x coordinate of the start of the first wellperiod - The distance between the left edges of two adjacent
wellsnWells - The number of wells
public MultipleWells(double depth,
double width,
double period,
int nWells)
depth - The depth of the wellswidth - The width of each wellperiod - The distance between the left edges of two adjacent
wellsnWells - The number of wellspublic MultipleWells(int nWells)
nWells - The number of wellspublic MultipleWells()
| Method Detail |
public double evaluate(double x)
depth if x is in a well, else zero.
public double[] getMarkers(double minX,
double maxX)
public void reCentre()
shift parameter so that the wells are
centered on the origin. In addition, if the width exceeds the period,
it will be set to half the period (unless there is only one well, of
course).
This method is intended to be used after a change to the period or number of wells.
public int getWellCount()
public void setWellCount(int i)
reCentre() if
the number jas changed.public double getPeriod()
public void setPeriod(double d)
public double getLow()
public double getHigh()
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||