_stan_builtins.py 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  1. # -*- coding: utf-8 -*-
  2. """
  3. pygments.lexers._stan_builtins
  4. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5. This file contains the names of functions for Stan used by
  6. ``pygments.lexers.math.StanLexer. This is for Stan language version 2.8.0.
  7. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
  8. :license: BSD, see LICENSE for details.
  9. """
  10. KEYWORDS = (
  11. 'else',
  12. 'for',
  13. 'if',
  14. 'in',
  15. 'increment_log_prob',
  16. 'integrate_ode',
  17. 'lp__',
  18. 'print',
  19. 'reject',
  20. 'return',
  21. 'while'
  22. )
  23. TYPES = (
  24. 'cholesky_factor_corr',
  25. 'cholesky_factor_cov',
  26. 'corr_matrix',
  27. 'cov_matrix',
  28. 'int',
  29. 'matrix',
  30. 'ordered',
  31. 'positive_ordered',
  32. 'real',
  33. 'row_vector',
  34. 'row_vectormatrix',
  35. 'simplex',
  36. 'unit_vector',
  37. 'vector',
  38. 'void')
  39. FUNCTIONS = (
  40. 'Phi',
  41. 'Phi_approx',
  42. 'abs',
  43. 'acos',
  44. 'acosh',
  45. 'append_col',
  46. 'append_row',
  47. 'asin',
  48. 'asinh',
  49. 'atan',
  50. 'atan2',
  51. 'atanh',
  52. 'bernoulli_ccdf_log',
  53. 'bernoulli_cdf',
  54. 'bernoulli_cdf_log',
  55. 'bernoulli_log',
  56. 'bernoulli_logit_log',
  57. 'bernoulli_rng',
  58. 'bessel_first_kind',
  59. 'bessel_second_kind',
  60. 'beta_binomial_ccdf_log',
  61. 'beta_binomial_cdf',
  62. 'beta_binomial_cdf_log',
  63. 'beta_binomial_log',
  64. 'beta_binomial_rng',
  65. 'beta_ccdf_log',
  66. 'beta_cdf',
  67. 'beta_cdf_log',
  68. 'beta_log',
  69. 'beta_rng',
  70. 'binary_log_loss',
  71. 'binomial_ccdf_log',
  72. 'binomial_cdf',
  73. 'binomial_cdf_log',
  74. 'binomial_coefficient_log',
  75. 'binomial_log',
  76. 'binomial_logit_log',
  77. 'binomial_rng',
  78. 'block',
  79. 'categorical_log',
  80. 'categorical_logit_log',
  81. 'categorical_rng',
  82. 'cauchy_ccdf_log',
  83. 'cauchy_cdf',
  84. 'cauchy_cdf_log',
  85. 'cauchy_log',
  86. 'cauchy_rng',
  87. 'cbrt',
  88. 'ceil',
  89. 'chi_square_ccdf_log',
  90. 'chi_square_cdf',
  91. 'chi_square_cdf_log',
  92. 'chi_square_log',
  93. 'chi_square_rng',
  94. 'cholesky_decompose',
  95. 'col',
  96. 'cols',
  97. 'columns_dot_product',
  98. 'columns_dot_self',
  99. 'cos',
  100. 'cosh',
  101. 'crossprod',
  102. 'csr_extract_u',
  103. 'csr_extract_v',
  104. 'csr_extract_w',
  105. 'csr_matrix_times_vector',
  106. 'csr_to_dense_matrix',
  107. 'cumulative_sum',
  108. 'determinant',
  109. 'diag_matrix',
  110. 'diag_post_multiply',
  111. 'diag_pre_multiply',
  112. 'diagonal',
  113. 'digamma',
  114. 'dims',
  115. 'dirichlet_log',
  116. 'dirichlet_rng',
  117. 'distance',
  118. 'dot_product',
  119. 'dot_self',
  120. 'double_exponential_ccdf_log',
  121. 'double_exponential_cdf',
  122. 'double_exponential_cdf_log',
  123. 'double_exponential_log',
  124. 'double_exponential_rng',
  125. 'e',
  126. 'eigenvalues_sym',
  127. 'eigenvectors_sym',
  128. 'erf',
  129. 'erfc',
  130. 'exp',
  131. 'exp2',
  132. 'exp_mod_normal_ccdf_log',
  133. 'exp_mod_normal_cdf',
  134. 'exp_mod_normal_cdf_log',
  135. 'exp_mod_normal_log',
  136. 'exp_mod_normal_rng',
  137. 'expm1',
  138. 'exponential_ccdf_log',
  139. 'exponential_cdf',
  140. 'exponential_cdf_log',
  141. 'exponential_log',
  142. 'exponential_rng',
  143. 'fabs',
  144. 'falling_factorial',
  145. 'fdim',
  146. 'floor',
  147. 'fma',
  148. 'fmax',
  149. 'fmin',
  150. 'fmod',
  151. 'frechet_ccdf_log',
  152. 'frechet_cdf',
  153. 'frechet_cdf_log',
  154. 'frechet_log',
  155. 'frechet_rng',
  156. 'gamma_ccdf_log',
  157. 'gamma_cdf',
  158. 'gamma_cdf_log',
  159. 'gamma_log',
  160. 'gamma_p',
  161. 'gamma_q',
  162. 'gamma_rng',
  163. 'gaussian_dlm_obs_log',
  164. 'get_lp',
  165. 'gumbel_ccdf_log',
  166. 'gumbel_cdf',
  167. 'gumbel_cdf_log',
  168. 'gumbel_log',
  169. 'gumbel_rng',
  170. 'head',
  171. 'hypergeometric_log',
  172. 'hypergeometric_rng',
  173. 'hypot',
  174. 'if_else',
  175. 'int_step',
  176. 'inv',
  177. 'inv_chi_square_ccdf_log',
  178. 'inv_chi_square_cdf',
  179. 'inv_chi_square_cdf_log',
  180. 'inv_chi_square_log',
  181. 'inv_chi_square_rng',
  182. 'inv_cloglog',
  183. 'inv_gamma_ccdf_log',
  184. 'inv_gamma_cdf',
  185. 'inv_gamma_cdf_log',
  186. 'inv_gamma_log',
  187. 'inv_gamma_rng',
  188. 'inv_logit',
  189. 'inv_phi',
  190. 'inv_sqrt',
  191. 'inv_square',
  192. 'inv_wishart_log',
  193. 'inv_wishart_rng',
  194. 'inverse',
  195. 'inverse_spd',
  196. 'is_inf',
  197. 'is_nan',
  198. 'lbeta',
  199. 'lgamma',
  200. 'lkj_corr_cholesky_log',
  201. 'lkj_corr_cholesky_rng',
  202. 'lkj_corr_log',
  203. 'lkj_corr_rng',
  204. 'lmgamma',
  205. 'log',
  206. 'log10',
  207. 'log1m',
  208. 'log1m_exp',
  209. 'log1m_inv_logit',
  210. 'log1p',
  211. 'log1p_exp',
  212. 'log2',
  213. 'log_determinant',
  214. 'log_diff_exp',
  215. 'log_falling_factorial',
  216. 'log_inv_logit',
  217. 'log_mix',
  218. 'log_rising_factorial',
  219. 'log_softmax',
  220. 'log_sum_exp',
  221. 'logistic_ccdf_log',
  222. 'logistic_cdf',
  223. 'logistic_cdf_log',
  224. 'logistic_log',
  225. 'logistic_rng',
  226. 'logit',
  227. 'lognormal_ccdf_log',
  228. 'lognormal_cdf',
  229. 'lognormal_cdf_log',
  230. 'lognormal_log',
  231. 'lognormal_rng',
  232. 'machine_precision',
  233. 'max',
  234. 'mdivide_left_tri_low',
  235. 'mdivide_right_tri_low',
  236. 'mean',
  237. 'min',
  238. 'modified_bessel_first_kind',
  239. 'modified_bessel_second_kind',
  240. 'multi_gp_cholesky_log',
  241. 'multi_gp_log',
  242. 'multi_normal_cholesky_log',
  243. 'multi_normal_cholesky_rng',
  244. 'multi_normal_log',
  245. 'multi_normal_prec_log',
  246. 'multi_normal_rng',
  247. 'multi_student_t_log',
  248. 'multi_student_t_rng',
  249. 'multinomial_log',
  250. 'multinomial_rng',
  251. 'multiply_log',
  252. 'multiply_lower_tri_self_transpose',
  253. 'neg_binomial_2_ccdf_log',
  254. 'neg_binomial_2_cdf',
  255. 'neg_binomial_2_cdf_log',
  256. 'neg_binomial_2_log',
  257. 'neg_binomial_2_log_log',
  258. 'neg_binomial_2_log_rng',
  259. 'neg_binomial_2_rng',
  260. 'neg_binomial_ccdf_log',
  261. 'neg_binomial_cdf',
  262. 'neg_binomial_cdf_log',
  263. 'neg_binomial_log',
  264. 'neg_binomial_rng',
  265. 'negative_infinity',
  266. 'normal_ccdf_log',
  267. 'normal_cdf',
  268. 'normal_cdf_log',
  269. 'normal_log',
  270. 'normal_rng',
  271. 'not_a_number',
  272. 'num_elements',
  273. 'ordered_logistic_log',
  274. 'ordered_logistic_rng',
  275. 'owens_t',
  276. 'pareto_ccdf_log',
  277. 'pareto_cdf',
  278. 'pareto_cdf_log',
  279. 'pareto_log',
  280. 'pareto_rng',
  281. 'pareto_type_2_ccdf_log',
  282. 'pareto_type_2_cdf',
  283. 'pareto_type_2_cdf_log',
  284. 'pareto_type_2_log',
  285. 'pareto_type_2_rng',
  286. 'pi',
  287. 'poisson_ccdf_log',
  288. 'poisson_cdf',
  289. 'poisson_cdf_log',
  290. 'poisson_log',
  291. 'poisson_log_log',
  292. 'poisson_log_rng',
  293. 'poisson_rng',
  294. 'positive_infinity',
  295. 'pow',
  296. 'prod',
  297. 'qr_Q',
  298. 'qr_R',
  299. 'quad_form',
  300. 'quad_form_diag',
  301. 'quad_form_sym',
  302. 'rank',
  303. 'rayleigh_ccdf_log',
  304. 'rayleigh_cdf',
  305. 'rayleigh_cdf_log',
  306. 'rayleigh_log',
  307. 'rayleigh_rng',
  308. 'rep_array',
  309. 'rep_matrix',
  310. 'rep_row_vector',
  311. 'rep_vector',
  312. 'rising_factorial',
  313. 'round',
  314. 'row',
  315. 'rows',
  316. 'rows_dot_product',
  317. 'rows_dot_self',
  318. 'scaled_inv_chi_square_ccdf_log',
  319. 'scaled_inv_chi_square_cdf',
  320. 'scaled_inv_chi_square_cdf_log',
  321. 'scaled_inv_chi_square_log',
  322. 'scaled_inv_chi_square_rng',
  323. 'sd',
  324. 'segment',
  325. 'sin',
  326. 'singular_values',
  327. 'sinh',
  328. 'size',
  329. 'skew_normal_ccdf_log',
  330. 'skew_normal_cdf',
  331. 'skew_normal_cdf_log',
  332. 'skew_normal_log',
  333. 'skew_normal_rng',
  334. 'softmax',
  335. 'sort_asc',
  336. 'sort_desc',
  337. 'sort_indices_asc',
  338. 'sort_indices_desc',
  339. 'sqrt',
  340. 'sqrt2',
  341. 'square',
  342. 'squared_distance',
  343. 'step',
  344. 'student_t_ccdf_log',
  345. 'student_t_cdf',
  346. 'student_t_cdf_log',
  347. 'student_t_log',
  348. 'student_t_rng',
  349. 'sub_col',
  350. 'sub_row',
  351. 'sum',
  352. 'tail',
  353. 'tan',
  354. 'tanh',
  355. 'tcrossprod',
  356. 'tgamma',
  357. 'to_array_1d',
  358. 'to_array_2d',
  359. 'to_matrix',
  360. 'to_row_vector',
  361. 'to_vector',
  362. 'trace',
  363. 'trace_gen_quad_form',
  364. 'trace_quad_form',
  365. 'trigamma',
  366. 'trunc',
  367. 'uniform_ccdf_log',
  368. 'uniform_cdf',
  369. 'uniform_cdf_log',
  370. 'uniform_log',
  371. 'uniform_rng',
  372. 'variance',
  373. 'von_mises_log',
  374. 'von_mises_rng',
  375. 'weibull_ccdf_log',
  376. 'weibull_cdf',
  377. 'weibull_cdf_log',
  378. 'weibull_log',
  379. 'weibull_rng',
  380. 'wiener_log',
  381. 'wishart_log',
  382. 'wishart_rng'
  383. )
  384. DISTRIBUTIONS = (
  385. 'bernoulli',
  386. 'bernoulli_logit',
  387. 'beta',
  388. 'beta_binomial',
  389. 'binomial',
  390. 'binomial_logit',
  391. 'categorical',
  392. 'categorical_logit',
  393. 'cauchy',
  394. 'chi_square',
  395. 'dirichlet',
  396. 'double_exponential',
  397. 'exp_mod_normal',
  398. 'exponential',
  399. 'frechet',
  400. 'gamma',
  401. 'gaussian_dlm_obs',
  402. 'gumbel',
  403. 'hypergeometric',
  404. 'inv_chi_square',
  405. 'inv_gamma',
  406. 'inv_wishart',
  407. 'lkj_corr',
  408. 'lkj_corr_cholesky',
  409. 'logistic',
  410. 'lognormal',
  411. 'multi_gp',
  412. 'multi_gp_cholesky',
  413. 'multi_normal',
  414. 'multi_normal_cholesky',
  415. 'multi_normal_prec',
  416. 'multi_student_t',
  417. 'multinomial',
  418. 'neg_binomial',
  419. 'neg_binomial_2',
  420. 'neg_binomial_2_log',
  421. 'normal',
  422. 'ordered_logistic',
  423. 'pareto',
  424. 'pareto_type_2',
  425. 'poisson',
  426. 'poisson_log',
  427. 'rayleigh',
  428. 'scaled_inv_chi_square',
  429. 'skew_normal',
  430. 'student_t',
  431. 'uniform',
  432. 'von_mises',
  433. 'weibull',
  434. 'wiener',
  435. 'wishart'
  436. )
  437. RESERVED = (
  438. 'alignas',
  439. 'alignof',
  440. 'and',
  441. 'and_eq',
  442. 'asm',
  443. 'auto',
  444. 'bitand',
  445. 'bitor',
  446. 'bool',
  447. 'break',
  448. 'case',
  449. 'catch',
  450. 'char',
  451. 'char16_t',
  452. 'char32_t',
  453. 'class',
  454. 'compl',
  455. 'const',
  456. 'const_cast',
  457. 'constexpr',
  458. 'continue',
  459. 'decltype',
  460. 'default',
  461. 'delete',
  462. 'do',
  463. 'double',
  464. 'dynamic_cast',
  465. 'enum',
  466. 'explicit',
  467. 'export',
  468. 'extern',
  469. 'false',
  470. 'false',
  471. 'float',
  472. 'friend',
  473. 'fvar',
  474. 'goto',
  475. 'inline',
  476. 'int',
  477. 'long',
  478. 'mutable',
  479. 'namespace',
  480. 'new',
  481. 'noexcept',
  482. 'not',
  483. 'not_eq',
  484. 'nullptr',
  485. 'operator',
  486. 'or',
  487. 'or_eq',
  488. 'private',
  489. 'protected',
  490. 'public',
  491. 'register',
  492. 'reinterpret_cast',
  493. 'repeat',
  494. 'short',
  495. 'signed',
  496. 'sizeof',
  497. 'static',
  498. 'static_assert',
  499. 'static_cast',
  500. 'struct',
  501. 'switch',
  502. 'template',
  503. 'then',
  504. 'this',
  505. 'thread_local',
  506. 'throw',
  507. 'true',
  508. 'true',
  509. 'try',
  510. 'typedef',
  511. 'typeid',
  512. 'typename',
  513. 'union',
  514. 'unsigned',
  515. 'until',
  516. 'using',
  517. 'var',
  518. 'virtual',
  519. 'void',
  520. 'volatile',
  521. 'wchar_t',
  522. 'xor',
  523. 'xor_eq'
  524. )