<commit_before>// included from constructor for function_signatures() in
// src/stan/lang/ast.hpp

std::vector<base_expr_type> base_types;
base_types.push_back(INT_T);
base_types.push_back(DOUBLE_T);
base_types.push_back(VECTOR_T);
base_types.push_back(ROW_VECTOR_T);
base_types.push_back(MATRIX_T);

std::vector<expr_type> vector_types;
vector_types.push_back(DOUBLE_T);  // scalar
vector_types.push_back(expr_type(DOUBLE_T, 1U));  // std vector
vector_types.push_back(VECTOR_T);  // Eigen vector
vector_types.push_back(ROW_VECTOR_T);  // Eigen row vector

std::vector<expr_type> int_vector_types;
int_vector_types.push_back(INT_T);  // scalar
int_vector_types.push_back(expr_type(INT_T, 1U));  // std vector

std::vector<expr_type> primitive_types;
primitive_types.push_back(INT_T);
primitive_types.push_back(DOUBLE_T);

add_unary("abs");
add("abs", INT_T, INT_T);
add_unary("acos");
add_unary("acosh");
for (size_t i = 0; i < base_types.size(); ++i) {
  add("add", base_types[i], base_types[i], base_types[i]);
}
add("add", VECTOR_T, VECTOR_T, DOUBLE_T);
add("add", ROW_VECTOR_T, ROW_VECTOR_T, DOUBLE_T);
add("add", MATRIX_T, MATRIX_T, DOUBLE_T);
add("add", VECTOR_T, DOUBLE_T, VECTOR_T);
add("add", ROW_VECTOR_T, DOUBLE_T, ROW_VECTOR_T);
add("add", MATRIX_T, DOUBLE_T, MATRIX_T);
for (size_t i = 0; i < base_types.size(); ++i) {
  add("add", base_types[i], base_types[i]);
}
add_unary("asin");
add_unary("asinh");
add_unary("atan");
add_binary("atan2");
add_unary("atanh");
for (size_t i = 0; i < int_vector_types.size(); ++i)
  for (size_t j = 0; j < vector_types.size(); ++j) {
    add("bernoulli_ccdf_log", DOUBLE_T, int_vector_types[i], 
	vector_types[j]);
    add("bernoulli_cdf", DOUBLE_T, int_vector_types[i], 
	vector_types[j]);
    add("bernoulli_cdf_log", DOUBLE_T, int_vector_types[i], 
	vector_types[j]);
    add("bernoulli_log", DOUBLE_T, int_vector_types[i], 
	vector_types[j]);
    add("bernoulli_logit_log", DOUBLE_T, int_vector_types[i], 
	vector_types[j]);
  }
add("bernoulli_rng", INT_T, DOUBLE_T);
add("bessel_first_kind", DOUBLE_T, INT_T, DOUBLE_T);
add("bessel_second_kind", DOUBLE_T, INT_T, DOUBLE_T);
for (size_t i = 0; i < int_vector_types.size(); i++)
  for (size_t j = 0; j < int_vector_types.size(); j++)
    for (size_t k = 0; k < vector_types.size(); k++)
      for (size_t l = 0; l < vector_types.size(); l++) {
        add("beta_binomial_ccdf_log", DOUBLE_T,
            int_vector_types[i], int_vector_types[j],
	    vector_types[k], 
            vector_types[l]);
        add("beta_binomial_cdf", DOUBLE_T,
            int_vector_types[i], int_vector_types[j],
	    vector_types[k], 
            vector_types[l]);
        add("beta_binomial_cdf_log", DOUBLE_T,
            int_vector_types[i], int_vector_types[j],
	    vector_types[k], vector_types[l]);
        add("beta_binomial_log", DOUBLE_T,
            int_vector_types[i], int_vector_types[j],
	    vector_types[k], vector_types[l]);
      }
add("beta_binomial_rng", INT_T, INT_T, DOUBLE_T, DOUBLE_T);
for (size_t i = 0; i < vector_types.size(); ++i) {
  for (size_t j = 0; j < vector_types.size(); ++j) {
    for (size_t k = 0; k < vector_types.size(); ++k) {
      add("beta_ccdf_log", DOUBLE_T, vector_types[i],
	  vector_types[j], vector_types[k]);
      add("beta_cdf", DOUBLE_T, vector_types[i], vector_types[j],
	  vector_types[k]);
      add("beta_cdf_log", DOUBLE_T, vector_types[i],
	  vector_types[j], vector_types[k]);
      add("beta_log", DOUBLE_T, vector_types[i], vector_types[j],
	  vector_types[k]);
    }
  }
}
add_binary("beta_rng");
add("binary_log_loss", DOUBLE_T, INT_T, DOUBLE_T);
for (size_t i = 0; i < int_vector_types.size(); ++i) {
  for (size_t j = 0; j < int_vector_types.size(); ++j) {
    for (size_t k = 0; k < vector_types.size(); ++k) {
      add("binomial_ccdf_log", DOUBLE_T, 
          int_vector_types[i], int_vector_types[j], vector_types[k]);
      add("binomial_cdf", DOUBLE_T, 
          int_vector_types[i], int_vector_types[j], vector_types[k]);
      add("binomial_cdf_log", DOUBLE_T, 
          int_vector_types[i], int_vector_types[j], vector_types[k]);
    }
  }
}
add_binary("binomial_coefficient_log");
for (size_t i = 0; i < int_vector_types.size(); ++i) {
  for (size_t j = 0; j < int_vector_types.size(); ++j) {
    for (size_t k = 0; k < vector_types.size(); ++k) {
      add("binomial_log", DOUBLE_T, 
          int_vector_types[i], int_vector_types[j], vector_types[k]);
      add("binomial_logit_log", DOUBLE_T, 
          int_vector_types[i], int_vector_types[j], vector_types[k]);
    }
  }
}
add("binomial_rng", INT_T, INT_T, DOUBLE_T);
add("block", MATRIX_T, MATRIX_T, INT_T, INT_T, INT_T, INT_T);
for (size_t i = 0; i < int_vector_types.size(); ++i) {
  add("categorical_log", DOUBLE_T, int_vector_types[i], VECTOR_T);
  add("categorical_logit_log", DOUBLE_T, int_vector_types[i],
      VECTOR_T);
}
add("categorical_rng", INT_T, VECTOR_T);
for (size_t i = 0; i < vector_types.size(); ++i) {
  for (size_t j = 0; j < vector_types.size(); ++j) {
    for (size_t k = 0; k < vector_types.size(); ++k) {
      add("cauchy_ccdf_log", DOUBLE_T, vector_types[i],
	  vector_types[j], vector_types[k]);
      add("cauchy_cdf", DOUBLE_T, vector_types[i], vector_types[j],
	  vector_types[k]);
      add("cauchy_cdf_log", DOUBLE_T, vector_types[i],
	  vector_types[j], vector_types[k]);
      add("cauchy_log", DOUBLE_T, vector_types[i], vector_types[j],
	  vector_types[k]);
    }
  }
 }
add_binary("cauchy_rng");
add("append_col", MATRIX_T, MATRIX_T, MATRIX_T);
add("append_col", MATRIX_T, VECTOR_T, MATRIX_T);
add("append_col", MATRIX_T, MATRIX_T, VECTOR_T);
add("append_col", MATRIX_T, VECTOR_T, VECTOR_T);
add("append_col", ROW_VECTOR_T, ROW_VECTOR_T, ROW_VECTOR_T);
add_unary("cbrt");
add_unary("ceil");
for (size_t i = 0; i < vector_types.size(); ++i) {
  for (size_t j = 0; j < vector_types.size(); ++j) {
      add("chi_square_ccdf_log", DOUBLE_T, vector_types[i],
	  vector_types[j]);
      add("chi_square_cdf", DOUBLE_T, vector_types[i],
	  vector_types[j]);
      add("chi_square_cdf_log", DOUBLE_T, vector_types[i],
	  vector_types[j]);
      add("chi_square_log", DOUBLE_T, vector_types[i],
	  vector_types[j]);
  }
}
add_unary("chi_square_rng");
add("cholesky_decompose", MATRIX_T, MATRIX_T);
add("col", VECTOR_T, MATRIX_T, INT_T);
add("cols", INT_T, VECTOR_T);
add("cols", INT_T, ROW_VECTOR_T);
add("cols", INT_T, MATRIX_T);
add("columns_dot_product", ROW_VECTOR_T, VECTOR_T, VECTOR_T);
add("columns_dot_product", ROW_VECTOR_T, ROW_VECTOR_T, ROW_VECTOR_T);
add("columns_dot_product", ROW_VECTOR_T, MATRIX_T, MATRIX_T);
add("columns_dot_self", ROW_VECTOR_T, VECTOR_T);
add("columns_dot_self", ROW_VECTOR_T, ROW_VECTOR_T);
add("columns_dot_self", ROW_VECTOR_T, MATRIX_T);
add_unary("cos");
add_unary("cosh");
add("crossprod", MATRIX_T, MATRIX_T);
add("cumulative_sum", expr_type(DOUBLE_T, 1U),
    expr_type(DOUBLE_T, 1U));
add("cumulative_sum", VECTOR_T, VECTOR_T);
add("cumulative_sum", ROW_VECTOR_T, ROW_VECTOR_T);
add("determinant", DOUBLE_T, MATRIX_T);
add("diag_matrix", MATRIX_T, VECTOR_T);
add("diag_post_multiply", MATRIX_T, MATRIX_T, VECTOR_T);<commit_msg>Added csr_* functions to signatures file.<commit_after>// included from constructor for function_signatures() in
// src/stan/lang/ast.hpp

std::vector<base_expr_type> base_types;
base_types.push_back(INT_T);
base_types.push_back(DOUBLE_T);
base_types.push_back(VECTOR_T);
base_types.push_back(ROW_VECTOR_T);
base_types.push_back(MATRIX_T);

std::vector<expr_type> vector_types;
vector_types.push_back(DOUBLE_T);  // scalar
vector_types.push_back(expr_type(DOUBLE_T, 1U));  // std vector
vector_types.push_back(VECTOR_T);  // Eigen vector
vector_types.push_back(ROW_VECTOR_T);  // Eigen row vector

std::vector<expr_type> int_vector_types;
int_vector_types.push_back(INT_T);  // scalar
int_vector_types.push_back(expr_type(INT_T, 1U));  // std vector

std::vector<expr_type> primitive_types;
primitive_types.push_back(INT_T);
primitive_types.push_back(DOUBLE_T);

add_unary("abs");
add("abs", INT_T, INT_T);
add_unary("acos");
add_unary("acosh");
for (size_t i = 0; i < base_types.size(); ++i) {
  add("add", base_types[i], base_types[i], base_types[i]);
}
add("add", VECTOR_T, VECTOR_T, DOUBLE_T);
add("add", ROW_VECTOR_T, ROW_VECTOR_T, DOUBLE_T);
add("add", MATRIX_T, MATRIX_T, DOUBLE_T);
add("add", VECTOR_T, DOUBLE_T, VECTOR_T);
add("add", ROW_VECTOR_T, DOUBLE_T, ROW_VECTOR_T);
add("add", MATRIX_T, DOUBLE_T, MATRIX_T);
for (size_t i = 0; i < base_types.size(); ++i) {
  add("add", base_types[i], base_types[i]);
}
add_unary("asin");
add_unary("asinh");
add_unary("atan");
add_binary("atan2");
add_unary("atanh");
for (size_t i = 0; i < int_vector_types.size(); ++i)
  for (size_t j = 0; j < vector_types.size(); ++j) {
    add("bernoulli_ccdf_log", DOUBLE_T, int_vector_types[i], 
	vector_types[j]);
    add("bernoulli_cdf", DOUBLE_T, int_vector_types[i], 
	vector_types[j]);
    add("bernoulli_cdf_log", DOUBLE_T, int_vector_types[i], 
	vector_types[j]);
    add("bernoulli_log", DOUBLE_T, int_vector_types[i], 
	vector_types[j]);
    add("bernoulli_logit_log", DOUBLE_T, int_vector_types[i], 
	vector_types[j]);
  }
add("bernoulli_rng", INT_T, DOUBLE_T);
add("bessel_first_kind", DOUBLE_T, INT_T, DOUBLE_T);
add("bessel_second_kind", DOUBLE_T, INT_T, DOUBLE_T);
for (size_t i = 0; i < int_vector_types.size(); i++)
  for (size_t j = 0; j < int_vector_types.size(); j++)
    for (size_t k = 0; k < vector_types.size(); k++)
      for (size_t l = 0; l < vector_types.size(); l++) {
        add("beta_binomial_ccdf_log", DOUBLE_T,
            int_vector_types[i], int_vector_types[j],
	    vector_types[k], 
            vector_types[l]);
        add("beta_binomial_cdf", DOUBLE_T,
            int_vector_types[i], int_vector_types[j],
	    vector_types[k], 
            vector_types[l]);
        add("beta_binomial_cdf_log", DOUBLE_T,
            int_vector_types[i], int_vector_types[j],
	    vector_types[k], vector_types[l]);
        add("beta_binomial_log", DOUBLE_T,
            int_vector_types[i], int_vector_types[j],
	    vector_types[k], vector_types[l]);
      }
add("beta_binomial_rng", INT_T, INT_T, DOUBLE_T, DOUBLE_T);
for (size_t i = 0; i < vector_types.size(); ++i) {
  for (size_t j = 0; j < vector_types.size(); ++j) {
    for (size_t k = 0; k < vector_types.size(); ++k) {
      add("beta_ccdf_log", DOUBLE_T, vector_types[i],
	  vector_types[j], vector_types[k]);
      add("beta_cdf", DOUBLE_T, vector_types[i], vector_types[j],
	  vector_types[k]);
      add("beta_cdf_log", DOUBLE_T, vector_types[i],
	  vector_types[j], vector_types[k]);
      add("beta_log", DOUBLE_T, vector_types[i], vector_types[j],
	  vector_types[k]);
    }
  }
}
add_binary("beta_rng");
add("binary_log_loss", DOUBLE_T, INT_T, DOUBLE_T);
for (size_t i = 0; i < int_vector_types.size(); ++i) {
  for (size_t j = 0; j < int_vector_types.size(); ++j) {
    for (size_t k = 0; k < vector_types.size(); ++k) {
      add("binomial_ccdf_log", DOUBLE_T, 
          int_vector_types[i], int_vector_types[j], vector_types[k]);
      add("binomial_cdf", DOUBLE_T, 
          int_vector_types[i], int_vector_types[j], vector_types[k]);
      add("binomial_cdf_log", DOUBLE_T, 
          int_vector_types[i], int_vector_types[j], vector_types[k]);
    }
  }
}
add_binary("binomial_coefficient_log");
for (size_t i = 0; i < int_vector_types.size(); ++i) {
  for (size_t j = 0; j < int_vector_types.size(); ++j) {
    for (size_t k = 0; k < vector_types.size(); ++k) {
      add("binomial_log", DOUBLE_T, 
          int_vector_types[i], int_vector_types[j], vector_types[k]);
      add("binomial_logit_log", DOUBLE_T, 
          int_vector_types[i], int_vector_types[j], vector_types[k]);
    }
  }
}
add("binomial_rng", INT_T, INT_T, DOUBLE_T);
add("block", MATRIX_T, MATRIX_T, INT_T, INT_T, INT_T, INT_T);
for (size_t i = 0; i < int_vector_types.size(); ++i) {
  add("categorical_log", DOUBLE_T, int_vector_types[i], VECTOR_T);
  add("categorical_logit_log", DOUBLE_T, int_vector_types[i],
      VECTOR_T);
}
add("categorical_rng", INT_T, VECTOR_T);
for (size_t i = 0; i < vector_types.size(); ++i) {
  for (size_t j = 0; j < vector_types.size(); ++j) {
    for (size_t k = 0; k < vector_types.size(); ++k) {
      add("cauchy_ccdf_log", DOUBLE_T, vector_types[i],
	  vector_types[j], vector_types[k]);
      add("cauchy_cdf", DOUBLE_T, vector_types[i], vector_types[j],
	  vector_types[k]);
      add("cauchy_cdf_log", DOUBLE_T, vector_types[i],
	  vector_types[j], vector_types[k]);
      add("cauchy_log", DOUBLE_T, vector_types[i], vector_types[j],
	  vector_types[k]);
    }
  }
 }
add_binary("cauchy_rng");
add("append_col", MATRIX_T, MATRIX_T, MATRIX_T);
add("append_col", MATRIX_T, VECTOR_T, MATRIX_T);
add("append_col", MATRIX_T, MATRIX_T, VECTOR_T);
add("append_col", MATRIX_T, VECTOR_T, VECTOR_T);
add("append_col", ROW_VECTOR_T, ROW_VECTOR_T, ROW_VECTOR_T);
add_unary("cbrt");
add_unary("ceil");
for (size_t i = 0; i < vector_types.size(); ++i) {
  for (size_t j = 0; j < vector_types.size(); ++j) {
      add("chi_square_ccdf_log", DOUBLE_T, vector_types[i],
	  vector_types[j]);
      add("chi_square_cdf", DOUBLE_T, vector_types[i],
	  vector_types[j]);
      add("chi_square_cdf_log", DOUBLE_T, vector_types[i],
	  vector_types[j]);
      add("chi_square_log", DOUBLE_T, vector_types[i],
	  vector_types[j]);
  }
}
add_unary("chi_square_rng");
add("cholesky_decompose", MATRIX_T, MATRIX_T);
add("col", VECTOR_T, MATRIX_T, INT_T);
add("cols", INT_T, VECTOR_T);
add("cols", INT_T, ROW_VECTOR_T);
add("cols", INT_T, MATRIX_T);
add("columns_dot_product", ROW_VECTOR_T, VECTOR_T, VECTOR_T);
add("columns_dot_product", ROW_VECTOR_T, ROW_VECTOR_T, ROW_VECTOR_T);
add("columns_dot_product", ROW_VECTOR_T, MATRIX_T, MATRIX_T);
add("columns_dot_self", ROW_VECTOR_T, VECTOR_T);
add("columns_dot_self", ROW_VECTOR_T, ROW_VECTOR_T);
add("columns_dot_self", ROW_VECTOR_T, MATRIX_T);
add_unary("cos");
add_unary("cosh");
add("crossprod", MATRIX_T, MATRIX_T);
add("csr_matrix_times_vector",VECTOR_T,INT_T,INT_T,
          VECTOR_T,int_vector_types[1],int_vector_types[1],int_vector_types[1], VECTOR_T);
add("csr_to_dense_matrix", MATRIX_T,INT_T,INT_T,
          VECTOR_T,int_vector_types[1],int_vector_types[1],int_vector_types[1]);
add("csr_extract_w", VECTOR_T, MATRIX_T);
add("csr_extract_v", int_vector_types[1], MATRIX_T);
add("csr_extract_u", int_vector_types[1], MATRIX_T);
add("csr_extract_z", int_vector_types[1], MATRIX_T);
add("cumulative_sum", expr_type(DOUBLE_T, 1U),
    expr_type(DOUBLE_T, 1U));
add("cumulative_sum", VECTOR_T, VECTOR_T);
add("cumulative_sum", ROW_VECTOR_T, ROW_VECTOR_T);
add("determinant", DOUBLE_T, MATRIX_T);
add("diag_matrix", MATRIX_T, VECTOR_T);
add("diag_post_multiply", MATRIX_T, MATRIX_T, VECTOR_T);
{'fraction_non_alphanumeric': 0.16646341463414635, 'fraction_numerical': 0.004403794037940379, 'mean_word_length': 5.575055679287305, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 11, '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': '7132172', 'n_tokens_mistral': 6474, 'n_tokens_neox': 6309, 'n_words': 1024}