net.fortytwo.flow.rdf.ranking
Class RDFSpreadVector

java.lang.Object
  extended by net.fortytwo.flow.rdf.ranking.RDFSpreadVector
All Implemented Interfaces:
Approximation<WeightedVector<org.openrdf.model.Resource>,HandlerException>, WeightedVectorApproximation<org.openrdf.model.Resource,HandlerException>

public class RDFSpreadVector
extends Object
implements WeightedVectorApproximation<org.openrdf.model.Resource,HandlerException>

Author:
Joshua Shinavier (http://fortytwo.net)

Constructor Summary
RDFSpreadVector(WeightedVector<org.openrdf.model.Resource> vector, org.openrdf.model.URI[] inPredicates, org.openrdf.model.URI[] outPredicates, org.openrdf.sail.SailConnection sailConnection, org.openrdf.model.Resource... seeds)
           
 
Method Summary
 int compute(int cycles)
           
 WeightedVector<org.openrdf.model.Resource> currentResult()
           
 void stepRelated(org.openrdf.sail.SailConnection sc, org.openrdf.model.Resource resource, double weight, WeightedVector<org.openrdf.model.Resource> result, Queue<org.openrdf.model.Resource> resources)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RDFSpreadVector

public RDFSpreadVector(WeightedVector<org.openrdf.model.Resource> vector,
                       org.openrdf.model.URI[] inPredicates,
                       org.openrdf.model.URI[] outPredicates,
                       org.openrdf.sail.SailConnection sailConnection,
                       org.openrdf.model.Resource... seeds)
Method Detail

currentResult

public WeightedVector<org.openrdf.model.Resource> currentResult()
Specified by:
currentResult in interface Approximation<WeightedVector<org.openrdf.model.Resource>,HandlerException>
Specified by:
currentResult in interface WeightedVectorApproximation<org.openrdf.model.Resource,HandlerException>

compute

public int compute(int cycles)
            throws HandlerException
Specified by:
compute in interface Approximation<WeightedVector<org.openrdf.model.Resource>,HandlerException>
Parameters:
cycles - the number of cycles available
Returns:
the number of cycles actually consumed
Throws:
HandlerException

stepRelated

public void stepRelated(org.openrdf.sail.SailConnection sc,
                        org.openrdf.model.Resource resource,
                        double weight,
                        WeightedVector<org.openrdf.model.Resource> result,
                        Queue<org.openrdf.model.Resource> resources)
                 throws HandlerException
Throws:
HandlerException


Copyright © 2007-2014. All Rights Reserved.