net.simplace.client.simulation.lap.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 withDOUBLE1--1.0
constantcOffsetoffset that is added to the (scaled) valueDOUBLE1--0.0
constantcOnlyXif true, only 1st, 3rd, 5th, ... entries are transformed (for FST interpolation tables x values)BOOLEAN1--false
constantcOnlyYif true, only 2nd, 4th, 6th, ... entries are transformed (for FST interpolation tables y values)BOOLEAN1--false
inputiArrayinput arrayDOUBLEARRAY1---
outArraytransformed output arrayDOUBLEARRAY1---



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


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


Create the FWSimVariables as interface for this SimComponent

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


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


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


creates a clone from this SimComponent for use in other threads


}



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