当前位置: 首页>>代码示例>>Java>>正文


Java RealBindMethod类代码示例

本文整理汇总了Java中pitt.search.semanticvectors.vectors.RealVector.RealBindMethod的典型用法代码示例。如果您正苦于以下问题:Java RealBindMethod类的具体用法?Java RealBindMethod怎么用?Java RealBindMethod使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RealBindMethod类属于pitt.search.semanticvectors.vectors.RealVector包,在下文中一共展示了RealBindMethod类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: makeFlagsCompatible

import pitt.search.semanticvectors.vectors.RealVector.RealBindMethod; //导入依赖的package包/类
/**
 * Checks some interaction between flags, and fixes them up to make them compatible.
 * 
 * <br/>
 * In practice, this means:
 * <ul><li>If {@link #vectortype()} is {@code binary}, {@link #dimension()} is a multiple of 64,
 * or is increased to be become a multiple of 64.  {@link #seedlength()} is set to be half this
 * number.</li>
 * <li>Setting {@link #searchvectorfile()} to {@link #queryvectorfile()} unless explicitly set otherwise.</li>
 * <li>Setting {@link RealVector#setBindType} if directed (this is something of a hack).</li>
 * </ul>
 */
private void makeFlagsCompatible() {
  if (vectortype == VectorType.BINARY) {
    // Impose "multiple-of-64" constraint, to facilitate permutation of 64-bit chunks.
    if (dimension % 64 != 0) {
      dimension = (1 + (dimension / 64)) * 64;
      logger.fine("For performance reasons, dimensions for binary vectors must be a mutliple "
          + "of 64. Flags.dimension set to: " + dimension + ".");
    }
    // Impose "balanced binary vectors" constraint, to facilitate reasonable voting.
    if (seedlength != dimension / 2) {
      seedlength = dimension / 2;
      logger.fine("Binary vectors must be generated with a balanced number of zeros and ones."
          + " FlagConfig.seedlength set to: " + seedlength + ".");
    }
  }
  
  if (searchvectorfile.isEmpty()) searchvectorfile = queryvectorfile;
  
  // This is a potentially dangerous pattern! An alternative would be to make this setting
  // part of each real vector, as with complex Modes. But they aren't so nice either.
  // Let's avoid getting too committed to either approach and refactor at will.
  // dwiddows, 2013-09-27.
  if (vectortype == VectorType.REAL && realbindmethod == RealVector.RealBindMethod.PERMUTATION) {
    RealVector.setBindType(RealVector.RealBindMethod.PERMUTATION);
  }
}
 
开发者ID:semanticvectors,项目名称:semanticvectors,代码行数:39,代码来源:FlagConfig.java

示例2: realbindmethod

import pitt.search.semanticvectors.vectors.RealVector.RealBindMethod; //导入依赖的package包/类
/** The binding method used for real vectors, see {@link RealVector#BIND_METHOD}. */
public RealBindMethod realbindmethod() { return realbindmethod; }
 
开发者ID:semanticvectors,项目名称:semanticvectors,代码行数:3,代码来源:FlagConfig.java


注:本文中的pitt.search.semanticvectors.vectors.RealVector.RealBindMethod类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。