Get rid of unnecessary uses of var_get_dict_index().
[pspp] / src / math / interaction.c
index f2831d27680d26033965a756c0aebf5c808fd177..aa8826e01ac7869c989088a9d4e9444ee07a7df9 100644 (file)
@@ -15,7 +15,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 /*
-  An interaction is a gsl_vector containing a "product" of other
+  An interaction is a structure containing a "product" of other
   variables. The variables can be either categorical or numeric.
   If the variables are all numeric, the interaction is just the
   scalar product. If any of the variables are categorical, their
 
 #include <config.h>
 #include <assert.h>
-#include <gsl/gsl_math.h>
-#include <gsl/gsl_vector.h>
 #include <data/value.h>
 #include <data/variable.h>
+#include <gl/unistr.h>
 #include <math/interaction.h>
 #include <string.h>
 #include <xalloc.h>
@@ -268,7 +267,7 @@ is_interaction (const struct variable *var, const struct interaction_variable **
   for (i = 0; i < n_intr; i++)
     {
       intr = interaction_get_variable (iv[i]);
-      if (var_get_dict_index (intr) == var_get_dict_index (var))
+      if (intr == var)
        {
          return true;
        }