QueryProcessor.Skyline.Skyset
Class Skyset

java.lang.Object
  extended by QueryProcessor.Query
      extended by QueryProcessor.Skyline.QuerySkyline
          extended by QueryProcessor.Skyline.Skyset.Skyset

public class Skyset
extends QuerySkyline

Class implementing the Sky-set algorithm for solving a Skyline query.


Field Summary
 
Fields inherited from class QueryProcessor.Query
q
 
Constructor Summary
Skyset(Image q, FeatureManager fm, SortedAccess sam)
          Basic constructor.
 
Method Summary
 boolean close()
          Deletes the previously created cursor for sorted access.
 int getDistances()
          Returns the total number of computed distances.
 SkylineResultLayer getFirstLayer()
          Computes and returns the undominated images.
 int getImageComparisonsCount()
          Returns the number of performed image comparisons.
 long getImageComparisonTime()
          Returns the time needed to compare images for domination.
 long getImageRetrievalTime()
          Returns the time spent for retrieving features from the DB.
 SkylineResultImage getNext()
          Returns the next undominated image.
 SkylineResultMultiLayer getNext(int k)
          Returns the next k images.
 SkylineResultLayer getNextLayer()
          Returns the current layer of undominated images.
 int getRandomAccessCount()
          Returns the number of performed random accesses.
 int getRandomAccessDistances()
          Returns the number of distances computed outside of the index.
 long getRandomAccessTime()
          Returns the time needed to perform random accesses.
 int getSortedAccessCount()
          Returns the number of performed sorted accesses.
 int getSortedAccessDistances()
          Returns the number of distances computed by the index.
 long getSortedAccessTime()
          Returns the time needed to perform sorted accesses.
 long getThresholdDominationTime()
          Returns the time needed to compare images for domination against the threshold image.
 long getTime()
          Returns the time needed to perform the whole algorithm.
 int getVectorComparisonsCount()
          Returns the number of performed vector comparisons.
 boolean resetDistances()
          Resets the number of computed distances.
 boolean resultExists()
          Checks whether an image that can be output as a result (i.e., not dominated by the threshold) exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Skyset

public Skyset(Image q,
              FeatureManager fm,
              SortedAccess sam)
Basic constructor.

Parameters:
q - Query image.
fm - The feature manager to be used.
sam - The sorted access manager to be used
Method Detail

close

public boolean close()
Deletes the previously created cursor for sorted access.

Returns:
true, always.

getNext

public SkylineResultImage getNext()
Returns the next undominated image.

Returns:
The next undominated image, null if no such image exist.

getNext

public SkylineResultMultiLayer getNext(int k)
Returns the next k images.

Parameters:
k - Number of requested results.
Returns:
Layers containing query results.

getNextLayer

public SkylineResultLayer getNextLayer()
Returns the current layer of undominated images.

Returns:
The current layer of undominated images.

getFirstLayer

public SkylineResultLayer getFirstLayer()
Computes and returns the undominated images.

Specified by:
getFirstLayer in class QuerySkyline
Returns:
The set of undominated images.

resultExists

public boolean resultExists()
Checks whether an image that can be output as a result (i.e., not dominated by the threshold) exists.

Returns:
true if an image exists that can be output, false otherwise.

getRandomAccessCount

public int getRandomAccessCount()
Returns the number of performed random accesses.

Returns:
The number of performed random accesses.

getSortedAccessCount

public int getSortedAccessCount()
Returns the number of performed sorted accesses.

Returns:
The number of performed sorted accesses.

getRandomAccessDistances

public int getRandomAccessDistances()
Returns the number of distances computed outside of the index.

Returns:
The number of distances computed outside of the index.

getSortedAccessDistances

public int getSortedAccessDistances()
Returns the number of distances computed by the index.

Returns:
The number of distances computed by the index.

getDistances

public int getDistances()
Returns the total number of computed distances.

Returns:
The total number of computed distances.

resetDistances

public boolean resetDistances()
Resets the number of computed distances.

Returns:
true if the count was successfully reset, false otherwise.

getImageComparisonsCount

public int getImageComparisonsCount()
Returns the number of performed image comparisons.

Returns:
The number of performed image comparisons.

getVectorComparisonsCount

public int getVectorComparisonsCount()
Returns the number of performed vector comparisons.

Returns:
The number of performed vector comparisons.

getImageRetrievalTime

public long getImageRetrievalTime()
Returns the time spent for retrieving features from the DB.

Returns:
The time spent for retrieving features from the DB (in milliseconds).

getSortedAccessTime

public long getSortedAccessTime()
Returns the time needed to perform sorted accesses.

Returns:
The time needed to perform sorted accesses (in milliseconds).

getRandomAccessTime

public long getRandomAccessTime()
Returns the time needed to perform random accesses.

Returns:
The time needed to perform random accesses (in milliseconds).

getImageComparisonTime

public long getImageComparisonTime()
Returns the time needed to compare images for domination.

Returns:
The time needed to compare images for domination (in milliseconds).

getThresholdDominationTime

public long getThresholdDominationTime()
Returns the time needed to compare images for domination against the threshold image.

Returns:
The time needed to compare images for domination against the threshold image (in milliseconds).

getTime

public long getTime()
Returns the time needed to perform the whole algorithm.

Returns:
The time needed to perform the whole algorithm (in milliseconds).