Package org.tweetyproject.math.algebra
Class BottleneckSemiring
This class represents a Bottleneck Semiring.
 In this semiring, the multiplication operation corresponds to finding the maximum of two weights,
 the addition operation corresponds to finding the minimum, 0.0 represents the
 additive identity, and Double.Positive_Infitity represents the multiplicative identity.
- Author:
- Sandra Hoffmann
- 
Constructor SummaryConstructorsConstructorDescriptionConstructs a BottleneckSemiring instance.BottleneckSemiring(double maxWeight) Constructs a BottleneckSemiring instance with a max weight.
- 
Method SummaryModifier and TypeMethodDescriptionPerforms a custom division operation on two Double values within the context of a Bottleneck Semiring.Generates a random Double element within the specified maximum value.validateAndReturn(Double value) Validates and returns the given value if valid.Methods inherited from class org.tweetyproject.math.algebra.Semiringadd, betterOrSame, getAddition, getMultiplication, getOneElement, getZeroElement, multiply, toNumericalValue
- 
Constructor Details- 
BottleneckSemiringpublic BottleneckSemiring()Constructs a BottleneckSemiring instance.
- 
BottleneckSemiringpublic BottleneckSemiring(double maxWeight) Constructs a BottleneckSemiring instance with a max weight.- Parameters:
- maxWeight- max weight
 
 
- 
- 
Method Details- 
validateAndReturnValidates and returns the given value if valid.- Overrides:
- validateAndReturnin class- Semiring<Double>
- Parameters:
- value- The value to be validated.
- Returns:
- The validated value.
- Throws:
- IllegalArgumentException- If the value is outside the valid range [0.0, maxValue].
 
- 
getRandomElementGenerates a random Double element within the specified maximum value.- Specified by:
- getRandomElementin class- Semiring<Double>
- Returns:
- A random Double element.
 
- 
dividePerforms a custom division operation on two Double values within the context of a Bottleneck Semiring. If the divisor is greater than or equal to the dividend, returns the dividend. Otherwise, returns the divisor.
 
-