Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

test/nodeedgetest.cc question #26

Closed
Outstep opened this issue Nov 8, 2018 · 1 comment
Closed

test/nodeedgetest.cc question #26

Outstep opened this issue Nov 8, 2018 · 1 comment

Comments

@Outstep
Copy link

Outstep commented Nov 8, 2018

Hello All,

Hope that your day is going well.

I have been reviewing the "test/nodeedgetest.cc" to get an idea on how to navigate and inspect property information from one Node-A to Node-B connected via 2 edges in different directions since I want to use my NodeIterator to start on Node-A and via and "Outgoing" edge get the Node-B.Property("hash").c_str() for comparison to another hash string that I send to a function.

The idea is to have a very fast way of comparing connected node neighbors "hash" string property against one that I have to see if it is already there.

In any case, I was digging through your "nodeedgetest.cc" code and saw that you seem to have both new edges as "Outgoing" for "tag0" and "tag1"


    Graph db("nodeedgegraph", create ? Graph::Create : Graph::ReadOnly);

    Transaction tx(db, Transaction::ReadWrite);

    Node *prev = 0;
    for (int i = 1; i < argc; i++) {
        Node &n = db.add_node(0);
        if (prev != NULL) {
            db.add_edge(*prev, n, "tag0");
            db.add_edge(*prev, n, "tag1");
        }
        prev = &n;
    }

Shouldn't that be reversed for "tag1" to be:

            db.add_edge(*prev, n, "tag0");
            db.add_edge(n, *prev, "tag1");

So that one is Outgoing and one is Incoming?

I think that this "add_edge()" method is of the form

add_edge( from, to, tagID);

but I could be wrong.
Cheers :)

@Outstep
Copy link
Author

Outstep commented Nov 9, 2018

I solved this question.

When will the next set of fixes be pushed? I'm interested in seeing the PMGD with concurrency version in action when available.

Have a good weekend :)

@Outstep Outstep closed this as completed Nov 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants