Class DistanceTwoIndividualSampler<U>
java.lang.Object
es.uam.eps.ir.relison.links.data.letor.sampling.AbstractIndividualSampler<U>
es.uam.eps.ir.relison.links.data.letor.sampling.DistanceTwoIndividualSampler<U>
- Type Parameters:
U
- Type of the users.
- All Implemented Interfaces:
IndividualSampler<U>
public class DistanceTwoIndividualSampler<U> extends AbstractIndividualSampler<U>
Samples the complete set of users at distance two from the user
-
Field Summary
Fields Modifier and Type Field Description private EdgeOrientation
uSel
Edge orientation for the neighbors of the origin node.private EdgeOrientation
vSel
Edge orientation for the neighbors of the destination nodes.Fields inherited from class es.uam.eps.ir.relison.links.data.letor.sampling.AbstractIndividualSampler
graph
-
Constructor Summary
Constructors Constructor Description DistanceTwoIndividualSampler(Graph<U> graph, EdgeOrientation uSel, EdgeOrientation vSel)
Constructor. -
Method Summary
Modifier and Type Method Description java.util.Set<U>
sampleUsers(U u, java.util.function.Predicate<U> filter)
Given a user, obtains the sample.
-
Field Details
-
Constructor Details
-
DistanceTwoIndividualSampler
Constructor.- Parameters:
graph
- the graph.uSel
- edge orientation for the neighbors of the origin node.vSel
- edge orientation for the neighbors of the selected nodes.
-
-
Method Details
-
sampleUsers
Description copied from interface:IndividualSampler
Given a user, obtains the sample.- Parameters:
u
- the parameter.filter
- a filter for the sample- Returns:
- the set of sampled users, with their relevance / weight.
-