int pc_prism_vbvt_2(void) { struct VBVT_Engine vbvt_eng; RET_ON_ERR(check_smooth_vb()); RET_ON_ERR(run_vbvt(&vbvt_eng)); return bpx_unify(bpx_get_call_arg(1,2), bpx_build_integer(vbvt_eng.iterate)) && bpx_unify(bpx_get_call_arg(2,2), bpx_build_float(vbvt_eng.free_energy)); }
int pc_prism_vbem_2(void) { struct VBEM_Engine vb_eng; RET_ON_ERR(check_smooth_vb()); RET_ON_ERR(run_vbem(&vb_eng)); release_num_sw_vals(); return bpx_unify(bpx_get_call_arg(1,2), bpx_build_integer(vb_eng.iterate)) && bpx_unify(bpx_get_call_arg(2,2), bpx_build_float(vb_eng.free_energy)); }