Skip to main content
. 2018 Mar 29;18(4):1016. doi: 10.3390/s18041016
Algorithm 4. Pseudocode of MAX_CONSISTENCIES for MCMC-LTMS.
MAX_CONSISTENCIESc(atom_true_clause)
Inputs: atom_true_clause, an atom, an atom set, a true clause or a true clause set
Outputs: the set of maximal consistencies
consistency = {}
for item in atom_true_clause
  if(item is a mode atom and is true)
    consistency0 = {item}
  else if(item is a non-mode atom or clause)
    consistency0 = {}
    for i in item’s support set
      consistency0 = MAX_PRODUCT(consistency0, MAX_CONSISTENCIES (i))
  consistency = MAX_PLUS(consistency, consistency0)
return consistency