IterativeExtrema¶
- class IterativeExtrema(*args)¶
- Iterative minimum and maximum. - Parameters:
- dimensionint
- Dimension of the input data 
 
 - See also - Notes - This class iteratively computes the minimum and maximum over an iteratively increasing dataset without storing any data in memory. - Examples - >>> import openturns as ot >>> ot.RandomGenerator.SetSeed(0) >>> dim = 5 >>> myExtrema = ot.IterativeExtrema(dim) >>> n = ot.Normal(dim) >>> size = 50 - Increment the data one point at a time: - >>> for i in range(size): ... point = n.getRealization() ... myExtrema.increment(point) >>> print(myExtrema.getIterationNumber()) 50 >>> print(myExtrema.getMin()) [-2.4067,-2.53986,-2.29006,-3.09737,-2.18139] >>> print(myExtrema.getMax()) [3.01263,3.02799,1.85579,2.11968,1.36783] - Increment with 50 additional points simultaneously and recompute the extrema: - >>> sample = n.getSample(size) >>> myExtrema.increment(sample) >>> print(myExtrema.getIterationNumber()) 100 >>> print(myExtrema.getMin()) [-2.4067,-2.53986,-2.72106,-3.09737,-2.18139] >>> print(myExtrema.getMax()) [3.01263,3.02799,2.24097,2.11968,2.55533] - Methods - Accessor to the object's name. - Get the dimension of the algorithm - getId()- Accessor to the object's id. - Get the current iteration of the algorithm - getMax()- Returns the values of the maximum over the inputs component per component - getMin()- Returns the values of the minimum over the inputs component per component - getName()- Accessor to the object's name. - Accessor to the object's shadowed id. - Accessor to the object's visibility state. - hasName()- Test if the object is named. - Test if the object has a distinguishable name. - increment(*args)- Increment the internal data. - setName(name)- Accessor to the object's name. - setShadowedId(id)- Accessor to the object's shadowed id. - setVisibility(visible)- Accessor to the object's visibility state. - __init__(*args)¶
 - getClassName()¶
- Accessor to the object’s name. - Returns:
- class_namestr
- The object class name (object.__class__.__name__). 
 
 
 - getDimension()¶
- Get the dimension of the algorithm - Returns:
- dimensionint
- Dimension of the algorithm 
 
 
 - getId()¶
- Accessor to the object’s id. - Returns:
- idint
- Internal unique identifier. 
 
 
 - getIterationNumber()¶
- Get the current iteration of the algorithm - Returns:
- iterationint
- Current iteration of the algorithm 
 
 
 - getMax()¶
- Returns the values of the maximum over the inputs component per component - Returns:
- maxPoint
- current values of the iterative maximum. 
 
- max
 
 - getMin()¶
- Returns the values of the minimum over the inputs component per component - Returns:
- minPoint
- current values of the iterative minimum. 
 
- min
 
 - getName()¶
- Accessor to the object’s name. - Returns:
- namestr
- The name of the object. 
 
 
 - getShadowedId()¶
- Accessor to the object’s shadowed id. - Returns:
- idint
- Internal unique identifier. 
 
 
 - getVisibility()¶
- Accessor to the object’s visibility state. - Returns:
- visiblebool
- Visibility flag. 
 
 
 - hasName()¶
- Test if the object is named. - Returns:
- hasNamebool
- True if the name is not empty. 
 
 
 - hasVisibleName()¶
- Test if the object has a distinguishable name. - Returns:
- hasVisibleNamebool
- True if the name is not empty and not the default one. 
 
 
 - increment(*args)¶
- Increment the internal data. - Parameters:
- datasequence of float or 2-d sequence of float
- New input point or sample. 
 
 
 - setName(name)¶
- Accessor to the object’s name. - Parameters:
- namestr
- The name of the object. 
 
 
 - setShadowedId(id)¶
- Accessor to the object’s shadowed id. - Parameters:
- idint
- Internal unique identifier. 
 
 
 - setVisibility(visible)¶
- Accessor to the object’s visibility state. - Parameters:
- visiblebool
- Visibility flag. 
 
 
 
 OpenTURNS
      OpenTURNS
    