/** {@inheritDoc} */ public void transformValues(TFloatFunction function) { for (TFloatLink l = head; got(l); ) { // l.setValue(function.execute(l.getValue())); // l = l.getNext(); } }
/** {@inheritDoc} */ public void fill(int fromIndex, int toIndex, float val) { if (fromIndex < 0) { throw new IndexOutOfBoundsException("begin index can not be < 0"); } TFloatLink l = getLinkAt(fromIndex); if (toIndex > size) { for (int i = fromIndex; i < size; i++) { l.setValue(val); l = l.getNext(); } for (int i = size; i < toIndex; i++) { add(val); } } else { for (int i = fromIndex; i < toIndex; i++) { l.setValue(val); l = l.getNext(); } } }
/** {@inheritDoc} */ public float set(int offset, float val) { if (offset > size) throw new IndexOutOfBoundsException("index " + offset + " exceeds size " + size); TFloatLink l = getLinkAt(offset); // if (no(l)) throw new IndexOutOfBoundsException("at offset " + offset); float prev = l.getValue(); l.setValue(val); return prev; }