Jama.Matrix.constructWithCopy()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(86)

本文整理了Java中Jama.Matrix.constructWithCopy()方法的一些代码示例,展示了Matrix.constructWithCopy()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Matrix.constructWithCopy()方法的具体详情如下:
包路径:Jama.Matrix
类名称:Matrix
方法名:constructWithCopy

Matrix.constructWithCopy介绍

暂无

代码示例

代码示例来源:origin: openimaj/openimaj

private static Matrix keypointToMatrix(Keypoint kp) {
  return Matrix.constructWithCopy(
      new double[][]{
          {kp.x},
          {kp.y},
          {1.0}
    }
  );
}
private static float distance(Matrix a,Matrix b) {

代码示例来源:origin: org.openimaj/image-local-features

private static Matrix keypointToMatrix(Keypoint kp) {
  return Matrix.constructWithCopy(
      new double[][]{
          {kp.x},
          {kp.y},
          {1.0}
    }
  );
}
private static float distance(Matrix a,Matrix b) {

代码示例来源:origin: openimaj/openimaj

/**
 * Construct a translation.
 *
 * @param x
 *            The amount to translate in the x-direction.
 * @param y
 *            The amount to translate in the y-direction.
 * @return The translation matrix.
 */
public static Matrix translateMatrix(double x, double y) {
  final Matrix matrix = Matrix.constructWithCopy(new double[][] {
      { 1, 0, x },
      { 0, 1, y },
      { 0, 0, 1 },
  });
  return matrix;
}

代码示例来源:origin: openimaj/openimaj

/**
 * Construct a rotation about 0, 0.
 *
 * @param rot
 *            The amount of rotation in radians.
 * @return The rotation matrix.
 */
public static Matrix rotationMatrix(double rot) {
  final Matrix matrix = Matrix.constructWithCopy(new double[][] {
      { Math.cos(rot), -Math.sin(rot), 0 },
      { Math.sin(rot), Math.cos(rot), 0 },
      { 0, 0, 1 },
  });
  return matrix;
}

代码示例来源:origin: lejon/T-SNE-Java

public static double[][] times(double[][] m1, double[][] m2) {
  Matrix A = Matrix.constructWithCopy(m1);
  Matrix B = Matrix.constructWithCopy(m2);
  return A.times(B).getArray();
}

代码示例来源:origin: com.github.yannrichet/JMathArray

public static QRDecomposition QR(double[][] v) {
  return new QRDecomposition(Matrix.constructWithCopy(v));
}

代码示例来源:origin: com.github.yannrichet/JMathArray

public static LUDecomposition LU(double[][] v) {
  return new LUDecomposition(Matrix.constructWithCopy(v));
}

代码示例来源:origin: com.github.yannrichet/JMathArray

public static double[][] divideLU(double[][] v1, double[]... v2) {
  return LU(v2).solve(Matrix.constructWithCopy(v1)).getArray();
}

代码示例来源:origin: com.github.yannrichet/JMathArray

public static double[][] divideQR(double[][] v1, double[]... v2) {
  return QR(v2).solve(Matrix.constructWithCopy(v1)).getArray();
}

代码示例来源:origin: openimaj/openimaj

Matrix rotationMatrix = Matrix.constructWithCopy(new double[][]{
    {Math.cos(rot),-Math.sin(rot),0},
    {Math.sin(rot),Math.cos(rot),0},
double minX=0,minY=0,maxX=0,maxY=0;
for(double[][] ext : extrema){
  Matrix tmp = rotationMatrix.times(Matrix.constructWithCopy(ext));
  if(unset)
Matrix centerTranslationMatrix = Matrix.constructWithCopy(new double[][]{
    {1,0,-centerX*scale*slantX},
    {0,1,-centerY*scale*slantY},
Matrix translationMatrix = Matrix.constructWithCopy(new double[][]{
    {1,0,transX*scale*slantX},
    {0,1,transY*scale*slantY},
    {0,0,1},
});
Matrix decenterTranslationMatrix = Matrix.constructWithCopy(new double[][]{
    {1,0,deCenterX},
    {0,1,deCenterY},
    {0,0,1},
});
Matrix scaleMatrix = Matrix.constructWithCopy(new double[][]{
    {scale,0,0},
    {0,scale,0},
    {0,0,1},
});
Matrix slantMatrix = Matrix.constructWithCopy(new double[][]{

代码示例来源:origin: org.openimaj/image-local-features

Matrix rotationMatrix = Matrix.constructWithCopy(new double[][]{
    {Math.cos(rot),-Math.sin(rot),0},
    {Math.sin(rot),Math.cos(rot),0},
double minX=0,minY=0,maxX=0,maxY=0;
for(double[][] ext : extrema){
  Matrix tmp = rotationMatrix.times(Matrix.constructWithCopy(ext));
  if(unset)
Matrix centerTranslationMatrix = Matrix.constructWithCopy(new double[][]{
    {1,0,-centerX*scale*slantX},
    {0,1,-centerY*scale*slantY},
Matrix translationMatrix = Matrix.constructWithCopy(new double[][]{
    {1,0,transX*scale*slantX},
    {0,1,transY*scale*slantY},
    {0,0,1},
});
Matrix decenterTranslationMatrix = Matrix.constructWithCopy(new double[][]{
    {1,0,deCenterX},
    {0,1,deCenterY},
    {0,0,1},
});
Matrix scaleMatrix = Matrix.constructWithCopy(new double[][]{
    {scale,0,0},
    {0,scale,0},
    {0,0,1},
});
Matrix slantMatrix = Matrix.constructWithCopy(new double[][]{

代码示例来源:origin: openimaj/openimaj

/**
 * Given two points, get a transform matrix that takes points from point a
 * to point b
 *
 * @param from
 *            from this point
 * @param to
 *            to this point
 * @return transform matrix
 */
public static Matrix translateToPointMatrix(Point2d from, Point2d to) {
  final Matrix matrix = Matrix.constructWithCopy(new double[][] {
      { 1, 0, to.minus(from).getX() },
      { 0, 1, to.minus(from).getY() },
      { 0, 0, 1 },
  });
  return matrix;
}

代码示例来源:origin: org.openimaj/core-image

};
for (final double[][] ext : extrema) {
  final Matrix tmp = transform.times(Matrix.constructWithCopy(ext));
  if (unset) {
    minX = maxX = tmp.get(0, 0);

代码示例来源:origin: openimaj/openimaj

};
for (final double[][] ext : extrema) {
  final Matrix tmp = transform.times(Matrix.constructWithCopy(ext));
  if (unset) {
    minX = maxX = tmp.get(0, 0);

代码示例来源:origin: gov.nist.math/jama

A = Matrix.constructWithCopy(rvals);
  tmp = A.get(raggedr,raggedc);
} catch ( IllegalArgumentException e ) {
C = B.minus(A);
avals[0][0] = tmp;
B = Matrix.constructWithCopy(avals);
tmp = B.get(0,0);
avals[0][0] = 0.0;

相关文章