Class MultiArgumentOperator

java.lang.Object
  |
  +--AbstractELOperator
        |
        +--MultiArgumentOperator
All Implemented Interfaces:
ELOperator
Direct Known Subclasses:
Add, Average, BitwiseOperator, Max, Min, Mul, Sub

public abstract class MultiArgumentOperator
extends AbstractELOperator
implements ELOperator


Fields inherited from interface ELOperator
LARGE_NUMER_OF_ARGUMENTS
 
Constructor Summary
MultiArgumentOperator()
           
 
Method Summary
 void apply(ELMatrix[] argument, ELMatrix out, ELEnvironment environment)
          Applies this operator.
protected  void checkArguments(ELMatrix[] argument)
           
protected  void clamp(ELMatrix out)
           
protected  void combine(ELMatrix out, ELMatrix other)
          Combines the cumulative result (out) with the next argument (other).
protected abstract  float combine(float a, float b)
          Override this to provide your element-by-element operator.
 int getMaxNumArguments()
          Returns the maxiumum number of arguments this operator accepts.
 int getMinNumArguments()
          Returns the minimum number of arguments this operator accepts.
 java.lang.String unparse()
          How this operator should appear in EL code.
 
Methods inherited from class AbstractELOperator
clamp, hasExternalInfluences, iconString, paintIcon
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ELOperator
description, hasExternalInfluences, name, paintIcon
 

Constructor Detail

MultiArgumentOperator

public MultiArgumentOperator()
Method Detail

checkArguments

protected void checkArguments(ELMatrix[] argument)

apply

public void apply(ELMatrix[] argument,
                  ELMatrix out,
                  ELEnvironment environment)
Description copied from interface: ELOperator
Applies this operator.
Specified by:
apply in interface ELOperator

combine

protected abstract float combine(float a,
                                 float b)
Override this to provide your element-by-element operator.

clamp

protected void clamp(ELMatrix out)

combine

protected void combine(ELMatrix out,
                       ELMatrix other)
Combines the cumulative result (out) with the next argument (other).

getMaxNumArguments

public int getMaxNumArguments()
Description copied from interface: ELOperator
Returns the maxiumum number of arguments this operator accepts. Note: All operators that accept an argument accept an ELMatrix argument.
Specified by:
getMaxNumArguments in interface ELOperator

getMinNumArguments

public int getMinNumArguments()
Description copied from interface: ELOperator
Returns the minimum number of arguments this operator accepts.
Specified by:
getMinNumArguments in interface ELOperator

unparse

public java.lang.String unparse()
Description copied from interface: ELOperator
How this operator should appear in EL code.
Specified by:
unparse in interface ELOperator