All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.mianalysis.mia.process.analysis.TotalPathLengthCalculator Maven / Gradle / Ivy

package io.github.mianalysis.mia.process.analysis;

import java.util.TreeMap;

public class TotalPathLengthCalculator implements SummaryCalculator {

    @Override
    public double calculate(double[] x, double[] y, double[] z, int[] f) {
        TreeMap steps = new InstantaneousStepSizeCalculator().calculate(x, y, z, f);

        double totalPathLength = 0;
        for (double value:steps.values()) totalPathLength += value;

        return totalPathLength;
        
    }    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy