GithubHelp home page GithubHelp logo

cumbala / cluster Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 31 KB

Implementation of cluster simplification algorithm for VUT IZP course

License: GNU General Public License v3.0

CMake 0.69% Makefile 1.48% C 45.77% Python 52.06%
vut vut-fit izp

cluster's Introduction

cluster

Implementation of cluster simplification algorithm for IZP course

Building

gcc, make and valgrind are the only requirements. Linux is mandatory, because valgrind still does not have an ARM implementation and x86 version does not work on new ARM Macs even through Rosetta 2.

  1. Clone this repo
  2. cd cluster
  3. make

Valgrind

Valgrind is used to check for memory leaks. To run it, use make valgrind. To change the cluster count, add variable override make CLUSTER_COUNT=10 valgrind.

Running

Usage: ./cluster <filename> [<size>]

  • ./cluster objekty - Will print all points from objekty combined into one cluster

    Output:

    Clusters:
    cluster 0: 40[86,663] 43[747,938] 47[285,973] 49[548,422] 52[741,541] 56[44,854] 57[795,59] 61[267,375] 62[85,874] 66[125,211] 68[80,770] 72[277,272] 74[222,444] 75[28,603] 79[926,463] 83[603,68] 86[238,650] 87[149,304] 89[749,190] 93[944,835]
    
  • ./cluster objekty 20 - Will print all points from objekty spread into 20 clusters

    Output:

    Clusters:
    cluster 0: 40[86,663]
    cluster 1: 43[747,938]
    cluster 2: 47[285,973]
    cluster 3: 49[548,422]
    cluster 4: 52[741,541]
    cluster 5: 56[44,854]
    cluster 6: 57[795,59]
    cluster 7: 61[267,375]
    cluster 8: 62[85,874]
    cluster 9: 66[125,211]
    cluster 10: 68[80,770]
    cluster 11: 72[277,272]
    cluster 12: 74[222,444]
    cluster 13: 75[28,603]
    cluster 14: 79[926,463]
    cluster 15: 83[603,68]
    cluster 16: 86[238,650]
    cluster 17: 87[149,304]
    cluster 18: 89[749,190]
    cluster 19: 93[944,835]
    
  • ./cluster objekty 8 - Will print all points from objekty combined into 8 clusters

    Output:

    Clusters:
    cluster 0: 40[86,663] 56[44,854] 62[85,874] 68[80,770] 75[28,603] 86[238,650]
    cluster 1: 43[747,938]
    cluster 2: 47[285,973]
    cluster 3: 49[548,422]
    cluster 4: 52[741,541] 79[926,463]
    cluster 5: 57[795,59] 83[603,68] 89[749,190]
    cluster 6: 61[267,375] 66[125,211] 72[277,272] 74[222,444] 87[149,304]
    cluster 7: 93[944,835]
    

Testing

Tested on both merlin and eva servers. This can be built on macOS, but valgrind will not work. Most work done in CLion connected to WSL Ubuntu 20.04. You can run tests on your machine by using make test. To test with Valgrind use make test-valgrind.

cluster's People

Contributors

cumbala avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.