@PublicAPI public class MDSetParameters extends java.lang.Object
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).Modifier and Type | Field and Description |
---|---|
protected int[] |
metricIndex
metric index by component
|
protected float[] |
userDataWeights
user data weights
|
protected float[] |
weights
component weights
|
Constructor and Description |
---|
MDSetParameters()
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.
|
Modifier and Type | Method and 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 |
size()
Get the size of the associated
MDSet instance. |
protected float[] weights
protected float[] userDataWeights
protected int[] metricIndex
public MDSetParameters()
public MDSetParameters(int nComponents)
nComponents
- number of components in the MDSet
public MDSetParameters(int nComponents, int nUserData)
nComponents
- number of components in the MDSet
nUserData
- number of further floating point valuespublic MDSetParameters(float[] weights, int[] metricIndex)
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 )
public MDSetParameters(float[] weights, float[] userDataWeights, int[] metricIndex)
weights
- weights of every components used in
MDSet.getDissimilarity( final Object other )
userDataWeights
- weights of every components of user datametricIndex
- index of metrices of components to be used in
MDSet.getDissimilarity( final Object other )
public void setSize(int nComponents)
MDSetParameters
object.nComponents
- number of components in the MDSet
public void setSize(int nComponents, int nUserData)
MDSetParameters
object.nComponents
- number of components in the MDSet
nUserData
- number of further floating point valuespublic void setWeights(float[] weights)
weights
- weights of every components used in
MDSet.getDissimilarity( final Object other )
public void setUserDataWeights(float[] weights)
weights
- weights of every components used in
MDSet.getDissimilarity( final Object other )
public void setMetricIndices(int[] metricIndices)
metricIndices
- index of metrices of components to be used in
MDSet.getDissimilarity( final Object other )
public void setWeight(int componentIndex, float w)
componentIndex
- index of the componentw
- the weight of this component in
MDSet.getDissimilarity( final Object other )
public void setUserDataWeight(int index, float w)
index
- index of the componentw
- the weight of this user data componentpublic void setMetricIndex(int componentIndex, int mi)
componentIndex
- index of the componentmi
- index of the metric of this component in
MDSet.getDissimilarity( final Object other )
public int size()
MDSet
instance.MDSet
public float getWeight(int index)
index
- index of a componentpublic float getUserDataWeight(int index)
index
- index of a componentpublic int getMetricIndex(int index)
index
- index of a component