infomat.algorithms.projection
Class ProjectionSimilarity

java.lang.Object
  extended by infomat.vectorspace.similarity.ISimilarity
      extended by infomat.vectorspace.similarity.DenseISimilarity
          extended by infomat.algorithms.projection.ProjectionSimilarity
All Implemented Interfaces:
HasProperties

public class ProjectionSimilarity
extends DenseISimilarity

Similarity measure for a projected matrix representation. A dense representation.


Field Summary
private  java.util.HashMap<IObject,float[]> ioReprMap
           
 
Fields inherited from class infomat.vectorspace.similarity.ISimilarity
properties
 
Constructor Summary
ProjectionSimilarity()
           
 
Method Summary
private  void add(float[] cumulator, float[] addition)
           
 Properties getDefaultProperties()
           
 float[] getGroupRepresentation(IObjectGroup iog)
           
 java.lang.String getName()
           
 Properties getProperties()
           
 java.lang.Object getPropertyValue(java.lang.String name)
           
 float[] getRepresentation(IObject io)
           
 float[] getUnnormalizedGroupRepresentation(IObjectGroup iog)
           
private  void normalize(float[] repr)
           
 void normalizeAll()
           
protected  void put(IObject io, float[] repr)
           
 void setProperties(Properties properties)
           
 void setProperty(java.lang.String name, java.lang.Object value)
           
 float sim(float[] repr1, float[] repr2)
           
 float sim(IObjectGroup iog1, IObjectGroup iog2)
           
 float sim(IObject io1, IObject io2)
           
 float sim(IObject io, IObjectGroup iog)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ioReprMap

private java.util.HashMap<IObject,float[]> ioReprMap
Constructor Detail

ProjectionSimilarity

public ProjectionSimilarity()
Method Detail

getDefaultProperties

public Properties getDefaultProperties()

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.String name)

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
                 throws PropertyNotFoundException
Throws:
PropertyNotFoundException

getProperties

public Properties getProperties()

setProperties

public void setProperties(Properties properties)

put

protected void put(IObject io,
                   float[] repr)

sim

public float sim(IObject io1,
                 IObject io2)
Specified by:
sim in class ISimilarity

sim

public float sim(IObject io,
                 IObjectGroup iog)
Specified by:
sim in class ISimilarity

sim

public float sim(IObjectGroup iog1,
                 IObjectGroup iog2)
Specified by:
sim in class ISimilarity

sim

public float sim(float[] repr1,
                 float[] repr2)
Specified by:
sim in class DenseISimilarity

getRepresentation

public float[] getRepresentation(IObject io)
Specified by:
getRepresentation in class DenseISimilarity

normalizeAll

public void normalizeAll()

normalize

private void normalize(float[] repr)

getGroupRepresentation

public float[] getGroupRepresentation(IObjectGroup iog)
Specified by:
getGroupRepresentation in class DenseISimilarity

getUnnormalizedGroupRepresentation

public float[] getUnnormalizedGroupRepresentation(IObjectGroup iog)
Specified by:
getUnnormalizedGroupRepresentation in class DenseISimilarity

add

private void add(float[] cumulator,
                 float[] addition)

getName

public java.lang.String getName()
Specified by:
getName in class ISimilarity