aicenter / ShoDi

0 stars 0 forks source link

Add a precision parametr to csv input #5

Closed F-I-D-O closed 4 years ago

F-I-D-O commented 4 years ago

the parameter is present in other methods/input formats

neumannjan commented 4 years ago

I don't really see where the parameter is specified. Is it on the command line? The command line arguments are identical regardless of the input type (it is just a different Loader class that is used for data loading, and all of them only take string inputFile as constructor input - please see here, here and here).

Maybe the parameter is contained in the input files themselves?

F-I-D-O commented 4 years ago

I checked that and it appears that the precision can be set when importing the Geojson graph to xengraph format. The same should be possible in the C++ processor part for the adjacency matrix, or for all input types.

neumannjan commented 4 years ago

Does this mean we want to support floating point weights by rounding them based on this precision parameter?

neumannjan commented 4 years ago

Added in e1a1de8. I hope this is what you imagined. This line is the core of the change. Each weight is simply divided by the provided (optional) integer parameter.

F-I-D-O commented 4 years ago

Ok, it looks like a correct implementation.