chemaxon.clustering
Class Common

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

public abstract class Common
extends java.lang.Object

Common superclass for JKlustor tools. Click here for mor information. tools.

Since:
JChem 1.6.2
Author:
Szilard Dorant

Constructor Summary
Common()
           
 
Method Summary
 int getDimensions()
          Gets the number of dimensions.
 long getElapsedTime()
          Gets the elapsed time.
 int getFpSize()
          Gets chemical hashed fingerprint size.
 boolean getIdGeneration()
          Indicates whether id-s will be generated or taken from input data.
 long getStartTime()
          Gets start time.
 java.io.PrintStream getStatStream()
          Gets the stream used to print statistics.
 float[] getWeights()
          Gets descriptor weights used for distance calculation.
 boolean isOnlyStat()
          Indicates if only statistics are produced.
 boolean isStatNeeded()
          Indicates whether statistics are produced.
 void setDimensions(int dim)
          Sets the number of dimensions.
 void setFpSize(int fpSize)
          Sets chemical hashed fingerprint size.
 void setIdGeneration(boolean b)
          Specifies if id-s will be generated or taken from input data.
 void setOnlyStat(boolean b)
          Specifies if only stastistics are to be generated.
 void setOutput(java.sql.Connection con, java.lang.String insertSQL)
          Directs output to a database table.
 void setOutput(java.io.File file)
          Directs output and statistics to a File.
 void setOutput(java.io.PrintStream ps)
          Directs output to a PrintStream.
 void setOutput(java.lang.String fileName)
          Directs output to a File.
 void setStatNeeded(boolean b)
          Enables or disables statistics generation.
 void setStatStream(java.io.PrintStream pst)
          Sets the stream used to print statistics.
 void setWeights(float[] weights)
          Sets descriptor weights used for distance calculation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Common

public Common()
Method Detail

setOutput

public void setOutput(java.sql.Connection con,
                      java.lang.String insertSQL)
               throws java.sql.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:
java.sql.SQLException

setOutput

public void setOutput(java.io.File file)
               throws java.io.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:
java.io.FileNotFoundException

setOutput

public void setOutput(java.lang.String fileName)
               throws java.io.FileNotFoundException
Directs output to a File.

Parameters:
fileName - the path of the output file
Throws:
java.io.FileNotFoundException

setOutput

public void setOutput(java.io.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(java.io.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 java.io.PrintStream getStatStream()
Gets the stream used to print statistics.

Returns:
the PrintStream where statistics are directed to