Class NormalDistributionMapping

java.lang.Object
org.variantsync.boosting.eval.util.NormalDistributionMapping

public class NormalDistributionMapping extends Object
Utilities class for distributing mappings randomly
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 mapping
      variantsDirectory - The path to the variants directory
      product_pc - A map to save the PCs of each variant to avoid loading later
      percentage - The percentage of mapping to be applied
      standardDeviation - The standard deviation for normal distribution (used for RQ3)
      Returns:
      The products with mapped nodes