MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / removeNonZero

Method removeNonZero

JSAT/src/jsat/linear/SparseVector.java:188–196  ·  view source on GitHub ↗

Removes a non zero value by shifting everything to the right over by one @param nzIndex the index to remove (setting it to zero)

(int nzIndex)

Source from the content-addressed store, hash-verified

186 * @param nzIndex the index to remove (setting it to zero)
187 */
188 private void removeNonZero(int nzIndex)
189 {
190 for(int i = nzIndex+1; i < used; i++)
191 {
192 values[i-1] = values[i];
193 indexes[i-1] = indexes[i];
194 }
195 used--;
196 }
197
198 /**
199 * Increments the value at the given index by the given value.

Callers 2

incrementMethod · 0.95
setMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected