Class SampleArrayFunctions


  • public class SampleArrayFunctions
    extends java.lang.Object
    Returns prior samples of given attribute from jexl context
    Author:
    cgallen
    • Constructor Summary

      Constructors 
      Constructor Description
      SampleArrayFunctions​(org.apache.commons.jexl2.JexlContext context)
      The context will be populated by jexl prior to expression execution
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Double arrayFirst​(java.lang.String sampleName, int n)
      Returns prior sample value of attribute 'sampleName' y = sample[i - n] If selected sample is before start of retrieved samples return first sample value sample[0]
      java.lang.Double arrayNaN​(java.lang.String sampleName, int n)
      Returns prior sample value of attribute 'sampleName' y = sample[i - n] If selected sample is before start of retrieved samples return Not a Number (NaN)
      java.lang.Double arrayStart​(java.lang.String sampleName, int n, double start)
      Returns prior sample value of attribute 'sampleName' y = sample[i - n] If selected sample is before start of retrieved samples return substitute sample value
      java.lang.Double arrayZero​(java.lang.String sampleName, java.lang.Integer n)
      Returns prior sample value of attribute 'sampleName' y = sample[i - n] If selected sample is before start of retrieved samples return zero (0)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SampleArrayFunctions

        public SampleArrayFunctions​(org.apache.commons.jexl2.JexlContext context)
        The context will be populated by jexl prior to expression execution
        Parameters:
        context -
    • Method Detail

      • arrayZero

        public java.lang.Double arrayZero​(java.lang.String sampleName,
                                          java.lang.Integer n)
        Returns prior sample value of attribute 'sampleName' y = sample[i - n] If selected sample is before start of retrieved samples return zero (0)
        Parameters:
        sampleName - name of attribute
        i - number of samples prior to return
        Returns:
        sample n-i or Zero (0) if sample before start of received sequence. NaN if sampleName not in jexl context
      • arrayFirst

        public java.lang.Double arrayFirst​(java.lang.String sampleName,
                                           int n)
        Returns prior sample value of attribute 'sampleName' y = sample[i - n] If selected sample is before start of retrieved samples return first sample value sample[0]
        Parameters:
        sampleName - name of attribute
        i - number of samples prior to return
        Returns:
        sample n-i or sample[0] if sample before start of received sequence. NaN if sampleName not in jexl context
      • arrayNaN

        public java.lang.Double arrayNaN​(java.lang.String sampleName,
                                         int n)
        Returns prior sample value of attribute 'sampleName' y = sample[i - n] If selected sample is before start of retrieved samples return Not a Number (NaN)
        Parameters:
        sampleName - name of attribute
        i - number of samples prior to return
        Returns:
        sample n-i or not a number (NaN) if sample before start of received sequence. NaN if sampleName not in jexl context
      • arrayStart

        public java.lang.Double arrayStart​(java.lang.String sampleName,
                                           int n,
                                           double start)
        Returns prior sample value of attribute 'sampleName' y = sample[i - n] If selected sample is before start of retrieved samples return substitute sample value
        Parameters:
        sampleName - name of attribute
        i - number of samples prior to return
        start - replace references before start of samples with this value
        Returns:
        sample n-i or substitute if sample before start of received sequence. NaN if sampleName not in jexl context