/** {@inheritDoc} */ public short[] toArray( int offset, int len ) { short[] rv = new short[ len ]; toArray( rv, offset, len ); return rv; }
/** {@inheritDoc} */ public short[] toArray() { return toArray( 0, _pos ); }
/** {@inheritDoc} */ public short[] toArray( short[] dest ) { int len = dest.length; if ( dest.length > _pos ) { len = _pos; dest[len] = no_entry_value; } toArray( dest, 0, len ); return dest; }
/** * Sheds any excess capacity above and beyond the current size of the list. */ public void trimToSize() { if ( _data.length > size() ) { short[] tmp = new short[ size() ]; toArray( tmp, 0, tmp.length ); _data = tmp; } }
/** * Copies the contents of the stack into a native array. Note that this will NOT * pop them out of the stack. The front of the list will be the top of the stack. * * @return an <code>short[]</code> value */ public short[] toArray() { short[] retval = _list.toArray(); reverse( retval, 0, size() ); return retval; }
/** * Copies a slice of the list into a native array. Note that this will NOT * pop them out of the stack. The front of the list will be the top * of the stack. * <p> * If the native array is smaller than the stack depth, * the native array will be filled with the elements from the top * of the array until it is full and exclude the remainder. * * @param dest the array to copy into. */ public void toArray( short[] dest ) { int size = size(); int start = size - dest.length; if ( start < 0 ) { start = 0; } int length = Math.min( size, dest.length ); _list.toArray( dest, start, length ); reverse( dest, 0, length ); if ( dest.length > size ) { dest[size] = _list.getNoEntryValue(); } }
/** {@inheritDoc} */ public short[] toArray( int offset, int len ) { short[] rv = new short[ len ]; toArray( rv, offset, len ); return rv; }
/** {@inheritDoc} */ public short[] toArray( short[] dest ) { int len = dest.length; if ( dest.length > _pos ) { len = _pos; dest[len] = no_entry_value; } toArray( dest, 0, len ); return dest; }
/** {@inheritDoc} */ public short[] toArray( int offset, int len ) { short[] rv = new short[ len ]; toArray( rv, offset, len ); return rv; }
/** {@inheritDoc} */ @Override public short[] toArray( int offset, int len ) { short[] rv = new short[ len ]; toArray( rv, offset, len ); return rv; }
/** {@inheritDoc} */ @Override public short[] toArray( short[] dest ) { int len = dest.length; if ( dest.length > _pos ) { len = _pos; dest[len] = no_entry_value; } toArray( dest, 0, len ); return dest; }
/** * Sheds any excess capacity above and beyond the current size of the list. */ public void trimToSize() { if ( _data.length > size() ) { short[] tmp = new short[ size() ]; toArray( tmp, 0, tmp.length ); _data = tmp; } }
/** * Copies the contents of the stack into a native array. Note that this will NOT * pop them out of the stack. The front of the list will be the top of the stack. * * @return an <code>short[]</code> value */ public short[] toArray() { short[] retval = _list.toArray(); reverse( retval, 0, size() ); return retval; }
/** * Copies the contents of the stack into a native array. Note that this will NOT * pop them out of the stack. The front of the list will be the top of the stack. * * @return an <code>short[]</code> value */ public short[] toArray() { short[] retval = _list.toArray(); reverse( retval, 0, size() ); return retval; }
/** * Copies the contents of the stack into a native array. Note that this will NOT * pop them out of the stack. The front of the list will be the top of the stack. * * @return an <code>short[]</code> value */ @Override public short[] toArray() { short[] retval = _list.toArray(); reverse( retval, 0, size() ); return retval; }
/** * Sheds any excess capacity above and beyond the current size of the list. */ public void trimToSize() { if ( _data.length > size() ) { short[] tmp = new short[ size() ]; toArray( tmp, 0, tmp.length ); _data = tmp; } }
/** * Sheds any excess capacity above and beyond the current size of the list. */ public void trimToSize() { if ( _data.length > size() ) { short[] tmp = new short[ size() ]; toArray( tmp, 0, tmp.length ); _data = tmp; } }
public static String encode(boolean[] fingerprint) { TShortArrayList xs = new TShortArrayList(120); for (int k=0; k < fingerprint.length; ++k) if (fingerprint[k]) xs.add((short)k); return encode(xs.toArray()); }
public Fingerprint compute(AbstractChemicalDatabase db, InChI inchi) throws CDKException { final TShortArrayList indizes = getDefaults(db, inchi); extend(indizes, inchi); return new ArrayFingerprint(this, indizes.toArray()); }
public Fingerprint compute(InChI inchi) throws CDKException { final TShortArrayList indizes = getDefaults(inchi); extend(indizes, inchi); return new ArrayFingerprint(this, indizes.toArray()); }