ControlCore-Project / concore-editor

The concore Editor
http://controlcore-project.github.io/concore-editor
BSD 3-Clause "New" or "Revised" License
9 stars 19 forks source link

Multiple edges with same name and same source, destination pairs #90

Open parteekcoder opened 1 year ago

parteekcoder commented 1 year ago

Are Multiple edges with same names are allowed?

Screenshot_20230220_203905

pradeeban commented 1 year ago

Are Multiple edges with same names are allowed? Yes, when that is a hyperedge. An edge that connects the same source with multiple destinations.

You won't be able to make an edge with the same name (CU) from XZ to PZ, though, as that is not a hyperedge.

DHGWorkflow (the parent of concore editor) is a directed hypergraph editor. https://github.com/NISYSLAB/DHGWorkflow/

It's a feature!

In concore, we allow connecting two nodes with multiple edges and multiple destination nodes with the same hyperedge from the same source.

But, in your example, you are connecting the same source-destination pair with multiple identical edges. Is that needed? That is more of a research question on the use cases of concore. I keep the question open for a while.

parteekcoder commented 1 year ago

Are Multiple edges with same names are allowed? Yes, when that is a hyperedge. An edge that connects the same source with multiple destinations.

You won't be able to make an edge with the same name (CU) from XZ to PZ, though, as that is not a hyperedge.

DHGWorkflow (the parent of concore editor) is a directed hypergraph editor. https://github.com/NISYSLAB/DHGWorkflow/

It's a feature!

In concore, we allow connecting two nodes with multiple edges and multiple destination nodes with the same hyperedge from the same source.

But, in your example, you are connecting the same source-destination pair with multiple identical edges. Is that needed? That is more of a research question on the use cases of concore. I keep the question open for a while.

ok @pradeeban thanks for clarification , In my perspective identical edges between same nodes are not required

But Once it is confirmed please tell me

pradeeban commented 1 year ago

Yes.

In concore, the representation goes: edge = (source, [destination]).

So, these two cases are actual use cases. case 1 (a hyperedge): abc = (A, [B, C])

case 2 (two edges between a pair of nodes): ab1 = (A, B) ab2 = (A, B)

But the case you have shown is, case 3: ab = (A, [B, B])

I will confirm and either close this question (if the above case 3 is valid) or convert this into a bug (if the case 3 is invalid and should be prevented).

parteekcoder commented 1 year ago

hi @pradeeban have you confirmed this Question

pradeeban commented 1 year ago

The above scenario as depicted in the screenshot should not exist. ab = (A, [B, B])

parteekcoder commented 1 year ago

The above scenario as depicted in the screenshot should not exist. ab = (A, [B, B])

so can you please assign me, I will make an PR shortly to solve this

Thanks @pradeeban for clarification

parteekcoder commented 1 year ago

@pradeeban can this be the case

A and B nodes

A to B with edge parteek B to A with edge parteek

pradeeban commented 1 year ago

No, that is a simple loop with the same name for the edges. Not supported in concore. If you try it now, it will throw the message, "Edge with same label exists." (That is the correct behavior).

pradeeban commented 1 year ago

Please make sure the PR should not mistakenly open up to allow more cases. We support a subset of hyperedges and avoid the rest.

edge = (source, [destination]) is allowed. edge = ([source], destination) is not allowed. edge = ([source], [destination]) is not allowed. edge = source -> mid-node -> destination is not allowed.

The above cases are implemented correctly.

parteekcoder commented 1 year ago

Please make sure the PR should not mistakenly open up to allow more cases. We support a subset of hyperedges and avoid the rest.

edge = (source, [destination]) is allowed. edge = ([source], destination) is not allowed. edge = ([source], [destination]) is not allowed. edge = source -> mid-node -> destination is not allowed.

The above cases are implemented correctly.

OK please give some time , as i was working in issue #92 I will solve it as early as possible

pradeeban commented 1 year ago

No worries. Take your time.

These are good to fix. But not as urgent.

parteekcoder commented 1 year ago

Please make sure the PR should not mistakenly open up to allow more cases. We support a subset of hyperedges and avoid the rest.

edge = (source, [destination]) is allowed. edge = ([source], destination) is not allowed. edge = ([source], [destination]) is not allowed. edge = source -> mid-node -> destination is not allowed.

The above cases are implemented correctly.

hey @pradeeban can you please give me some clearity betweeb case 1 and 3

Please tell me if I am right: Case 1: There can be edges with same label from a single source node to multiple nodes Case 3: It means there can't be duplicate(same label) edges

How these 2 can occur simultaneously ,please correct me if I am wrong

pradeeban commented 1 year ago

Case 1 is a typical hyperedge (you can Google it). One edge connecting more than 2 nodes.

Case 3 is just creating identical edges twice with the same label. It is meaningless/duplicate and should not be allowed.

pradeeban commented 1 year ago

Your screenshot is case 3 and shouldn't be allowed. (Not a critical issue. You can leave it as is, if in doubt, for now.)