|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.demo.ApplyToMatrix
@ALDAOperator(genericExecutionMode=ALL, level=APPLICATION) public class ApplyToMatrix
Demo operator to apply a summarizing operation to a 2D array in row or column wise fashion. The summarizing operator is assumed to take a 1D array as input and return a summarizing scalar, e.g. the mean or the maxium value.
Nested Class Summary | |
---|---|
static class |
ApplyToMatrix.SummarizeMode
Choose row or colum wise sum |
Field Summary | |
---|---|
private long |
elapsedTime
Elpased time |
private java.lang.Double[][] |
matrix
Input matrix |
private boolean |
returnElapsedTime
Supplemental to request elapsed time to be returned |
private java.lang.Double[] |
summaries
1D Array of summaries. |
private ApplyToMatrix.SummarizeMode |
summarizeMode
Mode of summarizing |
private ALDSummarizeArrayOp |
summarizeOp
Summarizing opererator |
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
ApplyToMatrix()
Default constructor. |
|
ApplyToMatrix(java.lang.Double[][] matrix)
Constructor. |
Method Summary | |
---|---|
long |
getElapsedTime()
Get value of elapsedTime. |
java.lang.Double[][] |
getMatrix()
Get value of matrix. |
boolean |
getReturnElapsedTime()
Get value of returnElapsedTime. |
java.lang.Double[] |
getSummaries()
Get value of summaries. |
ApplyToMatrix.SummarizeMode |
getSummarizeMode()
Get value of summarizeMode. |
ALDSummarizeArrayOp |
getSummarizeOp()
Get value of summarizeOp. |
java.lang.Boolean |
getVerbose()
Get value of verbose. |
protected void |
operate()
This method does the actual work and needs to be implemented by every subclass. |
void |
setElapsedTime(long value)
Set value of elapsedTime. |
void |
setMatrix(java.lang.Double[][] value)
Set value of matrix. |
void |
setReturnElapsedTime(boolean value)
Set value of returnElapsedTime. |
void |
setSummaries(java.lang.Double[] value)
Set value of summaries. |
void |
setSummarizeMode(ApplyToMatrix.SummarizeMode value)
Set value of summarizeMode. |
void |
setSummarizeOp(ALDSummarizeArrayOp value)
Set value of summarizeOp. |
void |
setVerbose(java.lang.Boolean value)
Set value of verbose. |
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
deserializeFromXmlFile, getALDPortHashAccessKey, getInInoutNames, getInInoutNames, getName, getNumParameters, getOutInoutNames, getParameter, getParameterDescriptor, getParameterNames, getSupplementalNames, getVersion, parametersToXmlObject, print, print, print, printInterface, printInterface, readHistory, runOp, runOp, runOp, serializeToXmlFile, setParameter, setParametersFromXml, setParametersFromXml, toString, validate, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory, writeParametersToXml |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
@Parameter(label="Elapsed time", direction=OUT, description="Elapsed time of operation in milliseconds", supplemental=true) private long elapsedTime
@Parameter(label="Input matrix", required=true, direction=IN, description="Input matrix.") private java.lang.Double[][] matrix
@Parameter(label="Return elapsed time", direction=IN, description="Request elapsed time consumed to be returned", supplemental=true) private boolean returnElapsedTime
@Parameter(label="summaries", direction=OUT, description="Row or column wise summaries") private java.lang.Double[] summaries
@Parameter(label="Summarize mode", required=true, direction=IN, description="Sum over columns or rows.") private ApplyToMatrix.SummarizeMode summarizeMode
@Parameter(label="Summarizing operator", required=true, direction=IN, description="Specifies the summarizing operation to apply") private ALDSummarizeArrayOp summarizeOp
Constructor Detail |
---|
public ApplyToMatrix() throws ALDOperatorException
ALDOperatorException
public ApplyToMatrix(java.lang.Double[][] matrix) throws ALDOperatorException
matrix
- Input matrix.
ALDOperatorException
Method Detail |
---|
public long getElapsedTime()
public java.lang.Double[][] getMatrix()
public boolean getReturnElapsedTime()
public java.lang.Double[] getSummaries()
public ApplyToMatrix.SummarizeMode getSummarizeMode()
public ALDSummarizeArrayOp getSummarizeOp()
public java.lang.Boolean getVerbose()
getVerbose
in class ALDOperator
protected void operate() throws ALDOperatorException, ALDProcessingDAGException
ALDOperator
operate
in class ALDOperator
ALDOperatorException
ALDProcessingDAGException
public void setElapsedTime(long value)
value
- New value of elapsedTimepublic void setMatrix(java.lang.Double[][] value)
value
- New value of matrixpublic void setReturnElapsedTime(boolean value)
value
- New value of returnElapsedTimepublic void setSummaries(java.lang.Double[] value)
value
- New value of summariespublic void setSummarizeMode(ApplyToMatrix.SummarizeMode value)
value
- New value of summarizeModepublic void setSummarizeOp(ALDSummarizeArrayOp value)
value
- New value of summarizeOppublic void setVerbose(java.lang.Boolean value)
setVerbose
in class ALDOperator
value
- New value of verbose
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |