Calculates a voxel plane y index (j) from an alpha value.

 @param [Float] alpha a fraction of the ray's movement between source and target
 @return [Integer] the calculated voxel plane index (j)
960399
def phi_y(alpha)
      # If the ray is orthogonal on the y axis, the evaluation will yield NaN, and
      # we return the index j which corresponds to the source's y position instead.
      (((@p2.y - @p1.y == 0 ? @p1.y : py(alpha)) - by) / @vs.delta_y).floor
    end
561426
protected static void computeAlphas( InterleavedF64 yf , InterleavedF64 kf , double lambda ,
										 InterleavedF64 alphaf ) {

		for( int y = 0; y < kf.height; y++ ) {

			int index = yf.startIndex + y*yf.stride;

			for( int x = 0; x < kf.width; x++, index += 2 ) {
				double a = yf.data[index];
				double b = yf.data[index+1];

				double c = kf.data[index] + lambda;
				double d = kf.data[index+1];

				double bottom = c*c + d*d;

				alphaf.data[index] = (a*c + b*d)/bottom;
				alphaf.data[index+1] = (b*c - a*d)/bottom;
			}
		}
	}
469132
def _get_alpha_data(data: np.ndarray, kwargs) -> Union[float, np.ndarray]:
    
    alpha = kwargs.pop("alpha", 1)
    if hasattr(alpha, "__call__"):
        return np.vectorize(alpha)(data)
    return alpha
508881
def alpha_mod(self):
        """"""
        a = ffi.new('Uint8 *')
        check_int_err(lib.SDL_GetTextureAlphaMod(self._ptr, a))
        return a[0]
823767
public static void scale( double alpha , DMatrix6 a ) {
        a.a1 *= alpha;
        a.a2 *= alpha;
        a.a3 *= alpha;
        a.a4 *= alpha;
        a.a5 *= alpha;
        a.a6 *= alpha;
    }
1193483
def from_top_left(from_layer=nil, f=nil)
      if from_layer.is_a?(Hash)
        f = from_layer
        from_layer = nil
      end
      f ||= {}
      from_layer ||= target.superlayer
      _calculate_frame(f, from: from_layer, relative_to: { x: :min, y: :min })
    end
943640
public static void scale( double alpha , DMatrix3 a ) {
        a.a1 *= alpha;
        a.a2 *= alpha;
        a.a3 *= alpha;
    }
1033645
public void setAlpha (float alpha)
    {
        if (alpha < 0.0f) {
            alpha = 0.0f;

        } else if (alpha > 1.0f) {
            alpha = 1.0f;
        }
        if (alpha != _alphaComposite.getAlpha()) {
            _alphaComposite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha);
            if (_mgr != null) {
                _mgr.getRegionManager().invalidateRegion(_bounds);
            }
        }
    }
969270
def Plane(pos=(0, 0, 0), normal=(0, 0, 1), sx=1, sy=None, c="g", bc="darkgreen",
          alpha=1, texture=None):
    
    if sy is None:
        sy = sx
    ps = vtk.vtkPlaneSource()
    ps.SetResolution(1, 1)
    tri = vtk.vtkTriangleFilter()
    tri.SetInputConnection(ps.GetOutputPort())
    tri.Update()
    poly = tri.GetOutput()
    axis = np.array(normal) / np.linalg.norm(normal)
    theta = np.arccos(axis[2])
    phi = np.arctan2(axis[1], axis[0])
    t = vtk.vtkTransform()
    t.PostMultiply()
    t.Scale(sx, sy, 1)
    t.RotateY(theta * 57.3)
    t.RotateZ(phi * 57.3)
    tf = vtk.vtkTransformPolyDataFilter()
    tf.SetInputData(poly)
    tf.SetTransform(t)
    tf.Update()
    pd = tf.GetOutput()
    actor = Actor(pd, c=c, bc=bc, alpha=alpha, texture=texture)
    actor.SetPosition(pos)
    settings.collectable_actors.append(actor)
    return actor
905608
def draw_anti_aliased_pixels(self, x, y1, y2, color):
        

        y_max = max(y1, y2)
        y_max_int = int(y_max)
        alpha = y_max - y_max_int

        if alpha > 0.0 and alpha < 1.0 and y_max_int + 1 < self.image_height:
            current_pix = self.pixel[int(x), y_max_int + 1]
            r = int((1 - alpha) * current_pix[0] + alpha * color[0])
            g = int((1 - alpha) * current_pix[1] + alpha * color[1])
            b = int((1 - alpha) * current_pix[2] + alpha * color[2])
            self.pixel[x, y_max_int + 1] = (r, g, b)

        y_min = min(y1, y2)
        y_min_int = int(y_min)
        alpha = 1.0 - (y_min - y_min_int)

        if alpha > 0.0 and alpha < 1.0 and y_min_int - 1 >= 0:
            current_pix = self.pixel[x, y_min_int - 1]
            r = int((1 - alpha) * current_pix[0] + alpha * color[0])
            g = int((1 - alpha) * current_pix[1] + alpha * color[1])
            b = int((1 - alpha) * current_pix[2] + alpha * color[2])
            self.pixel[x, y_min_int - 1] = (r, g, b)
420224
def cublasDsyr(handle, uplo, n, alpha, x, incx, A, lda):
    

    status = _libcublas.cublasDsyr_v2(handle,
                                      _CUBLAS_FILL_MODE[uplo], n, 
                                      ctypes.byref(ctypes.c_double(alpha)), 
                                      int(x), incx, int(A), lda)
    cublasCheckStatus(status)
952250
def try_greyscale(pixels, alpha=False, dirty_alpha=True):
    
    planes = 3 + bool(alpha)
    res = list()
    apix = list()
    for row in pixels:
        green = row[1::planes]
        if alpha:
            apix.append(row[4:planes])
        if (green != row[0::planes] or green != row[2::planes]):
            return False
        else:
            res.append(green)
    if alpha:
        return MergedPlanes(res, 1, apix, 1)
    else:
        return res
74966
def _get_index(self):
        
        contour = self.contour
        if contour is None:
            return None
        return contour.points.index(self)
893543
function(obj, alpha)
              {
                obj.css({ visibility: alpha > 0 ? 'visible' : 'hidden' });
                if (alpha > 0 && alpha < 100)
                {
                  if (isLessThanIE7)
                  {
                    var src = obj.attr('pngSrc');
                    if (src != null && (src.indexOf('AlphaBar.png') != -1 || src.indexOf('Bars.png') != -1 || src.indexOf('Maps.png') != -1))
                      obj.css({ filter: 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + src + '\', sizingMethod=\'scale\') progid:DXImageTransform.Microsoft.Alpha(opacity=' + alpha + ')' });
                    else obj.css({ opacity: Math.precision(alpha / 100, 4) });
                  }
                  else obj.css({ opacity: Math.precision(alpha / 100, 4) });
                }
                else if (alpha == 0 || alpha == 100)
                {
                  if (isLessThanIE7)
                  {
                    var src = obj.attr('pngSrc');
                    if (src != null && (src.indexOf('AlphaBar.png') != -1 || src.indexOf('Bars.png') != -1 || src.indexOf('Maps.png') != -1))
                      obj.css({ filter: 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + src + '\', sizingMethod=\'scale\')' });
                    else obj.css({ opacity: '' });
                  }
                  else obj.css({ opacity: '' });
                }
              }
690743
def indexXY(self, index):
        
        rect = self.visualRect(index)
        return rect.x(), rect.y()
284075
public static void scale( double alpha , DMatrix4x4 a ) {
        a.a11 *= alpha; a.a12 *= alpha; a.a13 *= alpha; a.a14 *= alpha;
        a.a21 *= alpha; a.a22 *= alpha; a.a23 *= alpha; a.a24 *= alpha;
        a.a31 *= alpha; a.a32 *= alpha; a.a33 *= alpha; a.a34 *= alpha;
        a.a41 *= alpha; a.a42 *= alpha; a.a43 *= alpha; a.a44 *= alpha;
    }
1295132
def jac(self, xy=None):
        
        if xy is not None:
            self.set_xy(xy)

        ux = numpy.dot(self.ax, self.xy_list[: len(self.ax)])
        vx = numpy.dot(self.bx, self.xy_list[: len(self.bx)])
        uy = numpy.dot(self.ay, self.xy_list[: len(self.ay)])
        vy = numpy.dot(self.by, self.xy_list[: len(self.by)])

        ux_dx = numpy.dot(self.ax, self.dx_list[: len(self.ax)])
        vx_dx = numpy.dot(self.bx, self.dx_list[: len(self.bx)])
        uy_dx = numpy.dot(self.ay, self.dx_list[: len(self.ay)])
        vy_dx = numpy.dot(self.by, self.dx_list[: len(self.by)])

        ux_dy = numpy.dot(self.ax, self.dy_list[: len(self.ax)])
        vx_dy = numpy.dot(self.bx, self.dy_list[: len(self.bx)])
        uy_dy = numpy.dot(self.ay, self.dy_list[: len(self.ay)])
        vy_dy = numpy.dot(self.by, self.dy_list[: len(self.by)])

        jac = numpy.array(
            [
                [
                    (ux_dx * vx - vx_dx * ux) / vx ** 2,
                    (ux_dy * vx - vx_dy * ux) / vx ** 2,
                ],
                [
                    (uy_dx * vy - vy_dx * uy) / vy ** 2,
                    (uy_dy * vy - vy_dy * uy) / vy ** 2,
                ],
            ]
        )
        return jac