|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infomat.vectorspace.similarity.ISimilarity infomat.vectorspace.similarity.SparseISimilarity infomat.vectorspace.similarity.SparseCartesianSimilarity
public class SparseCartesianSimilarity
Cartesian Similarity is the inverse of the Cartesian distance: sim = 1/dist. If the distance is zero the similarity is set to infinity.
Field Summary | |
---|---|
private IMatrix |
matrix
|
private boolean |
row
|
Fields inherited from class infomat.vectorspace.similarity.ISimilarity |
---|
properties |
Constructor Summary | |
---|---|
SparseCartesianSimilarity()
|
|
SparseCartesianSimilarity(IMatrix matrix,
boolean row)
|
|
SparseCartesianSimilarity(IMatrix matrix,
boolean row,
Properties properties)
|
|
SparseCartesianSimilarity(SparseCartesianSimilarity sim)
|
Method Summary | ||
---|---|---|
|
cartesianSquaredDistanceFromOrigo(IVector<V> vec1)
|
|
Properties |
getDefaultProperties()
|
|
IVector<IVectorIndex> |
getGroupRepresentation(IObjectGroup iog)
|
|
IMatrix |
getIMatrix()
Returns the actual IMatrix. |
|
boolean |
getIMatrixDimension()
Returns a boolean that indicates wether the algorithm should consider rows or columns of a matrix. |
|
java.lang.String |
getName()
|
|
Properties |
getProperties()
|
|
java.lang.Object |
getPropertyValue(java.lang.String name)
|
|
java.util.Vector |
getPropertyVector()
|
|
IVector<IVectorIndex> |
getRepresentation(IObject io)
Returns the representation in the form of a IVector |
|
void |
setIMatrix(IMatrix matrix)
Sets the IMatrix. |
|
void |
setIMatrixDimension(boolean row)
Sets a boolean that indicates wether the algorithm should consider rows or columns of a matrix. |
|
void |
setProperties(Properties properties)
|
|
void |
setProperty(java.lang.String name,
java.lang.Object value)
|
|
float |
sim(IObjectGroup iog1,
IObjectGroup iog2)
Calculates the similarity between two IObjectGroup:s. |
|
float |
sim(IObject io1,
IObject io2)
Calculates the similarity between two IObject:s. |
|
float |
sim(IObject io,
IObjectGroup iog)
Calculates the similarity between IObject and a IObjectGroup. |
|
|
sim(IVector<U> vec1,
IVector<V> vec2)
Calculates the similarity between two representations. |
|
|
sim(IVector<U> vec1,
IVector<V> vec2,
double sqDist)
Calculates the similarity between two representations, using the distance from origo for the second. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private IMatrix matrix
private boolean row
Constructor Detail |
---|
public SparseCartesianSimilarity()
public SparseCartesianSimilarity(SparseCartesianSimilarity sim)
public SparseCartesianSimilarity(IMatrix matrix, boolean row)
public SparseCartesianSimilarity(IMatrix matrix, boolean row, Properties properties)
Method Detail |
---|
public Properties getDefaultProperties()
getDefaultProperties
in interface HasProperties
public java.lang.String getName()
getName
in class ISimilarity
public java.util.Vector getPropertyVector()
public java.lang.Object getPropertyValue(java.lang.String name)
getPropertyValue
in interface HasProperties
public void setProperty(java.lang.String name, java.lang.Object value) throws PropertyNotFoundException
setProperty
in interface HasProperties
PropertyNotFoundException
public Properties getProperties()
getProperties
in interface HasProperties
public void setProperties(Properties properties)
setProperties
in interface HasProperties
public float sim(IObject io1, IObject io2)
sim
in class ISimilarity
public float sim(IObject io, IObjectGroup iog)
sim
in class ISimilarity
public float sim(IObjectGroup iog1, IObjectGroup iog2)
sim
in class ISimilarity
public <U extends IVectorIndex,V extends IVectorIndex> float sim(IVector<U> vec1, IVector<V> vec2)
sim
in class SparseISimilarity
public <U extends IVectorIndex,V extends IVectorIndex> float sim(IVector<U> vec1, IVector<V> vec2, double sqDist)
public <V extends IVectorIndex> double cartesianSquaredDistanceFromOrigo(IVector<V> vec1)
public IVector<IVectorIndex> getRepresentation(IObject io)
getRepresentation
in class SparseISimilarity
public IVector<IVectorIndex> getGroupRepresentation(IObjectGroup iog)
getGroupRepresentation
in class SparseISimilarity
public void setIMatrix(IMatrix matrix)
NeedsIMatrix
setIMatrix
in interface NeedsIMatrix
public IMatrix getIMatrix()
NeedsIMatrix
getIMatrix
in interface NeedsIMatrix
public void setIMatrixDimension(boolean row)
NeedsIMatrixDimension
setIMatrixDimension
in interface NeedsIMatrixDimension
public boolean getIMatrixDimension()
NeedsIMatrixDimension
getIMatrixDimension
in interface NeedsIMatrixDimension
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |