Class FullResponseMatrixTool
- java.lang.Object
-
- cern.accsoft.steering.jmad.tools.response.FullResponseMatrixTool
-
- All Implemented Interfaces:
ResponseMatrixTool
public class FullResponseMatrixTool extends java.lang.Object implements ResponseMatrixTool
This implementation ofResponseMatrixTool
calculates the response matrix using the exact kick strengths given in the request and calculates the response matrix by the use of two trajectories returned by the madx-model. It thus includes all (even nonlinear) effects and coupling.
-
-
Constructor Summary
Constructors Constructor Description FullResponseMatrixTool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProgressListener(java.util.function.BiConsumer<ResponseRequest,java.lang.Integer> listener)
adds a progress listener, which will get notified for every corrector under calculation.Jama.Matrix
calcResponseMatrix(JMadModel model, ResponseRequest request)
calculates the actual response-matrix.void
removeProgressListener(java.util.function.BiConsumer<ResponseRequest,java.lang.Integer> listener)
-
-
-
Method Detail
-
calcResponseMatrix
public Jama.Matrix calcResponseMatrix(JMadModel model, ResponseRequest request) throws JMadModelException
Description copied from interface:ResponseMatrixTool
calculates the actual response-matrix. Which correctors, monitors to use and how to vary the strengthes is defined via the ResponseRequest object.- Specified by:
calcResponseMatrix
in interfaceResponseMatrixTool
- Parameters:
model
- the model to use to calculate the response matrixrequest
- contains strenghtes, monitors and strength-variations to use to calc the response-matrix.- Returns:
- the response-matrix
- Throws:
JMadModelException
- if the calculation of the response matrix fails
-
addProgressListener
public void addProgressListener(java.util.function.BiConsumer<ResponseRequest,java.lang.Integer> listener)
Description copied from interface:ResponseMatrixTool
adds a progress listener, which will get notified for every corrector under calculation. The second argument is the index of the corrector for which calculation just finished.- Specified by:
addProgressListener
in interfaceResponseMatrixTool
- Parameters:
listener
- the listener to add
-
removeProgressListener
public void removeProgressListener(java.util.function.BiConsumer<ResponseRequest,java.lang.Integer> listener)
- Specified by:
removeProgressListener
in interfaceResponseMatrixTool
-
-