Fills the extra configurations in the topology.
489516
def _fill_topology_cfg(self, topo_dict):
        
        cfg_dict = {}
        if topo_dict.bond_member_ports is not None:
            cfg_dict.update({'bond_member_ports':
                             topo_dict.bond_member_ports})
        if topo_dict.bond_interface is not None:
            cfg_dict.update({'bond_interface':
                             topo_dict.bond_interface})
        return cfg_dict
545718
def with_base_config(base_config, extra_config):
    """"""

    config = copy.deepcopy(base_config)
    config.update(extra_config)
    return config
821779
public static void fill(Mapping src, Mapping dst) {
        for (Node off : src.getOfflineNodes()) {
            dst.addOfflineNode(off);
        }
        for (VM r : src.getReadyVMs()) {
            dst.addReadyVM(r);
        }
        for (Node on : src.getOnlineNodes()) {
            dst.addOnlineNode(on);
            for (VM r : src.getRunningVMs(on)) {
                dst.addRunningVM(r, on);
            }
            for (VM s : src.getSleepingVMs(on)) {
                dst.addSleepingVM(s, on);
            }

        }
    }
87745
function fillGridAt(x, y, drawMask, dimension, item) {
      if (x >= ngx || y >= ngy || x < 0 || y < 0) {
        return;
      }

      grid[x][y] = false;

      if (drawMask) {
        var ctx = elements[0].getContext('2d');
        ctx.fillRect(x * g, y * g, maskRectWidth, maskRectWidth);
      }

      if (interactive) {
        infoGrid[x][y] = { item: item, dimension: dimension };
      }
    }
293321
def fill_n_done(self):
        
        left = self.left
        right = self.right
        top = self.top
        bottom = self.bottom
        for i in xrange(self.n_chunks):
            self.n_done.ravel()[i] = np.sum([left.ravel()[i].n_done,
                                            right.ravel()[i].n_done,
                                            top.ravel()[i].n_done,
                                            bottom.ravel()[i].n_done])
681035
def add(self, *l):
        '''
        '''
        for a in flatten(l):
            self._add([self.Inner(a)], self.l)
446161
private void setupA( List<DMatrixRMaj> homographies ) {
		A.reshape(2*homographies.size(),6, false);

		DMatrixRMaj h1 = new DMatrixRMaj(3,1);
		DMatrixRMaj h2 = new DMatrixRMaj(3,1);

		DMatrixRMaj v12 = new DMatrixRMaj(1,6);
		DMatrixRMaj v11 = new DMatrixRMaj(1,6);
		DMatrixRMaj v22 = new DMatrixRMaj(1,6);

		DMatrixRMaj v11m22 = new DMatrixRMaj(1,6);

		for( int i = 0; i < homographies.size(); i++ ) {
			DMatrixRMaj H = homographies.get(i);

			CommonOps_DDRM.extract(H,0,3,0,1,h1,0,0);
			CommonOps_DDRM.extract(H,0,3,1,2,h2,0,0);

			// normalize H by the max value to reduce numerical error when computing A
			// several numbers are multiplied against each other and could become quite large/small
			double max1 = CommonOps_DDRM.elementMaxAbs(h1);
			double max2 = CommonOps_DDRM.elementMaxAbs(h2);
			double max = Math.max(max1,max2);

			CommonOps_DDRM.divide(h1,max);
			CommonOps_DDRM.divide(h2,max);

			// compute elements of A
			computeV(h1, h2, v12);
			computeV(h1, h1, v11);
			computeV(h2, h2, v22);

			CommonOps_DDRM.subtract(v11, v22, v11m22);

			CommonOps_DDRM.insert( v12    , A, i*2   , 0);
			CommonOps_DDRM.insert( v11m22 , A, i*2+1 , 0);
		}
	}
626915
function fill() {

        if (self.pgrid.filteredDataSource != null && self.dimensionsCount > 0) {

            var datasource = self.pgrid.filteredDataSource;
            if (datasource != null && utils.isArray(datasource) && datasource.length > 0) {
                for (var rowIndex = 0, dataLength = datasource.length; rowIndex < dataLength; rowIndex++) {
                    var row = datasource[rowIndex];
                    var dim = self.root;
                    for (var findex = 0; findex < self.dimensionsCount; findex++) {
                        var depth = self.dimensionsCount - findex;
                        var subfield = self.fields[findex];
                        var subvalue = row[subfield.name];
                        var subdimvals = dim.subdimvals;

                        if (subdimvals[subvalue] !== undefined) {
                            dim = subdimvals[subvalue];
                        } else {
                            dim.values.push(subvalue);
                            dim = new Dimension(++dimid, dim, subvalue, subfield, depth, false, findex == self.dimensionsCount - 1);
                            subdimvals[subvalue] = dim;
                            dim.rowIndexes = [];
                            self.dimensionsByDepth[depth].push(dim);
                        }

                        dim.rowIndexes.push(rowIndex);
                    }
                }
            }
        }
    }
907083
protected void addPrevExpandedCurrent() {
		Set<String> rows = getExpandedRows();
		if (!rows.isEmpty()) {
			WTreeComponentModel model = getOrCreateComponentModel();
			if (model.prevExpandedRows == null) {
				model.prevExpandedRows = new HashSet<>();
			}
			model.prevExpandedRows.addAll(rows);
		}
	}
1357638
protected Configurations merge(Configurations other) {
		Set<Class<?>> mergedClasses = new LinkedHashSet<>(getClasses());
		mergedClasses.addAll(other.getClasses());
		return merge(mergedClasses);
	}
1320063
private function fill()
    {
        foreach ($this->attributes as $key => $value) {
            $key = $this->camelCase($key);

            $this->{$key} = $value;
        }
    }
1131447
def _extrapolate(self, result, v, below_bounds, above_bounds, der):
        """"""
        if self.extrapolate_mode == 'const':
            fill_b = fill_a = self.fill_value
        elif self.extrapolate_mode == 'border':
            fill_b = self._poly_eval(0, 0, der)
            fill_a = self._poly_eval(0, -1, der)
        elif self.extrapolate_mode == 'extrapolate':
            u = v[above_bounds] - self._x[-2]
            fill_a = self._poly_eval(u, -2, der)
            u = v[below_bounds] - self._x[0]
            fill_b = self._poly_eval(u, 0, der)
        else:
            raise ValueError("extrapolation method doesn't exist")

        result[below_bounds] = fill_b
        result[above_bounds] = fill_a
435216
private InternalNodeState combineInternalNodeStates(InternalNodeState inState, ExternalNode3 externalNode) {

        ExternalNode3 n1 = inState.getExternalNode();

        ExternalNode3 n = combineExternalNodes(n1, externalNode);

        return new InternalNodeState(n);
    }
758197
def add_conf_item(self, instance, item):
        
        tmp_conf = {}

        if item not in EXTRA_CONF:
            tmp_conf['model'] = MODEL_TRANSFORM[item]

        for s_item in sorted(self.old_top[instance][item]):
            if self.old_top[instance][item][s_item] is not None:
                tmp_conf[s_item] = self.old_top[instance][item][s_item]

        if item in EXTRA_CONF:
            tmp_conf = {item: tmp_conf}
            if len(self.topology['conf']) == 0:
                self.topology['conf'].append(tmp_conf)
            else:
                self.topology['conf'][self.hv_id].update(tmp_conf)
        else:
            self.topology['conf'].append(tmp_conf)
        self.hv_id = len(self.topology['conf']) - 1
137889
def merge_extra_options(self, needs_info):
        """"""
        extra_keys = set(self.options.keys()).difference(set(needs_info.keys()))
        for key in extra_keys:
            needs_info[key] = self.options[key]

        # Finally add all not used extra options with empty value to need_info.
        # Needed for filters, which need to access these empty/not used options.
        for key in self.option_spec:
            if key not in needs_info.keys():
                needs_info[key] = ""

        return extra_keys
726173
def _lincomb(self, a, x, b, y, out):
        """"""
        for space, xp, yp, outp in zip(self.spaces, x.parts, y.parts,
                                       out.parts):
            space._lincomb(a, xp, b, yp, outp)
1249895
function extend(x, y){
    for(var key in y) {
        if (y.hasOwnProperty(key)) {
            x[key] = y[key];
        }
    }
    return x;
}