Skip to content

Instantly share code, notes, and snippets.

@rueian
Created January 1, 2020 17:58
Show Gist options
  • Select an option

  • Save rueian/78bb9347e77b49f66b264c4ff6ce085b to your computer and use it in GitHub Desktop.

Select an option

Save rueian/78bb9347e77b49f66b264c4ff6ce085b to your computer and use it in GitHub Desktop.
*hist_size = sslot.nvalues;
if (sslot.nvalues >= min_hist_size)
{
int nmatch = 0;
int i;
for (i = n_skip; i < sslot.nvalues - n_skip; i++)
{
if (varonleft ?
DatumGetBool(FunctionCall2Coll(opproc,
sslot.stacoll,
sslot.values[i],
constval)) :
DatumGetBool(FunctionCall2Coll(opproc,
sslot.stacoll,
constval,
sslot.values[i])))
nmatch++;
}
result = ((double) nmatch) / ((double) (sslot.nvalues - 2 * n_skip));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment