Package chemaxon.descriptors
Class MDSetParameters
java.lang.Object
chemaxon.descriptors.MDSetParameters
Parameters settings for
MDSet
-s. The main purpose of this class
is the support for dissimilarity calculations over MDSet
objects.
The dissimilarity coefficient of two MDSet
objects is defined as
the weighted sum of component-wise dissimilarity coefficients. Weights of
components are stored in this class, along with the metric indices used as
default metric. This is allows by MDSet.getDissimilarity( final Object other )
perform calculations with the required metric (not only the default one).- Since:
- JChem 2.0
-
Field Summary
Modifier and TypeFieldDescriptionprotected int[]
metric index by componentprotected float[]
user data weightsprotected float[]
component weights -
Constructor Summary
ConstructorDescriptionCrates an empty object.MDSetParameters
(float[] weights, float[] userDataWeights, int[] metricIndex) Creates and initializes an object with the given weights and metric indices.MDSetParameters
(float[] weights, int[] metricIndex) Creates and initializes an object with the given weights and metric indices.MDSetParameters
(int nComponents) Creates an object of the given size.MDSetParameters
(int nComponents, int nUserData) Creates an object of the given size. -
Method Summary
Modifier and TypeMethodDescriptionint
getMetricIndex
(int index) Gets the index of the metric used by a component to calculate the dissimilarity coefficient.float
getUserDataWeight
(int index) Gets the weight of a userData component.float
getWeight
(int index) Gets the weight of a component.void
setMetricIndex
(int componentIndex, int mi) Sets the index of metric used in the dissimilarity calculation by an individual component.void
setMetricIndices
(int[] metricIndices) Sets the index of metric of components.void
setSize
(int nComponents) Sets the size, number of components of an emptyMDSetParameters
object.void
setSize
(int nComponents, int nUserData) Sets the size, number of components and number of userData values of an emptyMDSetParameters
object.void
setUserDataWeight
(int index, float w) Sets the weight of an individual user data component.void
setUserDataWeights
(float[] weights) Sets the weights for userData.void
setWeight
(int componentIndex, float w) Sets the weight of an individual component.void
setWeights
(float[] weights) Sets the weights.int
size()
Get the size of the associatedMDSet
instance.
-
Field Details
-
weights
protected float[] weightscomponent weights -
userDataWeights
protected float[] userDataWeightsuser data weights -
metricIndex
protected int[] metricIndexmetric index by component
-
-
Constructor Details
-
MDSetParameters
public MDSetParameters()Crates an empty object. -
MDSetParameters
public MDSetParameters(int nComponents) Creates an object of the given size.- Parameters:
nComponents
- number of components in theMDSet
-
MDSetParameters
public MDSetParameters(int nComponents, int nUserData) Creates an object of the given size.- Parameters:
nComponents
- number of components in theMDSet
nUserData
- number of further floating point values
-
MDSetParameters
public MDSetParameters(float[] weights, int[] metricIndex) Creates and initializes an object with the given weights and metric indices.- Parameters:
weights
- weights of every components used inMDSet.getDissimilarity( final Object other )
metricIndex
- index of metrices of components to be used inMDSet.getDissimilarity( final Object other )
-
MDSetParameters
public MDSetParameters(float[] weights, float[] userDataWeights, int[] metricIndex) Creates and initializes an object with the given weights and metric indices.- Parameters:
weights
- weights of every components used inMDSet.getDissimilarity( final Object other )
userDataWeights
- weights of every components of user datametricIndex
- index of metrices of components to be used inMDSet.getDissimilarity( final Object other )
-
-
Method Details
-
setSize
public void setSize(int nComponents) Sets the size, number of components of an emptyMDSetParameters
object.- Parameters:
nComponents
- number of components in theMDSet
-
setSize
public void setSize(int nComponents, int nUserData) Sets the size, number of components and number of userData values of an emptyMDSetParameters
object.- Parameters:
nComponents
- number of components in theMDSet
nUserData
- number of further floating point values
-
setWeights
public void setWeights(float[] weights) Sets the weights.- Parameters:
weights
- weights of every components used inMDSet.getDissimilarity( final Object other )
-
setUserDataWeights
public void setUserDataWeights(float[] weights) Sets the weights for userData.- Parameters:
weights
- weights of every components used inMDSet.getDissimilarity( final Object other )
-
setMetricIndices
public void setMetricIndices(int[] metricIndices) Sets the index of metric of components.- Parameters:
metricIndices
- index of metrices of components to be used inMDSet.getDissimilarity( final Object other )
-
setWeight
public void setWeight(int componentIndex, float w) Sets the weight of an individual component.- Parameters:
componentIndex
- index of the componentw
- the weight of this component inMDSet.getDissimilarity( final Object other )
-
setUserDataWeight
public void setUserDataWeight(int index, float w) Sets the weight of an individual user data component.- Parameters:
index
- index of the componentw
- the weight of this user data component
-
setMetricIndex
public void setMetricIndex(int componentIndex, int mi) Sets the index of metric used in the dissimilarity calculation by an individual component.- Parameters:
componentIndex
- index of the componentmi
- index of the metric of this component inMDSet.getDissimilarity( final Object other )
-
size
public int size()Get the size of the associatedMDSet
instance.- Returns:
- number of components in the
MDSet
-
getWeight
public float getWeight(int index) Gets the weight of a component.- Parameters:
index
- index of a component- Returns:
- the weight of the component
-
getUserDataWeight
public float getUserDataWeight(int index) Gets the weight of a userData component.- Parameters:
index
- index of a component- Returns:
- the weight of the component
-
getMetricIndex
public int getMetricIndex(int index) Gets the index of the metric used by a component to calculate the dissimilarity coefficient.- Parameters:
index
- index of a component- Returns:
- the index of the metric used by the specified component
-