Skip to content

valse/pattern-recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pattern Recognition

Given a set of P feature points in the bidimensional plane, determine every line that contains at least N or more COLLINEAR points.

Graphs

Installation

Use the package manager npm to install patter-recognition.

npm install

Usage

Run the start script to launch the REST API server.

npm run start

Solution

The algorithm is not the fastest but I chosen to check the angle between each group of three points in the space to check the collinear condition:

Graphs

This is to involved array operations mainly and brush up some algebra concepts from the middle School 😆

I added comments where needed and the core file is the maths.js one: from the points collection in the space, I take the bigger combination of them until I found the longest line segment or I reach the desired minimum number of collinear points.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published