You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: quickscore.m
    path of file: ./repos/bnt/BNT/inference/static/@quickscore_inf_engine/private
    
    the code of the file until where you have to start completion: function prob = quickscore(fpos, fneg, inhibit, prior, leak)
% QUICKSCORE Heckerman's algorithm for BN2O networks.

    
function prob = quickscore(fpos, fneg, inhibit, prior, leak)
% QUICKSCORE Heckerman's algorithm for BN2O networks.
% prob = quickscore(fpos, fneg, inhibit, prior, leak)
% 
% Consider a BN2O (Binary Node 2-layer Noisy-or) network such as QMR with
% dieases on the top and findings on the bottom. (We assume all findings are observed,
% since hidden leaves can be marginalized away.)
% This algorithm takes O(2^|fpos|) time to compute the marginal on all the diseases.
%
% Inputs:
% fpos = the positive findings (a vector of numbers in {1, ..., Nfindings})
% fneg = the negative findings (a vector of numbers in {1, ..., Nfindings})
% inhibit(i,j) = inhibition prob. for finding i, disease j, or 1.0 if j is not a parent.
% prior(j) = prior prob. disease j is ON. We assume prior(off) = 1-prior(on).
% leak(i) = inhibition prob. for the leak node for finding i
%
% Output:
% prob(d) = Pr(disease d = on | ev)
%
% For details, see
% - Heckerman, "A tractable inference algorithm for diagnosing multiple diseases", UAI89.
% - Rish and Dechter, "On the impact of causal independ