Giter Site home page Giter Site logo

limitedinfection's Introduction

LimitedInfection

Requires Java 1.8 Maven 3.x

LimitedInfection serves as the manager for the initial infection and spread of an "infection", or feature. It allows for deployment of new feature while maintaining consistency between coaches and students.

If A coaches B and we give A a new feature, B should also get the feature. If B also coaches C then C should also get the feature. Because the infection is transferred by both the "coaches" and "is coached by" relationship, if instead we want to give C the feature, both B and A should still also get the feature. The infection controller offers two different approaches to infection.

Assumptions: For the limitedInfection case, I prioritized maintaining consistency within a classroom. All coaches and students MUST have the same feature, or none of them should have the new feature if there is no path satisfying the limit condition.

I didn't combine multiple disjointed paths to get the best infection (closest to the given limit). My limitedInfection implementation finds the one connected path with size closest to the given limit.

To improve in the future, I could implement a subset-sum algorithm to find the best combination of starting points to find the true closest infection(s) to the limit.

How to build/run project: Go to directory limitedInfection and run mvn clean install

How to run visualization: java -jar target/limitedInfection-0.0.1-SNAPSHOT-jar-with-dependencies.jar [type_of_visualize(limited: 0, total : 1), size_of_graph, limit or start_node_index]

Limited Infection Visualize: [type_of_visualize = 0, size_of_graph, limit] Total Infection Visualize: [type_of_visualize = 1, size_of_graph, start_node_index]

e.g. java -jar target/limitedInfection-0.0.1-SNAPSHOT-jar-with-dependencies.jar 0 50 20 This will visualize a limited infection on a graph of 50 users and a limit of 20 users. e.g. java -jar target/limitedInfection-0.0.1-SNAPSHOT-jar-with-dependencies.jar 1 50 6 This will visualize a total infection on a graph of 50 users starting from user/node #6.

Red represents infected, while black represents not infected.

limitedinfection's People

Stargazers

 avatar

Watchers

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