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

Issue with getHeadOfTheEdge() and getTailOfTheEdge() methods #31

Open
atulpundir88 opened this issue Nov 23, 2021 · 0 comments
Open

Issue with getHeadOfTheEdge() and getTailOfTheEdge() methods #31

atulpundir88 opened this issue Nov 23, 2021 · 0 comments

Comments

@atulpundir88
Copy link

The methods - getHeadOfTheEdge() and getTailOfTheEdge() defined in ColouredGraph class do not always return the head and tail of the edge.

For example, Consider the outgoing edges for a specific vertex. The tail of all such edges should always be the specific vertex, while the head can be some other vertex. However, different behaviour can be observed.

For the below code, the expected output is not displayed.
IntSet outEdges = graph.getOutEdges(2);
System.out.println("Outgoing Edges: " + outEdges);
for(int edge: outEdges) {
System.out.println("Head: " + graph.getHeadOfTheEdge(edge));
System.out.println("Tail: " + graph.getTailOfTheEdge(edge));
System.out.println("--");
}

Output :
Outgoing Edges: {1, 3, 2, 4}
Head: 2
Tail: 1

Head: 3
Tail: 2

Head: 3
Tail: 2

Head: 2
Tail: 1

Expected: Tail should always be 2.

Link for complete test case : https://github.com/UPB-Lemming-Group/Lemming/blob/optimize_expressions/src/test/java/org/aksw/simba/lemming/metrics/single/updateDegree/TripleIssue.java
Input File used : https://github.com/UPB-Lemming-Group/Lemming/blob/optimize_expressions/src/test/resources/expressions_max_test.n3
Triple Issue.pdf

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

1 participant