Contract enforcement behind optop_select(): checks that an
optop_as_theta_phi() result is a coherent
list(theta, phi, K, docs, terms) before any statistic is computed, so a
broken or partial adapter fails with a clear message instead of
propagating misaligned numbers. Document identifiers and terms are
mandatory and must be unique, and both weight matrices must have rows
summing to 1.
Arguments
- tp
A list as returned by
optop_as_theta_phi().- model_class
Character; the class vector of the adapted model, used in the error messages.