code: private int getVariableSize(int variable) {
      for (int i = 0; i < neighborIndices.length; i++) {
        if (neighborIndices[i] == variable) return getDimensions()[i];
      }
      return 0;
    }
docs: Address a variable by index to get it's size. Basically just a convenience function.
  
  @param variable the name, not index into neighbors, of the variable in question
  @return the size of the factor along this dimension