Function set_difference

Function Documentation

arma::uvec set_difference(const arma::uvec &A, const arma::uvec &B)

Computes the difference between two sets of indices.

Applies the standard library function std::set_difference to compute the difference between two sets of indices, then converted to an arma::uvec.

Parameters:
  • A – First set of indices (should be sorted).

  • B – Second set of indices (should be sorted).

Returns:

arma::uvec Vector of indices that are in A but not in B.