Class AllTrainSightMechanism<U extends java.io.Serializable,I extends java.io.Serializable,P>
java.lang.Object
es.uam.eps.ir.relison.diffusion.sight.IndividualSightMechanism<U,I,P>
es.uam.eps.ir.relison.diffusion.sight.AllTrainSightMechanism<U,I,P>
- Type Parameters:
U
- type of the usersI
- type of the information piecesP
- type of the parameters
- All Implemented Interfaces:
SightMechanism<U,I,P>
public class AllTrainSightMechanism<U extends java.io.Serializable,I extends java.io.Serializable,P> extends IndividualSightMechanism<U,I,P>
Sees the pieces of information that come from training users and the user has not previously propagated.
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<U,java.util.Set<U>>
allowed
For each user, the set of users they are allowed to see information fromprivate boolean
initialized
Indicates if the selections have been initialized or not.private EdgeOrientation
orientation
Orientation for indicating whih neighbors of the user propagate the information. -
Constructor Summary
Constructors Constructor Description AllTrainSightMechanism(EdgeOrientation orient)
Constructor. -
Method Summary
Modifier and Type Method Description void
resetSelections(Data<U,I,P> data)
For each user, this method preconfigures the sight mechanism (for example, selecting a fixed set of users whom each user pays attention to).boolean
seesInformation(UserState<U> user, Data<U,I,P> data, PropagatedInformation prop)
Checks if a user sees or not a piece of information.Methods inherited from class es.uam.eps.ir.relison.diffusion.sight.IndividualSightMechanism
seesInformation
-
Field Details
-
allowed
private final java.util.Map<U extends java.io.Serializable,java.util.Set<U extends java.io.Serializable>> allowedFor each user, the set of users they are allowed to see information from -
initialized
private boolean initializedIndicates if the selections have been initialized or not. -
orientation
Orientation for indicating whih neighbors of the user propagate the information.
-
-
Constructor Details
-
AllTrainSightMechanism
Constructor.- Parameters:
orient
- orientation for indicating which neighbors of the user propagate the information.
-
-
Method Details
-
resetSelections
Description copied from interface:SightMechanism
For each user, this method preconfigures the sight mechanism (for example, selecting a fixed set of users whom each user pays attention to).- Specified by:
resetSelections
in interfaceSightMechanism<U extends java.io.Serializable,I extends java.io.Serializable,P>
- Overrides:
resetSelections
in classIndividualSightMechanism<U extends java.io.Serializable,I extends java.io.Serializable,P>
- Parameters:
data
- the simulation data.
-
seesInformation
Description copied from class:IndividualSightMechanism
Checks if a user sees or not a piece of information.- Specified by:
seesInformation
in classIndividualSightMechanism<U extends java.io.Serializable,I extends java.io.Serializable,P>
- Parameters:
user
- the user.data
- the full data.prop
- the information piece received by a user.- Returns:
- true if the user sees the piece, false if it does not.
-