PINE LIBRARY
Actualizado MahjongCoreEngine

Localized Core Grid Evaluation & Array Processing Engine [Pine Script v6 Library]
EXECUTIVE SUMMARY
This library functions as the primary matrix controller and multidimensional array conversion processor for live-tick simulation models. It provides structural utilities to convert raw multi-element datasets into localized counts, offering deterministic memory alignment optimized for Pine Script v6's structural limitations.
EXPORTED FUNCTIONS & QUANTITATIVE LOGIC
- hand_to_counts(string[] hand): Translates an arbitrary array of string elements (Unicode vectors) into a standardized 34-element fixed-integer array representing frequency distribution. This reduces the search space for combinations from factorial complexity to linear static constraints, preserving Abstract Syntax Tree (AST) overhead.
- is_standard_form(int[] counts): A deterministic combinatoric explorer that evaluates if the 34-element matrix satisfies the standard terminal grouping format: 4 sets (melds) and 1 pair (eye). It runs recursive backtracking memory pointers to guarantee 100% mathematical validity under live compilation loops.
概要
本ライブラリは、ライブティック・シミュレーションモデルにおける主要なマトリックスコントローラおよび多次元配列変換プロセッサとして機能します。生の複数要素データセットを局所的なカウント配列に変換する構造的ユーティリティを提供し、Pine Script v6の制限に最適化された決定論的なメモリ配置を実現します。
エクスポート関数と定量的ロジック
- hand_to_counts(string[] hand): 任意の文字列配列(Unicodeベクター)を、出現頻度分布を表す標準化された34要素の固定整数配列へと変換します。これにより、組み合わせの探索空間を階乗の複雑さから線形静的制約へと縮小し、コンパイル負荷(ASTオーバーヘッド)を保護します。
- is_standard_form(int[] counts): 34要素のマトリックスが、標準的な終了状態グループ形式(4面子1雀頭)を満たしているかを決定論的に評価する組み合わせ探索エンジンです。再帰的なバックトラッキング・メモリポインタを実行し、ライブコンパイル環境下で100%の数学的妥当性を保証します。
EXECUTIVE SUMMARY
This library functions as the primary matrix controller and multidimensional array conversion processor for live-tick simulation models. It provides structural utilities to convert raw multi-element datasets into localized counts, offering deterministic memory alignment optimized for Pine Script v6's structural limitations.
EXPORTED FUNCTIONS & QUANTITATIVE LOGIC
- hand_to_counts(string[] hand): Translates an arbitrary array of string elements (Unicode vectors) into a standardized 34-element fixed-integer array representing frequency distribution. This reduces the search space for combinations from factorial complexity to linear static constraints, preserving Abstract Syntax Tree (AST) overhead.
- is_standard_form(int[] counts): A deterministic combinatoric explorer that evaluates if the 34-element matrix satisfies the standard terminal grouping format: 4 sets (melds) and 1 pair (eye). It runs recursive backtracking memory pointers to guarantee 100% mathematical validity under live compilation loops.
概要
本ライブラリは、ライブティック・シミュレーションモデルにおける主要なマトリックスコントローラおよび多次元配列変換プロセッサとして機能します。生の複数要素データセットを局所的なカウント配列に変換する構造的ユーティリティを提供し、Pine Script v6の制限に最適化された決定論的なメモリ配置を実現します。
エクスポート関数と定量的ロジック
- hand_to_counts(string[] hand): 任意の文字列配列(Unicodeベクター)を、出現頻度分布を表す標準化された34要素の固定整数配列へと変換します。これにより、組み合わせの探索空間を階乗の複雑さから線形静的制約へと縮小し、コンパイル負荷(ASTオーバーヘッド)を保護します。
- is_standard_form(int[] counts): 34要素のマトリックスが、標準的な終了状態グループ形式(4面子1雀頭)を満たしているかを決定論的に評価する組み合わせ探索エンジンです。再帰的なバックトラッキング・メモリポインタを実行し、ライブコンパイル環境下で100%の数学的妥当性を保証します。
Notas de prensa
v2追加:
get_all_tiles()
counts_to_hand(counts)
Parameters:
counts (array<int>)
Biblioteca Pine
Fiel al espíritu de TradingView, el autor ha publicado este código de Pine como biblioteca de código abierto, para que otros programadores de nuestra comunidad puedan reutilizarlo. ¡Enhorabuena al autor! Puede usar esta biblioteca de forma privada o en otras publicaciones de código abierto, pero su reutilización en publicaciones está sujeta a nuestras Normas internas.
Script Developer.
I specialize in pushing basic, fundamental concepts to their absolute limits. Dedicated to engineering noise-free indicators that reveal true market mechanics and logical edges. Clarity over https://clutter.https://www.youtube.com/@alt.analyst
I specialize in pushing basic, fundamental concepts to their absolute limits. Dedicated to engineering noise-free indicators that reveal true market mechanics and logical edges. Clarity over https://clutter.https://www.youtube.com/@alt.analyst
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Biblioteca Pine
Fiel al espíritu de TradingView, el autor ha publicado este código de Pine como biblioteca de código abierto, para que otros programadores de nuestra comunidad puedan reutilizarlo. ¡Enhorabuena al autor! Puede usar esta biblioteca de forma privada o en otras publicaciones de código abierto, pero su reutilización en publicaciones está sujeta a nuestras Normas internas.
Script Developer.
I specialize in pushing basic, fundamental concepts to their absolute limits. Dedicated to engineering noise-free indicators that reveal true market mechanics and logical edges. Clarity over https://clutter.https://www.youtube.com/@alt.analyst
I specialize in pushing basic, fundamental concepts to their absolute limits. Dedicated to engineering noise-free indicators that reveal true market mechanics and logical edges. Clarity over https://clutter.https://www.youtube.com/@alt.analyst
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.