Class MDSetParameters

java.lang.Object
chemaxon.descriptors.MDSetParameters

@PublicApi public class MDSetParameters extends Object
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

    Fields
    Modifier and Type
    Field
    Description
    protected int[]
    metric index by component
    protected float[]
    user data weights
    protected float[]
    component weights
  • Constructor Summary

    Constructors
    Constructor
    Description
    Crates 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 Type
    Method
    Description
    int
    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 empty MDSetParameters object.
    void
    setSize(int nComponents, int nUserData)
    Sets the size, number of components and number of userData values of an empty MDSetParameters 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
    Get the size of the associated MDSet instance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • weights

      protected float[] weights
      component weights
    • userDataWeights

      protected float[] userDataWeights
      user data weights
    • metricIndex

      protected int[] metricIndex
      metric 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 the MDSet
    • MDSetParameters

      public MDSetParameters(int nComponents, int nUserData)
      Creates an object of the given size.
      Parameters:
      nComponents - number of components in the MDSet
      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 in MDSet.getDissimilarity( final Object other )
      metricIndex - index of metrices of components to be used in MDSet.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 in MDSet.getDissimilarity( final Object other )
      userDataWeights - weights of every components of user data
      metricIndex - index of metrices of components to be used in MDSet.getDissimilarity( final Object other )
  • Method Details

    • setSize

      public void setSize(int nComponents)
      Sets the size, number of components of an empty MDSetParameters object.
      Parameters:
      nComponents - number of components in the MDSet
    • setSize

      public void setSize(int nComponents, int nUserData)
      Sets the size, number of components and number of userData values of an empty MDSetParameters object.
      Parameters:
      nComponents - number of components in the MDSet
      nUserData - number of further floating point values
    • setWeights

      public void setWeights(float[] weights)
      Sets the weights.
      Parameters:
      weights - weights of every components used in MDSet.getDissimilarity( final Object other )
    • setUserDataWeights

      public void setUserDataWeights(float[] weights)
      Sets the weights for userData.
      Parameters:
      weights - weights of every components used in MDSet.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 in MDSet.getDissimilarity( final Object other )
    • setWeight

      public void setWeight(int componentIndex, float w)
      Sets the weight of an individual component.
      Parameters:
      componentIndex - index of the component
      w - the weight of this component in MDSet.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 component
      w - 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 component
      mi - index of the metric of this component in MDSet.getDissimilarity( final Object other )
    • size

      public int size()
      Get the size of the associated MDSet 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