public void add(IVector b, IVector result) {
        if ((b == null) || (size != b.size)) return;

        if (result.size != size) result.reshape(size);

        int i;
        for (i = 0; i < size; i++) {
            result.realvector[i] = realvector[i] + b.realvector[i];
            result.imagvector[i] = imagvector[i] + b.imagvector[i];
        }
    }
public void add ( IVector b , IVector result ) { if ( ( b == null ) || ( size != b . size ) ) return ; if ( result . size != size ) result . reshape ( size ) ; int i ; for ( i = 0 ; i < size ; i ++ ) { result . realvector [ i ] = realvector [ i ] + b . realvector [ i ] ; result . imagvector [ i ] = imagvector [ i ] + b . imagvector [ i ] ; } }
Addition from two vectors