Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add array operations to cairo functions #66

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

omarespejel
Copy link

@omarespejel omarespejel commented May 22, 2022

DRAFT - PLEASE DO NOT REVIEW YET

Hey! This is the main submission of @haycarlitos and @omarespejel to the Miami Activate Hackathon. We are aiming to solve an infrastructure necessity for the Starknet ecosystem.

Description

Add array operations in Cairo.

Why

Development of programs involving vector operations require a set of numerical operations currently non-existing in the Cairo stack.

What?

* sum - Compute the sum of the element in an array.
* mean - Compute the arithmetic mean along the array.
* scalar_product - Compute the scalar multiplication of an array.
* median - Compute the median along the array.
* dot - Compute the dot product of two arrays.
* min - Obtain the minimum value in an array.
* max - Obtain the maximum value in an array.

Who could review?


This change is Reviewable

* asserts value is an integer
* asserts value is within the (-rc_bound, rc_bound) range
* returns true if value is even
* sum - Compute the sum of the element in an array.
* mean - Compute the arithmetic mean along the array.
* scalar_product - Compute the scalar multiplication of an array.
* median - Compute the median along the array.
* dot - Compute the dot product of two arrays.
* min - Obtain the minimum value in an array.
* max - Obtain the maximum value in an array.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant