Giter VIP home page Giter VIP logo

rucgraph's Introduction

rucgraph

This is a library of cpp header files mainly used for performing graph computing tasks. Here is a Table of Contents. Some other descriptions can be found on this page. Welcome to joining the development of rucgraph by pulling requests! (Contact: [email protected])

drawing

How to use rucgraph

Normally, there is an example in each header file to explain how to use the codes in this file. If there is not, you can add a mark, e.g., "/*an example is needed*/", in the end of this file, and then pull a request. I will add an example ASAP.

You can download the whole repository into a rucgraph folder, and add the path of this folder when compiling cpp codes.

An example of using rucgraph on a Linux server

  1. Download the whole rucgraph folder, and save it on the server, e.g., the path of the saved folder is "root/rucgraph".

  2. Given a cpp file named as "try.cpp", the contents in which are

using namespace std;

#include <data_structures/PairingHeapYS_with_offset.h>

int main()
{
	example_PairingHeapYS_with_offset();
}

, where "PairingHeapYS_with_offset.h" is a header file in rucgraph. In the terminal, compile and run the above codes using the following commands:

g++ -std=c++17 -I/root/rucgraph try.cpp a.out
./a.out

, where "-I/root/rucgraph" is to add the path of the rucgraph folder when compiling. Then, you successfully run an example application of an augmented pairing heap, detailed in "PairingHeapYS_with_offset.h".

An example of using both boost and rucgraph on a Linux server

Some header files in rucgraph require the Boost library. To use these files, it is required to download the Boost library as well. For example, given a cpp file named as "try.cpp", the contents in which are

#include <graph_v_of_v_idealID/common_algorithms/graph_v_of_v_idealID_shortest_paths.h>

int main()
{
	test_graph_v_of_v_idealID_shortest_paths();
}

In the terminal, compile and run the above codes using the following commands:

g++ -std=c++17 -I/home/boost_1_75_0 -I/root/rucgraph try.cpp -o a.out
./a.out

, where "-I/home/boost_1_75_0" is to add the path of the boost folder when compiling. Then, you successfully run a test of finding shortest paths in a graph, detailed in "graph_v_of_v_idealID_shortest_paths.h".


Highlights

A Pairing Heap that can change all keys in O(1) time

rucgraph contains an augmented Pairing Heap that can change all keys in O(1) time! It achieves this by associating an offset value with each node in the heap. To use this heap, include the following header file in your codes.

#include <data_structures/PairingHeapYS_with_offset.h>

Notes for updating files.

  1. It is preferable to add an example in the front or end of each h file, for describing how to use the codes in the file.
  2. The recorded codes, except those in the build_in_progress folder, should be as stable as possible.

rucgraph's People

Contributors

rucdatascience avatar anthonyd77 avatar wzrrr1016 avatar theroadqaq avatar jacklee2111 avatar liqy020130 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.