linbox

Switching Network based BlackBox Matrix. More...
#include <butterfly.h>
Inherits BlackboxInterface.
Public Member Functions  
Butterfly (const Field &F, size_t n)  
NoOp Constructor.  
Butterfly (const Field &F, size_t n, typename Switch::Factory &factory)  
Constructor from an integer and a switch object. More...  
template<class OutVector , class InVector >  
OutVector &  apply (OutVector &y, const InVector &x) const 
Application of BlackBox matrix. More...  
template<class OutVector , class InVector >  
OutVector &  applyTranspose (OutVector &y, const InVector &x) const 
Application of BlackBox matrix transpose. More...  
Switching Network based BlackBox Matrix.
A good preconditioner.
Implements butterfly switching network on a LinBox vector as a black box matrix through the use of a switch object.
This is a blackbox matrix object, and it implements all purely virtual methods of the abstract base class. See BlackboxArchetype for the specification of these methods.
This matrix requires a dense vector to be used. Sparse vectors must somehow be converted to dense vectors before this matrix may be applied to them.
Butterfly  (  const Field &  F, 
size_t  n,  
typename Switch::Factory &  factory  
) 
Constructor from an integer and a switch object.
The switch object is an object that is applied to two references to elements to switch them. It must have both an apply and an applyTranspose method. It must contain all information needed by the switch other than the elements themselves. This includes any random numbers or sequences of values. It must also be able to be applied as many times as needed. In particular, it must be able to create new random elements or repeat a stored sequence of values. This is not required by the abstract base class.
n  integer size of vectors to be applied to 
F  
factory  switch predicate object object 

inline 
Application of BlackBox matrix.
y = A*x
. Requires one vector conforming to the LinBox vector archetype. Required by abstract base class. For this matrix, this involves applying each switch in order to the input vector.
x  constant reference to vector to contain input (before switching) 
y 

inline 
Application of BlackBox matrix transpose.
y = transpose (A)*x
. Requires one vector conforming to the LinBox vector archetype. Required by abstract base class. For this matrix, this involves applying the transpose of each switch to the input vector in the reverse order of the apply function.
x  constant reference to vector to contain input (before switching) 
y 