WFG1 t4 transformation
554853
public float[] t4(float[] z, int k, int M) {
    float[] result = new float[M];
    float[] w = new float[z.length];

    for (int i = 0; i < z.length; i++) {
      w[i] = (float) 2.0 * (i + 1);
    }

    for (int i = 1; i <= M - 1; i++) {
      int head = (i - 1) * k / (M - 1) + 1;
      int tail = i * k / (M - 1);
      float[] subZ = subVector(z, head - 1, tail - 1);
      float[] subW = subVector(w, head - 1, tail - 1);

      result[i - 1] = (new Transformations()).rSum(subZ, subW);
    }

    int head = k + 1 - 1;
    int tail = z.length - 1;
    float[] subZ = subVector(z, head, tail);
    float[] subW = subVector(w, head, tail);
    result[M - 1] = (new Transformations()).rSum(subZ, subW);

    return result;
  }
214360
public float[] t1(float[] z, int k) {
    float[] result = new float[z.length];

    for (int i = 0; i < z.length; i++) {
      result[i] = (new Transformations()).sDecept(z[i], (float) 0.35, (float) 0.001, (float) 0.05);
    }

    return result;
  }
1241236
private BoundingBox transform(BoundingBox boundingBox, final Widget widget) {
        return transform(boundingBox, widget.getTransform()
                .getLocalModelMatrix4f());
    }
1091765
public static final void transform(Group group, Matrix4d m) {
		for (Atom atom : group.getAtoms()) {
			transform(atom, m);
		}
		for (Group altG : group.getAltLocs()) {
			transform(altG, m);
		}
	}
302563
public Matrix4 setToTransform (IVector3 translation, IQuaternion rotation, IVector3 scale) {
        double sx = scale.x(), sy = scale.y(), sz = scale.z();
        return setToRotation(rotation).set(
            m00 * sx, m10 * sy, m20 * sz, translation.x(),
            m01 * sx, m11 * sy, m21 * sz, translation.y(),
            m02 * sx, m12 * sy, m22 * sz, translation.z(),
            0f, 0f, 0f, 1f);
    }
1307358
private <T> Collection<Integer> transformSideOutput(SideOutputTransformation<T> sideOutput) {
		StreamTransformation<?> input = sideOutput.getInput();
		Collection<Integer> resultIds = transform(input);

		// the recursive transform might have already transformed this
		if (alreadyTransformed.containsKey(sideOutput)) {
			return alreadyTransformed.get(sideOutput);
		}

		List<Integer> virtualResultIds = new ArrayList<>();

		for (int inputId : resultIds) {
			int virtualId = StreamTransformation.getNewNodeId();
			streamGraph.addVirtualSideOutputNode(inputId, virtualId, sideOutput.getOutputTag());
			virtualResultIds.add(virtualId);
		}
		return virtualResultIds;
	}
1149485
public static <T extends Transform> T multiply (
        double m00, double m01, double m10, double m11, double tx, double ty, AffineTransform b, T into) {
        return multiply(m00, m01, m10, m11, tx, ty, b.m00, b.m01, b.m10, b.m11, b.tx, b.ty, into);
    }
1109019
def weight_targeting(w, k):
  """"""
  k = tf.to_int32(k)
  w_shape = shape_list(w)
  size = tf.to_int32(tf.reduce_prod(w_shape[:-1]))
  w = tf.reshape(w, [size, w_shape[-1]])

  transpose_w = tf.transpose(w)
  thres = tf.contrib.framework.sort(tf.abs(transpose_w), axis=1)[:, k]
  mask = to_float(thres[None, :] >= tf.abs(w))

  return tf.reshape(mask, w_shape)
710039
public Vector4f transform(Vector4fc v, Vector4f dest) {
        double sin = Math.sin(angle);
        double cos = Math.cosFromSin(sin, angle);
        float dot = x * v.x() + y * v.y() + z * v.z();
        dest.set((float) (v.x() * cos + sin * (y * v.z() - z * v.y()) + (1.0 - cos) * dot * x),
                 (float) (v.y() * cos + sin * (z * v.x() - x * v.z()) + (1.0 - cos) * dot * y),
                 (float) (v.z() * cos + sin * (x * v.y() - y * v.x()) + (1.0 - cos) * dot * z),
                 dest.w);
        return dest;
    }
877251
@Override
  public void getTransform(Matrix transform) {
    if (mTransformCallback != null) {
      mTransformCallback.getTransform(transform);
    } else {
      transform.reset();
    }
  }
787514
def _transformBy(self, matrix, **kwargs):
        
        t = transform.Transform(*matrix)
        transformation = t.transform(self.transformation)
        self.transformation = tuple(transformation)
1179340
public boolean createTransform( Point2D_F64 tl , Point2D_F64 tr ,
									Point2D_F64 br , Point2D_F64 bl )
	{
		associatedPairs.get(0).p2.set(tl);
		associatedPairs.get(1).p2.set(tr);
		associatedPairs.get(2).p2.set(br);
		associatedPairs.get(3).p2.set(bl);

		if( !computeHomography.process(associatedPairs, H) )
			return false;

//		if( !refineHomography.fitModel(associatedPairs,H,Hrefined) ) {
//			return false;
//		}
//		homography.set(Hrefined);

		ConvertMatrixData.convert(H,H32);
		transform.set(H32);

		return true;
	}
1303968
public void transform(Tuple3D<?> t) {
		double x, y, z;
		x = this.m00 * t.getX() + this.m01 * t.getY() + this.m02 * t.getZ() + this.m03;
		y = this.m10 * t.getX() + this.m11 * t.getY() + this.m12 * t.getZ() + this.m13;
		z = this.m20 * t.getX() + this.m21 * t.getY() + this.m22 * t.getZ() + this.m23;
		t.set(x, y, z);
	}
136185
def getSkeletalReferenceTransforms(self, action, eTransformSpace, eReferencePose, unTransformArrayCount):
        """"""

        fn = self.function_table.getSkeletalReferenceTransforms
        pTransformArray = VRBoneTransform_t()
        result = fn(action, eTransformSpace, eReferencePose, byref(pTransformArray), unTransformArrayCount)
        return result, pTransformArray
1257597
private static AxisAngle4d getAxisAngle(Matrix4d transformation) {
		AxisAngle4d axis = new AxisAngle4d();
		axis.set(transformation);
		return axis;
	}
919044
public ItemTransformComponent firstPerson(Matrix4f left, Matrix4f right)
	{
		this.firstPersonLeftHand = left;
		this.firstPersonRightHand = right;
		return this;
	}
638553
def transformed(self, t):
        
        assert t.shape[0] == t.shape[1]
        extra_dimensions = t.shape[0] - self.dimensions - 1

        def transform(a):
            return t.dot(np.concatenate(
                (a, [0] * extra_dimensions, [1]),
                axis=0
            ))[:self.dimensions]
        return Rect(transform(self.mins), transform(self.maxes))