RegularGridEnclosingSimplex

class RegularGridEnclosingSimplex(*args)

Specialized point location algorithm on RegularGrid.

Available constructors:
RegularGridEnclosingSimplex(regularGrid)
Parameters:
regularGrid : RegularGrid

Points

Examples

>>> import openturns as ot
>>> grid = ot.RegularGrid(0, 0.1, 20)
>>> locator = ot.RegularGridEnclosingSimplex(grid)
>>> simplex = locator.query([0.12])

Methods

getClassName() Accessor to the object’s name.
getId() Accessor to the object’s id.
getName() Accessor to the object’s name.
getShadowedId() Accessor to the object’s shadowed id.
getSimplices() Collection of simplex accessor.
getVertices() Collection of vertices accessor.
getVisibility() Accessor to the object’s visibility state.
hasName() Test if the object is named.
hasVisibleName() Test if the object has a distinguishable name.
query(*args) Get the index of the enclosing simplex of the given point.
queryScalar(*args) Accessor to the enclosing simplex index.
setName(name) Accessor to the object’s name.
setShadowedId(id) Accessor to the object’s shadowed id.
setVerticesAndSimplices(vertices, simplices) Rebuild a new data structure for these vertices and simplices.
setVisibility(visible) Accessor to the object’s visibility state.
__init__(*args)

Initialize self. See help(type(self)) for accurate signature.

getClassName()

Accessor to the object’s name.

Returns:
class_name : str

The object class name (object.__class__.__name__).

getId()

Accessor to the object’s id.

Returns:
id : int

Internal unique identifier.

getName()

Accessor to the object’s name.

Returns:
name : str

The name of the object.

getShadowedId()

Accessor to the object’s shadowed id.

Returns:
id : int

Internal unique identifier.

getSimplices()

Collection of simplex accessor.

Returns:
simplices : IndicesCollection

Collection of simplices.

getVertices()

Collection of vertices accessor.

Returns:
vertices : Sample

Collection of points.

getVisibility()

Accessor to the object’s visibility state.

Returns:
visible : bool

Visibility flag.

hasName()

Test if the object is named.

Returns:
hasName : bool

True if the name is not empty.

hasVisibleName()

Test if the object has a distinguishable name.

Returns:
hasVisibleName : bool

True if the name is not empty and not the default one.

query(*args)

Get the index of the enclosing simplex of the given point.

Available usages:

query(point)

query(sample)

Parameters:
point : sequence of float

Given point.

sample : 2-d sequence of float

Given points.

Returns:
index : int

If point is enclosed in a simplex, return its index; otherwise return an int which is at least greater than the number of simplices.

indices : openturns.Indices

Index of enclosing simplex of each point of the sample. If there is no enclosing simplex, value is an int which is at least greater than the number of simplices.

queryScalar(*args)

Accessor to the enclosing simplex index.

Available usages:

queryScalar(x)

queryScalar(point)

Parameters:
x : float

Given point.

point : sequence of float

Sequence of 1D points.

Returns:
index : int

If x is inside RegularGrid bounds, return the index of the interval in which it is contained; otherwise return an int which is at least greater than the number of intervals.

indices : openturns.Indices

Index of the enclosing simplex of the given 1D points.

setName(name)

Accessor to the object’s name.

Parameters:
name : str

The name of the object.

setShadowedId(id)

Accessor to the object’s shadowed id.

Parameters:
id : int

Internal unique identifier.

setVerticesAndSimplices(vertices, simplices)

Rebuild a new data structure for these vertices and simplices.

Parameters:
vertices : Sample

Vertices.

simplices : IndicesCollection

Simplices.

setVisibility(visible)

Accessor to the object’s visibility state.

Parameters:
visible : bool

Visibility flag.