|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectit.unimo.dbgroup.momis.tools.DistanceMap
it.unimo.dbgroup.momis.tools.DistanceMapSymmetrical
Symmetric Index container for Distance objects.
This class has been designed to handle Distances between objects
and provides several ways to retrieve distances.
In this implementation distances are considered symmetrically.
This means that d(a,b, 10) and (b,a, 20) are considered identical
and mutually over-writing
(the one replace the other in this indexing structure);
This choice allows handling of not directed graphs.
This class is based on a asymmetric DistanceMap class
| Field Summary |
| Fields inherited from class it.unimo.dbgroup.momis.tools.DistanceMap |
|
| Constructor Summary | |
DistanceMapSymmetrical()
Indexes a set of Distance objects. |
|
DistanceMapSymmetrical(Distance[] distances)
Indexes a set of Distance objects. |
|
DistanceMapSymmetrical(DistanceMap oldMap,
java.util.Set preserve)
Clonation method with filter. |
|
DistanceMapSymmetrical(DistanceMapSymmetrical oldMap)
Clonation method. |
|
| Method Summary | |
void |
delete(java.lang.Object src,
java.lang.Object dst)
Removes from the indexing structure all distances from the given src and the given dst. |
Distance |
get(java.lang.Object src,
java.lang.Object dst)
Given source and destination object returns the Distance object between them . |
static void |
main(java.lang.String[] args)
Routine used to test the class. |
void |
put(Distance distance)
Add a distance object in the indexing structure. If a distance between the given elements already exists, it is substituted whith the new object. |
| Methods inherited from class it.unimo.dbgroup.momis.tools.DistanceMap |
delete, getAllDistances, getEndingIn, getRelatedTo, getSetOfDestinationElements, getSetOfDistances, getSetOfElements, getSetOfSourceElements, getStartingFrom, putArray, putArrayRestricted, toString, toStringTable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DistanceMapSymmetrical()
public DistanceMapSymmetrical(Distance[] distances)
distances - Distance instance to be indexed.public DistanceMapSymmetrical(DistanceMapSymmetrical oldMap)
public DistanceMapSymmetrical(DistanceMap oldMap,
java.util.Set preserve)
oldMap - the DistanceMap to copy from.preserve - the list of element to preserve.| Method Detail |
public void put(Distance distance)
put in class DistanceMapdistance - The distance element to add to this indexing
structure
public Distance get(java.lang.Object src,
java.lang.Object dst)
get in class DistanceMap
public void delete(java.lang.Object src,
java.lang.Object dst)
delete in class DistanceMappublic static void main(java.lang.String[] args)
Tests the tools.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||