Int256

Concurrent Int256 Array

The Int256 contract is a concurrent array specialized for storing int256 data. It inherits from the Base contract to utilize container functionalities for int256 storage.

Constructor

Int256()

constructor()

Constructor for the Int256 contract.

Public Functions

push

function push(int256 elem) public virtual

Add an int256 data element to the concurrent array.

  • Parameters:

    • elem: The int256 data element to add to the array.

pop

function pop() public virtual returns (int256)

Remove and return the last int256 data element from the concurrent array.

  • Returns:

    • int256: The last int256 data element from the array.

get

function get(uint256 idx) public virtual returns (int256)

Retrieve the int256 data element at the given index from the concurrent array.

  • Parameters:

    • idx The index of the int256 data element to retrieve.

  • Returns:

    • int256: The int256 data element stored at the given index.

set

function set(uint256 idx, int256 elem) public

Set the int256 data element at the given index in the concurrent array.

  • Parameters:

    • idx: The index where the int256 data element should be stored.

    • elem: The int256 data element to be stored at the specified index.

Last updated