Classes | |
class | BlockOperator |
Operator defined with product domain and range. More... | |
class | TensorOp |
Explicit BlockOp construction for two range components. More... | |
class | DiagOp |
Explicit BlockOp construction for 2x2 diagonal. More... | |
class | BlockLinearOp |
Linear Operator defined with product range. More... | |
class | BlockLinearOpBlock |
i,j block of BlockLinearOp, as LinearOp More... | |
class | ColumnLinearOp |
Linear Operator defined with product range. More... | |
class | TensorLinearOp |
Explicit ColumnLinearOp construction for two range components Y.H. More... | |
class | InjectOp |
Affine Injection operator. More... | |
class | FunctionObject |
The FunctionObject / DataContainer hiearchy follows the Acyclic Visitor design pattern (see Martin 2002 for more on this). More... | |
class | FunctionObjectConstEval |
Membership. More... | |
class | ScalarRedn |
Mixin class for types that store, update, and return "small" objects, meaning effectively those with usable copy semantics. More... | |
class | FunctionObjectScalarRedn |
Function object with const eval and scalar reduction attributes. More... | |
class | DataContainer |
DataContainer is the principal RVL abstraction for types encapsulating data structures. More... | |
class | DataContainerFactory |
Factory class for DataContainers. More... | |
class | RVLException |
An implementation of the std::exception interface, with additional methods so it can be used more like a output stream. More... | |
class | Functional |
Interface for scalar-valued vector functions. More... | |
class | FunctionalProductDomain |
A specialization of Functional which also has partial derivatives. More... | |
class | FunctionalEvaluation |
Evaluation is a pair of a (clone of a) Functional and an evaluation point Vector, stored by reference. More... | |
class | HessianEvaluation |
The Hessian Evaluation is a lightweight implementation of the LinearOp interface which refers back to a FunctionalEvaluation to implement all methods. More... | |
class | FunctionalProductDomainEvaluation |
A specialization of FunctionalEvaluation which accesses the additional partial derivatives of the FunctionalProductDomain class. More... | |
class | LinCombFunctional |
LinCombFunctional is a concrete class implementing a linear combination of two or more Functional instances. More... | |
class | StdFOFunctional |
This class implements the Functional interface by combining the operation of three FunctionObjects and a domain Space. More... | |
class | NullFunctional |
Null-functional. More... | |
class | FcnlOpComp |
This handle class creates the composite of a functional and an operator , using the protected services of Operator and Functional. More... | |
class | RestrictFcnl |
Restriction operator - currently only for two-component domains. More... | |
class | LinCombObject |
LinCombObject is an subtype FunctionObject offering a method to set two mutable scalars a and b, intended to be coefficients in a linear combination. More... | |
class | LinearAlgebraPackage |
Interface to function objects defining the basic ops of linear algebra in Hilbert space: linear combination, assignment to the zero vector, and inner product. More... | |
class | CompLinearOp |
Composition of linear operators (so subscripts indicate order of evaluation - that's how the constructor is organized). More... | |
class | LinearOp |
Principal RVL interface for Linear Operators. More... | |
class | LinearOpFO |
Standard construction of a LinearOp, given spaces for domain and range and FunctionObjects implementing the forward and adjoint apply. More... | |
class | Invertible |
Invertible is a mixin interface for operators which can compute inverses. More... | |
class | LinearOpWithInverse |
Linear operator with inverse mapping supplied as a class method. More... | |
class | AdjLinearOp |
AdjLinearOp creates the adjoint operator of an LinearOp as a linear operator in its own right. More... | |
class | NormalLinearOp |
NormalLinearOp creates the normal operator of a LinearOp as a linear operator in its own right. More... | |
class | ScaleOpFwd |
ScaleOpFwd implementing the linear operator where a is a scalar. More... | |
class | ScaleOpInv |
ScaleOpInv implementing the linear operator where is a scalar. More... | |
class | LinCombLinearOp |
LinCombLinearOp is a concrete class implementing a linear combination with weights of two linear operators and , that is, . More... | |
class | SymmetricBilinearOp |
for the moment, a standalone class. More... | |
class | LinearBilinearOp |
LinearOp crreated by fixing the first argument in a bilinear op. More... | |
class | ShiftOperator |
Given an input vector d, this operator implements . More... | |
class | ResidualOperator |
Given an input vector d, and an operator G, this operator implements . More... | |
class | EuclideanForm |
This functional is the standard Euclidean Form . More... | |
class | QuadraticForm |
QuadraticForm creates a function of the form in which A is a linear operator. More... | |
class | ShiftedQuadraticForm |
ShiftedQuadraticForm creates a function of the form in which A is a linear operator, b a vector. More... | |
class | LeastSquaresFcnlGN |
LeastSquaresFcnlGN creates a least squares objective function from an operator. More... | |
class | StdLeastSquaresFcnlGN |
StdLeastSquaresFcnlGN creates a least squares objective function from an operator and a data vector. More... | |
class | Operator |
Interface for vector-valued vector functions. More... | |
class | OperatorProductDomain |
Operator defined on product space. More... | |
class | RestrictOp |
restriction, or partial evaluation, of an operator on a product space. More... | |
class | LinOpValOp |
Operator with product domain presumed to be linear in last component, from which a linear operator may be conveniently extracted by restriction. More... | |
class | ConstLinOpValOp |
Given a linear operator F on x1, ConstLinOpValOp provides a LinOpValOp where F is considered constant wrt x0. More... | |
class | TangentMap |
standard example of LinOpValOp: More... | |
class | LinearRestrictOp |
create linear op by restricting the nonlinear variable in LinOpValOp. More... | |
class | CompLOVOp |
Composition in the first component of LinOpValOp with arbitrary op - could be accomplished with DiagonalOp, this construction introduced for efficiency's sake. More... | |
class | LinCompLOVOp |
Composition in the second component of LinOpValOp with arbitrary lop - could be accomplished with DiagonalOp, this construction introduced for efficiency's sake. More... | |
class | OperatorWithInvertibleDeriv |
Operators whose derivatives are supplied with inverse mappings. More... | |
class | OperatorEvaluation |
OperatorEvaluation pairs a reference to a Vector with an independent, dynamically-allocated instance of an Operator. More... | |
class | DerivEvaluation |
Implements the derivative by delegating the implementation of the apply methods to the Operator class, by way of the Evaluation. More... | |
class | Deriv2Evaluation |
Implements the 2nd derivative by delegating the implementation of the apply methods to the Operator class, by way of the Evaluation. More... | |
class | InvertibleDerivEvaluation |
Evaluation of derivative supplied with inverse mappings. More... | |
class | OperatorProductDomainEvaluation |
Evaluation for product domain case, provided only for type-safety. More... | |
class | PartialDerivEvaluation |
similar in structure to DerivEvaluation More... | |
class | LNLOperator |
LNLOperator creates a nonlinear op from a linear operator. More... | |
class | ANLOperator |
ANLOperator creates a nonlinear op from an affine operator. More... | |
class | OpFO |
Standard construction of an op, given spaces for domain and range and several FunctionObject instances implementing the various apply operations: in the notation of the main constructor OpFO::OpFO, the first FunctionObject argument (f) is used to implement OpFO::apply, the second (dff) to implement OpFO::applyDeriv, and the third (dfa) to implement OpFO::applyAdjDeriv. More... | |
class | LinCombOperator |
LinCombOperator is a concrete class implementing a linear combination of two or more Operator instances. More... | |
class | LinearOpEvaluation |
Convenience class used in formulation of linear combination, composition algorithms to avoid unnecessary temporary storage and computation, which would result from using OperatorEvaluation in the same settings. More... | |
class | LinearOpAdjEvaluation |
Another convenience handle class used in formulation of linear combination, composition algorithms to avoid unnecessary temporary storage and computation, which would result from using OperatorEvaluation in the same settings. More... | |
class | OpComp |
OpComp is a concrete class implementing composition of any number of Operator and/or LinearOp instancess. More... | |
class | IdentityOp |
IdentityOp is a concrete class implementing identity operator. More... | |
class | Product |
Simple Cartesian product mixin. More... | |
class | ROProduct |
Simple Cartesian product mixin - read-only access to factors. More... | |
class | BlockFunctionObject |
BlockFOs are arrays of FOs, which can be evaluated block-diagonal fashion on ProductDCs. More... | |
class | DiagonalFunctionObject |
Produces diagonal ("scalar") app of single FO to all components of ProductDC. More... | |
class | ProductDataContainer |
ProductDataContainers are DataContainers equipped with an indexing operator[], which returns a reference to a DataContainer when supplied with an in-range int index. More... | |
class | StdProductDataContainer |
Standard implementation of ProductDataContainer. More... | |
class | ProductSpace |
Abstract base class expressing behaviour of Cartesian products of vector spaces. More... | |
class | StdProductSpace |
Standard construction of product spaces, via an (STL) vector of dynamically allocated Spaces. More... | |
class | CartesianPowerSpace |
This space implements the Cartesian power of a space. More... | |
class | Components |
Provides indexed access to components (factors) of a Vector in ProductSpace. More... | |
class | Space |
RVL abstract base class for Hilbert Spaces. More... | |
class | StdSpace |
Standard modular RVL space class. More... | |
class | SpaceDCF |
A converse to StdSpace: takes any space and makes manifest its inner DataContainerFactory. More... | |
class | Vector |
RVL Vector class. More... | |
class | WatchedVecRef |
This class references a vector and will store a version number. More... | |
struct | ScalarFieldTraits |
A traits class to extend the capabilities of numeric_limits without duplicating such capabilities. More... | |
struct | ScalarFieldTraits< bool > |
struct | ScalarFieldTraits< int > |
struct | ScalarFieldTraits< long > |
struct | ScalarFieldTraits< unsigned int > |
struct | ScalarFieldTraits< unsigned long > |
struct | ScalarFieldTraits< float > |
struct | ScalarFieldTraits< double > |
class | Writeable |
Mixin interface to mandate write-to-ostream method, and derive write-to-exception method from it. More... | |
class | Oracle |
Generic oracle interface. More... | |
class | Factory |
Standard factory interface - really a policy. More... | |
struct | ScalarFieldTraits< std::complex< T > > |
Functions | |
template<typename Scalar> | |
bool | AdjointTest (LinearOp< Scalar > const &op, FunctionObject &randomize, ostream &str, int tol=100) |
Test of adjoint relationship between applyOp and applyAdjOp methods of a LinearOp. | |
template<typename Scalar> | |
bool | DerivTest (Operator< Scalar > const &op, Vector< Scalar > const &y, Vector< Scalar > const &p, ostream &str, int n=10, typename ScalarFieldTraits< Scalar >::AbsType hmin=0.1, typename ScalarFieldTraits< Scalar >::AbsType hmax=1.0, typename ScalarFieldTraits< Scalar >::AbsType minrat=1.95) |
tests accuracy of directional derivative computation by comparison with centered finite difference approximation. | |
template<class Scalar> | |
bool | GradientTest (Functional< Scalar > const &f, const Vector< Scalar > &y, const Vector< Scalar > &p, ostream &str, int n=11, Scalar hmin=0.1, Scalar hmax=1.0, Scalar minrat=1.95) |
This implementation of the gradient test should be sufficient for all Functionals. | |
template<class Scalar> | |
void | Scan (Functional< Scalar > const &f, const Vector< Scalar > &y, const Vector< Scalar > &p, int n=11, Scalar hmin=-ScalarFieldTraits< Scalar >::One(), Scalar hmax=ScalarFieldTraits< Scalar >::One(), ostream &str=cout) |
Computes values of an RVL::Functional along a line segment in its domain, and writes them nicely formatted to an output stream. | |
template<typename Scalar> | |
void | SpaceTest (Space< Scalar > const &sp, Vector< Scalar > const &v, std::string msg) |
space membership test - turns standard test into one-liner | |
template<typename Scalar> | |
void | testRealOnly () |
Some applications do not make sense unless the absolute value type (signed, in the current implementation) is the same as the scalar type. | |
template<class real> | |
int | ProtectedDivision (real a, real b, real ", real tol=ScalarFieldTraits< real >::AbsZero()) |
Calculate in a careful manner. |
bool RVL::AdjointTest | ( | LinearOp< Scalar > const & | op, | |
FunctionObject & | randomize, | |||
ostream & | str, | |||
int | tol = 100 | |||
) |
Test of adjoint relationship between applyOp and applyAdjOp methods of a LinearOp.
constructs random vectors x in domain, y in range, applies image method to x, adjoint image method to y, and compares inner products.
Definition at line 46 of file adjtest.hh.
References RVL::LinearOp< Scalar >::applyAdjOp(), RVL::LinearOp< Scalar >::applyOp(), RVL::Operator< Scalar >::getDomain(), and RVL::Operator< Scalar >::getRange().
bool RVL::DerivTest | ( | Operator< Scalar > const & | op, | |
Vector< Scalar > const & | y, | |||
Vector< Scalar > const & | p, | |||
ostream & | str, | |||
int | n = 10 , |
|||
typename ScalarFieldTraits< Scalar >::AbsType | hmin = 0.1 , |
|||
typename ScalarFieldTraits< Scalar >::AbsType | hmax = 1.0 , |
|||
typename ScalarFieldTraits< Scalar >::AbsType | minrat = 1.95 | |||
) |
tests accuracy of directional derivative computation by comparison with centered finite difference approximation.
Prints several columns of output, including estimated convergence rate, which should approach 2. Since no unversal scale rule is possible, users will have to adjust the limits hmin and hmax to suit the application.
Arguments:
op | operator whose deriv comp is to be tested | |
y | base point at which derivative accuracy is tested | |
dy | direction of differentiation | |
str | output stream on which to print report (use cout for terminal output) | |
n | number of (evenly spaced) offsets h at which to compute divided differences. Default is 10. | |
hmin | minimum offset (default 0.1) | |
hmax | maximum offset (defaults 1.0, but these defaults are only useful if the operator is rather smooth in the intrinsic scale of ). rate of convergence lower bound - test returns true if the last convergence rate computed is lower than this one (i.e. "yes there is a problem"), else false ("no problem"). |
Definition at line 74 of file derivtest.hh.
References RVL::Operator< Scalar >::getDomain(), RVL::Operator< Scalar >::getMaxStep(), RVL::Operator< Scalar >::getRange(), RVL::OperatorEvaluation< Scalar >::getValue(), RVL::Vector< Scalar >::inSpace(), RVL::Vector< Scalar >::norm(), and ProtectedDivision().
bool RVL::GradientTest | ( | Functional< Scalar > const & | f, | |
const Vector< Scalar > & | y, | |||
const Vector< Scalar > & | p, | |||
ostream & | str, | |||
int | n = 11 , |
|||
Scalar | hmin = 0.1 , |
|||
Scalar | hmax = 1.0 , |
|||
Scalar | minrat = 1.95 | |||
) |
This implementation of the gradient test should be sufficient for all Functionals.
Tests n finite difference steps from y in direction p, ranging from hmin to hmax. Compares computed rate of change <grad f(y), p> with centered finite difference approximations (f(y+h*p)-f(y-h*p))/(2*h) for n values of h ranging from hmin to hmax. Computes nominal convergence rate by Richardson extrapolation, prints result to ostream specified in arg list. Convergence rate should converge to 2.0 for well-chosen n, range of steps h.
Definition at line 51 of file gradtest.hh.
References RVL::Functional< Scalar >::getDomain(), RVL::FunctionalEvaluation< Scalar >::getGradient(), RVL::Functional< Scalar >::getMaxStep(), RVL::FunctionalEvaluation< Scalar >::getValue(), RVL::Vector< Scalar >::inSpace(), and ProtectedDivision().
void RVL::Scan | ( | Functional< Scalar > const & | f, | |
const Vector< Scalar > & | y, | |||
const Vector< Scalar > & | p, | |||
int | n = 11 , |
|||
Scalar | hmin = -ScalarFieldTraits<Scalar>::One() , |
|||
Scalar | hmax = ScalarFieldTraits<Scalar>::One() , |
|||
ostream & | str = cout | |||
) |
Computes values of an RVL::Functional along a line segment in its domain, and writes them nicely formatted to an output stream.
Definition at line 44 of file scantest.hh.
References RVL::Functional< Scalar >::getDomain(), RVL::Functional< Scalar >::getMaxStep(), and RVL::Vector< Scalar >::inSpace().
void RVL::SpaceTest | ( | Space< Scalar > const & | sp, | |
Vector< Scalar > const & | v, | |||
std::string | msg | |||
) |
space membership test - turns standard test into one-liner
Definition at line 945 of file space.hh.
References RVL::Vector< Scalar >::inSpace(), RVL::Writeable::write(), and RVL::Vector< Scalar >::write().
Referenced by RVL::IdentityOp< Scalar >::apply(), RVL::IdentityOp< Scalar >::applyAdjDeriv(), and RVL::IdentityOp< Scalar >::applyDeriv().
void RVL::testRealOnly | ( | ) |
Some applications do not make sense unless the absolute value type (signed, in the current implementation) is the same as the scalar type.
Including a call to this function anywhere in the code defining a class will ensure that it compiles only when this "reality" condition is satisfied.
Definition at line 195 of file utility.hh.
int RVL::ProtectedDivision | ( | real | a, | |
real | b, | |||
real & | quot, | |||
real | tol = ScalarFieldTraits<real>::AbsZero() | |||
) |
Calculate in a careful manner.
Without the tolerance, performs checks to avoid underflow/overflow. With the tolerance, checks to ensure that the resulting quotient exceeds the tolerance. Return codes: 1 Overflow 2 Underflow 3 Failed to exceed specified tolerance.
Definition at line 212 of file utility.hh.
Referenced by DerivTest(), GradientTest(), and RVL::ScaleOpInv< Scalar >::ScaleOpInv().