Class ConstructSimulation

java.lang.Object
org.gsusers.gsmv.utilities.ConstructSimulation

public class ConstructSimulation extends Object
'constructSimulation' (cS) builds the synthetic data according to the ANOVA random org.gs_users.gs_lv.model. On the basis of the specified facets and their nesting, the program has identified the potential sources of variability (variance components) in terms of crossed and nested facets, as well as due to their interactions (see CompConstrct), expressed as strings, designated 'Configurations' - the general 'Effects' of the org.gs_users.gs_lv.model. For each configuration (i.e.'Effect') it then gets the number of possible states (from 'SampleSizeTree.getSize), over the allowed range of facet indices. For each configuration it generates 'synthetic error' values, distributed according to the variance component corresponding to its configuration. It then steps through the indices in the correct order, adding all the component error values according to the appropriate indices. The resulting array of double numbers (darOutput) is distributed symmetrically around 0.0 with the appropriate compound variance. On the side, 'constructSimulation also prepares a stringArrayList (salCarriageReturn), providing the formated indices for each line of data values. Both, darOutput and salCarriageReturn are being passed to SynthGroups.saveSynthetics.
See Also:
  • Constructor Details

    • ConstructSimulation

      public ConstructSimulation(Nest _nest)
      constructor
      Parameters:
      _nest - pointer to Nest
  • Method Details

    • getData

      public Double[][] getData()
      getter of final darOutput
      Returns:
      darOutput
    • getCarriageReturn

      public String[] getCarriageReturn()
      getter of row indices
      Returns:
      salCarriageReturn
    • getlineCount

      public int getlineCount()
      Getter for lineCount.
      Returns:
      total number of lines
    • dumpArray

      public String dumpArray(int[] array)
      utility to convert int array to text string
      Parameters:
      array - arbitrary int array
      Returns:
      formatted text
    • dumpArray

      public String dumpArray(Double[] array)
      utility to convert double array to text string
      Parameters:
      array - arbitrary double array
      Returns:
      formatted text