GithubHelp home page GithubHelp logo

twitter_connected_graph's Introduction

All code relevant to our graph algorithms are located in the graph.cpp/h files, and our test suite can be found in the tests directory. Results are outputted as BFS_results_Main, and the results of floyed warshall and influential nodes are outputted to the command line.

The graph interface has four public functions: BFSTraversal, numNodesExplored, shortest_path, and influential. Respectively, these functions return: a minimum spanning tree of the graph, the number of nodes explored in the bfs traversal, the shortest path between two nodes and the cost of that path, and the most influential node in the graph (via the Brandes angorithm [link in description]).

Our assignment can be compiled with the “make” command on the commandline, and our tests can be compiled with the “make test” command. Our program can be run with the following command: ./main <dataset> <first_n_nodes> <Name of Result .txt file> *OPTIONAL: * <Run Shortest Path? (Y or N)> <NodeA: (int)> <NodeB: (int)>

Note that the second flag can be omitted for all nodes to be explored, and ommiting the first flag runs the code on the reply network dataset

To manage time complexity of the test suite, we wrote tests on sample datasets or on our robust datasets with a limited sample of nodes. BFS was tested through the public BFSTraversal and numNodesExplored functions, the former returning a minimum spanning tree and the latter returning the number of nodes explored in the traversal (note that this is equal to the number of nodes in the graph for a connected graph. Our floyd warshall algorithm was tested through our shortest_path algorithm, which verifies that the matrix containing the distances between nodes and that the matrix containing the next node in a shortest path is initialized. Then, our shortest path algorithm can quickly find the shortest path between two nodes. Finally, our betweenness centrality algorithm was tested through our public influential function, which runs the betweenness centrality algorithm to find the most influential node in a graph.

twitter_connected_graph's People

Contributors

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