Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generators for graphs? #26

Closed
gsvgit opened this issue May 22, 2019 · 2 comments
Closed

Generators for graphs? #26

gsvgit opened this issue May 22, 2019 · 2 comments

Comments

@gsvgit
Copy link
Collaborator

gsvgit commented May 22, 2019

Should we store graphs? I think that for synthetic graphs (worst case, sparse-to-full) we should create generators. Also, I think that for real-world data we should provide converters to our format, instead of converted graphs storing.

@ciromdrs
Copy link

ciromdrs commented Jun 5, 2019

In our implementation (https://gitlab.com/ciromoraismedeiros/rdf-ccfpq) we use python functions for generating synthetic graphs. Here's a sample for generating complete graphs (n is the number of vertices):

def new_complete_graph(n, predicates): 
    graph = Graph()
    for i in range(1,n+1):
        s = str(i)
        for p in predicates:
            for j in range(1,n+1):
                o = str(j)
                graph.add(s,p,o)
    return graph

Is that what you are looking for?

As for the data format, I believe we should make our implementations able to read any RDF format.
That is easily achievable in Python with RDFLib (https://pypi.org/project/rdflib/).

gsvgit added a commit that referenced this issue Jul 12, 2019
Generators for graphs (issue #26). Graphs and query for May Alias analysis (issue #25)
@gsvgit
Copy link
Collaborator Author

gsvgit commented Nov 19, 2019

Done. Now we use generators for synthetic graphs.

@gsvgit gsvgit closed this as completed Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants