Class TraceAnalysisKt

    • Constructor Detail

    • Method Detail

      • trace_mean

         final static Double trace_mean(DoubleArray S)

        Computes the mean of a trace.

        Parameters:
        S - Input trace
        Returns:

        Mean value

      • trace_var

         final static Double trace_var(DoubleArray S)

        Computes the variance of a trace.

        Parameters:
        S - Input trace
        Returns:

        Variance

      • trace_scv

         final static Double trace_scv(DoubleArray S)

        Computes the squared coefficient of variation (SCV) of a trace.

        Parameters:
        S - Input trace
        Returns:

        Squared coefficient of variation (variance / mean^2)

      • autocov

         final static DoubleArray autocov(DoubleArray X)

        Computes the autocovariance of a trace using FFT.

        Parameters:
        X - Input trace (column vector conceptually)
        Returns:

        Autocovariance vector

      • trace_acf

         final static DoubleArray trace_acf(DoubleArray S, IntArray lags)

        Computes the autocorrelation function (ACF) for a trace at specified lags.

        Parameters:
        S - Input trace
        lags - Lags at which to compute ACF (1-based in MATLAB, converted to 0-based internally)
        Returns:

        Autocorrelation values at specified lags

      • trace_acf

         final static Double trace_acf(DoubleArray S)

        Computes the autocorrelation function at lag 1.

        Parameters:
        S - Input trace
        Returns:

        Lag-1 autocorrelation

      • trace_skew

         final static Double trace_skew(DoubleArray S)

        Computes the bias-corrected skewness of a trace.

        Parameters:
        S - Input trace
        Returns:

        Skewness value

      • trace_joint

         final static Double trace_joint(DoubleArray S, IntArray lags, IntArray orders)

        Computes the joint moment EX^{k_1}_{i} X^{k_2}_{i+lag_1} ... for a trace.

        Parameters:
        S - Input trace
        lags - Array of lag values (cumulative)
        orders - Array of moment orders for each position
        Returns:

        Joint moment value

      • trace_idi

         final static DoubleArray trace_idi(DoubleArray S, IntArray kset)

        Computes the index of dispersion for intervals (IDI) of a trace.

        Parameters:
        S - Input trace (inter-arrival times)
        kset - Array of k values at which to compute IDI
        Returns:

        Array of IDI values

      • trace_idi

         final static Double trace_idi(DoubleArray S)

        Computes the index of dispersion for intervals with default k values.

        Parameters:
        S - Input trace
        Returns:

        IDI value at k = min(1000, trace_length/30)

      • trace_idc

         final static Double trace_idc(DoubleArray S)

        Computes the index of dispersion for counts (IDC) of a trace. Asymptotically, IDI and IDC are equal.

        Parameters:
        S - Input trace
        Returns:

        IDC value

      • trace_gamma

         final static Double trace_gamma(DoubleArray T, Integer limit)

        Estimates the autocorrelation decay rate of a trace.

        Parameters:
        T - Input trace
        limit - Maximum lag considered (default: 1000)
        Returns:

        Autocorrelation decay rate gamma

      • trace_iat2counts

         final static IntArray trace_iat2counts(DoubleArray S, Double scale)

        Computes the counting process from inter-arrival times. Returns the number of arrivals within 'scale' time units from each arrival.

        Parameters:
        S - Inter-arrival times
        scale - Time window size
        Returns:

        Counts array

      • trace_iat2bins

         final static Pair<IntArray, IntArray> trace_iat2bins(DoubleArray S, Double scale)

        Computes binned counts from inter-arrival times.

        Parameters:
        S - Inter-arrival times
        scale - Bin width
        Returns:

        Pair of (counts per bin, bin membership for each event)

      • trace_pmf

         final static Pair<DoubleArray, DoubleArray> trace_pmf(DoubleArray X)

        Computes the probability mass function of discrete values in a trace.

        Parameters:
        X - Input trace with discrete values
        Returns:

        Pair of (PMF values, unique values)

      • trace_summary

         final static TraceSummary trace_summary(DoubleArray m)

        Computes comprehensive summary statistics for a trace.

        Parameters:
        m - Input trace
        Returns:

        TraceSummary containing all computed statistics

      • mtrace_mean

         final static DoubleArray mtrace_mean(List<DoubleArray> traces)

        Computes the mean of multiple traces (multi-trace mean).

        Parameters:
        traces - List of traces
        Returns:

        Array of means for each trace