Package org.xcsp.common.domains
Class Domains.DomStochastic
- java.lang.Object
-
- org.xcsp.common.domains.Domains.DomBasic
-
- org.xcsp.common.domains.Domains.DomStochastic
-
- All Implemented Interfaces:
Domains.IDom
- Enclosing class:
- Domains
public static final class Domains.DomStochastic extends Domains.DomBasic
The class for representing the domain of a stochastic variable.
-
-
Field Summary
Fields Modifier and Type Field Description Values.SimpleValue[]
probas
The probabilities associated with the values of the domain: probas[i] is the probability of values[i].-
Fields inherited from class org.xcsp.common.domains.Domains.DomBasic
values
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DomStochastic(Object[] values, Values.SimpleValue[] probas)
Builds a stochastic domain, with the specified values and the specified probabilities.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Domains.DomStochastic
parse(String s, Types.TypeVar type)
Returns the stochastic domain obtained by parsing the specified string, according to the specified type.String
toString()
-
-
-
Field Detail
-
probas
public final Values.SimpleValue[] probas
The probabilities associated with the values of the domain: probas[i] is the probability of values[i]. Probabilities can be given as rational, decimal, or integer values (only, 0 and 1 for integer).
-
-
Constructor Detail
-
DomStochastic
protected DomStochastic(Object[] values, Values.SimpleValue[] probas)
Builds a stochastic domain, with the specified values and the specified probabilities.
-
-
Method Detail
-
parse
public static Domains.DomStochastic parse(String s, Types.TypeVar type)
Returns the stochastic domain obtained by parsing the specified string, according to the specified type.
-
toString
public String toString()
- Overrides:
toString
in classDomains.DomBasic
-
-