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

[BUG/Feature] Light Weight Edge Support #121

Open
du00cs opened this issue Feb 27, 2017 · 0 comments
Open

[BUG/Feature] Light Weight Edge Support #121

du00cs opened this issue Feb 27, 2017 · 0 comments
Assignees

Comments

@du00cs
Copy link

du00cs commented Feb 27, 2017

The implementation now will fail if the edge is a lightweight edge. Some configuration of a lightweight flag should be introduced and traverse of edge should take it into consideration.

Some changes below seems work:

// OrientVertex.java, :65
if (fieldValue instanceof ORidBag) {
    if (graph.isLightWeightEdge()) { // light weight branch
        streamVertices.add(asStream(((ORidBag) fieldValue).rawIterator())
                .map(oIdentifiable -> new OrientVertex(graph, oIdentifiable)));
    } else { // original
        streamVertices.add(asStream(((ORidBag) fieldValue).rawIterator())
                .map(oIdentifiable -> new OrientEdge(graph, oIdentifiable.getRecord()))
                .map(edge -> edge.vertices(direction.opposite()))
                .flatMap(vertices -> asStream(vertices)));
    }
}

Any suggestion?

@wolf4ood wolf4ood self-assigned this Aug 7, 2017
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