/** Returns a string representation of this vector. * * <P>Note that this string representation shows the bit of index 0 at the leftmost position. * @return a string representation of this vector, with the bit of index 0 on the left. */ public String toString() { final StringBuffer s = new StringBuffer(); final int size = size(); for( int i = 0; i < size; i++ ) s.append( getInt( i ) ); return s.toString(); }
/** Returns a string representation of this vector. * * <P>Note that this string representation shows the bit of index 0 at the leftmost position. * @return a string representation of this vector, with the bit of index 0 on the left. */ public String toString() { final StringBuffer s = new StringBuffer(); final int size = size(); for( int i = 0; i < size; i++ ) s.append( getInt( i ) ); return s.toString(); }
public BitVector copy() { return copy( 0, size() ); }
public BitVector copy() { return copy( 0, size() ); }
public BitVector and( final BitVector v ) { for( int i = Math.min( size(), v.size() ); i-- != 0; ) if ( ! v.getBoolean( i ) ) clear( i ); return this; }
public BitVector or( final BitVector v ) { for( int i = Math.min( size(), v.size() ); i-- != 0; ) if ( v.getBoolean( i ) ) set( i ); return this; }
public BitVector xor( final BitVector v ) { for( int i = Math.min( size(), v.size() ); i-- != 0; ) if ( v.getBoolean( i ) ) flip( i ); return this; }
public BitVector and( final BitVector v ) { for( int i = Math.min( size(), v.size() ); i-- != 0; ) if ( ! v.getBoolean( i ) ) clear( i ); return this; }
public BitVector or( final BitVector v ) { for( int i = Math.min( size(), v.size() ); i-- != 0; ) if ( v.getBoolean( i ) ) set( i ); return this; }
public BitVector xor( final BitVector v ) { for( int i = Math.min( size(), v.size() ); i-- != 0; ) if ( v.getBoolean( i ) ) flip( i ); return this; }