struct categoricals *
-categoricals_create (const struct variable **v, size_t n_vars,
+categoricals_create (const struct variable *const *v, size_t n_vars,
const struct variable *wv, enum mv_class exclude)
{
size_t i;
union value ;
-struct categoricals *categoricals_create (const struct variable **v, size_t n_vars,
+struct categoricals *categoricals_create (const struct variable *const *v, size_t n_vars,
const struct variable *wv, enum mv_class exclude);
void categoricals_destroy (struct categoricals *);
{
/* The variables for which the covariance matrix is to be calculated. */
size_t n_vars;
- const struct variable **vars;
+ const struct variable *const *vars;
/* Categorical variables. */
struct categoricals *categoricals;
/* Create a covariance struct.
*/
struct covariance *
-covariance_1pass_create (size_t n_vars, const struct variable **vars,
+covariance_1pass_create (size_t n_vars, const struct variable *const *vars,
const struct variable *weight, enum mv_class exclude)
{
size_t i;
until then.
*/
struct covariance *
-covariance_2pass_create (size_t n_vars, const struct variable **vars,
- size_t n_catvars, const struct variable **catvars,
+covariance_2pass_create (size_t n_vars, const struct variable *const *vars,
+ size_t n_catvars, const struct variable *const *catvars,
const struct variable *wv, enum mv_class exclude)
{
size_t i;
}
}
+/* Function to access the categoricals used by COV
+ The return value is owned by the COV
+*/
+const struct categoricals *
+covariance_get_categoricals (const struct covariance *cov)
+{
+ return cov->categoricals;
+}
/* Destroy the COV object */
struct variable;
struct ccase ;
-struct covariance * covariance_1pass_create (size_t n_vars, const struct variable **vars,
+struct covariance * covariance_1pass_create (size_t n_vars, const struct variable *const *vars,
const struct variable *wv, enum mv_class excl);
struct covariance *
-covariance_2pass_create (size_t n_vars, const struct variable **vars,
- size_t n_catvars, const struct variable **catvars,
+covariance_2pass_create (size_t n_vars, const struct variable *const *vars,
+ size_t n_catvars, const struct variable *const *catvars,
const struct variable *wv, enum mv_class excl);
void covariance_accumulate (struct covariance *, const struct ccase *);
const gsl_matrix *covariance_moments (const struct covariance *cov, int m);
+const struct categoricals * covariance_get_categoricals (const struct covariance *cov);
+
#endif