Class PythonIntervalEventTrigger<T extends AbstractDetector<T>>

    • Constructor Detail

      • PythonIntervalEventTrigger

        public PythonIntervalEventTrigger​(T prototypeFiringIntervalDetector)
    • Method Detail

      • pythonExtension

        public void pythonExtension​(long pythonObject)
        Part of JCC Python interface to object
      • pythonExtension

        public long pythonExtension()
        Part of JCC Python interface to object
      • pythonDecRef

        public void pythonDecRef()
        Part of JCC Python interface to object
      • convertIntervalDetector

        public <D extends FieldAbstractDetector<D,​S>,​S extends CalculusFieldElement<S>> FieldAbstractDetector<D,​S> convertIntervalDetector​(Field<S> field,
                                                                                                                                                             T detector)
        Description copied from class: IntervalEventTrigger
        Convert a primitive firing intervals detector into a field firing intervals detector.

        There is not need to set up withMaxCheck, withThreshold, or withHandler in the converted detector, this will be done by caller.

        A skeleton implementation of this method to convert some XyzDetector into FieldXyzDetector, considering these detectors are created from a date and a number parameter is:

        
             protected <D extends FieldEventDetector<S>, S extends CalculusFieldElement<S>>
                 FieldAbstractDetector<D, S> convertIntervalDetector(final Field<S> field, final XyzDetector detector) {
        
                 final FieldAbsoluteDate<S> date  = new FieldAbsoluteDate<>(field, detector.getDate());
                 final S                    param = field.getZero().newInstance(detector.getParam());
        
                 final FieldAbstractDetector<D, S> converted = (FieldAbstractDetector<D, S>) new FieldXyzDetector<>(date, param);
                 return converted;
        
             }
         
         
        Specified by:
        convertIntervalDetector in class IntervalEventTrigger<T extends AbstractDetector<T>>
        Type Parameters:
        D - type of the event detector
        S - type of the field elements
        Parameters:
        field - field to which the state belongs
        detector - primitive firing intervals detector to convert
        Returns:
        converted firing intervals detector