From 2414a9e37882fd23d9e50f916bb9e6a7cc2f6bad Mon Sep 17 00:00:00 2001
From: John Darrington <john@darrington.wattle.id.au>
Date: Mon, 28 Nov 2011 21:27:41 +0100
Subject: [PATCH] categoricals.c: Rename function to more accurately reflect
 its purpose

---
 src/math/categoricals.c | 5 ++---
 src/math/categoricals.h | 3 +--
 src/math/covariance.c   | 2 +-
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/math/categoricals.c b/src/math/categoricals.c
index af79023a..2ec1dc19 100644
--- a/src/math/categoricals.c
+++ b/src/math/categoricals.c
@@ -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);
diff --git a/src/math/categoricals.h b/src/math/categoricals.h
index 91767270..ec708efa 100644
--- a/src/math/categoricals.h
+++ b/src/math/categoricals.h
@@ -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. */
diff --git a/src/math/covariance.c b/src/math/covariance.c
index 9bc8eb72..2f4f525a 100644
--- a/src/math/covariance.c
+++ b/src/math/covariance.c
@@ -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
-- 
2.30.2