<commit_before>package com.lfscheidegger.jfacet.shade;

/**
 * Namespace for deafult GLSL primitives.
 */
public enum Type {
  /**
   * atomic floating-point value
   */
  FLOAT_T("float", 1),

  /**
   * 2-dimensional floating-point vector
   */
  VEC2_T("vec2", 2),

  /**
   * 3-dimensional floating-point vector
   */
  VEC3_T("vec3", 3),

  /**
   * 4-dimensional floating-point vector
   */
  VEC4_T("vec4", 4),

  /**
   * 2x2-dimensional floating-point matrix
   */
  MAT2_T("mat2", 2),

  /**
   * 3x3-dimensional floating-point matrix
   */
  MAT3_T("mat3", 3),

  /**
   * 4x4-dimensional floating-point matrix
   */
  MAT4_T("mat4", 4),

  /**
   * opaque type for 2D texture sampler
   */
  SAMPLER2D_T("sampler2D", -1);

  private final String mValue;
  private final int mDimension;

  Type(String value, int dimension) {
    mValue = value;
    mDimension = dimension;
  }

  @Override
  public String toString() {
    return mValue;
  }

  public int getDimension() {
    if (mDimension == -1) {
      throw new RuntimeException("Cannot call getDimension() on matrix type " + toString());
    }

    return mDimension;
  }

  public static Type getVecTypeForDimension(int dimension) {
    switch(dimension) {
      case 2: return VEC2_T;
      case 3: return VEC3_T;
      case 4: return VEC4_T;
      default: throw new RuntimeException("Invalid dimension for vector: " + dimension);
    }
  }

  public static Type getMatTypeForDimension(int dimension) {
    switch(dimension) {
      case 2: return MAT2_T;
      case 3: return MAT3_T;
      case 4: return MAT4_T;
      default: throw new RuntimeException("Invalid dimension for matrix: " + dimension);
    }
  }
}<commit_msg>Removing dimensionality from Types<commit_after>package com.lfscheidegger.jfacet.shade;

/**
 * Namespace for deafult GLSL primitives.
 */
public enum Type {
  /**
   * atomic floating-point value
   */
  FLOAT_T("float"),

  /**
   * 2-dimensional floating-point vector
   */
  VEC2_T("vec2"),

  /**
   * 3-dimensional floating-point vector
   */
  VEC3_T("vec3"),

  /**
   * 4-dimensional floating-point vector
   */
  VEC4_T("vec4"),

  /**
   * 2x2-dimensional floating-point matrix
   */
  MAT2_T("mat2"),

  /**
   * 3x3-dimensional floating-point matrix
   */
  MAT3_T("mat3"),

  /**
   * 4x4-dimensional floating-point matrix
   */
  MAT4_T("mat4"),

  /**
   * opaque type for 2D texture sampler
   */
  SAMPLER2D_T("sampler2D");

  private final String mValue;

  Type(String value) {
    mValue = value;
  }

  @Override
  public String toString() {
    return mValue;
  }
}
{'fraction_non_alphanumeric': 0.1311411992263056, 'fraction_numerical': 0.026692456479690523, 'mean_word_length': 2.720863309352518, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6637067', 'n_tokens_mistral': 954, 'n_tokens_neox': 883, 'n_words': 206}