hutilscpp (version 0.1.0)

AnyWhich: Quickly verify (and locate) the existence of a breach.

Description

Used when a single instance is likely to occur and be important to detect quickly (in a sufficiently large integer vector).

Arguments

x

An integer vector.

a

A (single) integer. That which is to be compared.

gt, lt, eq

Booleans, whether or not the comparison is greater than, less than, or equal to. Only gt and lt are mutually exclusive. If all FALSE, find the first instance where none are equal (i.e. does x have more than one distinct value).