def get_theano_hamiltonian_functions(model_vars, shared, logpt, potential, use_single_leapfrog=False, **theano_kwargs):
 (H, q) = _theano_hamiltonian(model_vars, shared, logpt, potential)
 (energy_function, p) = _theano_energy_function(H, q, **theano_kwargs)
 if use_single_leapfrog:
  leapfrog_integrator = _theano_single_leapfrog(H, q, p, **theano_kwargs)
 else:
  leapfrog_integrator = _theano_leapfrog_integrator(H, q, p, **theano_kwargs)
 return (H, energy_function, leapfrog_integrator, {'q': q, 'p': p})

def get_theano_hamiltonian_functions ( model_vars , shared , logpt , potential , use_single_leapfrog = False , ** theano_kwargs ) : ( H , q ) = _theano_hamiltonian ( model_vars , shared , logpt , potential ) ( energy_function , p ) = _theano_energy_function ( H , q , ** theano_kwargs ) if use_single_leapfrog : leapfrog_integrator = _theano_single_leapfrog ( H , q , p , ** theano_kwargs ) else : leapfrog_integrator = _theano_leapfrog_integrator ( H , q , p , ** theano_kwargs ) return ( H , energy_function , leapfrog_integrator , { 'q' : q , 'p' : p } )
construct theano functions for the hamiltonian .