net.simplace.sim.components.util.LinearTransformArray

Scales and shifts DOUBLEARRAY SimVariables.

Takes a doublearray Variable iArray and scales it with cFactor and shifts it with cOffset (linear transformation). The output is stored in the variable Array.

\[ Array_k = cFactor \cdot iArray_k + cOffset \]

Notice

It is also possible, to scale FST-styled interpolation tables, i. e. double arrays of size 2n, that store alternating x and y values.

If cOnlyY is true, only the entries, representing y values are scaled (2nd, 4th, 6th ,...).

If cOnlyX is true, only the entries, representing x values are scaled (1st, 3rd, 5th, ...).

If both are true, then nothing is scaled. By default, both are set to false.

Component Variables

Content TypeNameDescriptionData TypeUnitMin ValueMax ValueDefault Value
constantcFactorfactor the value is scaled withDOUBLE--1.0
constantcOffsetoffset that is added to the (scaled) valueDOUBLE--0.0
constantcOnlyXif true, only 1st, 3rd, 5th, ... entries are transformed (for FST interpolation tables x values)BOOLEAN--false
constantcOnlyYif true, only 2nd, 4th, 6th, ... entries are transformed (for FST interpolation tables y values)BOOLEAN--false
inputiArrayinput arrayDOUBLEARRAY---
outArraytransformed output arrayDOUBLEARRAY---



public class LinearTransformArray extends net.simplace.sim.model.FWSimComponent {
// Public Constructors
public LinearTransformArray();


// Public Instance Methods
public HashMap createVariables(); // Defines
net.simplace.sim.model.FWSimComponent


Create the FWSimVariables as interface for this SimComponent

// Protected Instance Methods
protected void init(); // Defines net.simplace.sim.model.FWSimComponent

Initializes the fields by getting input and output FWSimVariables from VarMap
protected void process(); // Defines net.simplace.sim.model.FWSimComponent

Process the algorithm and write the results back to VarMap
protected FWSimComponent clone(FWSimVarMap aVarMap);
// Defines net.simplace.sim.model.FWSimComponent


creates a clone from this SimComponent for use in other threads


}



Hierarchy: java.lang.Object - net.simplace.sim.model.FWSimComponent (net.simplace.sim.util.FWSimFieldContainer) - LinearTransformArray