-
Notifications
You must be signed in to change notification settings - Fork 295
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
feat: protogalaxy combiner quotient #3245
Merged
Merged
Changes from 11 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
6313f15
wip wip wip
maramihali 40cedd0
styuff
maramihali c7cc936
how do I do this?
maramihali aed27df
pain
maramihali 265f248
wip that works
maramihali 44da63f
Merge branch 'master' into mm/pg-plumbing
maramihali 7ffc364
cleanup
maramihali 62df97a
Merge branch 'master' into mm/combiner-quotient
maramihali 9d1b5c6
comment test
maramihali 42ac7e2
comment test
maramihali 75221fb
Merge remote-tracking branch 'origin/master' into mm/combiner-quotient
codygunton bc63909
Add weirder test
codygunton 7d3e01b
Use clearer type names
codygunton 86963a5
pr review additions
maramihali a816c4b
Merge branch 'master' into mm/combiner-quotient
maramihali 91ca591
fix formatting
maramihali abb6ed2
add missing issue
maramihali 887d596
Merge branch 'master' into mm/combiner-quotient
maramihali 7fe6c62
extra comments
maramihali File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
barretenberg/cpp/src/barretenberg/honk/proof_system/barycentric.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import numpy as np | ||
|
||
|
||
def get_A_at_z(z, xs): | ||
result = 1 | ||
for x in xs: | ||
result *= (z - x) | ||
return result | ||
|
||
def get_A_deriv(i, xs): | ||
result = 1 | ||
xi = xs[i] | ||
for j in range(len(xs)): | ||
if j != i: | ||
result *= (xi - xs[j]) | ||
return result | ||
|
||
|
||
|
||
points = [2,3] | ||
evals = [2, 3] | ||
|
||
z = 5 | ||
|
||
result = get_A_at_z(z, points) | ||
s = 0 | ||
for i in range(len(evals)): | ||
s += evals[i] / ((z - points[i])* get_A_deriv(i, points)) | ||
result *= s | ||
print(result) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,6 +87,12 @@ def get_extended_univariates(instances, row_idx): | |
result = np.array(extend_one_entity(result)) | ||
return result | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be doing something? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wops, i just realised i introduced it here, did not realise, sorry |
||
def compute_lagrange(points): | ||
lagrange_0 = np.array([]) | ||
lagrange_1 = np.array([]) | ||
|
||
|
||
def compute_first_example(): | ||
i0 = Instance([Row(0), Row(1)]) | ||
i1 = Instance([Row(128), Row(129)]) | ||
|
@@ -104,7 +110,6 @@ def compute_first_example(): | |
accumulator += zeta_pow * relation_value | ||
zeta_pow *= zeta | ||
|
||
accumulator *= extend_one_entity([1, 2]) | ||
return accumulator | ||
|
||
|
||
|
@@ -134,7 +139,6 @@ def compute_second_example(): | |
result += rel(w_l, w_r, w_o, q_m, q_l, q_r, q_o, q_c) | ||
result *= 2 | ||
|
||
result *= extend_one_entity([1, 2]) | ||
return result | ||
|
||
if __name__ == "__main__": | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Until we handle alpha properly, this test doesn't really make sense so I decided to remove it.