Class SimulationState<U extends java.io.Serializable,I extends java.io.Serializable,P>
java.lang.Object
es.uam.eps.ir.relison.diffusion.simulation.SimulationState<U,I,P>
- Type Parameters:
U
- Type of the users.I
- type of the information pieces.P
- type of the parameter values.
public class SimulationState<U extends java.io.Serializable,I extends java.io.Serializable,P>
extends java.lang.Object
Stores the current state of a simulation.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description SimulationState()
-
Method Summary
Modifier and Type Method Description void
clear()
Clears the structures for a new simulation.java.util.stream.Stream<UserState<U>>
getAllUsers()
Gets the state of all users.UserState<U>
getUser(U u)
Obtains the state of the user.void
initialize(Data<U,I,P> data)
Initializes the different structures for the simulation.
-
Field Details
-
Constructor Details
-
SimulationState
public SimulationState()
-
-
Method Details
-
clear
public void clear()Clears the structures for a new simulation. -
initialize
Initializes the different structures for the simulation.- Parameters:
data
- the simulation data.
-
getUser
Obtains the state of the user.- Parameters:
u
- the user.- Returns:
- the state of the user.
-
getAllUsers
Gets the state of all users.- Returns:
- the state of all users.
-