Class NormalDistributionMapping
java.lang.Object
org.variantsync.boosting.eval.util.NormalDistributionMapping
Utilities class for distributing mappings randomly
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.variantsync.boosting.product.Variant[]
distributeMappings
(org.variantsync.boosting.product.Variant[] preproducts, Path variantsDirectory, Map<String, org.variantsync.vevos.simulation.variability.pc.Artefact> product_pc, double percentage, double standardDeviation) Distributes mappings for products based on a given percentage and standard deviation.
-
Constructor Details
-
NormalDistributionMapping
public NormalDistributionMapping()
-
-
Method Details
-
distributeMappings
public static org.variantsync.boosting.product.Variant[] distributeMappings(org.variantsync.boosting.product.Variant[] preproducts, Path variantsDirectory, Map<String, org.variantsync.vevos.simulation.variability.pc.Artefact> product_pc, double percentage, double standardDeviation) Distributes mappings for products based on a given percentage and standard deviation. This function takes in an array of preproducts, a path to the variants directory, a map of product PCs, a percentage value for mapping, and a standard deviation for normal distribution. It calculates the total number of nodes in all preproducts, generates a distribution array based on the percentage and standard deviation, and then maps nodes in each product based on the distribution.- Parameters:
preproducts
- The products before mappingvariantsDirectory
- The path to the variants directoryproduct_pc
- A map to save the PCs of each variant to avoid loading laterpercentage
- The percentage of mapping to be appliedstandardDeviation
- The standard deviation for normal distribution (used for RQ3)- Returns:
- The products with mapped nodes
-