methods below are called by vector layers implementations
480017
function (layer) {
		var path = layer._path = L.SVG.create('path');

		// @namespace Path
		// @option className: String = null
		// Custom class name set on an element. Only for SVG renderer.
		if (layer.options.className) {
			L.DomUtil.addClass(path, layer.options.className);
		}

		if (layer.options.interactive) {
			L.DomUtil.addClass(path, 'leaflet-interactive');
		}

		this._updateStyle(layer);
	}
1355205
function() {
        for (var i=0, len=this.layers.length; i<len; i++) {
            var layer = this.layers[i];
            this.setLayerZIndex(layer, i);
        }
    }
1271624
function(lst, x, y, w, h) {
      lst.push(new Wall(new Vec(x,y), new Vec(x+w,y)));
      lst.push(new Wall(new Vec(x+w,y), new Vec(x+w,y+h)));
      lst.push(new Wall(new Vec(x+w,y+h), new Vec(x,y+h)));
      lst.push(new Wall(new Vec(x,y+h), new Vec(x,y)));
    }
274318
def layer(output_shape=None, new_parameters=None):
  """"""
  def layer_decorator(call):
    """Decorating the call function."""
    def output_shape_fun(self, input_shape):
      if output_shape is None:
        return input_shape
      kwargs = self._init_kwargs  # pylint: disable=protected-access
      return output_shape(input_shape, **kwargs)

    def new_parameters_fun(self, input_shape, rng):
      if new_parameters is None:
        return ()
      kwargs = self._init_kwargs  # pylint: disable=protected-access
      return new_parameters(input_shape, rng, **kwargs)

    def call_fun(self, x, params=(), **kwargs):
      """The call function of the created class, derived from call."""
      # Merge on-call kwargs with class-kwargs.
      call_kwargs = kwargs.copy()
      call_kwargs.update(self._init_kwargs)  # pylint: disable=protected-access
      # Call with the merged kwargs.
      return call(x, params=params, **call_kwargs)

    # Set doc for python help.
    call_fun.__doc__ = call.__doc__
    if output_shape is None:
      output_shape_fun.__doc__ = output_shape.__doc__
    if new_parameters is None:
      new_parameters_fun.__doc__ = new_parameters.__doc__

    # Create the class.
    cls = type(call.__name__, (Layer,),
               {'call': call_fun,
                'output_shape': output_shape_fun,
                'new_parameters': new_parameters_fun})

    return cls
  return layer_decorator
94194
def copyActivations(self, layer, vec, start = 0):
        
        vector = self.replacePatterns(vec, layer.name)
        if self.verbosity > 4:
            print("Copying Activations: ", vector[start:start+layer.size])
        layer.copyActivations(vector[start:start+layer.size])
422099
void set_composite_vector()
    {
        composite_.clear();
        for (Document<K> document : documents_)
        {
            composite_.add_vector(document.feature());
        }
    }
637390
function(v) {
            var v0 = v._x;
            var v1 = v._y;
            var v2 = v._z;
            var v3 = 1;
            var x = v0 * this.elements[0] + v1 * this.elements[1] + v2 * this.elements[2] + v3 * this.elements[3];
            var y = v0 * this.elements[4] + v1 * this.elements[5] + v2 * this.elements[6] + v3 * this.elements[7];
            var z = v0 * this.elements[8] + v1 * this.elements[9] + v2 * this.elements[10] + v3 * this.elements[11];
            var w = v0 * this.elements[12] + v1 * this.elements[13] + v2 * this.elements[14] + v3 * this.elements[15];
            // scale such that fourth element becomes 1:
            if (w != 1) {
                var invw = 1.0 / w;
                x *= invw;
                y *= invw;
                z *= invw;
            }
            return new CSG.Vector3D(x, y, z);
        }
341631
function Vector2D(x, y) {
    _classCallCheck(this, Vector2D);

    this.x = x !== undefined ? x : 0.0;
    this.y = y !== undefined ? y : 0.0;
  }
632812
def layer(op):
    ''''''

    def layer_decorated(self, *args, **kwargs):
        # Automatically set a name if not provided.
        name = kwargs.setdefault('name', self.get_unique_name(op.__name__))
        # Figure out the layer inputs.
        if len(self.terminals) == 0:
            raise RuntimeError('No input variables found for layer %s.' % name)
        elif len(self.terminals) == 1:
            layer_input = self.terminals[0]
        else:
            layer_input = list(self.terminals)
        # Perform the operation and get the output.
        layer_output = op(self, layer_input, *args, **kwargs)
        # Add to layer LUT.
        self.layers[name] = layer_output
        # This output is now the input for the next layer.
        self.feed(layer_output)
        # Return self for chained calls.
        return self

    return layer_decorated
914195
private static void vectorSwap(PagesIndex pagesIndex, int from, int l, int s)
    {
        for (int i = 0; i < s; i++, from++, l++) {
            pagesIndex.swap(from, l);
        }
    }
925471
@Override protected void postProcessing() {
        if (argOptions.hasOption("saveVectors")) {
            String fileName = argOptions.getStringOption("saveVectors");
            LOGGER.info("saving index vectors to " + fileName);
            IndexVectorUtil.save(isa.getWordToIndexVector(), 
                                 new File(fileName));
        }        
    }
653848
public void setLayer(VectorLayer layer) {
		this.layer = layer;
		Object value = layerSelect.getValue();
		if (value == null || !value.equals(layer.getLabel())) {
			layerSelect.setValue(layer.getLabel());
		}
		empty();
	}
1204135
public void pretrainLayer(String layerName, DataSetIterator dataSetIterator) {
        if (numInputArrays != 1) {
            throw new UnsupportedOperationException(
                    "Cannot train ComputationGraph network with  multiple inputs using a DataSetIterator");
        }

        pretrainLayer(layerName, ComputationGraphUtil.toMultiDataSetIterator(dataSetIterator));
    }
910305
function(layerArray, layer) {
        if (layer.layersContext) {
            for (var i=0, len = layer.layersContext.length; i<len; i++) {
                var l = layer.layersContext[i];
                layerArray.push(l);
                if (l.layersContext) {
                    this.processLayer(layerArray, l);
                }
            }
        }
    }
628246
protected void processLayer(GrayF32 image1 , GrayF32 image2 ,
								GrayF32 deriv1X , GrayF32 deriv1Y,
								GrayF32 deriv2X , GrayF32 deriv2Y,
								GrayF32 deriv2XX , GrayF32 deriv2YY, GrayF32 deriv2XY) {

		int N = image1.width*image1.height;
		int stride = image1.stride;

		// outer Taylor expansion iterations
		for( int indexOuter = 0; indexOuter < numOuter; indexOuter++ ) {

			// warp the image and the first + second derivatives
			warpImageTaylor(image2, flowU, flowV, warpImage2);

			warpImageTaylor(deriv2X, flowU, flowV, warpDeriv2X);
			warpImageTaylor(deriv2Y, flowU, flowV, warpDeriv2Y);

			warpImageTaylor(deriv2XX, flowU, flowV, warpDeriv2XX);
			warpImageTaylor(deriv2YY, flowU, flowV, warpDeriv2YY);
			warpImageTaylor(deriv2XY, flowU, flowV, warpDeriv2XY);

			gradient.process(flowU,derivFlowUX,derivFlowUY);
			gradient.process(flowV,derivFlowVX,derivFlowVY);

			computePsiSmooth(derivFlowUX,derivFlowUY,derivFlowVX,derivFlowVY,psiSmooth);

			computeDivUVD(flowU, flowV,psiSmooth,divU,divV,divD);

			// initialize the motion increments to zero
			Arrays.fill(du.data,0,N,0);
			Arrays.fill(dv.data,0,N,0);

			for( int indexInner = 0; indexInner < numInner; indexInner++ ) {

				computePsiDataPsiGradient(image1, image2,
						deriv1X, deriv1Y,
						deriv2X, deriv2Y, deriv2XX, deriv2YY, deriv2XY,
						du, dv, psiData, psiGradient);

				float error;
				int iter = 0;

				do {
					// inner SOR iteration.
					error = 0;

					// inner portion
					for (int y = 1; y < image1.height - 1; y++) {
						int i = y * image1.width + 1;
						for (int x = 1; x < image1.width - 1; x++, i++) {
							error += iterationSor(image1, deriv1X, deriv1Y, i, i + 1, i - 1, i + stride, i - stride);
						}
					}

					// border regions require special treatment
					int y0 = 0;
					int y1 = image1.height-1;
					for (int x = 0; x < image1.width; x++ ) {
						error += iterationSor(image1, deriv1X, deriv1Y,
								s(x, y0), s(x + 1, y0), s(x - 1, y0), s(x, y0 - 1), s(x, y0 + 1));

						error += iterationSor(image1, deriv1X, deriv1Y,
								s(x, y1), s(x + 1, y1), s(x - 1, y1), s(x, y1 - 1), s(x, y1 + 1));
					}

					int x0 = 0;
					int x1 = image1.width-1;
					for (int y = 1; y < image1.height - 1; y++) {
						error += iterationSor(image1, deriv1X, deriv1Y,
								s(x0, y), s(x0 - 1, y), s(x0 + 1, y), s(x0, y - 1), s(x0, y + 1));
						error += iterationSor(image1, deriv1X, deriv1Y,
								s(x1, y), s(x1 - 1, y), s(x1 + 1, y), s(x1, y - 1), s(x1, y + 1));
					}
				} while (error > convergeTolerance * image1.width * image1.height && ++iter < maxIterationsSor);
			}

			// update the flow with the motion increments
			PixelMath.add(flowU,du, flowU);
			PixelMath.add(flowV,dv, flowV);
		}
	}
515823
function() {

        if (this.layers.length == this.map.layers.length) { 
            this.map.events.unregister('addlayer', this, this.configureLayers);

            for(var i=0, len=this.layers.length; i<len; i++) {
                
                var layer = this.map.layers[i];
                var c = this.layers.charAt(i);
                
                if (c == "B") {
                    this.map.setBaseLayer(layer);
                } else if ( (c == "T") || (c == "F") ) {
                    layer.setVisibility(c == "T");
                }
            }
        }
    }
773674
function mergeLayers(layers)
{
  var _instance = this
    , result    = null
    ;

  layers.forEach(function(layer)
  {
    layer.exts.forEach(function(ext)
    {
      ext.dirs.forEach(function(cfg)
      {
        // have customizable's array merge function
        result = merge.call({
          useCustomAdapters: merge.behaviors.useCustomAdapters,
          'array': _instance.arrayMerge,
          useCustomTypeOf: merge.behaviors.useCustomTypeOf,
          'typeof': _instance.mergeTypeOf
        }, result || {}, cfg.config);
      });
    });
  });

  // return `null` if noting found
  // and let downstream layers to make the decision
  return result;
}