pymor.algorithms.image
¶
Module Contents¶
Classes¶
|
|
|
Functions¶
Estimate the image of given |
|
Estimate the image of given |
- pymor.algorithms.image.estimate_image(operators=(), vectors=(), domain=None, extends=False, orthonormalize=True, product=None, riesz_representatives=False)[source]¶
Estimate the image of given
Operators
for all mu.Let
operators
be a list ofOperators
with common source and range, and letvectors
be a list ofVectorArrays
or vector-likeOperators
in the range of these operators. Given aVectorArray
domain
of vectors in the source of the operators, this algorithms determines aVectorArray
image
of range vectors such that the linear span ofimage
contains:op.apply(U, mu=mu)
for all operatorsop
inoperators
, for all possibleParameters
mu
and for allVectorArrays
U
contained in the linear span ofdomain
,U
for allVectorArrays
invectors
,v.as_range_array(mu)
for allOperators
invectors
and all possibleParameters
mu
.
The algorithm will try to choose
image
as small as possible. However, no optimality is guaranteed. The image estimation algorithm is specified byCollectOperatorRangeRules
andCollectVectorRangeRules
.Parameters
- operators
See above.
- vectors
See above.
- domain
See above. If
None
, an emptydomain
VectorArray
is assumed.- extends
For some operators, e.g.
EmpiricalInterpolatedOperator
, as well as for all elements ofvectors
,image
is estimated independently from the choice ofdomain
. Ifextends
isTrue
, such operators are ignored. (This is useful in case these vectors have already been obtained by earlier calls to this function.)- orthonormalize
Compute an orthonormal basis for the linear span of
image
using thegram_schmidt
algorithm.- product
Inner product
Operator
w.r.t. which to orthonormalize.- riesz_representatives
If
True
, compute Riesz representatives of the vectors inimage
before orthonormalizing (useful for dual norm computation when the range of theoperators
is a dual space).
Returns
The
VectorArray
image
.Raises
- ImageCollectionError
Is raised when for a given
Operator
no image estimate is possible.
- pymor.algorithms.image.estimate_image_hierarchical(operators=(), vectors=(), domain=None, extends=None, orthonormalize=True, product=None, riesz_representatives=False)[source]¶
Estimate the image of given
Operators
for all mu.This is an extended version of
estimate_image
, which callsestimate_image
individually for each vector ofdomain
.As a result, the vectors in the returned
image
VectorArray
will be ordered by thedomain
vector they correspond to (starting with vectors which correspond to the elements ofvectors
and toOperators
for which the image is estimated independently fromdomain
).This function also returns an
image_dims
list, such that the firstimage_dims[i+1]
vectors ofimage
correspond to the firsti
vectors ofdomain
(the firstimage_dims[0]
vectors correspond tovectors
and toOperators
with fixed image estimate).Parameters
- operators
See
estimate_image
.- vectors
See
estimate_image
.- domain
See
estimate_image
.- extends
When additional vectors have been appended to the
domain
VectorArray
afterestimate_image_hierarchical
has been called, andestimate_image_hierarchical
shall be called again for the extendeddomain
array,extends
can be set to(image, image_dims)
, whereimage
,image_dims
are the return values of the lastestimate_image_hierarchical
call. The olddomain
vectors will then be skipped during computation andimage
,image_dims
will be modified in-place.- orthonormalize
See
estimate_image
.- product
See
estimate_image
.- riesz_representatives
See
estimate_image
.
Returns
- image
See above.
- image_dims
See above.
Raises
- ImageCollectionError
Is raised when for a given
Operator
no image estimate is possible.
- class pymor.algorithms.image.CollectOperatorRangeRules(source, image, extends)[source]¶
Bases:
pymor.algorithms.rules.RuleTable
RuleTable
for theestimate_image
algorithm.
- class pymor.algorithms.image.CollectVectorRangeRules(image)[source]¶
Bases:
pymor.algorithms.rules.RuleTable
RuleTable
for theestimate_image
algorithm.