Matriz Transposta - transforma array dados de linhas em colunas
197959
function flipDiagonally($arr)
    {
        $out = array();
        foreach ($arr as $key => $subarr) {
            foreach ($subarr as $subkey => $subvalue) {
                $out[$subkey][$key] = $subvalue;
            }
        }
        return $out;
    }
118480
function subMatrix (data, numRows, numCols, row, col) {
  var sub = []

  for (var i = 0; i < numRows; i++) {
    for (var j = 0; j < numCols; j++) {
      if ((i !== row) && (j !== col)) {
        sub.push(data[matrixToArrayIndex(i, j, numCols)])
      }
    }
  }

  return sub
}
1252097
def _polarDecomposeInterpolationTransformation(matrix1, matrix2, value):
    
    m1 = MathTransform(matrix1)
    m2 = MathTransform(matrix2)
    return tuple(m1.interpolate(m2, value))
3694
public static void minimum(Planar<GrayF64> input, GrayF64 output) {
		output.reshape(input.width,input.height);
		if (BoofConcurrency.USE_CONCURRENT) {
			ImplImageBandMath_MT.minimum(input, output, 0, input.getNumBands() - 1);
		} else {
			ImplImageBandMath.minimum(input, output, 0, input.getNumBands() - 1);
		}
	}
1051958
@Override
    public BandMatrix transpose() {
        BandMatrix at = new BandMatrix(n, m2, m1);
        for (int i = 0; i < n; i++) {
            for (int j = i-m2; j <= i+m1; j++) {
                if (j >= 0 && j < n) {
                    at.set(i, j, get(j, i));
                }
            }
        }

        return at;
    }
852122
private int[][] houghTransformation(boolean[][] mat) {
    final int xres = mat.length, yres = mat[0].length;
    final double tscale = STEPS * .66 / (xres + yres);
    final int[][] ret = new int[STEPS][STEPS];

    for(int x = 0; x < mat.length; x++) {
      final boolean[] row = mat[x];
      for(int y = 0; y < mat[0].length; y++) {
        if(row[y]) {
          for(int i = 0; i < STEPS; i++) {
            final int d = (STEPS >> 1) + (int) (tscale * (x * table.cos(i) + y * table.sin(i)));
            if(d > 0 && d < STEPS) {
              ret[d][i]++;
            }
          }
        }
      }
    }

    return ret;
  }
552664
public static void transpose( DMatrix4x4 m ) {
        double tmp;
        tmp = m.a12; m.a12 = m.a21; m.a21 = tmp;
        tmp = m.a13; m.a13 = m.a31; m.a31 = tmp;
        tmp = m.a14; m.a14 = m.a41; m.a41 = tmp;
        tmp = m.a23; m.a23 = m.a32; m.a32 = tmp;
        tmp = m.a24; m.a24 = m.a42; m.a42 = tmp;
        tmp = m.a34; m.a34 = m.a43; m.a43 = tmp;
    }
488662
function(tiposMB, endian, noErrores) {
    if (!(this instanceof generadorBuffer)) return new generadorBuffer(tiposMB, endian, noErrores);
    this.bytesBuffer = 0;
    this.buff = new Array;
    this.tiposMB = tiposMB;
    this.endian = endian;
    this.noErrores = noErrores;
    
    /*
     * Creación de las funciones específicas para cada tipo de dato
     */
    
    // Obtenemos un array con los tipos de datos de ModBus
    var arrTipos = new Array;
    var tipo;
    for (tipo in this.tiposMB) {
        arrTipos.push(tipo);
    }  

    // Creamos las funciones correspondientes para cada tipo de dato, de forma que conviertan los bytes del buffer en el tipo numérico adecuado
    arrTipos.forEach((function (nombreTipo) {
        generadorBuffer.prototype[nombreTipo] = function(dato) {
            return this.agregarDato(nombreTipo, dato);
        }
    }).bind(this));
    
    return true; // Devuelve algo para evitar errores en la comprobación de código
}
693059
public function ptTransform(&$x, &$y, $trans = true)
    {
        // load the last Transfomation Matrix
        $nb = count($this->_transf);
        if ($nb) {
            $m = $this->_transf[$nb-1];
        } else {
            $m = array(1,0,0,1,0,0);
        }

        // apply the Transformation Matrix
        list($x, $y) = array(($x*$m[0]+$y*$m[2]+$m[4]),($x*$m[1]+$y*$m[3]+$m[5]));

        // if true => convert into PDF unit
        if ($trans) {
            $x = $x*$this->k;
            $y = ($this->h-$y)*$this->k;
        }

        return true;
    }
264565
@Override
    protected ImageWritable doTransform(ImageWritable image, Random random) {
        if (image == null) {
            return null;
        }
        Mat mat = converter.convert(image.getFrame());
        int top = random != null ? random.nextInt(cropTop + 1) : cropTop;
        int left = random != null ? random.nextInt(cropLeft + 1) : cropLeft;
        int bottom = random != null ? random.nextInt(cropBottom + 1) : cropBottom;
        int right = random != null ? random.nextInt(cropRight + 1) : cropRight;

        y = Math.min(top, mat.rows() - 1);
        x = Math.min(left, mat.cols() - 1);
        int h = Math.max(1, mat.rows() - bottom - y);
        int w = Math.max(1, mat.cols() - right - x);
        Mat result = mat.apply(new Rect(x, y, w, h));

        return new ImageWritable(converter.convert(result));
    }
748627
def translate_array(trans_vec,vec_array):

    '''
    '''

    return map ( lambda x,m=trans_vec:add(m,x),vec_array )
751519
function transformArrayData(stream, item, cb) {
    var row = [];
    if (stream.totalCount++) {
        row.push(stream.rowDelimiter);
    }
    row.push(stream.formatter(item));
    return row.join("");
}
527072
public static void transpose( DMatrix2x2 m ) {
        double tmp;
        tmp = m.a12; m.a12 = m.a21; m.a21 = tmp;
    }
924100
function qrJs() {
                var m = this.rows();
                var n = this.cols();
                var Q = Matrix$b.I(m);
                var A = this;
                
                for(var k = 1; k < Math.min(m, n); k++) {
            	var ak = A.slice(k, 0, k, k).col(1);
            	var oneZero = [1];
            	
            	while(oneZero.length <=  m - k)
            	    oneZero.push(0);
            	
            	oneZero = $V(oneZero);
            	var vk = ak.add(oneZero.x(ak.norm() * Math.sign(ak.e(1))));
            	var Vk = $M(vk);
            	var Hk = Matrix$b.I(m - k + 1).subtract(Vk.x(2).x(Vk.transpose()).div(Vk.transpose().x(Vk).e(1, 1)));
            	var Qk = identSize(Hk, m, n, k);
            	A = Qk.x(A);
            	// slow way to compute Q
            	Q = Q.x(Qk);
                }
                
                return {Q: Q, R: A};
            }
1162252
private void extractTransform( DMatrixRMaj U , DMatrixRMaj V , DMatrixRMaj S ,
								   Se3_F64 se , boolean optionA , boolean optionB )
	{
		DMatrixRMaj R = se.getR();
		Vector3D_F64 T = se.getT();

		// extract rotation
		if( optionA )
			CommonOps_DDRM.mult(U,Rz,temp);
		else
			CommonOps_DDRM.multTransB(U,Rz,temp);
		CommonOps_DDRM.multTransB(temp,V,R);

		// extract screw symmetric translation matrix
		if( optionB )
			CommonOps_DDRM.multTransB(U,Rz,temp);
		else
			CommonOps_DDRM.mult(U,Rz,temp);
		CommonOps_DDRM.mult(temp,S,temp2);
		CommonOps_DDRM.multTransB(temp2,U,temp);

		T.x = temp.get(2,1);
		T.y = temp.get(0,2);
		T.z = temp.get(1,0);
	}
405829
function transpose(out, a) {
  // If we are transposing ourselves we can skip a few steps but have to cache some values
  if (out === a) {
    var a1 = a[1]
    out[1] = a[2]
    out[2] = a1
  } else {
    out[0] = a[0]
    out[1] = a[2]
    out[2] = a[1]
    out[3] = a[3]
  }

  return out
}
409743
@Override
    protected ImageWritable doTransform(ImageWritable image, Random random) {
        if (image == null) {
            return null;
        }

        Mat mat = converter.convert(image.getFrame());
        Mat box = new Mat(height, width, mat.type());
        box.put(borderValue);
        x = (mat.cols() - width) / 2;
        y = (mat.rows() - height) / 2;
        int w = Math.min(mat.cols(), width);
        int h = Math.min(mat.rows(), height);
        Rect matRect = new Rect(x, y, w, h);
        Rect boxRect = new Rect(x, y, w, h);

        if (x <= 0) {
            matRect.x(0);
            boxRect.x(-x);
        } else {
            matRect.x(x);
            boxRect.x(0);
        }

        if (y <= 0) {
            matRect.y(0);
            boxRect.y(-y);
        } else {
            matRect.y(y);
            boxRect.y(0);
        }
        mat.apply(matRect).copyTo(box.apply(boxRect));
        return new ImageWritable(converter.convert(box));
    }