GithubHelp home page GithubHelp logo

flipdistance's Introduction

Introduction

This repository implements the algorithm in the An ๐’ช(3.82^k) Time FPT Algorithm for Convex Flip Distance, which was published in STACS 2023.

Building and Running

Please make sure you have cmake and a C++ compiler installed. We used Clang 11, but other compilers should work as well.

Clone or download this repository, and then go to the root directory of this project in the terminal. Run the following commands:

cmake -S . -B cmake-build-debug
cd cmake-build-debug
cmake --build .

The files generated by cmake will appear in the cmake-build-debug directory. You can run the following command to execute all unit tests.

cd cmake-build-debug
./Google_Tests_run

Project Structure

main.cpp and rand.cpp are entry points to the main program.

The triangulation folder contains classes for triangulations, binary trees, and binary strings. The TriangulatedGraph class stores triangulations and implements common operations such as flips. The BinaryTree class implements a basic binary tree, which is useful when the algorithm needs to convert a triangulation into a binary tree. BinaryString is a wrapper class for vector<bool> and facilitates conversions between different representations of a triangulation.

The algo folder contains 2 algorithms for computing flip distance: a simple breadth-first search algorithm and the FPT algorithm described in the STACS paper. The BFS algorithm is a baseline in performance tests and helps to verify the more complicated algorithm in the paper.

The tests folder contains some unit tests.

The utils folder contains a utility program that generates random triangulations.

flipdistance's People

Contributors

lihaohong6 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.