% A HG beam operator.

function op = BeamOp(varargin)

  op = struct('mx', eye(2), 'my', eye(2));

  op = class(op, 'BeamOp');

  errstr = 'Don''t know what to do with ';	% for argument error messages
  switch( nargin )
   case 0					% default constructor
   case 1
    arg = varargin{1};
    if( ~isa(arg, 'BeamOp') )			% copy constructor
      error([errstr 'a %s.'], class(arg));
    end
   otherwise					% wrong number of input args
    error([errstr '%d input arguments.'], nargin);
  end
