Class SampledResults<T>

java.lang.Object
org.moeaframework.analysis.sample.SampledResults<T>
Type Parameters:
T - the type of the result
All Implemented Interfaces:
Partition<Sample,T>, Displayable, Formattable<org.apache.commons.lang3.tuple.Pair<Sample,T>>

public class SampledResults<T> extends Object implements Partition<Sample,T>
Collection of samples and their result value.
  • Constructor Details

    • SampledResults

      public SampledResults(Samples samples)
      Constructs a new sampled results collection.
      Parameters:
      samples - the samples
    • SampledResults

      public SampledResults(ParameterSet parameterSet)
      Constructs a new sampled results collection.
      Parameters:
      parameterSet - the parameters contained in each sample
  • Method Details

    • add

      public void add(Sample sample, T result)
      Adds the given sample and result value.
      Parameters:
      sample - the sample
      result - the result value
    • size

      public int size()
      Description copied from interface: Partition
      Returns the number of key-value pairs in this partition.
      Specified by:
      size in interface Partition<Sample,T>
      Returns:
      the number of items
    • stream

      public Stream<org.apache.commons.lang3.tuple.Pair<Sample,T>> stream()
      Description copied from interface: Partition
      Returns a Stream of the key-value pairs in this partition.
      Specified by:
      stream in interface Partition<Sample,T>
      Returns:
      the stream
    • asTabularData

      public TabularData<org.apache.commons.lang3.tuple.Pair<Sample,T>> asTabularData()
      Description copied from interface: Formattable
      Returns the contents of this object as a TabularData instance, which can be used to save, print, or format the data in various ways.
      Specified by:
      asTabularData in interface Formattable<T>
      Specified by:
      asTabularData in interface Partition<Sample,T>
      Returns:
      the TabularData instance