Class ClocksDifference

All Implemented Interfaces:
ClockModel, ParameterDriversProvider

public class ClocksDifference extends AbstractCombinedClocksPair
Clock model computing the difference of two underlying models.
Since:
14.0
Author:
Luc Maisonobe
  • Constructor Details

    • ClocksDifference

      public ClocksDifference(ClockModel clock1, ClockModel clock2)
      Simple constructor.

      The combined clock is clock1 - clock2

      Parameters:
      clock1 - first underlying clock
      clock2 - second underlying clock
  • Method Details

    • combine

      protected ClockOffset combine(ClockOffset offset1, ClockOffset offset2)
      Combine two offsets.
      Specified by:
      combine in class AbstractCombinedClocksPair
      Parameters:
      offset1 - first offset
      offset2 - second offset
      Returns:
      combined offset
    • toField

      public <T extends CalculusFieldElement<T>> FieldClocksDifference<T> toField(DoubleFunction<T> converter)
      Convert to field model.
      Type Parameters:
      T - type of the field elements
      Parameters:
      converter - converter to field elements
      Returns:
      field version of the instance
    • toGradient

      public FieldClocksDifference<Gradient> toGradient(int freeParameters, Map<String,Integer> indices)
      Convert to gradient model.
      Parameters:
      freeParameters - total number of free parameters in the gradient
      indices - indices of the differentiation parameters in derivatives computations, must be span name and not driver name
      Returns:
      converted clock model