Class TestMetropolisHastings.PropFunction

    • Constructor Detail

      • PropFunction

        public PropFunction()
    • Method Detail

      • getProposalRatio

        public double getProposalRatio​(double x,
                                       double y)
        Description copied from interface: ProposalFunction1DIfc
        The ratio of g(y,x)/g(x,y). The ratio of the proposal function evaluated at x = current and y = proposed, where g() is some proposal function of x and y. The implementor should ensure that the returned ratio is a valid double
        Specified by:
        getProposalRatio in interface ProposalFunction1DIfc
        Parameters:
        x - the x to evaluate
        y - the y to evaluate
        Returns:
        the ratio of the proposal function
      • generateProposedGivenCurrent

        public double generateProposedGivenCurrent​(double current)
        Specified by:
        generateProposedGivenCurrent in interface ProposalFunction1DIfc
        Parameters:
        current - the current state value of the chain (i.e. x)
        Returns:
        the generated possible state (i.e. y) which may or may not be accepted