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
-
Method Summary
Modifier and TypeMethodDescriptionint
Gets the number of dimensions.long
Gets the elapsed time.int
Gets chemical hashed fingerprint size.boolean
Indicates whether id-s will be generated or taken from input data.long
Gets start time.Gets the stream used to print statistics.float[]
Gets descriptor weights used for distance calculation.boolean
Indicates if only statistics are produced.boolean
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
Directs output and statistics to a File.void
setOutput
(PrintStream ps) Directs output to a PrintStream.void
Directs output to a File.void
setOutput
(Connection con, String insertSQL) Directs output to a database table.void
setStatNeeded
(boolean b) Enables or disables statistics generation.void
setStatStream
(PrintStream pst) Sets the stream used to print statistics.void
setWeights
(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,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
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
-