Package org.oristool.math.function
Class PartitionedGEN
java.lang.Object
org.oristool.math.function.PartitionedGEN
- All Implemented Interfaces:
PartitionedFunction
Multidimensional PDF on a piecewise DBM zone support.
-
Constructor Summary
ConstructorDescriptionCreates an empty PDF.PartitionedGEN
(List<GEN> functions) Creates a new piecewise PDF from a list of PDFs with DBM zone support.PartitionedGEN
(PartitionedGEN partitionedGEN) Creates a copy of the input piecewise PDF. -
Method Summary
Modifier and TypeMethodDescriptionReturns the product with another PDF, which is the product of densities over the Cartesian product of supports.cartesianProduct
(PartitionedFunction partitionedFunction) Returns the product with another partitioned function, which is the product of densities over the Cartesian product of supports.conditionToBound
(Variable v, OmegaBigDecimal min, OmegaBigDecimal max) Imposes the boundmin <= v <= max
and normalizes the density.conditionToMax
(Variable v, OmegaBigDecimal max) Imposes the boundv <= max
and normalizes the density.conditionToMin
(Variable v, OmegaBigDecimal min) Imposes the boundv >= min
and normalizes the density.void
constantShift
(BigDecimal constant) Subtracts a constant from all variables.void
constantShift
(BigDecimal constant, Collection<Variable> variables) Subtracts a constant from a set of variables.boolean
Returns the list of variables of this PDF.int
hashCode()
Integrates this PDF over the support.static PartitionedGEN
Creates an empty instance with integral equal to 1.void
Removes the input variable.void
shiftAndProject
(Variable var) Subtracts the input variable from all others and removes it.void
substitute
(Variable oldVar, Variable newVar) Replaces one variable name with another one.void
substitute
(Variable oldVar, Variable newVar, BigDecimal constant) Replaces one variable name with another one plus a constant.void
substituteAndShift
(Variable oldVar, Variable newVar, BigDecimal constant) ReplacesoldVar
withVariable.TSTAR
and makesnewVar - constant
the new ground.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.oristool.math.function.PartitionedFunction
getDensities, getDomains, getDomainsEFT, getDomainsLFT
-
Constructor Details
-
PartitionedGEN
public PartitionedGEN()Creates an empty PDF. -
PartitionedGEN
Creates a new piecewise PDF from a list of PDFs with DBM zone support.- Parameters:
functions
- PDFs with DBM zone support
-
PartitionedGEN
Creates a copy of the input piecewise PDF.- Parameters:
partitionedGEN
- input piecewise PDF
-
-
Method Details
-
newOneInstance
Creates an empty instance with integral equal to 1. This instance has empty support and density equal to 1; it can be used as neutral element in products with other PDFs.- Returns:
- an empty PDF
-
equals
-
hashCode
public int hashCode() -
getFunctions
- Specified by:
getFunctions
in interfacePartitionedFunction
-
cartesianProduct
Returns the product with another PDF, which is the product of densities over the Cartesian product of supports.- Parameters:
f
- input PDF- Returns:
- product PDF
-
cartesianProduct
Returns the product with another partitioned function, which is the product of densities over the Cartesian product of supports.- Parameters:
partitionedFunction
- input function- Returns:
- product PDF
-
conditionToMin
Imposes the boundv >= min
and normalizes the density.- Parameters:
v
- target variablemin
- minimum value- Returns:
- probability that the bound is satisfied (before normalization)
-
conditionToMax
Imposes the boundv <= max
and normalizes the density.- Parameters:
v
- target variablemax
- maximum value- Returns:
- probability that the bound is satisfied (before normalization)
-
conditionToBound
Imposes the boundmin <= v <= max
and normalizes the density.- Parameters:
v
- target variablemin
- minimum valuemax
- maximum value- Returns:
- probability that the bound is satisfied (before normalization)
-
shiftAndProject
Subtracts the input variable from all others and removes it.- Parameters:
var
- target variable
-
project
Removes the input variable.- Parameters:
var
- target variable
-
constantShift
Subtracts a constant from all variables.- Parameters:
constant
- input constant
-
constantShift
Subtracts a constant from a set of variables.- Parameters:
constant
- input constantvariables
- variables to be shifted
-
substitute
Replaces one variable name with another one.- Parameters:
oldVar
- old variable namenewVar
- new variable name
-
substitute
Replaces one variable name with another one plus a constant.- Parameters:
oldVar
- old variable namenewVar
- new variable nameconstant
- constant to add
-
substituteAndShift
ReplacesoldVar
withVariable.TSTAR
and makesnewVar - constant
the new ground.- Parameters:
oldVar
- old variable namenewVar
- new variable nameconstant
- constant to subtract from newVar
-
integrateOverDomain
Integrates this PDF over the support.The result should be 1, unless the support has been restricted without normalization.
- Returns:
- integral over the support
-
toString
-
getVariables
Returns the list of variables of this PDF.- Returns:
- list of variables (not including
Variable.TSTAR
)
-
toMathematicaString
- Specified by:
toMathematicaString
in interfacePartitionedFunction
-