RicardoSantos

MarkovAlgorithm

RicardoSantos Wizard Cập nhật   
Library "MarkovAlgorithm"
Markov algorithm is a string rewriting system that uses grammar-like rules to operate on strings of
symbols. Markov algorithms have been shown to be Turing-complete, which means that they are suitable as a
general model of computation and can represent any mathematical expression from its simple notation.
~ wikipedia
.
reference:
en.wikipedia.org/wiki/Markov_algorithm
rosettacode.org/wiki...e_a_Markov_algorithm

parse(rules, separator)
  Parameters:
    rules (string)
    separator (string)
  Returns: - `array<rule> _rules`: List of rules.
---
Usage:
- `parse("|0 -> 0||\n1 -> 0|\n0 -> ")`

apply(expression, rules)
  Aplies rules to a expression.
  Parameters:
    expression (string): `string`: Text expression to be formated by the rules.
    rules (rule): `string`: Rules to apply to expression on a string format to be parsed.
  Returns: - `string _result`: Formated expression.
---
Usage:
- `apply("101", parse("|0 -> 0||\n1 -> 0|\n0 -> "))`

apply(expression, rules)
  Parameters:
    expression (string)
    rules (string)
  Returns: - `string _result`: Formated expression.
---
Usage:
- `apply("101", parse("|0 -> 0||\n1 -> 0|\n0 -> "))`


rule
  String pair that represents `pattern -> replace`, each rule may be ordinary or terminating.
  Fields:
    pattern (series string): Pattern to replace.
    replacement (series string): Replacement patterns.
    termination (series bool): Termination rule.
Phát hành các Ghi chú:
v2 minor update.
Phát hành các Ghi chú:
Fix logger version.
Thư viện Pine

Với tinh thần TradingView thực sự, tác giả đã xuất bản mã Pine này như một thư viện mã nguồn mở để các lập trình viên Pine khác từ cộng đồng của chúng tôi có thể sử dụng lại nó. Chúc mừng tác giả! Bạn có thể sử dụng thư viện này một cách riêng tư hoặc trong các ấn phẩm mã nguồn mở khác, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy chung.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng thư viện này?

Sao chép văn bản vào khay nhớ tạm và dán nó vào tập lệnh của bạn.