[Networkit] Refactoring Diameter to the standard interface

Maximilian Vogel maximilian.vogel at student.kit.edu
Thu Jan 28 16:10:19 CET 2016

I refactored the Diameter class. Although it works fine so far, I still 
consider it work in progress (documentation, behaviour of the 
constructor, proper toString-method, ...). I think it's a good 
opportunity for a code review and suggestions.

Changes can be seen here:


On 27.01.2016 08:35, Henning Meyerhenke wrote:
> Christian's suggestion would also be my preference.
> HM
> Am 26.01.16 um 21:26 schrieb Christian Staudt:
>> I recommend to move towards “one class - one measure”, the network
>> analysts perspective (rather than “one class - one algorithm”, the
>> algorithm engineer’s perspective). So probably Diameter should be one
>> class and the computation that .run() performs should be selected in the
>> constructor.
>>> On 26 Jan 2016, at 11:36, Maximilian Vogel
>>> <maximilian.vogel at student.kit.edu
>>> <mailto:maximilian.vogel at student.kit.edu>> wrote:
>>> This is just a little brainstorming:
>>>    * Refactor the different implementations into private methods.
>>>      Implement some logic deciding which algorithm to use in the
>>>      constructor. The run()-method then calls the right private method.
>>>      Retrieve the result with a getter method (always!) returning a pair.
>>>    * Expanding on the previous idea: Move the different implementations
>>>      into seperate classes and implement a wrapper class for convenient
>>>      usage.
>>> Those are the two raw designs that came to my mind. The second one
>>> seems cleaner, but probably means more work.
>>> Any fundamentally different designs? What do you think?
>>> Best
>>> Max
>>> On 25.01.2016 17:58, Christian Staudt wrote:
>>>> I have a situation in which it is very inconvenient that the Diameter class does not follow the standard pattern for our analytics algorithms, with parameter initialization in the constructor and a parameter-less run method.
>>>> Since several other people either depend or work on Diameter, I’d like to discuss proposals on how to refactor. To be honest I’d also be happy if someone would volunteer to implement the refactoring.
>>>> Chris
> _______________________________________________
> NetworKit mailing list
> NetworKit at ira.uni-karlsruhe.de
> https://lists.ira.uni-karlsruhe.de/mailman/listinfo/networkit

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20160128/42a271a6/attachment.html>

More information about the NetworKit mailing list