pouyaesm/signed-community-detection

Number of partitions not aligning with the number of nodes

piinshiuan opened this issue · 1 comments

I've encountered an issue while using the program where it fails to execute properly with specific datasets.
Example 1:
For instance, consider the following dataset:

1	4	1
1	5	1
2	4	-1
3	4	-1
4	6	-1

Running the program with this dataset triggers an "index out of range" error. After reviewing the code, I suspect this error might be due to the number of partitions not aligning with the number of nodes.
Example 2:
Similarly, when utilizing a dataset with all edges being negative, such as:

1	4	-1
2	4	-1
3	4	-1

The program throws the following error: java.lang.NegativeArraySizeException: -2147483647.

I believe addressing these issues would enhance the robustness of the program. Any guidance or suggestions on resolving these problems would be greatly appreciated. Thank you!

I've encountered an issue while using the program where it fails to execute properly with specific datasets. Example 1: For instance, consider the following dataset:

1	4	1
1	5	1
2	4	-1
3	4	-1
4	6	-1

Running the program with this dataset triggers an "index out of range" error. After reviewing the code, I suspect this error might be due to the number of partitions not aligning with the number of nodes. Example 2: Similarly, when utilizing a dataset with all edges being negative, such as:

1	4	-1
2	4	-1
3	4	-1

The program throws the following error: java.lang.NegativeArraySizeException: -2147483647.

I believe addressing these issues would enhance the robustness of the program. Any guidance or suggestions on resolving these problems would be greatly appreciated. Thank you!

Thank you for reaching out. Both edge cases are now fixed and added to tests.