Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • S sasa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • verimag
  • synchrone
  • sasa
  • Issues
  • #12
Closed
Open
Created Jul 02, 2019 by erwan@jahierOwner

Add a get_graph_attributes function to the sasa API

The idea is be able to transmit parameters to algo. For that we can take advantage of the graph attributes mechanism of dot.

For instance, one could write dot files that looks like:

 graph g {
  diameter=2
  k=42  

  p1 [algo=p.ml]
  p2 [algo=p.ml]
  p1 -- p2
}

And then access to k and to the diameter as follows:

 let (init_state: int -> 's) =
  fun _ -> 
    let diameter = int_of_string (get_graph_attributes "diameter") in
    let k = int_of_string (get_graph_attributes "k") in
    diameter+ (Random.int k)
Edited Jul 02, 2019 by erwan
Assignee
Assign to
Time tracking