Class Common

java.lang.Object
chemaxon.clustering.Common
Direct Known Subclasses:
Compare, NearestNeighbors, Ward

@PublicApi public abstract class Common extends Object
Common superclass for JKlustor tools. Click here for mor information. tools.
Since:
JChem 1.6.2
  • Constructor Details

    • Common

      public Common()
  • Method Details

    • setOutput

      public void setOutput(Connection con, String insertSQL) throws SQLException
      Directs output to a database table.
      Parameters:
      con - Connection opened to the database
      insertSQL - the SQL string used for inserting results into table. See the documentation for details.
      Throws:
      SQLException
    • setOutput

      public void setOutput(File file) throws FileNotFoundException
      Directs output and statistics to a File. Statisitcs can be redirected later by calling setStatStream()
      Parameters:
      file - the file where statistics are directed to
      Throws:
      FileNotFoundException
    • setOutput

      public void setOutput(String fileName) throws FileNotFoundException
      Directs output to a File.
      Parameters:
      fileName - the path of the output file
      Throws:
      FileNotFoundException
    • setOutput

      public void setOutput(PrintStream ps)
      Directs output to a PrintStream.
      Parameters:
      ps - the PrintStream where the output will be directed to
    • setIdGeneration

      public void setIdGeneration(boolean b)
      Specifies if id-s will be generated or taken from input data.
      Parameters:
      b - if set to true, id will be generated for each compound. If false, the first data column will be treated as id number.
    • getIdGeneration

      public boolean getIdGeneration()
      Indicates whether id-s will be generated or taken from input data.
      Returns:
      true, if id will be generated for each compound, false, if the first data column will be treated as id number.
    • setOnlyStat

      public void setOnlyStat(boolean b)
      Specifies if only stastistics are to be generated.
      Parameters:
      b - if set to true, only statistics will be produced
    • isOnlyStat

      public boolean isOnlyStat()
      Indicates if only statistics are produced.
      Returns:
      true, if only statistics are to be produced , false otherwise
    • setStatNeeded

      public void setStatNeeded(boolean b)
      Enables or disables statistics generation.
      Parameters:
      b - true, if statistics are to be produced, false otherwise
    • isStatNeeded

      public boolean isStatNeeded()
      Indicates whether statistics are produced.
      Returns:
      true, if statistics are to be produced, false otherwise.
    • setDimensions

      public void setDimensions(int dim)
      Sets the number of dimensions.
      Parameters:
      dim - the number of dimensions (floating-point descriptors)
    • getDimensions

      public int getDimensions()
      Gets the number of dimensions.
      Returns:
      the number of dimensions (floating-point descriptors)
    • setFpSize

      public void setFpSize(int fpSize)
      Sets chemical hashed fingerprint size.
      Parameters:
      fpSize - fingerprint size in bits
    • getFpSize

      public int getFpSize()
      Gets chemical hashed fingerprint size.
      Returns:
      fingerprint size in bits
    • setWeights

      public void setWeights(float[] weights)
      Sets descriptor weights used for distance calculation.
      Parameters:
      weights - the weights of the numbers' floating-point descriptors
    • getWeights

      public float[] getWeights()
      Gets descriptor weights used for distance calculation.
      Returns:
      the descriptor weights, or null if not specified
    • getStartTime

      public long getStartTime()
      Gets start time.
      Returns:
      the start time
    • getElapsedTime

      public long getElapsedTime()
      Gets the elapsed time.
      Returns:
      the elapsed time in milliseconds since start time
    • setStatStream

      public void setStatStream(PrintStream pst)
      Sets the stream used to print statistics. By default statistics are printed to the standard output.
      Parameters:
      pst - the PrintStream, where statistics will be directed to
    • getStatStream

      public PrintStream getStatStream()
      Gets the stream used to print statistics.
      Returns:
      the PrintStream where statistics are directed to