Example #1
0
 @Override
 public <M extends Number> void add(Vector<M> vector) {
   assert (vector.length() == n);
   for (Map.Entry<Integer, M> e : vector.entrySet()) {
     add(e.getKey(), e.getValue().intValue());
   }
 }
Example #2
0
 /** Decrement an index */
 public void dec(int idx) {
   add(idx, -1);
 }
Example #3
0
 @Override
 public void sub(int idx, double i) {
   add(idx, -i);
 }
Example #4
0
 /** Increment an index */
 public void inc(int idx) {
   add(idx, 1);
 }