RicardoSantos

WIPTensor

RicardoSantos Wizard Telah dikemas kini   
Library "WIPTensor"
A Tensor or 3 dimensional array structure and interface.
---
Note: im just highjacking the name to use it as a 3d array on a project..
there is no optimization attempts or tensor specific functionality within.

to_string(this)
  Convert `Tensor` to a string format.
  Parameters:
    this: Tensor data.
  Returns: string.

to_vector(this)
  Convert `Tensor` to a one dimension array.
  Parameters:
    this: Tensor data.
  Returns: New array with flattened `Tensor` data.

new(x, y, z, initial_value)
  Create a new `Tensor` with provided shape.
  Parameters:
    x: Dimension `X` size.
    y: Dimension `Y` size.
    z: Dimension `Z` size.
    initial_value: Value to fill the `Tensor`.
  Returns: New `Tensor`.

new(shape, initial_value)
  Create a new `Tensor` with provided shape.
  Parameters:
    shape: Shape of dimensions size.
    initial_value: Value to fill the `Tensor`.
  Returns: New `Tensor`.

from(expression, sepx, sepy, sepz)
  Create a `Tensor` from provided array and shape.
  Parameters:
    expression
    sepx
    sepy
    sepz
  Returns: New `Tensor`.

from(vector, x, y, z)
  Create a `Tensor` from provided array and shape.
  Parameters:
    vector: Data with flattened dimensions.
    x
    y
    z
  Returns: New `Tensor`.

from(vector, shape)
  Parameters:
    vector
    shape

get(this, x, y, z)
  Get the value at position.
  Parameters:
    this: `Tensor` data.
    x
    y
    z
  Returns: Value at position.

get(this, position)
  Parameters:
    this
    position

set(this, x, y, z, value)
  Set the value at position.
  Parameters:
    this: `Tensor` data.
    x
    y
    z
    value: New Value.

set(this, position, value)
  Parameters:
    this
    position
    value

Vector
  Helper type for 3d structure.
  Fields:
    v: Vector of the 3rd dimension.

Tensor
  A Tensor is a three dimensional array were the 3rd dimension accounts for time.
  Fields:
    m: Matrix that holds the vectors.
Nota Keluaran:
v2 missing functionality x-ºD

Added:
get_vector_xy(this, position)
  Parameters:
    this
    position

set_vector_xy(this, position, values)
  Parameters:
    this
    position
    values
Perpustakaan Pine

Di dalam semangat sebenar TradingView, pengarang telah menerbitkan kod Pine ini sebagai perpustakaan sumber terbuka, jadi pengaturcara-pengaturcara Pine yang lain dari komuniti kami boleh menggunakannya semula. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara peribadi atau pada penerbitan-penerbitan sumber terbuka lain, tetapi penggunaan semula kod ini di dalam penerbitan adalah ditadbir oleh Peraturan Dalaman.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Mahu gunakan perpustakaan ini?

Salin garisan ini dan tampalkan ia di dalam skrip anda.