Closed kasimirgabert closed 6 years ago
i have tried to launch ./weight_test with G_weighted.mtx a small graph and it works properly.
Sorry I don't understand this pull request. Why you added const bool allocate_coo
? is it to avoid the coo array allocation twice? in this case, I think there is a more elegant solution
Yes, it is to avoid allocating the coo array if the allocation will be the wrong size. A more elegant solution would be great; as it stands it's broken, so any solution soon would be appreciated.
Kasimir rule
Added in fixes that prevented the GraphIO GraphWeight class from working correctly. coo_t, specified in GraphStd, was being used to allocate the COO. This fix makes that allocation optional in GraphStd and the COO is then actually allocated in GraphWeight, where the size is correct. Additionally the weighted graph parsers all used _coo_size, which was not set. A simple test file was created which was used to verify that a weighted matrix market file was parsed correctly.
Prior to this fix the weight_test binary will segfault.