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

com.puresoltechnologies.purifinity.server.metrics.entropy.EntropyMetricEvaluatorParameter Maven / Gradle / Ivy

package com.puresoltechnologies.purifinity.server.metrics.entropy;

import java.util.HashSet;
import java.util.Set;

import com.puresoltechnologies.commons.domain.LevelOfMeasurement;
import com.puresoltechnologies.commons.domain.ParameterWithArbitraryUnit;
import com.puresoltechnologies.parsers.source.SourceCodeLocation;
import com.puresoltechnologies.purifinity.analysis.domain.CodeRangeType;
import com.puresoltechnologies.purifinity.evaluation.api.CodeRangeNameParameter;
import com.puresoltechnologies.purifinity.evaluation.api.CodeRangeTypeParameter;
import com.puresoltechnologies.purifinity.evaluation.api.QualityLevelParameter;
import com.puresoltechnologies.purifinity.evaluation.api.SourceCodeLocationParameter;
import com.puresoltechnologies.purifinity.evaluation.api.SourceCodeQualityParameter;
import com.puresoltechnologies.purifinity.evaluation.domain.QualityLevel;
import com.puresoltechnologies.purifinity.evaluation.domain.SourceCodeQuality;
import com.puresoltechnologies.purifinity.evaluation.domain.metrics.MetricParameter;

public class EntropyMetricEvaluatorParameter {

	public static final ParameterWithArbitraryUnit SOURCE_CODE_LOCATION = SourceCodeLocationParameter
			.getInstance();
	public static final ParameterWithArbitraryUnit CODE_RANGE_TYPE = CodeRangeTypeParameter
			.getInstance();
	public static final ParameterWithArbitraryUnit CODE_RANGE_NAME = CodeRangeNameParameter
			.getInstance();
	public static final MetricParameter N_DIFF = new MetricParameter(
			"nDiff", "", LevelOfMeasurement.RATIO,
			"Number of different operators", Integer.class);
	public static final MetricParameter N_TOTAL = new MetricParameter(
			"nTotal", "", LevelOfMeasurement.RATIO,
			"Total number of operators", Integer.class);
	public static final MetricParameter S = new MetricParameter(
			"S", "", LevelOfMeasurement.RATIO, "Entropy", Double.class);
	public static final MetricParameter S_MAX = new MetricParameter(
			"Smax", "", LevelOfMeasurement.RATIO, "Maximum entropy",
			Double.class);
	public static final MetricParameter S_NORM = new MetricParameter(
			"Snorm", "", LevelOfMeasurement.RATIO, "Normalized entropy",
			Double.class);
	public static final MetricParameter RS = new MetricParameter(
			"Rs", "", LevelOfMeasurement.RATIO, "Entropic redundancy",
			Double.class);
	public static final MetricParameter R = new MetricParameter(
			"R", "", LevelOfMeasurement.RATIO, "Redundancy", Double.class);
	public static final MetricParameter R_NORM = new MetricParameter(
			"Rnorm", "", LevelOfMeasurement.RATIO, "Normalized redundancy",
			Double.class);
	public static final ParameterWithArbitraryUnit QUALITY = SourceCodeQualityParameter
			.getInstance();
	public static final ParameterWithArbitraryUnit QUALITY_LEVEL = QualityLevelParameter
			.getInstance();

	public static final Set> ALL = new HashSet<>();
	static {
		ALL.add(N_DIFF);
		ALL.add(N_TOTAL);
		ALL.add(S);
		ALL.add(S_MAX);
		ALL.add(S_NORM);
		ALL.add(RS);
		ALL.add(R);
		ALL.add(R_NORM);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy