
OPCHAIN2(3LO)        Linop Reference Manual         OPCHAIN2(3LO)

NAME
     <type>opChain2 - class to store products of operators.

SYNOPSIS
     #include <<type>opchain2.h>

DESCRIPTION
     Class <type>opChain2 is class  derived  from  <type>operator
     which   allows   for   automatic  handling  of  products  of
     <type>operators. <type>operators can be joined to produce  a
     <type>opChain2  which,  when the Forward function is called,
     applies them in the order specified in the method of assign-
     ing the operators. The Adjoint function calls the Adjoint of
     the <type>operators, in reverse order.  One  thing  that  is
     important  to  notice  is  that  the <type>opChain2 contains
     pointers to <type>operators, not the  <type>operators  them-
     selves.  Thus,  the  <type>operators must be maintained (not
     changed or deleted), or the <type>opChain2 will not work.

     num is the number of operators that the chain  contains.  It
     must be set by derived classes to work properly.

PUBLIC OPERATIONS
     <type>opChain2()
          Construct with the number of operators contained set to
          zero.

     <type>opChain2(<type>operator & op,<type>operator & op2)
     <type>opChain2(<type>operator * op,<type>operator * op2)
          Create   an   <type>opChain2   containing    the    two
          <type>operators.  Forward   applies  op2  and then op.
          Adjoint applies op and then op2.

     <type>opChain2(int num)
          Construct from the number of operators to be contained.

     <type>opChain2(const <type>opChain2 &)
     <type>opChain2 & operator=(const <type>opChain2 &)

     friend <type>opChain2 operator*(<type>operator&,<type>operator&)
          Return  a  <type>opChain2 built from the two operators.
          This  is  an   alternative   method   of   creating   a
          <type>opChain2.   For a chain A*B*C, Forward applies C,
          then B, then A, and Adjoint does the reverse.

     <type>opChain2 <type>opChain2::operator=*(<type>operator& A)
          Return the fopChain with the new operator at the  left.
          That is, this is the equivalent of A * this.  A will be
          applied last in the Forward case.

     ~<type>opChain2()

OPCHAIN2(3LO)        Linop Reference Manual         OPCHAIN2(3LO)

     <type>spacearray Forward(const <type>spacearray & x) const
     <type>spacearray Adjoint(const <type>spacearray & x) const

PROTECTED VARIABLES
     <type>operator **ops
     int num

PROTECTED OPERATIONS
     void set(int pos, <type>operator & op)
     void set(int pos, <type>operator & op)
          Set the operator at the position given.   pos  must  be
          less  than  or  equal to the number of operators in the
          chain (num).  If  pos==num  (meaning  that  it  is  one
          greater than the last position), space is allocated for
          the extra operator,  the  number  of  operators  incre-
          mented,  and the operator is inserted at the last posi-
          tion.

SEE ALSO
     <type>spacearray, <type>operator

