_stan_builtins.py 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  1. """
  2. pygments.lexers._stan_builtins
  3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4. This file contains the names of functions for Stan used by
  5. ``pygments.lexers.math.StanLexer. This is for Stan language version 2.29.0.
  6. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
  7. :license: BSD, see LICENSE for details.
  8. """
  9. KEYWORDS = (
  10. 'break',
  11. 'continue',
  12. 'else',
  13. 'for',
  14. 'if',
  15. 'in',
  16. 'print',
  17. 'reject',
  18. 'return',
  19. 'while',
  20. )
  21. TYPES = (
  22. 'cholesky_factor_corr',
  23. 'cholesky_factor_cov',
  24. 'corr_matrix',
  25. 'cov_matrix',
  26. 'int',
  27. 'matrix',
  28. 'ordered',
  29. 'positive_ordered',
  30. 'real',
  31. 'row_vector',
  32. 'simplex',
  33. 'unit_vector',
  34. 'vector',
  35. 'void',
  36. 'array',
  37. 'complex'
  38. )
  39. FUNCTIONS = (
  40. 'abs',
  41. 'acos',
  42. 'acosh',
  43. 'add_diag',
  44. 'algebra_solver',
  45. 'algebra_solver_newton',
  46. 'append_array',
  47. 'append_col',
  48. 'append_row',
  49. 'arg',
  50. 'asin',
  51. 'asinh',
  52. 'atan',
  53. 'atan2',
  54. 'atanh',
  55. 'bernoulli_cdf',
  56. 'bernoulli_lccdf',
  57. 'bernoulli_lcdf',
  58. 'bernoulli_logit_glm_lpmf',
  59. 'bernoulli_logit_glm_lupmf',
  60. 'bernoulli_logit_glm_rng',
  61. 'bernoulli_logit_lpmf',
  62. 'bernoulli_logit_lupmf',
  63. 'bernoulli_logit_rng',
  64. 'bernoulli_lpmf',
  65. 'bernoulli_lupmf',
  66. 'bernoulli_rng',
  67. 'bessel_first_kind',
  68. 'bessel_second_kind',
  69. 'beta',
  70. 'beta_binomial_cdf',
  71. 'beta_binomial_lccdf',
  72. 'beta_binomial_lcdf',
  73. 'beta_binomial_lpmf',
  74. 'beta_binomial_lupmf',
  75. 'beta_binomial_rng',
  76. 'beta_cdf',
  77. 'beta_lccdf',
  78. 'beta_lcdf',
  79. 'beta_lpdf',
  80. 'beta_lupdf',
  81. 'beta_proportion_lccdf',
  82. 'beta_proportion_lcdf',
  83. 'beta_proportion_rng',
  84. 'beta_rng',
  85. 'binary_log_loss',
  86. 'binomial_cdf',
  87. 'binomial_coefficient_log',
  88. 'binomial_lccdf',
  89. 'binomial_lcdf',
  90. 'binomial_logit_lpmf',
  91. 'binomial_logit_lupmf',
  92. 'binomial_lpmf',
  93. 'binomial_lupmf',
  94. 'binomial_rng',
  95. 'block',
  96. 'categorical_logit_glm_lpmf',
  97. 'categorical_logit_glm_lupmf',
  98. 'categorical_logit_lpmf',
  99. 'categorical_logit_lupmf',
  100. 'categorical_logit_rng',
  101. 'categorical_lpmf',
  102. 'categorical_lupmf',
  103. 'categorical_rng',
  104. 'cauchy_cdf',
  105. 'cauchy_lccdf',
  106. 'cauchy_lcdf',
  107. 'cauchy_lpdf',
  108. 'cauchy_lupdf',
  109. 'cauchy_rng',
  110. 'cbrt',
  111. 'ceil',
  112. 'chi_square_cdf',
  113. 'chi_square_lccdf',
  114. 'chi_square_lcdf',
  115. 'chi_square_lpdf',
  116. 'chi_square_lupdf',
  117. 'chi_square_rng',
  118. 'chol2inv',
  119. 'cholesky_decompose',
  120. 'choose',
  121. 'col',
  122. 'cols',
  123. 'columns_dot_product',
  124. 'columns_dot_self',
  125. 'conj',
  126. 'cos',
  127. 'cosh',
  128. 'cov_exp_quad',
  129. 'crossprod',
  130. 'csr_extract_u',
  131. 'csr_extract_v',
  132. 'csr_extract_w',
  133. 'csr_matrix_times_vector',
  134. 'csr_to_dense_matrix',
  135. 'cumulative_sum',
  136. 'dae',
  137. 'dae_tol',
  138. 'determinant',
  139. 'diag_matrix',
  140. 'diag_post_multiply',
  141. 'diag_pre_multiply',
  142. 'diagonal',
  143. 'digamma',
  144. 'dims',
  145. 'dirichlet_lpdf',
  146. 'dirichlet_lupdf',
  147. 'dirichlet_rng',
  148. 'discrete_range_cdf',
  149. 'discrete_range_lccdf',
  150. 'discrete_range_lcdf',
  151. 'discrete_range_lpmf',
  152. 'discrete_range_lupmf',
  153. 'discrete_range_rng',
  154. 'distance',
  155. 'dot_product',
  156. 'dot_self',
  157. 'double_exponential_cdf',
  158. 'double_exponential_lccdf',
  159. 'double_exponential_lcdf',
  160. 'double_exponential_lpdf',
  161. 'double_exponential_lupdf',
  162. 'double_exponential_rng',
  163. 'e',
  164. 'eigenvalues_sym',
  165. 'eigenvectors_sym',
  166. 'erf',
  167. 'erfc',
  168. 'exp',
  169. 'exp2',
  170. 'exp_mod_normal_cdf',
  171. 'exp_mod_normal_lccdf',
  172. 'exp_mod_normal_lcdf',
  173. 'exp_mod_normal_lpdf',
  174. 'exp_mod_normal_lupdf',
  175. 'exp_mod_normal_rng',
  176. 'expm1',
  177. 'exponential_cdf',
  178. 'exponential_lccdf',
  179. 'exponential_lcdf',
  180. 'exponential_lpdf',
  181. 'exponential_lupdf',
  182. 'exponential_rng',
  183. 'fabs',
  184. 'falling_factorial',
  185. 'fdim',
  186. 'floor',
  187. 'fma',
  188. 'fmax',
  189. 'fmin',
  190. 'fmod',
  191. 'frechet_cdf',
  192. 'frechet_lccdf',
  193. 'frechet_lcdf',
  194. 'frechet_lpdf',
  195. 'frechet_lupdf',
  196. 'frechet_rng',
  197. 'gamma_cdf',
  198. 'gamma_lccdf',
  199. 'gamma_lcdf',
  200. 'gamma_lpdf',
  201. 'gamma_lupdf',
  202. 'gamma_p',
  203. 'gamma_q',
  204. 'gamma_rng',
  205. 'gaussian_dlm_obs_lpdf',
  206. 'gaussian_dlm_obs_lupdf',
  207. 'generalized_inverse',
  208. 'get_imag',
  209. 'get_lp',
  210. 'get_real',
  211. 'gumbel_cdf',
  212. 'gumbel_lccdf',
  213. 'gumbel_lcdf',
  214. 'gumbel_lpdf',
  215. 'gumbel_lupdf',
  216. 'gumbel_rng',
  217. 'head',
  218. 'hmm_hidden_state_prob',
  219. 'hmm_latent_rng',
  220. 'hmm_marginal',
  221. 'hypergeometric_lpmf',
  222. 'hypergeometric_lupmf',
  223. 'hypergeometric_rng',
  224. 'hypot',
  225. 'identity_matrix',
  226. 'inc_beta',
  227. 'int_step',
  228. 'integrate_1d',
  229. 'integrate_ode',
  230. 'integrate_ode_adams',
  231. 'integrate_ode_bdf',
  232. 'integrate_ode_rk45',
  233. 'inv',
  234. 'inv_chi_square_cdf',
  235. 'inv_chi_square_lccdf',
  236. 'inv_chi_square_lcdf',
  237. 'inv_chi_square_lpdf',
  238. 'inv_chi_square_lupdf',
  239. 'inv_chi_square_rng',
  240. 'inv_cloglog',
  241. 'inv_erfc',
  242. 'inv_gamma_cdf',
  243. 'inv_gamma_lccdf',
  244. 'inv_gamma_lcdf',
  245. 'inv_gamma_lpdf',
  246. 'inv_gamma_lupdf',
  247. 'inv_gamma_rng',
  248. 'inv_logit',
  249. 'inv_Phi',
  250. 'inv_sqrt',
  251. 'inv_square',
  252. 'inv_wishart_lpdf',
  253. 'inv_wishart_lupdf',
  254. 'inv_wishart_rng',
  255. 'inverse',
  256. 'inverse_spd',
  257. 'is_inf',
  258. 'is_nan',
  259. 'lambert_w0',
  260. 'lambert_wm1',
  261. 'lbeta',
  262. 'lchoose',
  263. 'ldexp',
  264. 'lgamma',
  265. 'linspaced_array',
  266. 'linspaced_int_array',
  267. 'linspaced_row_vector',
  268. 'linspaced_vector',
  269. 'lkj_corr_cholesky_lpdf',
  270. 'lkj_corr_cholesky_lupdf',
  271. 'lkj_corr_cholesky_rng',
  272. 'lkj_corr_lpdf',
  273. 'lkj_corr_lupdf',
  274. 'lkj_corr_rng',
  275. 'lmgamma',
  276. 'lmultiply',
  277. 'log',
  278. 'log10',
  279. 'log1m',
  280. 'log1m_exp',
  281. 'log1m_inv_logit',
  282. 'log1p',
  283. 'log1p_exp',
  284. 'log2',
  285. 'log_determinant',
  286. 'log_diff_exp',
  287. 'log_falling_factorial',
  288. 'log_inv_logit',
  289. 'log_inv_logit_diff',
  290. 'log_mix',
  291. 'log_modified_bessel_first_kind',
  292. 'log_rising_factorial',
  293. 'log_softmax',
  294. 'log_sum_exp',
  295. 'logistic_cdf',
  296. 'logistic_lccdf',
  297. 'logistic_lcdf',
  298. 'logistic_lpdf',
  299. 'logistic_lupdf',
  300. 'logistic_rng',
  301. 'logit',
  302. 'loglogistic_cdf',
  303. 'loglogistic_lpdf',
  304. 'loglogistic_rng',
  305. 'lognormal_cdf',
  306. 'lognormal_lccdf',
  307. 'lognormal_lcdf',
  308. 'lognormal_lpdf',
  309. 'lognormal_lupdf',
  310. 'lognormal_rng',
  311. 'machine_precision',
  312. 'map_rect',
  313. 'matrix_exp',
  314. 'matrix_exp_multiply',
  315. 'matrix_power',
  316. 'max',
  317. 'mdivide_left_spd',
  318. 'mdivide_left_tri_low',
  319. 'mdivide_right_spd',
  320. 'mdivide_right_tri_low',
  321. 'mean',
  322. 'min',
  323. 'modified_bessel_first_kind',
  324. 'modified_bessel_second_kind',
  325. 'multi_gp_cholesky_lpdf',
  326. 'multi_gp_cholesky_lupdf',
  327. 'multi_gp_lpdf',
  328. 'multi_gp_lupdf',
  329. 'multi_normal_cholesky_lpdf',
  330. 'multi_normal_cholesky_lupdf',
  331. 'multi_normal_cholesky_rng',
  332. 'multi_normal_lpdf',
  333. 'multi_normal_lupdf',
  334. 'multi_normal_prec_lpdf',
  335. 'multi_normal_prec_lupdf',
  336. 'multi_normal_rng',
  337. 'multi_student_t_lpdf',
  338. 'multi_student_t_lupdf',
  339. 'multi_student_t_rng',
  340. 'multinomial_logit_lpmf',
  341. 'multinomial_logit_lupmf',
  342. 'multinomial_logit_rng',
  343. 'multinomial_lpmf',
  344. 'multinomial_lupmf',
  345. 'multinomial_rng',
  346. 'multiply_log',
  347. 'multiply_lower_tri_self_transpose',
  348. 'neg_binomial_2_cdf',
  349. 'neg_binomial_2_lccdf',
  350. 'neg_binomial_2_lcdf',
  351. 'neg_binomial_2_log_glm_lpmf',
  352. 'neg_binomial_2_log_glm_lupmf',
  353. 'neg_binomial_2_log_lpmf',
  354. 'neg_binomial_2_log_lupmf',
  355. 'neg_binomial_2_log_rng',
  356. 'neg_binomial_2_lpmf',
  357. 'neg_binomial_2_lupmf',
  358. 'neg_binomial_2_rng',
  359. 'neg_binomial_cdf',
  360. 'neg_binomial_lccdf',
  361. 'neg_binomial_lcdf',
  362. 'neg_binomial_lpmf',
  363. 'neg_binomial_lupmf',
  364. 'neg_binomial_rng',
  365. 'negative_infinity',
  366. 'norm',
  367. 'normal_cdf',
  368. 'normal_id_glm_lpdf',
  369. 'normal_id_glm_lupdf',
  370. 'normal_lccdf',
  371. 'normal_lcdf',
  372. 'normal_lpdf',
  373. 'normal_lupdf',
  374. 'normal_rng',
  375. 'not_a_number',
  376. 'num_elements',
  377. 'ode_adams',
  378. 'ode_adams_tol',
  379. 'ode_adjoint_tol_ctl',
  380. 'ode_bdf',
  381. 'ode_bdf_tol',
  382. 'ode_ckrk',
  383. 'ode_ckrk_tol',
  384. 'ode_rk45',
  385. 'ode_rk45_tol',
  386. 'one_hot_array',
  387. 'one_hot_int_array',
  388. 'one_hot_row_vector',
  389. 'one_hot_vector',
  390. 'ones_array',
  391. 'ones_int_array',
  392. 'ones_row_vector',
  393. 'ones_vector',
  394. 'ordered_logistic_glm_lpmf',
  395. 'ordered_logistic_glm_lupmf',
  396. 'ordered_logistic_lpmf',
  397. 'ordered_logistic_lupmf',
  398. 'ordered_logistic_rng',
  399. 'ordered_probit_lpmf',
  400. 'ordered_probit_lupmf',
  401. 'ordered_probit_rng',
  402. 'owens_t',
  403. 'pareto_cdf',
  404. 'pareto_lccdf',
  405. 'pareto_lcdf',
  406. 'pareto_lpdf',
  407. 'pareto_lupdf',
  408. 'pareto_rng',
  409. 'pareto_type_2_cdf',
  410. 'pareto_type_2_lccdf',
  411. 'pareto_type_2_lcdf',
  412. 'pareto_type_2_lpdf',
  413. 'pareto_type_2_lupdf',
  414. 'pareto_type_2_rng',
  415. 'Phi',
  416. 'Phi_approx',
  417. 'pi',
  418. 'poisson_cdf',
  419. 'poisson_lccdf',
  420. 'poisson_lcdf',
  421. 'poisson_log_glm_lpmf',
  422. 'poisson_log_glm_lupmf',
  423. 'poisson_log_lpmf',
  424. 'poisson_log_lupmf',
  425. 'poisson_log_rng',
  426. 'poisson_lpmf',
  427. 'poisson_lupmf',
  428. 'poisson_rng',
  429. 'polar',
  430. 'positive_infinity',
  431. 'pow',
  432. 'print',
  433. 'prod',
  434. 'proj',
  435. 'qr_Q',
  436. 'qr_R',
  437. 'qr_thin_Q',
  438. 'qr_thin_R',
  439. 'quad_form',
  440. 'quad_form_diag',
  441. 'quad_form_sym',
  442. 'quantile',
  443. 'rank',
  444. 'rayleigh_cdf',
  445. 'rayleigh_lccdf',
  446. 'rayleigh_lcdf',
  447. 'rayleigh_lpdf',
  448. 'rayleigh_lupdf',
  449. 'rayleigh_rng',
  450. 'reduce_sum',
  451. 'reject',
  452. 'rep_array',
  453. 'rep_matrix',
  454. 'rep_row_vector',
  455. 'rep_vector',
  456. 'reverse',
  457. 'rising_factorial',
  458. 'round',
  459. 'row',
  460. 'rows',
  461. 'rows_dot_product',
  462. 'rows_dot_self',
  463. 'scale_matrix_exp_multiply',
  464. 'scaled_inv_chi_square_cdf',
  465. 'scaled_inv_chi_square_lccdf',
  466. 'scaled_inv_chi_square_lcdf',
  467. 'scaled_inv_chi_square_lpdf',
  468. 'scaled_inv_chi_square_lupdf',
  469. 'scaled_inv_chi_square_rng',
  470. 'sd',
  471. 'segment',
  472. 'sin',
  473. 'singular_values',
  474. 'sinh',
  475. 'size',
  476. 'skew_double_exponential_cdf',
  477. 'skew_double_exponential_lccdf',
  478. 'skew_double_exponential_lcdf',
  479. 'skew_double_exponential_lpdf',
  480. 'skew_double_exponential_lupdf',
  481. 'skew_double_exponential_rng',
  482. 'skew_normal_cdf',
  483. 'skew_normal_lccdf',
  484. 'skew_normal_lcdf',
  485. 'skew_normal_lpdf',
  486. 'skew_normal_lupdf',
  487. 'skew_normal_rng',
  488. 'softmax',
  489. 'sort_asc',
  490. 'sort_desc',
  491. 'sort_indices_asc',
  492. 'sort_indices_desc',
  493. 'sqrt',
  494. 'sqrt2',
  495. 'square',
  496. 'squared_distance',
  497. 'std_normal_cdf',
  498. 'std_normal_lccdf',
  499. 'std_normal_lcdf',
  500. 'std_normal_lpdf',
  501. 'std_normal_lupdf',
  502. 'std_normal_rng',
  503. 'step',
  504. 'student_t_cdf',
  505. 'student_t_lccdf',
  506. 'student_t_lcdf',
  507. 'student_t_lpdf',
  508. 'student_t_lupdf',
  509. 'student_t_rng',
  510. 'sub_col',
  511. 'sub_row',
  512. 'sum',
  513. 'svd_U',
  514. 'svd_V',
  515. 'symmetrize_from_lower_tri',
  516. 'tail',
  517. 'tan',
  518. 'tanh',
  519. 'target',
  520. 'tcrossprod',
  521. 'tgamma',
  522. 'to_array_1d',
  523. 'to_array_2d',
  524. 'to_complex',
  525. 'to_matrix',
  526. 'to_row_vector',
  527. 'to_vector',
  528. 'trace',
  529. 'trace_gen_quad_form',
  530. 'trace_quad_form',
  531. 'trigamma',
  532. 'trunc',
  533. 'uniform_cdf',
  534. 'uniform_lccdf',
  535. 'uniform_lcdf',
  536. 'uniform_lpdf',
  537. 'uniform_lupdf',
  538. 'uniform_rng',
  539. 'uniform_simplex',
  540. 'variance',
  541. 'von_mises_cdf',
  542. 'von_mises_lccdf',
  543. 'von_mises_lcdf',
  544. 'von_mises_lpdf',
  545. 'von_mises_lupdf',
  546. 'von_mises_rng',
  547. 'weibull_cdf',
  548. 'weibull_lccdf',
  549. 'weibull_lcdf',
  550. 'weibull_lpdf',
  551. 'weibull_lupdf',
  552. 'weibull_rng',
  553. 'wiener_lpdf',
  554. 'wiener_lupdf',
  555. 'wishart_lpdf',
  556. 'wishart_lupdf',
  557. 'wishart_rng',
  558. 'zeros_array',
  559. 'zeros_int_array',
  560. 'zeros_row_vector'
  561. )
  562. DISTRIBUTIONS = (
  563. 'bernoulli',
  564. 'bernoulli_logit',
  565. 'bernoulli_logit_glm',
  566. 'beta',
  567. 'beta_binomial',
  568. 'binomial',
  569. 'binomial_logit',
  570. 'categorical',
  571. 'categorical_logit',
  572. 'categorical_logit_glm',
  573. 'cauchy',
  574. 'chi_square',
  575. 'dirichlet',
  576. 'discrete_range',
  577. 'double_exponential',
  578. 'exp_mod_normal',
  579. 'exponential',
  580. 'frechet',
  581. 'gamma',
  582. 'gaussian_dlm_obs',
  583. 'gumbel',
  584. 'hypergeometric',
  585. 'inv_chi_square',
  586. 'inv_gamma',
  587. 'inv_wishart',
  588. 'lkj_corr',
  589. 'lkj_corr_cholesky',
  590. 'logistic',
  591. 'loglogistic',
  592. 'lognormal',
  593. 'multi_gp',
  594. 'multi_gp_cholesky',
  595. 'multi_normal',
  596. 'multi_normal_cholesky',
  597. 'multi_normal_prec',
  598. 'multi_student_t',
  599. 'multinomial',
  600. 'multinomial_logit',
  601. 'neg_binomial',
  602. 'neg_binomial_2',
  603. 'neg_binomial_2_log',
  604. 'neg_binomial_2_log_glm',
  605. 'normal',
  606. 'normal_id_glm',
  607. 'ordered_logistic',
  608. 'ordered_logistic_glm',
  609. 'ordered_probit',
  610. 'pareto',
  611. 'pareto_type_2',
  612. 'poisson',
  613. 'poisson_log',
  614. 'poisson_log_glm',
  615. 'rayleigh',
  616. 'scaled_inv_chi_square',
  617. 'skew_double_exponential',
  618. 'skew_normal',
  619. 'std_normal',
  620. 'student_t',
  621. 'uniform',
  622. 'von_mises',
  623. 'weibull',
  624. 'wiener',
  625. 'wishart',
  626. )
  627. RESERVED = (
  628. 'repeat',
  629. 'until',
  630. 'then',
  631. 'true',
  632. 'false',
  633. 'var',
  634. 'struct',
  635. 'typedef',
  636. 'export',
  637. 'auto',
  638. 'extern',
  639. 'var',
  640. 'static',
  641. )