ProbabilityDistributionHandler.java 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package de.tu_darmstadt.tk.SmartHomeNetworkSim.core;
  2. import javax.swing.JPanel;
  3. import org.apache.commons.math3.random.RandomGenerator;
  4. /**
  5. * Allows selection and configuration of such a class in view. Also Import & visualization of the example panel.
  6. *
  7. * @author Andreas T. Meyer-Berg
  8. */
  9. public interface ProbabilityDistributionHandler {
  10. /**
  11. * Set the random generator which should be used
  12. * @param rng random generator
  13. */
  14. public void setRandomGenerator(RandomGenerator rng);
  15. /**
  16. * Next value from the distribution
  17. * @return next sample value
  18. */
  19. public long sampleNextValue();
  20. /**
  21. * Returns a configuration panel for the distribution.
  22. * Should be set enabled, visible and embedded by the calling methods.
  23. * @return panel for configuration
  24. */
  25. public JPanel getConfigurationPanel();
  26. /**
  27. * Returns a simple description/name/identifier of the Distribution.
  28. * For example: "Gaussian Distribution"
  29. * @return simple description
  30. */
  31. public String getSimpleDescription();
  32. }