Skip to content

Commit

Permalink
Merge pull request #113 from dehann/feature/subgraphcopy
Browse files Browse the repository at this point in the history
Feature/subgraphcopy
  • Loading branch information
dehann authored May 17, 2018
2 parents d0f3143 + e77499d commit 66fd363
Show file tree
Hide file tree
Showing 20 changed files with 315 additions and 74 deletions.
File renamed without changes.
36 changes: 36 additions & 0 deletions examples/database/1_subGraphCopy.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## test subLocalGRaphCopy! function of cloudgraphs

# 0. Load required packages
using Caesar


# 1. Get the authentication and session information
include(joinpath(ENV["HOME"],"Documents","blandauthlocal.jl"))
cg, addrdict = standardcloudgraphsetup(addrdict=addrdict)
addrdict["sessionId"] = "Hackathon"
addrdict["robotId"] = "PixieBot"


# 2. Create a local empty factor graph object
fg = Caesar.initfg(sessionname=addrdict["sessionId"], robotname=addrdict["robotId"], cloudgraph=cg)
# fg.stateless = true # so that we don't update local elements


# 3.a Fetch a portion of the graph
Caesar.subLocalGraphCopy!(fg, ["x1";"x3";], neighbors=1, reqbackendset=false, reqready=false)

# see what is going on
Graphs.plot(fg.g)



# ===========ALTERNATIVE========================================================

fg = Caesar.initfg(sessionname=addrdict["sessionId"], robotname=addrdict["robotId"], cloudgraph=cg)
# 3.b Or fetch the entire factor graph
Caesar.fullLocalGraphCopy!(fg, reqbackendset=false, reqready=false)




#
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 66fd363

Please sign in to comment.