Class InducedIdleEventNode.IdScope
java.lang.Object
com.dna.jopt.member.unit.node.event.InducedIdleEventNode.IdScope
- Enclosing class:
- InducedIdleEventNode
The numbers of the
InducedIdleEventNodes created in one task of a parallel step, for
example one task of a generation of the genetic evolution. A scope takes one number of the
sequence when it is created. A node created on a thread inside the scope gets the number of
the scope and its count in the scope, so its ID does not depend on the other tasks or
on the threads that run them. Scopes created in a fixed order, for example per task before the
tasks run, give the same IDs in every run with the same seed.-
Method Summary
Modifier and TypeMethodDescriptionvoidbegin()Makes this scope the scope of the current thread untilend()is called.static InducedIdleEventNode.IdScopecreate()Creates a scope with the next number of the sequence.static voidend()Ends the scope of the current thread.
-
Method Details
-
create
Creates a scope with the next number of the sequence.- Returns:
- the scope
-
begin
public void begin()Makes this scope the scope of the current thread untilend()is called. -
end
public static void end()Ends the scope of the current thread.
-