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
Operatorsfor all mu.Let
operatorsbe a list ofOperatorswith common source and range, and letvectorsbe a list ofVectorArraysor vector-likeOperatorsin the range of these operators. Given aVectorArraydomainof vectors in the source of the operators, this algorithms determines aVectorArrayimageof range vectors such that the linear span ofimagecontains:op.apply(U, mu=mu)for all operatorsopinoperators, for all possibleParametersmuand for allVectorArraysUcontained in the linear span ofdomain,Ufor allVectorArraysinvectors,v.as_range_array(mu)for allOperatorsinvectorsand all possibleParametersmu.
The algorithm will try to choose
imageas small as possible. However, no optimality is guaranteed. The image estimation algorithm is specified byCollectOperatorRangeRulesandCollectVectorRangeRules.Parameters
- operators
See above.
- vectors
See above.
- domain
See above. If
None, an emptydomainVectorArrayis assumed.- extends
For some operators, e.g.
EmpiricalInterpolatedOperator, as well as for all elements ofvectors,imageis estimated independently from the choice ofdomain. IfextendsisTrue, 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
imageusing thegram_schmidtalgorithm.- product
Inner product
Operatorw.r.t. which to orthonormalize.- riesz_representatives
If
True, compute Riesz representatives of the vectors inimagebefore orthonormalizing (useful for dual norm computation when the range of theoperatorsis a dual space).
Returns
The
VectorArrayimage.Raises
- ImageCollectionError
Is raised when for a given
Operatorno 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
Operatorsfor all mu.This is an extended version of
estimate_image, which callsestimate_imageindividually for each vector ofdomain.As a result, the vectors in the returned
imageVectorArraywill be ordered by thedomainvector they correspond to (starting with vectors which correspond to the elements ofvectorsand toOperatorsfor which the image is estimated independently fromdomain).This function also returns an
image_dimslist, such that the firstimage_dims[i+1]vectors ofimagecorrespond to the firstivectors ofdomain(the firstimage_dims[0]vectors correspond tovectorsand toOperatorswith 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
domainVectorArrayafterestimate_image_hierarchicalhas been called, andestimate_image_hierarchicalshall be called again for the extendeddomainarray,extendscan be set to(image, image_dims), whereimage,image_dimsare the return values of the lastestimate_image_hierarchicalcall. The olddomainvectors will then be skipped during computation andimage,image_dimswill 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
Operatorno image estimate is possible.
- class pymor.algorithms.image.CollectOperatorRangeRules(source, image, extends)[source]¶
Bases:
pymor.algorithms.rules.RuleTableRuleTablefor theestimate_imagealgorithm.
- class pymor.algorithms.image.CollectVectorRangeRules(image)[source]¶
Bases:
pymor.algorithms.rules.RuleTableRuleTablefor theestimate_imagealgorithm.