Class Art2aAbstractResult

java.lang.Object
de.unijena.cheminf.clustering.art2a.abstractResult.Art2aAbstractResult
All Implemented Interfaces:
IArt2aClusteringResult
Direct Known Subclasses:
Art2aDoubleClusteringResult, Art2aFloatClusteringResult

public abstract class Art2aAbstractResult extends Object implements IArt2aClusteringResult
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 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 interface IArt2aClusteringResult
      Returns:
      int epoch number
    • getNumberOfDetectedClusters

      public int getNumberOfDetectedClusters()
      Returns the number of detected clusters.
      Specified by:
      getNumberOfDetectedClusters in interface IArt2aClusteringResult
      Returns:
      int detected cluster number
    • getClusterIndices

      public int[] getClusterIndices(int aClusterNumber) throws IllegalArgumentException
      Returns the input indices assigned to the given cluster.
      Specified by:
      getClusterIndices in interface IArt2aClusteringResult
      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 interface IArt2aClusteringResult
      Parameters:
      aClusteringResultWriter - clustering result writer
      aClusteringProcessWriter - clustering result (process) writer
      Throws:
      NullPointerException - is thrown, if the Writers are null.
      See Also: