gov.sandia.cognition.math.matrix.Vector.toString()方法的使用及代码示例

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

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

Vector.toString介绍

[英]Converts the vector to a String, using the given formatter.
[中]使用给定的格式化程序将向量转换为字符串。

代码示例

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

public void stepStarted(
  final IterativeAlgorithm algorithm)
{
  final ProbabilisticLatentSemanticAnalysis plsa =
    (ProbabilisticLatentSemanticAnalysis) algorithm;
  NumberFormat format = new DecimalFormat("0.00");
  out.println("Iteration " + plsa.getIteration());
  for (ProbabilisticLatentSemanticAnalysis.LatentData latent
    : plsa.result.latents)
  {
    out.println("    Latent " + latent.index);
    out.println("        p(z)   = " + format.format(latent.pLatent));
    out.println("        p(t|z) = " + latent.pTermGivenLatent.toString(format));
    out.println("        p(d|z) = " + latent.pDocumentGivenLatent.toString(format));
  }
}

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

public void stepStarted(
  final IterativeAlgorithm algorithm)
{
  final ProbabilisticLatentSemanticAnalysis plsa =
    (ProbabilisticLatentSemanticAnalysis) algorithm;
  NumberFormat format = new DecimalFormat("0.00");
  out.println("Iteration " + plsa.getIteration());
  for (ProbabilisticLatentSemanticAnalysis.LatentData latent
    : plsa.result.latents)
  {
    out.println("    Latent " + latent.index);
    out.println("        p(z)   = " + format.format(latent.pLatent));
    out.println("        p(t|z) = " + latent.pTermGivenLatent.toString(format));
    out.println("        p(d|z) = " + latent.pDocumentGivenLatent.toString(format));
  }
}

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

public void stepStarted(
  final IterativeAlgorithm algorithm)
{
  final ProbabilisticLatentSemanticAnalysis plsa =
    (ProbabilisticLatentSemanticAnalysis) algorithm;
  NumberFormat format = new DecimalFormat("0.00");
  out.println("Iteration " + plsa.getIteration());
  for (ProbabilisticLatentSemanticAnalysis.LatentData latent
    : plsa.result.latents)
  {
    out.println("    Latent " + latent.index);
    out.println("        p(z)   = " + format.format(latent.pLatent));
    out.println("        p(t|z) = " + latent.pTermGivenLatent.toString(format));
    out.println("        p(d|z) = " + latent.pDocumentGivenLatent.toString(format));
  }
}

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

/**
 * Writes the given vector to the Java-based writer
 * @param vector Vector to write to the Java-based writer
 * @throws java.io.IOException on bad write
 */
public void write(
  Vector vector )
  throws IOException
{
  this.getWriter().write( vector.toString() );
  this.getWriter().write( "\n" );
  this.getWriter().flush();
}

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

/**
 * Writes the given vector to the Java-based writer
 * @param vector Vector to write to the Java-based writer
 * @throws java.io.IOException on bad write
 */
public void write(
  Vector vector )
  throws IOException
{
  this.getWriter().write( vector.toString() );
  this.getWriter().write( "\n" );
  this.getWriter().flush();
}

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

/**
 * Writes the given vector to the Java-based writer
 * @param vector Vector to write to the Java-based writer
 * @throws java.io.IOException on bad write
 */
public void write(
  Vector vector )
  throws IOException
{
  this.getWriter().write( vector.toString() );
  this.getWriter().write( "\n" );
  this.getWriter().flush();
}

相关文章

微信公众号

最新文章

更多