rUniformTriangle¶
- rUniformTriangle(*args)¶
Realization of a uniform distribution over a triangle.
- Parameters:
- asequence of float, in
The first vertex of the triangle.
- bsequence of float, in
The second vertex of the triangle.
- csequence of float, in
The third vertex of the triangle.
- sizeint
The number of realizations to generate.
- Returns:
- realizationsfloat or sequence of float
The realizations of the distribution.
Notes
This method samples the barycentric coordinates, allowing to work in any dimension.
Examples
>>> import openturns as ot >>> ot.RandomGenerator.SetSeed(0) >>> a = [1, 5] >>> b = [2, 3] >>> c = [-1, 2] >>> r = ot.DistFunc.rUniformTriangle(a, b, c) >>> r = ot.DistFunc.rUniformTriangle(a, b, c, 10)