public static class Region.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder(Region region)
Create a builder and initialize the weights from the given region.
|
Builder(RegionUtility utility)
Create a builder for the region which, for now, assigns weight 0 to everything.
|
Builder(RegionUtility utility,
java.util.List<java.math.BigInteger> backward,
java.util.List<java.math.BigInteger> forward)
Create a builder for the region with the given weights.
|
| Modifier and Type | Method and Description |
|---|---|
Region.Builder |
addLoopAround(int index,
java.math.BigInteger weight)
Add a loop with the given weight around the given event.
|
Region.Builder |
addLoopAround(java.lang.String event,
java.math.BigInteger weight)
Add a loop with the given weight around the given event.
|
Region.Builder |
addRegionWithFactor(Region region,
java.math.BigInteger factor)
Add the weights of a region with some factor applied to our current state.
|
Region.Builder |
addWeightOn(int index,
java.math.BigInteger weight)
Add some weight around the given event.
|
Region.Builder |
addWeightOn(java.lang.String event,
java.math.BigInteger weight)
Add some weight around the given event.
|
static Region |
copyRegionToUtility(RegionUtility utility,
Region region)
Create a copy of a region for a different RegionUtility.
|
static Region.Builder |
createPure(RegionUtility utility,
java.util.List<java.math.BigInteger> vector)
Create a new region builder for a pure region with the given weights.
|
Region.Builder |
makePure()
Turn this builder's weight into the weight for a normal region.
|
Region |
withInitialMarking(java.math.BigInteger initial)
Create a region from the current state of the builder and the given initial marking.
|
Region |
withNormalRegionInitialMarking()
Create a region from the current state of this builder and the initial marking that a normal region
would have.
|
public Builder(RegionUtility utility, java.util.List<java.math.BigInteger> backward, java.util.List<java.math.BigInteger> forward)
utility - The region utility that should be used.backward - The backward weights.forward - The forward weights.public Builder(RegionUtility utility)
utility - The region utility that should be used.public Builder(Region region)
region - The region to copy.public Region.Builder addWeightOn(java.lang.String event, java.math.BigInteger weight)
event - The event whose weight should be modified.weight - The weight that should be added.public Region.Builder addWeightOn(int index, java.math.BigInteger weight)
index - The event index whose weight should be modified.weight - The weight that should be added.public Region.Builder addLoopAround(java.lang.String event, java.math.BigInteger weight)
event - The event on which a loop should be added.weight - The weight that should be added.public Region.Builder addLoopAround(int index, java.math.BigInteger weight)
index - The event index on which a loop should be added.weight - The weight that should be added.public Region.Builder addRegionWithFactor(Region region, java.math.BigInteger factor)
region - The region to add.factor - The factor that should be used.public Region.Builder makePure()
public Region withInitialMarking(java.math.BigInteger initial)
initial - The initial marking of the region.public Region withNormalRegionInitialMarking()
public static Region.Builder createPure(RegionUtility utility, java.util.List<java.math.BigInteger> vector)
utility - The region utility that should be used.vector - A vector which contains the weight for each event in the order described by utility.public static Region copyRegionToUtility(RegionUtility utility, Region region)
utility - The utility to use.region - The region to copy to the given utility.java.lang.IllegalArgumentException - When the event lists are incompatible.