|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectro.mosc.reco.algebra.Algebra
public class Algebra
Universal algebra class.
Field Summary | |
---|---|
protected java.util.List<Relation> |
relatios
|
protected Signature |
signature
|
protected java.util.Map<java.lang.Class,java.util.List> |
supportSets
|
Constructor Summary | |
---|---|
Algebra(Signature signature)
|
Method Summary | |
---|---|
void |
addElementsInRelation(java.lang.String relationName,
java.lang.Object[] elements,
double relationValue)
Add elements to algebra. |
void |
addElementToAlgebra(java.lang.Object element)
Algebra signature should contain element's type . If there is no RelationResolver associated to all relation containing element's type in signature, use another method to add elements to algebra. the RelationResolver will be used to compute relation's confidence factor for each relation containing element's type in it's signature. |
private void |
addRelation(Relation relation)
|
private double |
getCharacteristicPredicateValue(RelationSignature signature,
java.lang.Object[] elements)
Get characteristicPredicateValue for a given relation signature and some elements |
java.lang.Object[] |
getMappedElements(Relation relation,
java.util.Map mapping)
Return a list of elements coresponding to a list of given elements, translated by given mapping. |
double |
isIsomorphism(Algebra algebra,
java.util.Map mapping,
double threshold)
|
Isomorphism |
isomorphism(Algebra algebra)
|
private java.lang.Object[] |
recursievlyCreateMapping(int k,
int[][] positions,
Algebra algebra)
Recursivelty generates all possible mappings. |
private void |
recursievlyEnumerateAllElements(RelationSignature relationSignature,
java.lang.Object element,
int[] positions,
int k,
int fitPosition)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Map<java.lang.Class,java.util.List> supportSets
protected java.util.List<Relation> relatios
protected Signature signature
Constructor Detail |
---|
public Algebra(Signature signature)
Method Detail |
---|
public void addElementToAlgebra(java.lang.Object element) throws RelationResolverException, SortNotSupported
element
- the element to add to the algebra.
RelationResolverException
- if can not find a resolver
for each relation heaving element's class in it's signature.
SortNotSupported
private void recursievlyEnumerateAllElements(RelationSignature relationSignature, java.lang.Object element, int[] positions, int k, int fitPosition)
private void addRelation(Relation relation)
public void addElementsInRelation(java.lang.String relationName, java.lang.Object[] elements, double relationValue)
relationName
- name of the relation.elements
- a list of elements.relationValue
- confidence factor.public Isomorphism isomorphism(Algebra algebra) throws NoIsomorphismsException
NoIsomorphismsException
private java.lang.Object[] recursievlyCreateMapping(int k, int[][] positions, Algebra algebra)
k
- the index of the currently permutated sort.positions
- and array of permutation indices (the isomorphism mapping as an array of ints)algebra
- the target (isomorphic) algebra.
public double isIsomorphism(Algebra algebra, java.util.Map mapping, double threshold)
algebra
- an algebramapping
- a mappingthreshold
- 0 means exact isomorphism, 1 means any mapping.
private double getCharacteristicPredicateValue(RelationSignature signature, java.lang.Object[] elements)
signature
- elements
-
public java.lang.Object[] getMappedElements(Relation relation, java.util.Map mapping)
relation
- mapping
- a mapping from source objects (hashCode) - to destination objects
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |