// Path: lib/src/main/java/hrv/lib/hrv/RRData.java
// public class RRData {
// 
// 	private final TimeUnit rrValueAxisUnit;
// 	private final /*@ spec_public */ TimeUnit rrTimeAxisUnit;
// 
// 	private final double[] rrValuesAxis;
// 	private final double[] rrTimeAxis;
// 
// 	public RRData(double[] timeAxis, TimeUnit timeAxisUnit, double[] valueAxis, TimeUnit valueAxisUnit) {
// 		this.rrValuesAxis = valueAxis;
// 		this.rrValueAxisUnit = valueAxisUnit;
// 
// 		this.rrTimeAxis = timeAxis;
// 		this.rrTimeAxisUnit = timeAxisUnit;
// 	}
// 
// 	/**
// 	 * Creates a new RRData object from an RR-Interval
// 	 * 
// 	 * @param rrInterval
// 	 *            RR-Interval
// 	 * @param unit
// 	 *            of the given RR-Data.
// 	 * @return new RRData object with given RR-Interval data.
// 	 */
// 	public static RRData createFromRRInterval(double[] rrInterval, TimeUnit unit) {
// 		var rrTimeAxis = new double[rrInterval.length];
// 		for (var i = 1; i < rrInterval.length; i++) {
// 			rrTimeAxis[i] = rrTimeAxis[i - 1] + rrInterval[i - 1];
// 		}
// 
// 		return new RRData(rrTimeAxis, unit, rrInterval, unit);
// 	}
// 
// 	public double[] getValueAxis() {
// 		return rrValuesAxis;
// 	}
// 
// 	public double[] getTimeAxis() {
// 		return rrTimeAxis;
// 	}
// 	
// 	public TimeUnit getValueAxisUnit() {
// 		return rrValueAxisUnit;
// 	}
// 
// 	public TimeUnit getTimeAxisUnit() {
// 		return rrTimeAxisUnit;
// 	}
// }
// 
// Path: lib/src/main/java/hrv/lib/units/TimeUnit.java
// public enum TimeUnit {
// 	DAY("d"),
// 	HOUR("h"),
// 	MINUTE("m"),
// 	SECOND("s"),
// 	MILLISECOND("ms");
// 	
// 	private final String asText;
// 	
// 	TimeUnit(String asText) {
// 		this.asText = asText;
// 	}
// 	
// 	@Override
// 	public String toString() {
// 		return asText;
// 	}
// }


import hrv.lib.hrv.RRData;
import hrv.lib.units.TimeUnit;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
package hrv.lib.hrv.calc.parameter;



class SDSDCalculatorTest {

	@Test
	void testForZeroCalculation() {
		double[] valueData = new double[] { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 };
		RRData data = new RRData(null, TimeUnit.SECOND, valueData, TimeUnit.SECOND);
		
		SDSDCalculator calc = new SDSDCalculator();
		assertEquals(0.0, calc.process(data).getValue(), 0.00001);
	}
	
	@Test
	void testWikiSampleData() {
		//Vales needed after subtraction: 10.0, 9.0, 13.0, 15.0, 16.0
		//Sample Source: https://de.wikipedia.org/wiki/Empirische_Standardabweichung
		double[] valueData = new double[] { 100, 90, 81, 68, 53, 37 };
// Path: lib/src/main/java/hrv/lib/hrv/RRData.java
// public class RRData {
// 
// 	private final TimeUnit rrValueAxisUnit;
// 	private final /*@ spec_public */ TimeUnit rrTimeAxisUnit;
// 
// 	private final double[] rrValuesAxis;
// 	private final double[] rrTimeAxis;
// 
// 	public RRData(double[] timeAxis, TimeUnit timeAxisUnit, double[] valueAxis, TimeUnit valueAxisUnit) {
// 		this.rrValuesAxis = valueAxis;
// 		this.rrValueAxisUnit = valueAxisUnit;
// 
// 		this.rrTimeAxis = timeAxis;
// 		this.rrTimeAxisUnit = timeAxisUnit;
// 	}
// 
// 	/**
// 	 * Creates a new RRData object from an RR-Interval
// 	 * 
// 	 * @param rrInterval
// 	 *            RR-Interval
// 	 * @param unit
// 	 *            of the given RR-Data.
// 	 * @return new RRData object with given RR-Interval data.
// 	 */
// 	public static RRData createFromRRInterval(double[] rrInterval, TimeUnit unit) {
// 		var rrTimeAxis = new double[rrInterval.length];
// 		for (var i = 1; i < rrInterval.length; i++) {
// 			rrTimeAxis[i] = rrTimeAxis[i - 1] + rrInterval[i - 1];
// 		}
// 
// 		return new RRData(rrTimeAxis, unit, rrInterval, unit);
// 	}
// 
// 	public double[] getValueAxis() {
// 		return rrValuesAxis;
// 	}
// 
// 	public double[] getTimeAxis() {
// 		return rrTimeAxis;
// 	}
// 	
// 	public TimeUnit getValueAxisUnit() {
// 		return rrValueAxisUnit;
// 	}
// 
// 	public TimeUnit getTimeAxisUnit() {
// 		return rrTimeAxisUnit;
// 	}
// }
// 
// Path: lib/src/main/java/hrv/lib/units/TimeUnit.java
// public enum TimeUnit {
// 	DAY("d"),
// 	HOUR("h"),
// 	MINUTE("m"),
// 	SECOND("s"),
// 	MILLISECOND("ms");
// 	
// 	private final String asText;
// 	
// 	TimeUnit(String asText) {
// 		this.asText = asText;
// 	}
// 	
// 	@Override
// 	public String toString() {
// 		return asText;
// 	}
// }


// Path: lib/src/test/java/hrv/lib/hrv/calc/parameter/SDSDCalculatorTest.java
import hrv.lib.hrv.RRData;
import hrv.lib.units.TimeUnit;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;

package hrv.lib.hrv.calc.parameter;



class SDSDCalculatorTest {

	@Test
	void testForZeroCalculation() {
		double[] valueData = new double[] { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 };
		RRData data = new RRData(null, TimeUnit.SECOND, valueData, TimeUnit.SECOND);
		
		SDSDCalculator calc = new SDSDCalculator();
		assertEquals(0.0, calc.process(data).getValue(), 0.00001);
	}
	
	@Test
	void testWikiSampleData() {
		//Vales needed after subtraction: 10.0, 9.0, 13.0, 15.0, 16.0
		//Sample Source: https://de.wikipedia.org/wiki/Empirische_Standardabweichung
		double[] valueData = new double[] { 100, 90, 81, 68, 53, 37 };
		RRData data = new RRData(null, TimeUnit.SECOND, valueData, TimeUnit.SECOND);