Class DistributionContainer

java.lang.Object
random.DistributionContainer

public class DistributionContainer extends Object

Title:Distribution Container

Description: Data structure that stores a nested distribution

Author:
Peter Parapatics Date: 17-dec-1007
  • Field Details

  • Constructor Details

    • DistributionContainer

      public DistributionContainer(StorableDistribution distribution, Parameter parameter)
      Constructs a Distribution Container with a given distribution and a parameter
      Parameters:
      distribution - the distribution to be stored
      parameter - the parameter of the distribution
  • Method Details

    • getDistribution

      public Distribution getDistribution()
      Get the continuous distribution stored in the container
      Returns:
      the distribution stored in the container
      Throws:
      ClassCastException - if the distribution stored is not a continuous distribution
    • getDiscreteDistribution

      public DiscreteDistribution getDiscreteDistribution()
      Get the discrete distribution stored in the container
      Returns:
      the distribution stored in the container
      Throws:
      ClassCastException - if the distribution stored is not a discrete distribution
    • getParameter

      public Parameter getParameter()
      Get method for the distribution parameter
      Returns:
      the parameter belonging to the distribution