class_docstr: Class for performing sampling in Continuous model
  using No U Turn Sampler (a variant of Hamiltonian Monte Carlo)
  
  Parameters:
  -----------
  model: Model from which sampling has to be done
  
  simulate_dynamics: Class to propose future states of position
      and momentum in time by simulating HamiltonianDynamics
  
  References
  ----------
  Matthew D. Hoffman, Andrew Gelman, The No-U-Turn Sampler: Adaptively
  Setting Path Lengths in Hamiltonian Monte Carlo. Journal of
  Machine Learning Research 15 (2014) 1351-1381
class_docstr_tok: ["Class","for","performing","sampling","in","Continuous","model","using","No","U","Turn","Sampler","(","a","variant","of","Hamiltonian","Monte","Carlo",")","Parameters",":","--","--","--","--","--","-","model",":","Model","from","which","sampling","has","to","be","done","simulate_dynamics",":","Class","to","propose","future","states","of","position","and","momentum","in","time","by","simulating","HamiltonianDynamics","References","--","--","--","--","--","Matthew","D.","Hoffman",",","Andrew","Gelman",",","The","No-U-Turn","Sampler",":","Adaptively","Setting","Path","Lengths","in","Hamiltonian","Monte","Carlo",".","Journal","of","Machine","Learning","Research","15","(","2014",")","1351-1381"]
docstr: Checks the acceptance criteria and updates it
docstr_tok: ["Checks","the","acceptance","criteria","and","updates","it"]
code: def _update_acceptance_criteria(
      self,
      position_forward,
      position_backward,
      momentum_forward,
      momentum_backward,
      accept_set_bool,
      candidate_set_size,
      candidate_set_size2,
  ):
      """
      Checks the acceptance criteria and updates it
      """
  
      criteria1 = (
          np.dot(
              (position_forward - position_backward), momentum_backward
          )
          >= 0
      )
  
      criteria2 = (
          np.dot(
              (position_forward - position_backward), momentum_forward
          )
          >= 0
      )
  
      accept_set_bool = accept_set_bool and criteria1 and criteria2
      candidate_set_size += candidate_set_size2
  
      return accept_set_bool, candidate_set_size
  
file_path: dragonfly/dragonfly/sampling/nuts.py
imports: from __future__ import division
  import numpy
  from .base import LeapFrog
  from .hmc import HamiltonianMCDA
  from .check_functions import _check_1d_array_object
label_desc: Use image node_id 3 for calling the NoUTurnSampler obj's underlying member method code with example usage: obj._update_acceptance_criteria(position_forward, position_backward, momentum_forward, momentum_backward, accept_set_bool, candidate_set_size, candidate_set_size2) and returns: accept_set_bool,  candidate_set_size