|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectutil.wavelet.SimpleSignal
public class SimpleSignal
A wrapper for an array of signal values and boundary conditions check.
Constructor Summary | |
---|---|
SimpleSignal(float[] values)
Construct a signal using the given array of signal values and default boundary conditions. |
|
SimpleSignal(float[] values,
BoundaryCondition boundaryCondition)
Construct a signal using the given array of signal values and boundary conditions. |
|
SimpleSignal(int size)
Construct a zero filled signal using the size and default boundary conditions. |
|
SimpleSignal(int size,
BoundaryCondition boundaryCondition)
Construct a zero filled signal using the size and a boundary condition. |
|
SimpleSignal(SimpleSignal signal)
Copy constructor. |
Method Summary | |
---|---|
SimpleSignal |
add(SimpleSignal signal)
Add the given signal to this signals and return result in this instance. |
static void |
add(SimpleSignal signalA,
SimpleSignal signalB,
SimpleSignal signalC)
Return in 'c' the addition of 'a' and 'b'. |
SimpleSignal |
convolve(SimpleSignal kernel)
Convolve this signal with a kernel. |
int |
estimateNumberOfScales()
Get an estimate for the number of wavelet scales in this signal. |
BoundaryCondition |
getBoundaryCondition()
Get the boundary condition (extrapolation methodology) for this signal. |
static SimpleSignal |
getChirp(int size,
float startFrequency,
float endFrequency)
Get a unit amplitude chirp signal with the given start and end frequencies. |
static SimpleSignal |
getDirac(int size)
Get a dicrete approximation of the Dirac delta function. |
static float |
getGaussianDeviate()
Get a normally distributed gaussian deviate with zero mean and unit variance. |
static SimpleSignal |
getGaussianNoise(int size)
Get a unit variance gaussian noise signal. |
static SimpleSignal |
getScalingFunction(int size,
float scale)
Get the B3-spline scaling funtion of the a-trous (with Mirror boundary) |
SimpleSignal |
getSubset(int start,
int end)
Get a subset of the signal betwen the given start and end positions. |
float |
getValue(int position)
Get the signal value at the given position and deal with boundary conditions when position is out of range. |
static SimpleSignal |
getWavelet(int size,
float scale)
Get the B3-spline wavelet funtion of the a-trous (with Mirror boundary) |
SimpleSignal |
multiply(float multiplier)
Multiply by the given multipler and return result in this instance. |
SimpleSignal |
multiply(SimpleSignal signal)
Multiply by the given signal and return result in this instance. |
static void |
multiply(SimpleSignal signalA,
float multiplier,
SimpleSignal signalB)
Return in 'B' the multiplication of 'a' and multiplier. |
static void |
multiply(SimpleSignal signalA,
SimpleSignal signalB,
SimpleSignal signalC)
Return in 'c' the multiplication of 'a' and 'b'. |
void |
setBoundaryCondition(BoundaryCondition boundaryCondition)
Set the boundary condition (extrapolation methodology) for this signal. |
void |
setValue(int position,
float signalValue)
Set the signal value at the given position and deal with boundary conditions when position is out of range. |
int |
size()
Get the size of this signal. |
SimpleSignal |
square()
Square the given signal and return result in this instance. |
static void |
square(SimpleSignal signalA,
SimpleSignal signalB)
Return in 'b' the square of 'a' and 'b'. |
SimpleSignal |
subtract(SimpleSignal signal)
Subtract the given signal from this signal and return result in this instance. |
static void |
subtract(SimpleSignal signalA,
SimpleSignal signalB,
SimpleSignal signalC)
Return in 'c' the subtraction of 'a' minus 'b'. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleSignal(float[] values)
values
- an array of signal valuespublic SimpleSignal(float[] values, BoundaryCondition boundaryCondition)
values
- an array of signal valuesboundaryCondition
- the boundary conditionpublic SimpleSignal(SimpleSignal signal)
signal
- to be clonedpublic SimpleSignal(int size)
size
- the size of the signalpublic SimpleSignal(int size, BoundaryCondition boundaryCondition)
size
- the size of the signalboundaryCondition
- the boundary conditionMethod Detail |
---|
public SimpleSignal convolve(SimpleSignal kernel)
kernel
- the convolution kernelpublic BoundaryCondition getBoundaryCondition()
public void setBoundaryCondition(BoundaryCondition boundaryCondition)
boundaryCondition
- the boundary conditionpublic int size()
public float getValue(int position)
position
- the position
setValue(int, float)
public void setValue(int position, float signalValue)
index
≤ size().
position
- the positionsignalValue
- the value to set the signal togetValue(int)
public SimpleSignal getSubset(int start, int end)
start
- position where the subset startsend
- position where the subset ends
public int estimateNumberOfScales()
Scale
public static SimpleSignal getDirac(int size)
public static SimpleSignal getChirp(int size, float startFrequency, float endFrequency)
size
- the size of the signalstartFrequency
- the starting frequency (in units of sample size)endFrequency
- the ending frequency (in units of sample size)
public static SimpleSignal getGaussianNoise(int size)
size
- the size of the signal
public static float getGaussianDeviate()
public static SimpleSignal getScalingFunction(int size, float scale)
public static SimpleSignal getWavelet(int size, float scale)
public SimpleSignal add(SimpleSignal signal)
signal
- the signal to be addedpublic SimpleSignal subtract(SimpleSignal signal)
signal
- the signal to be subtractedpublic SimpleSignal multiply(SimpleSignal signal)
signal
- the signal to be multipliedpublic SimpleSignal multiply(float multiplier)
multiplier
- the multiplierpublic SimpleSignal square()
public static void add(SimpleSignal signalA, SimpleSignal signalB, SimpleSignal signalC)
signalA
- inputsignalB
- inputsignalC
- output equals signalA + signalBpublic static void subtract(SimpleSignal signalA, SimpleSignal signalB, SimpleSignal signalC)
signalA
- inputsignalB
- inputsignalC
- output equals signalA - signalBpublic static void multiply(SimpleSignal signalA, SimpleSignal signalB, SimpleSignal signalC)
signalA
- inputsignalB
- inputsignalC
- output equals signalA * signalBpublic static void multiply(SimpleSignal signalA, float multiplier, SimpleSignal signalB)
signalA
- inputmultiplier
- inputsignalB
- output equals signalA * multiplierpublic static void square(SimpleSignal signalA, SimpleSignal signalB)
signalA
- inputsignalB
- output equals signalA*signalA
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |