87888990919293949596
ByteVector result = a.copy(factory); ByteVectorIterator it = b.nonZeroIterator(); while (it.hasNext()) { it.next(); result.update(it.index(), ByteVectors.asMinusFunction(it.get())); } return result; } }
241242243244245246247248249250251
if (value != 0) { ByteVectorIterator it = nonZeroIterator(); while (it.hasNext()) { it.next(); result.set(it.index(), aTimesB(value, it.get())); } } return result; }
ByteVector result = a.copy(factory); ByteVectorIterator it = b.nonZeroIterator(); while (it.hasNext()) { it.next(); result.update(it.index(), ByteVectors.asPlusFunction(it.get())); } return result; } }
288289290291292293294295296297298
byte acc = 0; ByteVectorIterator it = nonZeroIterator(); while (it.hasNext()) { it.next(); final byte prod = aTimesB(it.get(), matrix.get(it.index(), j)); acc = aPlusB(acc, prod); } result.set(j, acc); }
324325326327328329330331332333334
byte acc = 0; ByteVectorIterator it = nonZeroIterator(fromIndex, toIndex); while (it.hasNext()) { it.next(); final byte prod = aTimesB(it.get(), matrix.get(it.index() - fromIndex, j)); acc = aPlusB(acc, prod); } result.set(j, acc); }
8990919293949596979899
ByteVector result = a.blank(factory); ByteVectorIterator it = b.nonZeroIterator(); while (it.hasNext()) { it.next(); result.set(it.index(), aTimesB(it.get(), a.get(it.index()))); } return result; } }
6667686970717273747576
ByteVectorIterator it = indexer.nonZeroIterator(b); // TODO: these.andAlsoAdd(those) // these.andAlsoSubtract(those); while (it.hasNext()) { it.next(); a.update(it.index(), ByteVectors.asPlusFunction(it.get())); } return null; } @Override
7677787980818283848586
@Override public Void apply(SparseByteVector a, DenseByteVector b) { ByteVectorIterator it = indexer.iterator(a); while (it.hasNext()) { it.set(aPlusB(it.get(), b.get(it.index()))); } return null; } @Override
96979899100101102103104105
public Void apply(DenseByteVector a, SparseByteVector b) { ByteVectorIterator it = indexer.nonZeroIterator(b); while (it.hasNext()) { it.next(); a.set(it.index(), aPlusB(a.get(it.index()), it.get())); } return null; } }