no.uib.cipr.matrix.Vector.copy()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(147)

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

Vector.copy介绍

[英]Creates a deep copy of the vector
[中]创建向量的深度副本

代码示例

代码示例来源:origin: org.dkpro.similarity/dkpro-similarity-algorithms-vsm-asl

@Override
public Vector get()
{
  return vector.copy();
}

代码示例来源:origin: de.tudarmstadt.ukp.similarity.algorithms/de.tudarmstadt.ukp.similarity.algorithms.vsm-asl

@Override
public Vector get()
{
  return vector.copy();
}

代码示例来源:origin: dkpro/dkpro-similarity

@Override
public Vector get()
{
  return vector.copy();
}

代码示例来源:origin: com.googlecode.matrix-toolkits-java/mtj

/**
 * Constructor for IR. Uses the given vector as template for creating
 * scratch vectors. Typically, the solution or the right hand side vector
 * can be passed, and the template is not modified
 * 
 * @param template
 *            Vector to use as template for the work vectors needed in the
 *            solution process
 */
public IR(Vector template) {
  z = template.copy();
  r = template.copy();
}

代码示例来源:origin: fommil/matrix-toolkits-java

/**
 * Constructor for IR. Uses the given vector as template for creating
 * scratch vectors. Typically, the solution or the right hand side vector
 * can be passed, and the template is not modified
 * 
 * @param template
 *            Vector to use as template for the work vectors needed in the
 *            solution process
 */
public IR(Vector template) {
  z = template.copy();
  r = template.copy();
}

代码示例来源:origin: gov.sandia.foundry/gov-sandia-cognition-common-core

/**
 * Creates a new instance of DenseVector
 * @param vector Vector from which to populate the elements of this, will not be modified
 */
protected DenseVector(
  DenseVector vector )
{
  this( (no.uib.cipr.matrix.DenseVector)
    vector.getInternalVector().copy() );
}

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

private DenseVector sigmoid(Vector vector) {
    final DenseVector out = (DenseVector) vector.copy();
    final double[] xd = out.getData();
    for (int i = 0; i < xd.length; i++)
      xd[i] = 1 / (1 + Math.exp(-xd[i]));
    return out;
  }
}

代码示例来源:origin: algorithmfoundry/Foundry

/**
 * Creates a new instance of DenseVector
 * @param vector Vector from which to populate the elements of this, will not be modified
 */
protected DenseVector(
  DenseVector vector )
{
  this( (no.uib.cipr.matrix.DenseVector)
    vector.getInternalVector().copy() );
}

代码示例来源:origin: fommil/matrix-toolkits-java

@Override
public Vector copy() {
  return Matrices.synchronizedVector(x.copy());
}

代码示例来源:origin: algorithmfoundry/Foundry

/**
 * Creates a new instance of DenseVector
 * @param vector Vector from which to populate the elements of this, will not be modified
 */
protected DenseVector(
  DenseVector vector )
{
  this( (no.uib.cipr.matrix.DenseVector)
    vector.getInternalVector().copy() );
}

代码示例来源:origin: org.openimaj/sandbox

private DenseVector sigmoid(Vector vector) {
    final DenseVector out = (DenseVector) vector.copy();
    final double[] xd = out.getData();
    for (int i = 0; i < xd.length; i++)
      xd[i] = 1 / (1 + Math.exp(-xd[i]));
    return out;
  }
}

代码示例来源:origin: com.googlecode.matrix-toolkits-java/mtj

@Override
public Vector copy() {
  return Matrices.synchronizedVector(x.copy());
}

代码示例来源:origin: gov.sandia.foundry/gov-sandia-cognition-common-core

@Override
public AbstractMTJVector clone()
{
  AbstractMTJVector clone = (AbstractMTJVector) super.clone();
  clone.setInternalVector( this.getInternalVector().copy() );
  return clone;
}

代码示例来源:origin: algorithmfoundry/Foundry

@Override
public AbstractMTJVector clone()
{
  AbstractMTJVector clone = (AbstractMTJVector) super.clone();
  clone.setInternalVector( this.getInternalVector().copy() );
  return clone;
}

代码示例来源:origin: algorithmfoundry/Foundry

@Override
public AbstractMTJVector clone()
{
  AbstractMTJVector clone = (AbstractMTJVector) super.clone();
  clone.setInternalVector( this.getInternalVector().copy() );
  return clone;
}

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

private Vector project(Vector v, Vector u){
  return u.copy().scale((v.dot(u) / u.dot(u)));
}

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

private static Point2d end(Vector origin, Vector dir) {
  final Vector ret = origin.copy().add(10000, dir);
  return new Point2dImpl((float) ret.get(0), (float) ret.get(1));
}

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

private static Point2d start(Vector origin, Vector dir) {
  final Vector ret = origin.copy().add(-10000, dir);
  return new Point2dImpl((float) ret.get(0), (float) ret.get(1));
}

代码示例来源:origin: org.openimaj/sandbox

private static Point2d end(Vector origin, Vector dir) {
  final Vector ret = origin.copy().add(10000, dir);
  return new Point2dImpl((float) ret.get(0), (float) ret.get(1));
}

代码示例来源:origin: org.openimaj/sandbox

private static Point2d start(Vector origin, Vector dir) {
  final Vector ret = origin.copy().add(-10000, dir);
  return new Point2dImpl((float) ret.get(0), (float) ret.get(1));
}

相关文章