|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectifi.dsb.AxisValues
ifi.dsb.FrequencyAxis
Class for creation of frequency axis for use in plotting. Objects can hold axis values, a value for sampling rate and axis mode.
TimeAxis| Field Summary | |
static int |
NEGATIVE_HALF
NEGATIVE_HALF mode will give an axis with values from minus half the sampling-rate (inclusive if length is even, exclusive otherwise) to zero (inclusive). |
static int |
POSITIVE_FULL
POSITIVE_FULL mode will give an axis with values from zero (inclusive) to the sampling-rate (exclusive). |
static int |
POSITIVE_HALF
POSITIVE_HALF mode will give an axis with values from zero (inclusive) to half the sampling-rate (inclusive if length is even, exclusive otherwise). |
static int |
SYMMETRIC
SYMMETRIC mode will give an axis with values from minus half the sampling-rate (inclusive if length is even) to plus half the sampling-rate (exclusive). |
| Constructor Summary | |
FrequencyAxis(double[] frequencies)
Constructs FrequencyAxis object. |
|
FrequencyAxis(double[] frequencies,
java.lang.String label)
Constructs FrequencyAxis object. |
|
FrequencyAxis(double samplingRate,
int length)
Constructs FrequencyAxis object. |
|
FrequencyAxis(double samplingRate,
int length,
int mode)
Constructs FrequencyAxis object. |
|
FrequencyAxis(double samplingRate,
int length,
int mode,
java.lang.String label)
Constructs FrequencyAxis object. |
|
FrequencyAxis(double samplingRate,
int length,
java.lang.String label)
Constructs FrequencyAxis object. |
|
FrequencyAxis(int length)
Constructs FrequencyAxis object. |
|
| Method Summary | |
int |
getFullLength()
Return the number of bins for a full-period frequency axis. |
int |
getMode()
Return axis mode, one of POSITIVE_HALF, POSITIVE_FULL, SYMMETRIC or NEGATIVE_HALF. |
double |
getSamplingRate()
Return the sampling rate. |
static void |
main(java.lang.String[] args)
|
void |
setMode(int mode)
Set the axis mode, one of POSITIVE_HALF, POSITIVE_FULL, SYMMETRIC or NEGATIVE_HALF. |
| Methods inherited from class ifi.dsb.AxisValues |
getLabel, getLength, getMax, getMin, getValues, setLabel, setLength, setMax, setMin, updateValues |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int NEGATIVE_HALF
public static final int POSITIVE_HALF
public static final int SYMMETRIC
public static final int POSITIVE_FULL
| Constructor Detail |
public FrequencyAxis(double samplingRate,
int length)
samplingRate - length - Number of bins for a full-period frequency axis.
public FrequencyAxis(double samplingRate,
int length,
java.lang.String label)
samplingRate - length - Number of bins for a full-period frequency axis.label - Axis label.public FrequencyAxis(int length)
length - Number of bins for a full-period frequency axis.public FrequencyAxis(double[] frequencies)
frequencies - Frequency bins, assuming a full-period frequency axis
valid for axis mode equal to POSITIVE_FULL.
public FrequencyAxis(double[] frequencies,
java.lang.String label)
frequencies - Frequency bins, assuming a full-period frequency axis
valid for axis mode equal to POSITIVE_FULL.label - Axis label.
public FrequencyAxis(double samplingRate,
int length,
int mode)
samplingRate - Value for sampling rate stored in the object.length - Number of frequency bins (for full-period frequency axis).mode - Type of axis, one of POSITIVE_HALF ([0, samplingRate/2]),
NEGATIVE_HALF ([-samplingRate/2, 0]),
SYMMETRIC ([-samplingRate/2, samplingRate/2]),
POSITIVE_FULL ([0, samplingRate]).
public FrequencyAxis(double samplingRate,
int length,
int mode,
java.lang.String label)
samplingRate - Value for sampling rate stored in the object.length - Number of frequency bins (for full-period frequency axis).mode - Type of axis, one of POSITIVE_HALF ([0, samplingRate/2]),
NEGATIVE_HALF ([-samplingRate/2, 0]),
SYMMETRIC ([-samplingRate/2, samplingRate/2]),
POSITIVE_FULL ([0, samplingRate]).label - Axis label.| Method Detail |
public int getMode()
public void setMode(int mode)
public int getFullLength()
public double getSamplingRate()
public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||