class ComplexityInvariantDistance implements IDistanceMetric {

	@Override
	public double distance(final double[] a, final double[] b) {
		double complexityA = this.complexityMeasure.complexity(a);
		double complexityB = this.complexityMeasure.complexity(b);
		double complexityCorrectionFactor = Math.max(complexityA, complexityB) / Math.min(complexityA, complexityB);

		return this.distanceMeasure.distance(a, b) * complexityCorrectionFactor;
	}

	  ComplexityInvariantDistance(final IDistanceMetric distanceMeasure, final ITimeSeriesComplexity complexityMeasure);

}