OPEN-SOURCE SCRIPT
ที่อัปเดต:

Function: Multi Dimension Indexer

2 476
Description:
A Function that returns the flat index of a N dimensions array.

Inputs:
_indices: Array containing dimension indices.¹
_limits: Array containing dimension size.¹

Note:
¹: _indices and _limits size must match. indices must be within dimension size.

Outputs:
_offset: the flat 1D index.

Resources:
eli.thegreenplace.net/2015/memory-layout-of-multi-dimensional-arrays
เอกสารเผยแพร่
added functions for 2d/3d for lightweight indexing, better examples.
เอกสารเผยแพร่
removed some extra redundant stuff.

คำจำกัดสิทธิ์ความรับผิดชอบ

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.