Class Sequence

    • Constructor Detail

      • Sequence

        public Sequence()
        Creates a new sequence of outcomes.
      • Sequence

        public Sequence​(Sequence s)
      • Sequence

        public Sequence​(Sequence s,
                        String outcome,
                        double p)
      • Sequence

        public Sequence​(List<String> outcomes)
    • Method Detail

      • hashCode

        public int hashCode()
        hashCode in class Object
      • add

        public void add​(String outcome,
                        double p)
        Adds an outcome and probability to this sequence.
        outcome - the outcome to be added.
        p - the probability associated with this outcome.
      • getOutcomes

        public List<String> getOutcomes()
        Returns a list of outcomes for this sequence.
        a list of outcomes.
      • getProbs

        public double[] getProbs()
        Returns an array of probabilities associated with the outcomes of this sequence.
        an array of probabilities.
      • getScore

        public double getScore()
        Returns the score of this sequence.
        The score of this sequence.
      • getProbs

        public void getProbs​(double[] ps)
        Populates an array with the probabilities associated with the outcomes of this sequence.
        ps - a pre-allocated array to use to hold the values of the probabilities of the outcomes for this sequence.