public void plus ( ISparseVector sv ) { if ( sv instanceof HashSparseVector ) { TIntFloatIterator it = ( ( HashSparseVector ) sv ) . data . iterator ( ) ; while ( it . hasNext ( ) ) { it . advance ( ) ; data . adjustOrPutValue ( it . key ( ) , it . value ( ) , it . value ( ) ) ; } } else if ( sv instanceof BinarySparseVector ) { TIntIterator it = ( ( BinarySparseVector ) sv ) . data . iterator ( ) ; while ( it . hasNext ( ) ) { int i = it . next ( ) ; data . adjustOrPutValue ( i , DefaultValue , DefaultValue ) ; } } }
v + sv