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 algorithm to compute the network coordinates #878

Merged
merged 6 commits into from
Feb 27, 2023

Conversation

samuelmanzanera
Copy link
Member

@samuelmanzanera samuelmanzanera commented Jan 31, 2023

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #159

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

TODO: need to provide more way to tests (Awaiting response from @internet-zero)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@samuelmanzanera samuelmanzanera marked this pull request as ready for review February 10, 2023 09:04
@apoorv-2204
Copy link
Contributor

rebase?

Copy link
Member

@bchamagne bchamagne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can neither approve nor deny this PR. I don't have the maths skills to read this.
I know it works when I give it an hermitian matrix, but I don't get what the matrix is in our use case.

FYI, I had to install bazel on my archlinux to make XLA compile.

mix.exs Outdated Show resolved Hide resolved
Comment on lines 73 to 83
b =
1..(matrix_size - 1)
|> Enum.map(fn i ->
excluded_first_row_tensor
|> Nx.slice([i - 1, 0], [1, i])
|> Nx.power(2)
|> Nx.sum()
end)
|> Nx.stack()
|> Nx.sum()
|> Nx.to_number()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it may be worth it to precise that that the indexes start at 0 vs 1 in the formula

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually, algorithm start indexes a 1, while programming language start indexes at 0. I guess this is a standard way of thinking.

@samuelmanzanera samuelmanzanera merged commit f17a993 into develop Feb 27, 2023
@samuelmanzanera samuelmanzanera deleted the network_patch branch February 27, 2023 10:13
tenmoves added a commit to tenmoves/archethic-node that referenced this pull request Mar 10, 2023
tenmoves added a commit to tenmoves/archethic-node that referenced this pull request Mar 17, 2023
tenmoves added a commit to tenmoves/archethic-node that referenced this pull request Mar 21, 2023
tenmoves added a commit to tenmoves/archethic-node that referenced this pull request Mar 28, 2023
tenmoves added a commit to tenmoves/archethic-node that referenced this pull request Mar 28, 2023
tenmoves added a commit to tenmoves/archethic-node that referenced this pull request Mar 28, 2023
@samuelmanzanera samuelmanzanera added API Involve API facing user feature New feature request beacon chain Involve BeaconChain and removed API Involve API facing user labels May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beacon chain Involve BeaconChain feature New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a program to compute network patch
5 participants