Package chemaxon.clustering
Class Common
java.lang.Object
chemaxon.clustering.Common
- Direct Known Subclasses:
Compare,NearestNeighbors,Ward
Common superclass for JKlustor tools.
Click
here
for mor information.
tools.
- Since:
- JChem 1.6.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGets the number of dimensions.longGets the elapsed time.intGets chemical hashed fingerprint size.booleanIndicates whether id-s will be generated or taken from input data.longGets start time.Gets the stream used to print statistics.float[]Gets descriptor weights used for distance calculation.booleanIndicates if only statistics are produced.booleanIndicates whether statistics are produced.voidsetDimensions(int dim) Sets the number of dimensions.voidsetFpSize(int fpSize) Sets chemical hashed fingerprint size.voidsetIdGeneration(boolean b) Specifies if id-s will be generated or taken from input data.voidsetOnlyStat(boolean b) Specifies if only stastistics are to be generated.voidDirects output and statistics to a File.voidsetOutput(PrintStream ps) Directs output to a PrintStream.voidDirects output to a File.voidsetOutput(Connection con, String insertSQL) Directs output to a database table.voidsetStatNeeded(boolean b) Enables or disables statistics generation.voidsetStatStream(PrintStream pst) Sets the stream used to print statistics.voidsetWeights(float[] weights) Sets descriptor weights used for distance calculation.
-
Constructor Details
-
Common
public Common()
-
-
Method Details
-
setOutput
Directs output to a database table.- Parameters:
con- Connection opened to the databaseinsertSQL- the SQL string used for inserting results into table. See the documentation for details.- Throws:
SQLException
-
setOutput
Directs output and statistics to a File. Statisitcs can be redirected later by callingsetStatStream()- Parameters:
file- the file where statistics are directed to- Throws:
FileNotFoundException
-
setOutput
Directs output to a File.- Parameters:
fileName- the path of the output file- Throws:
FileNotFoundException
-
setOutput
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 totrue, id will be generated for each compound. Iffalse, 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 totrue, 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,falseotherwise
-
isStatNeeded
public boolean isStatNeeded()Indicates whether statistics are produced.- Returns:
true, if statistics are to be produced,falseotherwise.
-
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
nullif 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
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
Gets the stream used to print statistics.- Returns:
- the PrintStream where statistics are directed to
-