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

implement test colinearity function #21

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ushindikaghoma
Copy link

This function takes a reference to a slice of tuples, where each tuple represents a point with an x and y coordinate. It then extracts the x and y coordinates into separate vectors, and uses those to interpolate a polynomial. If the degree of the polynomial is less than or equal to 1, the function returns true, indicating that the points are collinear. Otherwise, it returns false.

Copy link
Contributor

@elielnfinic elielnfinic left a comment

Choose a reason for hiding this comment

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

Fix data types

pub fn __xor__(self, exponent : i128) -> Polynomial {
// TBD
Polynomial::from(vec![FieldElement::new()])
fn test_colinearity(points: &[(i128, i128)]) -> bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

Points should be of type FieldElement

Copy link
Contributor

@elielnfinic elielnfinic left a comment

Choose a reason for hiding this comment

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

Veuillez fixer le type de votre array &[FieldElement].

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.

2 participants