GithubHelp home page GithubHelp logo

k-tough's Introduction

K-Tough

This is a trial for calculating the TOUGHNESS for any given graph.

Let G(V,E) be an undirected graph, t(G) denotes the toughness of G defined as:

t(G) = min{|S|/w(G-S)}

where S is any vertex seperator for G, |S| is the size of vertex seperator S, w(G) is the number of connected components of G.

##Usage

  • To compile and package the project,
sbt package
  • To submit package to spark in local mode
spark-submit --class "Toughness" --master local[4] target/scala-2.10/your-project_2.10-1.0.jar
  • To submit package to spark in stand alone cluster mode
spark-submit --class "Toughness" --master spark://cluster07:7077 your-project_2.10-1.0.jar

##Visualize We use a Python module: graph-tool to visualize graphs (<50 nodes for simplicity). http://graph-tool.skewed.de/

  • To draw a graph to a png/pdf file, use graph_draw function:
graph_draw(g, vertex_text=g.vertex_index, vertex_font_size=18, output_size=(500,500), output="example-2.png")

k-tough's People

Contributors

renqhit avatar

Stargazers

Licheng Zhang avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

k-tough's Issues

Multiple Unit Tests using one SparkContext

Multiple test shouldn't share one single SparkContext. This will cause an "Address already in use" error.

15/01/28 15:55:50 INFO slf4j.Slf4jLogger: Slf4jLogger started
15/01/28 15:55:50 INFO Remoting: Starting remoting
15/01/28 15:55:50 INFO spark.SparkEnv: Registering MapOutputTracker
15/01/28 15:55:50 INFO spark.HttpServer: Starting HTTP Server
15/01/28 15:55:51 INFO slf4j.Slf4jLogger: Slf4jLogger started
15/01/28 15:55:51 INFO Remoting: Starting remoting
15/01/28 15:55:51 INFO spark.HttpFileServer: HTTP File server directory is /tmp/spark-d9058caf-bd67-4181-961b-bfc8b1737176
15/01/28 15:55:51 INFO spark.HttpServer: Starting HTTP Server
15/01/28 15:55:51 INFO server.Server: jetty-8.1.14.v20131031
15/01/28 15:55:51 INFO server.AbstractConnector: Started [email protected]:36808
15/01/28 15:55:51 INFO util.Utils: Successfully started service 'HTTP file server' on port 36808.
15/01/28 15:55:51 INFO server.Server: jetty-8.1.14.v20131031
15/01/28 15:55:51 WARN component.AbstractLifeCycle: FAILED [email protected]:4040: java.net.BindException: Address already in use
java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:444)
    at sun.nio.ch.Net.bind(Net.java:436)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
...

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.