java.lang.Object
org.jgrapht.alg.centers.CentersLocationAlgorithmBase<V,E>
- Type Parameters:
V- the graph vertex type.E- the graph edge type.
- All Implemented Interfaces:
CentersLocationAlgorithm<V,E>
- Direct Known Subclasses:
GonHeuristic
public abstract class CentersLocationAlgorithmBase<V,E>
extends Object
implements CentersLocationAlgorithm<V,E>
Base class for Centers Location algorithms.
This class provides implementations of utilities for Centers Location classes.
- Author:
- Jose Alejandro Cornejo-Acosta
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckGraph(Graph<V, E> graph) Checks that graph is undirected, complete, and non-emptyprotected voidrequireNotEmpty(Graph<V, E> graph) Checks that graph is not emptyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jgrapht.alg.interfaces.CentersLocationAlgorithm
getCenters
-
Constructor Details
-
CentersLocationAlgorithmBase
public CentersLocationAlgorithmBase()
-
-
Method Details
-
checkGraph
Checks that graph is undirected, complete, and non-empty- Parameters:
graph- the graph- Throws:
IllegalArgumentException- if graph is not undirectedIllegalArgumentException- if graph is not completeIllegalArgumentException- if graph contains no vertices
-
requireNotEmpty
Checks that graph is not empty- Parameters:
graph- the graph- Throws:
IllegalArgumentException- if graph contains no vertices
-