Skip to content

implement test colinearity function#21

Open
ushindikaghoma wants to merge 3 commits into
StarknetCongo:mainfrom
ushindikaghoma:main
Open

implement test colinearity function#21
ushindikaghoma wants to merge 3 commits into
StarknetCongo:mainfrom
ushindikaghoma:main

Conversation

@ushindikaghoma

Copy link
Copy Markdown

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.

@elielnfinic elielnfinic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix data types

Comment thread baby-stark/src/polynomial.rs Outdated
pub fn __xor__(self, exponent : i128) -> Polynomial {
// TBD
Polynomial::from(vec![FieldElement::new()])
fn test_colinearity(points: &[(i128, i128)]) -> bool {

Copy link
Copy Markdown
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

@elielnfinic elielnfinic left a comment

Copy link
Copy Markdown
Contributor

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