classPiiAverageOperation
#include <PiiAverageOperation.h>
Calculate the average of all values in a matrix.
Inherits PiiDefaultOperation
Description
Inputs
Outputs
double or
complex<double>. If an average type is meanRows
or meanColumns, then output type is PiiMatrix<double> or PiiMatrix<complex<double>
>.
Properties
|
CalculationMode is a type of the average calculation. |
Public types
|
enum
|
{ MeanAll, MeanRows, MeanColumns }
Calculation modes. |
Constructors and destructor
Public member functions
|
( )
|
|
|
void
|
|
Protected member functions
|
virtual void
|
( )
Executes one round of processing. |
Property details
-
CalculationMode calculationMode
[read, write]CalculationMode is a type of the average calculation.
Default is MeanAll.
Enumeration details
-
enum CalculationMode
Calculation modes.
-
MeanAll- output the mean of all values (double or double complex) -
MeanRows- output the means of all rows (column matrix with double or double complex data) -
MeanColumns- output the means of all columns (row matrix with double or double complex data)
-
Function details
-
PiiAverageOperation
() -
CalculationMode calculationMode
() -
void setCalculationMode
-
virtual void process
()[protected, virtual]Executes one round of processing.
This function is invoked by the processor if the necessary preconditions for a new processing round are met. This function does all the necessary calculations to create output objects and sends them to output sockets.
Calls to process(), syncEvent(), and setProperty() are synchronized and cannot occur simultaneously. PiiDefaultOperation ensures this by locking processLock() for reading before calling process().
Note: With time-consuming operations, one should occasionally check that the operation hasn't been interrupted, i.e. that state() returns
Running.Exceptions
- PiiExecutionException
-
whenever an unrecoverable error occurs during a processing round, the operation is interrupted, or finishes execution due to end of input data.
Reimplemented from PiiDefaultOperation.
Add a note
Not a single note added yet. Be the first, add yours.