categoricals.c: Rename function to more accurately reflect its purpose
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 28 Nov 2011 20:27:41 +0000 (21:27 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Mon, 28 Nov 2011 20:27:41 +0000 (21:27 +0100)
src/math/categoricals.c
src/math/categoricals.h
src/math/covariance.c

index af79023a20cdf793fc162d913d37dacb1f66727f..2ec1dc19100a5caa7219ecdfe4e333e4536e9c00 100644 (file)
@@ -561,7 +561,7 @@ categoricals_done (const struct categoricals *cat_)
          struct interaction_value *iv = iap->reverse_interaction_value_map[y];
          for (x = iap->base_subscript_short; x < iap->base_subscript_short + df ;++x)
            {
-             const double bin = categoricals_get_binary_by_subscript (cat, x, iv->ccase); \
+             const double bin = categoricals_get_code_for_case (cat, x, iv->ccase); \
              iap->enc_sum [x - iap->base_subscript_short] += bin * iv->cc;
            }
        }
@@ -620,8 +620,7 @@ categoricals_get_sum_by_subscript (const struct categoricals *cat, int subscript
 /* Returns unity if the value in case C at SUBSCRIPT is equal to the category
    for that subscript */
 double
-categoricals_get_binary_by_subscript (const struct categoricals *cat,
-                                     int subscript,
+categoricals_get_code_for_case (const struct categoricals *cat, int subscript,
                                      const struct ccase *c)
 {
   const struct interaction *iact = categoricals_get_interaction_by_subscript (cat, subscript);
index 91767270de599218a6f8eddf46de65952672628f..ec708efa178c91a3c8b621264a1fc3d05dffd3e8 100644 (file)
@@ -86,8 +86,7 @@ const struct interaction *categoricals_get_interaction_by_subscript (const struc
 
 double categoricals_get_sum_by_subscript (const struct categoricals *cat, int subscript);
 
-double categoricals_get_binary_by_subscript (const struct categoricals *cat, int subscript,
-                                            const struct ccase *c);
+double categoricals_get_code_for_case (const struct categoricals *cat, int subscript, const struct ccase *c);
 
 
 /* These use the long map.  Useful for descriptive statistics. */
index 9bc8eb72e7515a7ba2f3cb9042f315fe049e6877..2f4f525adb6b69a561cc524f079c4607d7198401 100644 (file)
@@ -268,7 +268,7 @@ get_val (const struct covariance *cov, int i, const struct ccase *c)
       return val->f;
     }
 
-  return categoricals_get_binary_by_subscript (cov->categoricals, i - cov->n_vars, c);
+  return categoricals_get_code_for_case (cov->categoricals, i - cov->n_vars, c);
 }
 
 #if 0