@ALDAOperator(genericExecutionMode=ALL, level=APPLICATION, shortDescription="Calculates the row or column sums of the matrix.") public class MatrixSum extends ALDOperator
Modifier and Type | Class and Description |
---|---|
static class |
MatrixSum.SummarizeMode
Choose row or colum wise sum
|
ALDOperator.HidingMode, ALDOperator.HistoryConstructionMode
Modifier and Type | Field and Description |
---|---|
private Double[][] |
matrix
Input matrix
|
private MatrixSum.SummarizeMode |
summarizeMode
Mode of summarizing
|
private Double[] |
sums
1D Array of sums.
|
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider
Constructor and Description |
---|
MatrixSum()
Default constructor.
|
MatrixSum(Double[][] _matrix)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getDocumentation()
Full description of the operator, e.g., to be shown as documentation in GUI.
|
Double[] |
getSums()
Returns the calculated sums.
|
protected void |
operate()
This method does the actual work and needs to be implemented by every
subclass.
|
addOperatorExecutionProgressEventListener, addParameter, addParameter, addParameterUnconditioned, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getHidingMode, getInactiveParameterNames, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterDescriptorUnconditioned, getParameterNames, getParameterUnconditioned, getSupplementalNames, getVerbose, getVersion, handleOperatorExecutionProgressEvent, hasInOutParameters, hasParameter, isAnnotatedParameter, isConfigured, print, print, print, printInterface, printInterface, readHistory, readResolve, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, removeParameter, runOp, runOp, runOp, setConstructionMode, setConstructionMode, setConstructionMode, setHidingMode, setName, setParameter, setParameterUnconditioned, setVerbose, toStringVerbose, unconfiguredItems, validate, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory
@Parameter(label="Input matrix", required=true, direction=IN, description="Input matrix.") private Double[][] matrix
@Parameter(label="Summarize mode", required=true, direction=IN, description="Sum over columns or rows?") private MatrixSum.SummarizeMode summarizeMode
@Parameter(label="sums", direction=OUT, description="Row or column wise sums.") private transient Double[] sums
public MatrixSum() throws ALDOperatorException
ALDOperatorException
public MatrixSum(Double[][] _matrix) throws ALDOperatorException
_matrix
- Input matrix.ALDOperatorException
protected void operate() throws ALDOperatorException
ALDOperator
operate
in class ALDOperator
ALDOperatorException
public Double[] getSums()
public String getDocumentation()
ALDOperator
getDocumentation
in class ALDOperator
Copyright © 2010–2021 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.