- 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 Constructor Description CentersLocationAlgorithmBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckGraph(Graph<V,E> graph)Checks that graph is undirected, complete, and non-emptyprotected voidrequireNotEmpty(Graph<V,E> graph)Checks that graph is not empty-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jgrapht.alg.interfaces.CentersLocationAlgorithm
getCenters
-
-
-
-
Method Detail
-
checkGraph
protected void checkGraph(Graph<V,E> graph)
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
protected void requireNotEmpty(Graph<V,E> graph)
Checks that graph is not empty- Parameters:
graph- the graph- Throws:
IllegalArgumentException- if graph contains no vertices
-
-