Provides an initial estimate for the flow by interpolating values from the previous layer.
191138
protected void interpolateFlowScale(int widthNew, int heightNew) {
		initFlowX.reshape(widthNew,heightNew);
		initFlowY.reshape(widthNew,heightNew);

		interpolateFlowScale(flowX, initFlowX);
		interpolateFlowScale(flowY, initFlowY);

		flowX.reshape(widthNew,heightNew);
		flowY.reshape(widthNew,heightNew);

		// init flow contains the initial estimate of the flow vector (if available)
		// flow contains the estimate for each iteration below
		flowX.setTo(initFlowX);
		flowY.setTo(initFlowY);
	}
475319
def initial_guesses(self):
        
        return np.array([param.value for param in self.model.params])
585419
def interp(x, xp, *args, **kwargs):
    """"""
    return interpolate_1d(x, xp, *args, **kwargs)
1271123
def init_net_params(scale, layer_sizes, rs=npr.RandomState(0)):
    """"""
    return [(scale * rs.randn(m, n),   # weight matrix
             scale * rs.randn(n))      # bias vector
            for m, n in zip(layer_sizes[:-1], layer_sizes[1:])]
107109
def interp(net, layers):
    
    for l in layers:
        m, k, h, w = net.params[l][0].data.shape
        if m != k and k != 1:
            print 'input + output channels need to be the same or |output| == 1'
            raise
        if h != w:
            print 'filters need to be square'
            raise
        filt = upsample_filt(h)
        net.params[l][0].data[range(m), range(k), :, :] = filt
284548
def init1(self, dae):
        """"""
        self.v0 = matrix(dae.y[self.v])
440428
def pass_outputs_v1(self):
    """"""
    der = self.parameters.derived.fastaccess
    flu = self.sequences.fluxes.fastaccess
    out = self.sequences.outlets.fastaccess
    for bdx in range(der.nmbbranches):
        out.branched[bdx][0] += flu.outputs[bdx]
504098
function GLTFCubicSplineInterpolant( parameterPositions, sampleValues, sampleSize, resultBuffer ) {

		THREE.Interpolant.call( this, parameterPositions, sampleValues, sampleSize, resultBuffer );

	}
461974
def interpolate(v1, v2, t):
    '''
    '''
    return add(v1, mul(sub(v2, v1), t))
1108950
def InitFromFlowResult(self, flow_result):
    """"""

    self.payload_type = compatibility.GetName(flow_result.payload.__class__)
    self.payload = flow_result.payload
    self.client_id = flow_result.client_id
    self.timestamp = flow_result.timestamp

    return self
998929
def interpolate(self, target, extent):
        
        target = cast_anything_to_vector(target)
        self += extent * (target - self)
829201
def _pre_analysis(self):
        

        l.debug("Starting from %#x", self._start)

        # initialize the task stack
        self._task_stack = [ ]

        # initialize the execution counter dict
        self._execution_counter = defaultdict(int)

        # Generate a CFG if no CFG is provided
        if not self._cfg:
            l.debug("Generating a CFG, since none was given...")
            # TODO: can we use a fast CFG instead? note that fast CFG does not care of context sensitivity at all, but
            # TODO: for state merging, we also don't really care about context sensitivity.
            self._cfg = self.project.analyses.CFGEmulated(context_sensitivity_level=self._context_sensitivity_level,
                starts=(self._start,)
            )

        if not self._cfg.normalized:
            l.warning("The given CFG is not normalized, which might impact the performance/accuracy of the VFG "
                      "analysis.")

        # Prepare the state
        initial_state = self._prepare_initial_state(self._start, self._initial_state)
        initial_state.ip = self._start

        if self.project.arch.name.startswith('MIPS'):
            initial_state.regs.t9 = self._start

        # clear function merge points cache
        self._function_merge_points = {}

        # Create the initial state
        state = initial_state.copy()

        if self._start_at_function:
            # set the return address to an address so we can catch it and terminate the VSA analysis
            # TODO: Properly pick an address that will not conflict with any existing code and data in the program
            self._final_address = 0x4fff0000
            self._set_return_address(state, self._final_address)

        call_stack = None
        if not self._start_at_function:
            # we should build a custom call stack
            call_stack = CallStack()
            call_stack = call_stack.call(None, self._function_start, retn_target=self._final_address)

        job = VFGJob(state.addr, state, self._context_sensitivity_level,
                     jumpkind='Ijk_Boring', final_return_address=self._final_address,
                     call_stack=call_stack
                     )
        block_id = BlockID.new(state.addr, job.get_call_stack_suffix(), job.jumpkind)
        job._block_id = block_id

        self._insert_job(job)

        # create the task
        function_analysis_task = FunctionAnalysis(self._function_start, self._final_address)
        function_analysis_task.jobs.append(job)
        self._task_stack.append(function_analysis_task)
311079
def interpolate2dStructuredIDW(grid, mask, kernel=15, power=2, fx=1, fy=1):
    '''
    

    '''
    weights = np.empty(shape=((2*kernel+1,2*kernel+1)))
    for xi in range(-kernel,kernel+1):
        for yi in range(-kernel,kernel+1):
            dist = ((fx*xi)**2+(fy*yi)**2)
            if dist:
                weights[xi+kernel,yi+kernel] = 1 / dist**(0.5*power)

    return _calc(grid, mask, kernel, weights)
75233
function interpolatePairs( _ps, t1, t2 ) {
  var pn = [];
  for (var i=0; i<_ps.length; i++) {
    var next = (i==_ps.length-1) ? 0 : i+1;
    pn.push( new Pair( _ps[i].interpolate( t1 ) ).to( _ps[next].interpolate( 1-t2 ) ) );
  }
  return pn;
}
52297
private double fillInterpolatedValues(InterpolationType interpolationType) {
		double interpolatedValue = 0;
		if (shouldDoInterpolation(true)) {

			double y1 = values[indexToInterpolate];

			if (current == indexToInterpolate) {
				return y1;
			}

			long x = timestamps[current];
			long x1 = timestamps[indexToInterpolate];
			if (x == x1) {
				return y1;
			}
			int next = indexToInterpolate + iterators.length;
			double y2 = values[next];
			long x2 = timestamps[next];
			if (x == x2) {
				return y2;
			}

			switch(interpolationType){
			case LININT:
				interpolatedValue = (y2 - y1) / (x2 - x1) * (x - x1) + y1;
				break;
			case ZIMSUM:
				interpolatedValue = 0;
				break;
			default:
				throw new IllegalArgumentException("Invalid interpolation type specified");
			}
		}
		return interpolatedValue;
	}
1139449
def _initialize(self, show_bounds, reset_camera, outline):
        """"""
        self.plotter.subplot(*self.loc)
        if outline is None:
            self.plotter.add_mesh(self.input_dataset.outline_corners(),
                    reset_camera=False, color=vtki.rcParams['outline_color'],
                    loc=self.loc)
        elif outline:
            self.plotter.add_mesh(self.input_dataset.outline(),
                    reset_camera=False, color=vtki.rcParams['outline_color'],
                    loc=self.loc)
        # add the axis labels
        if show_bounds:
            self.plotter.show_bounds(reset_camera=False, loc=loc)
        if reset_camera:
            cpos = self.plotter.get_default_cam_pos()
            self.plotter.camera_position = cpos
            self.plotter.reset_camera()
            self.plotter.camera_set = False
468204
def initialize(self):
        
        if getattr(self, '_initialized', False):
            return

        out = getattr(self, '_output_layers', None)
        if out is None:
            self.initialize_layers()
        self._check_for_unused_kwargs()

        iter_funcs = self._create_iter_funcs(
            self.layers_, self.objective, self.update,
            self.y_tensor_type,
            )
        self.train_iter_, self.eval_iter_, self.predict_iter_ = iter_funcs
        self._initialized = True