|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectframed.Slope
public class Slope
Use a Slope object to compute derivatives of a static input frame. Currently supported are derivatives up to the order of 3. Use the Context class to specify the desired derivatives and their context. Each derivative may be computed over a different context. Tirol smoothing (x[i] = x[i-1]/4 + x[i]/2 + x[i+1]/4) is enabled by default.
Nested Class Summary | |
---|---|
static class |
Slope.Context
The Context class holds all information necessary to compute derivatives. |
Field Summary | |
---|---|
static int |
PAD_COPY
pad with the most recently read valid data |
Constructor Summary | |
---|---|
Slope(FrameSource source)
Generate the default Slope object; computes the first derivative over a context of 3 frames. |
|
Slope(FrameSource source,
Slope.Context[] contexts)
Generate a specific Slope object for the given contexts |
Method Summary | |
---|---|
static Slope |
create(FrameSource source,
java.lang.String parameterString)
Create a new Slope object which computes the specified deltas on the connected source |
int |
getFrameSize()
Return the outgoing frame size |
boolean |
getTirol()
Tirol smoothing enabled? |
static void |
main(java.lang.String[] args)
|
boolean |
read(double[] buf)
Read and process the next frame. |
void |
setTirol(boolean tirol)
Enable/disable Tirol filtering (smoothing); (x[i] = x[i-1]/4 + x[i]/2 + x[i+1]/4) |
java.lang.String |
toString()
Return a String representation of the FrameSource |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static int PAD_COPY
Constructor Detail |
---|
public Slope(FrameSource source)
source
- public Slope(FrameSource source, Slope.Context[] contexts)
source
- contexts
- derivatives to computeSlope.Context
Method Detail |
---|
public static Slope create(FrameSource source, java.lang.String parameterString) throws MalformedParameterStringException
source
- FrameSource to connect toparameterString
- "context-size:order[,context-size:order,...]
MalformedParameterStringException
public int getFrameSize()
getFrameSize
in interface FrameSource
public boolean getTirol()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public boolean read(double[] buf) throws java.io.IOException
read
in interface FrameSource
buf
- buffer to save the frame; implementing objects may depend
on a constant dimensionduring subsequent calls
java.io.IOException
public void setTirol(boolean tirol)
tirol
- public java.lang.String toString()
FrameSource
toString
in interface FrameSource
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |