Alignment API and Server 4.2.${version.update}

fr.inrialpes.exmo.align.impl
Class MatrixMeasure

java.lang.Object
  extended by fr.inrialpes.exmo.align.impl.MatrixMeasure
All Implemented Interfaces:
Similarity
Direct Known Subclasses:
InstanceBasedMatrixMeasure, JWNLAlignment.WordNetMatrixMeasure, StringDistAlignment.StringDistMatrixMeasure

public abstract class MatrixMeasure
extends Object
implements Similarity

Implements the structure needed for recording class similarity or dissimilarity within a matrix structure.

Version:
$Id: MatrixMeasure.java 1502 2010-08-16 08:13:55Z euzenat $
Author:
Jérôme Euzenat

Field Summary
 HashMap<Object,Integer> classlist1
           
 HashMap<Object,Integer> classlist2
           
 double[][] clmatrix
           
 int i
           
 HashMap<Object,Integer> indlist1
           
 HashMap<Object,Integer> indlist2
           
 double[][] indmatrix
           
 int j
           
 int l1
           
 int l2
           
 int nbclass1
           
 int nbclass2
           
 int nbind1
           
 int nbind2
           
 int nbprop1
           
 int nbprop2
           
private  NumberFormat numFormat
           
 LoadedOntology onto1
           
 LoadedOntology onto2
           
 double[][] prmatrix
           
 HashMap<Object,Integer> proplist1
           
 HashMap<Object,Integer> proplist2
           
 boolean similarity
           
 
Constructor Summary
MatrixMeasure()
           
 
Method Summary
 void compute(Properties params)
          actually computes the similarity and store it in the adequate structures
 double getClassSimilarity(Object c1, Object c2)
          Accessors to the stored similarity values
 double getIndividualSimilarity(Object i1, Object i2)
           
 double getPropertySimilarity(Object p1, Object p2)
           
 boolean getSimilarity()
          Is it a similarity or a distance?
 void initialize(LoadedOntology o1, LoadedOntology o2)
          Initialize the similarity value with various useful structures
 void initialize(LoadedOntology onto1, LoadedOntology onto2, Alignment align)
           
 void printClassSimilarityMatrix(String type)
          Printers of the obtained similarity values
 void printIndividualSimilarityMatrix(String type)
           
private  void printMatrix(int nb1, HashMap<Object,Integer> ent1, HashMap<Object,Integer> ent2, double[][] matrix)
           
 void printPropertySimilarityMatrix(String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.inrialpes.exmo.align.impl.Similarity
classMeasure, individualMeasure, propertyMeasure
 

Field Detail

similarity

public boolean similarity

onto1

public LoadedOntology onto1

onto2

public LoadedOntology onto2

nbclass1

public int nbclass1

nbclass2

public int nbclass2

nbprop1

public int nbprop1

nbprop2

public int nbprop2

nbind1

public int nbind1

nbind2

public int nbind2

i

public int i

j

public int j

l1

public int l1

l2

public int l2

classlist2

public HashMap<Object,Integer> classlist2

classlist1

public HashMap<Object,Integer> classlist1

proplist2

public HashMap<Object,Integer> proplist2

proplist1

public HashMap<Object,Integer> proplist1

indlist2

public HashMap<Object,Integer> indlist2

indlist1

public HashMap<Object,Integer> indlist1

numFormat

private NumberFormat numFormat

clmatrix

public double[][] clmatrix

prmatrix

public double[][] prmatrix

indmatrix

public double[][] indmatrix
Constructor Detail

MatrixMeasure

public MatrixMeasure()
Method Detail

initialize

public void initialize(LoadedOntology onto1,
                       LoadedOntology onto2,
                       Alignment align)
Specified by:
initialize in interface Similarity

initialize

public void initialize(LoadedOntology o1,
                       LoadedOntology o2)
Description copied from interface: Similarity
Initialize the similarity value with various useful structures

Specified by:
initialize in interface Similarity

compute

public void compute(Properties params)
Description copied from interface: Similarity
actually computes the similarity and store it in the adequate structures

Specified by:
compute in interface Similarity

getIndividualSimilarity

public double getIndividualSimilarity(Object i1,
                                      Object i2)
Specified by:
getIndividualSimilarity in interface Similarity

getClassSimilarity

public double getClassSimilarity(Object c1,
                                 Object c2)
Description copied from interface: Similarity
Accessors to the stored similarity values

Specified by:
getClassSimilarity in interface Similarity

getPropertySimilarity

public double getPropertySimilarity(Object p1,
                                    Object p2)
Specified by:
getPropertySimilarity in interface Similarity

printMatrix

private void printMatrix(int nb1,
                         HashMap<Object,Integer> ent1,
                         HashMap<Object,Integer> ent2,
                         double[][] matrix)

getSimilarity

public boolean getSimilarity()
Description copied from interface: Similarity
Is it a similarity or a distance?

Specified by:
getSimilarity in interface Similarity

printClassSimilarityMatrix

public void printClassSimilarityMatrix(String type)
Description copied from interface: Similarity
Printers of the obtained similarity values

Specified by:
printClassSimilarityMatrix in interface Similarity

printPropertySimilarityMatrix

public void printPropertySimilarityMatrix(String type)
Specified by:
printPropertySimilarityMatrix in interface Similarity

printIndividualSimilarityMatrix

public void printIndividualSimilarityMatrix(String type)
Specified by:
printIndividualSimilarityMatrix in interface Similarity

Alignment API and Server 4.2.${version.update}

(C) INRIA & friends, 2003-${curryear}