Add a vector indexed
436587
def add_template_events_to_ifo(self, ifo, columns, vectors):
        
        # Just call through to the standard function
        self.template_events = self.template_event_dict[ifo]
        self.add_template_events(columns, vectors)
        self.template_event_dict[ifo] = self.template_events
        self.template_events = None
533144
def assoc(self, index, value):
        ''''''
        newvec = ImmutableVector()
        newvec.tree = self.tree.assoc(index, value)
        if index >= self._length:
            newvec._length = index+1
        else:
            newvec._length = self._length
        return newvec
714839
function _Vector(dimension, data) {
  if (!dimension || !Number.isInteger(dimension))
    throw new TypeError('Dimension of the array must be an integer.');

  var _values;
  if (!data || data === undefined)
    _values = [];
  else if (!util.isNumberArray(data))
    throw new TypeError('Invalid values for vector.');
  else
    _values = data;

  if (_values.length < dimension) {
    var zeros = Array(dimension - _values.length).fill(0);
    _values = _values.concat(zeros);
  } else if (_values.length > dimension) {
    _values = _values.slice(0, dimension);
  }

  readonly(this, "dimension", dimension);
  readonly(this, "values", _values);
  readonly(this, "magnitude", _magnitudeOf(_values));
}
348057
public Vector4f add(float x, float y, float z, float w) {
        return add(x, y, z, w, thisOrNew());
    }
713430
public Vector4f add(float x, float y, float z, float w, Vector4f dest) {
        dest.x = this.x + x;
        dest.y = this.y + y;
        dest.z = this.z + z;
        dest.w = this.w + w;
        return dest;
    }
102086
function addToIndex(ele) {
  // Add to index.js of a feature, note filePath should be in a feature
  // const ele = utils.parseElePath(elePath);
  const indexPath = `src/features/${ele.feature}/index.js`;

  if (!vio.fileExists(indexPath)) {
    throw new Error(`entry.addToIndex failed: file not found ${indexPath}`);
  }

  const moduleSource = paths.relativeModuleSource(indexPath, ele.modulePath);
  refactor.addExportFrom(indexPath, moduleSource, ele.name);
}
776142
def index(name)
      indices[name] = Index.new(name) unless indices.include?(name)
    end
737719
public Vector3i add(int x, int y, int z) {
        return add(x, y, z, thisOrNew());
    }
322790
public Vector2f add(float x, float y, Vector2f dest) {
        dest.x = this.x + x;
        dest.y = this.y + y;
        return dest;
    }
623803
public void add(int num, int[] indices) {
        for (int i = 0; i < indices.length; ++i)
            indices[i] += num;
    }
615067
public void add(LongIntVector other) {
        if (other instanceof LongIntUnsortedVector) {
            LongIntUnsortedVector vec = (LongIntUnsortedVector) other;
            for (int i=0; i<vec.top; i++) {
                this.add(vec.idx[i], vec.vals[i]);
            }
        } else {
            //  TODO: Add special case for LongIntDenseVector.
            other.iterate(new SparseBinaryOpApplier(this, new Lambda.IntAdd()));
        }
    }
482032
@Override
    public void increment(int index, double val)
    {
        int baseIndex = getBaseIndex(index);
        vecs[baseIndex].increment(index-lengthSums[baseIndex], val);
    }
152408
public void add(Vector v)
	{
		x += v.x;
		y += v.y;
		z += v.z;
	}
1327214
public void add(LongDoubleVector other) {
        if (other instanceof LongDoubleUnsortedVector) {
            LongDoubleUnsortedVector vec = (LongDoubleUnsortedVector) other;
            for (int i=0; i<vec.top; i++) {
                this.add(vec.idx[i], vec.vals[i]);
            }
        } else {
            //  TODO: Add special case for LongDoubleDenseVector.
            other.iterate(new SparseBinaryOpApplier(this, new Lambda.DoubleAdd()));
        }
    }
412535
def add_vector(self, vector):
        
        self._num_docs+=1
        max_id, veclen = self._mmw.write_vector(self._num_docs, vector)
        self._num_terms = max(self._num_terms, 1 + max_id)
        self._num_nnz += veclen
901403
function(v) {
    var m = this.m;
    return new Vector(
      m[0] * v.x + m[1] * v.y + m[2] * v.z,
      m[4] * v.x + m[5] * v.y + m[6] * v.z,
      m[8] * v.x + m[9] * v.y + m[10] * v.z
    );
  }
975620
public Vector4i add(int x, int y, int z, int w) {
        return add(x, y, z, w, thisOrNew());
    }