Class Art2aAbstractResult
java.lang.Object
de.unijena.cheminf.clustering.art2a.abstractResult.Art2aAbstractResult
- All Implemented Interfaces:
IArt2aClusteringResult
- Direct Known Subclasses:
Art2aDoubleClusteringResult
,Art2aFloatClusteringResult
Abstract class.
This abstract class implements the IArt2aClusteringResult interface.
The interface provides methods to access clustering results.
The concrete implementation of the clustering result properties in the IArt2aClusteringResult interface
is taken over by this abstract class.
-
Constructor Summary
ConstructorDescriptionArt2aAbstractResult
(int aNumberOfEpochs, int aNumberOfDetectedClusters, int[] aClusterView, ConcurrentLinkedQueue<String> aClusteringProcessQueue, ConcurrentLinkedQueue<String> aClusteringResultQueue) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
exportClusteringResultsToTextFiles
(Writer aClusteringResultWriter, Writer aClusteringProcessWriter) The result of the clustering is additionally exported in two text files.int[]
getClusterIndices
(int aClusterNumber) Returns the input indices assigned to the given cluster.int
Returns the number of detected clusters.int
Returns the number of epochs.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.unijena.cheminf.clustering.art2a.interfaces.IArt2aClusteringResult
getAngleBetweenClusters, getClusterRepresentatives, getVigilanceParameter
-
Constructor Details
-
Art2aAbstractResult
public Art2aAbstractResult(int aNumberOfEpochs, int aNumberOfDetectedClusters, int[] aClusterView, ConcurrentLinkedQueue<String> aClusteringProcessQueue, ConcurrentLinkedQueue<String> aClusteringResultQueue) throws IllegalArgumentException Constructor.- Parameters:
aNumberOfEpochs
- final epoch number.aNumberOfDetectedClusters
- final number of detected clusters.aClusteringProcessQueue
- clustering result (process) queue of typ string. Queues are used or thread security but these here should not be used by more than one thread.aClusteringResultQueue
- clustering result queue of typ string. Queues are used or thread security but these here should not be used by more than one thread.aClusterView
- array for cluster assignment of each input vector.- Throws:
IllegalArgumentException
- is thrown, if the given arguments are invalid.
-
-
Method Details
-
getNumberOfEpochs
public int getNumberOfEpochs()Returns the number of epochs.- Specified by:
getNumberOfEpochs
in interfaceIArt2aClusteringResult
- Returns:
- int epoch number
-
getNumberOfDetectedClusters
public int getNumberOfDetectedClusters()Returns the number of detected clusters.- Specified by:
getNumberOfDetectedClusters
in interfaceIArt2aClusteringResult
- Returns:
- int detected cluster number
-
getClusterIndices
Returns the input indices assigned to the given cluster.- Specified by:
getClusterIndices
in interfaceIArt2aClusteringResult
- Parameters:
aClusterNumber
- given cluster number- Returns:
- array with the input indices for a given cluster
- Throws:
IllegalArgumentException
- is thrown if the given cluster does not exist.
-
exportClusteringResultsToTextFiles
public void exportClusteringResultsToTextFiles(Writer aClusteringResultWriter, Writer aClusteringProcessWriter) throws NullPointerException The result of the clustering is additionally exported in two text files. One of these files is a very detailed representation of the results (clustering process file), while in the other only the most important results are summarized (clustering result file). IMPORTANT: In order to additionally export the clustering results into text files, the folder must be created first. This requires the method call setUpClusteringResultTextFilePrinter(String aPathName, Class) or user own Writer and text files. This method call is optional, the folder can also be created by the user.- Specified by:
exportClusteringResultsToTextFiles
in interfaceIArt2aClusteringResult
- Parameters:
aClusteringResultWriter
- clustering result writeraClusteringProcessWriter
- clustering result (process) writer- Throws:
NullPointerException
- is thrown, if the Writers are null.- See Also:
-