#graph #interval #interval-graph

time_varying_graph

A complex graph package for interacting with time-varying graphs. For more information you can check out https://arxiv.org/abs/1012.0009

4 releases

0.1.3 Jun 13, 2023
0.1.2 Jun 3, 2023
0.1.1 Jun 3, 2023
0.1.0 Jun 3, 2023

#1917 in Math

28 downloads per month

MIT/Apache

23KB
386 lines

time_varying_graph

Description

The main purpose of this library is to provide a simple library for interacting with time varying graphs.

Use

use time_varying_graph::tvg::{Tvg};



    let data = r#"
        {
          "nodes": [
            "Node1",
            "Node2"
          ],
          "edges": [
            {
              "from": "Node1",
              "to": "Node2",
              "start" : 0.0,
              "end" : 1.0,
              "data": null
            }
          ]
        }"#;


    // Create a time-varying graph:
    let mut time_varying_graph = Tvg::new();
    // Add data from json (recommended)
    time_varying_graph.add_edges_from_json(data.to_string());

lib.rs:

Library for creating and managing time-varying graphs, currently in the works.

Example


 use time_varying_graph::tvg::{Tvg};

 let data = r#"
       {
         "nodes": [
           "Node1",
           "Node2"
         ],
         "edges": [
           {
             "from": "Node1",
             "to": "Node2",
             "start" : 0.0,
             "end" : 1.0,
             "data": null
           }
         ]
       }"#;


// Create a time-varying graph:
let mut time_varying_graph = Tvg::new();
// Add data from json (recommended)
time_varying_graph.add_edges_from_json(data.to_string());



Dependencies

~5–12MB
~131K SLoC