function  vec = op_a( X, store_a, nonz)
% evaluate A(X) .. A is stored in store_a and nonz;
% call:  vec = op_at( X, store_a, nonz)

[ m, m1] = size( nonz);         % dimension of dual
vec = zeros( m,1);
last = 0;
for i = 1 : m;
        first = last + 1;
        last  = first + nonz( i) - 1;
        sum = 0;
        for j = first : last;
                i1 = store_a( 1, j); i2 = store_a( 2, j); w = store_a(3,j);
                if i1  == i2, sum = sum + w * X( i1, i1);
                        else
                sum = sum + w * ( X( i1, i2) + X( i2, i1));
                        end
                end;
        vec( i) = sum;
        end;
