All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
NetworKit::Diameter Class Reference

#include <Diameter.h>

Public Member Functions

 Diameter (const Graph &G, DiameterAlgo algo=DiameterAlgo::automatic, double error=-1.f, count nSamples=0)
 
void run () override
 The generic run method which calls runImpl() and takes care of setting to the appropriate value. More...
 
std::string toString () const override
 Returns a string with the algorithm's name and its parameters, if there are any. More...
 
std::pair< count, countgetDiameter () const
 
- Public Member Functions inherited from NetworKit::Algorithm
 Algorithm ()
 Constructor to the algorithm base class. More...
 
virtual ~Algorithm ()=default
 Virtual default destructor. More...
 
bool hasFinished () const
 Indicates whether an algorithm has completed computation or not. More...
 
void assureFinished () const
 Assure that the algorithm has been run, throws a std::runtime_error otherwise. More...
 
virtual bool isParallel () const
 

Additional Inherited Members

- Protected Attributes inherited from NetworKit::Algorithm
bool hasRun
 A boolean variable indicating whether an algorithm has finished its computation or not. More...
 

Constructor & Destructor Documentation

NetworKit::Diameter::Diameter ( const Graph G,
DiameterAlgo  algo = DiameterAlgo::automatic,
double  error = -1.f,
count  nSamples = 0 
)

Member Function Documentation

std::pair< count, count > NetworKit::Diameter::getDiameter ( ) const
void NetworKit::Diameter::run ( )
overridevirtual

The generic run method which calls runImpl() and takes care of setting to the appropriate value.

Implements NetworKit::Algorithm.

std::string NetworKit::Diameter::toString ( ) const
overridevirtual

Returns a string with the algorithm's name and its parameters, if there are any.

Subclasses should override it.

Returns
The string representation of the algorithm.

Reimplemented from NetworKit::Algorithm.


The documentation for this class was generated from the following files: