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


Java NonBlockingHashMapLong类代码示例

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


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

示例1: toString

import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
@Override public String toString() {
  StringBuilder sb = new StringBuilder();
  for( NonBlockingHashMapLong.IteratorLong i = iter(_col0s); i.hasNext(); ) {
    long l = i.nextLong();
    double d = Double.longBitsToDouble(l);
    sb.append(d).append(": {");
    NonBlockingHashMapLong<AtomicLong> col1s = _col0s.get(l);
    for( NonBlockingHashMapLong.IteratorLong j = iter(col1s); j.hasNext(); ) {
      long l2 = j.nextLong();
      double d2 = Double.longBitsToDouble(l2);
      AtomicLong al = col1s.get(l2);
      sb.append(d2).append(": ").append(al.get()).append(", ");
    }
    sb.append("}\n");
  }
  return sb.toString();
}
 
开发者ID:kyoren,项目名称:https-github.com-h2oai-h2o-3,代码行数:18,代码来源:ASTTable.java

示例2: toString

import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
@Override
public String toString() {
  StringBuilder sb = new StringBuilder();
  for (NonBlockingHashMapLong.IteratorLong i = iter(_col0s); i.hasNext(); ) {
    long l = i.nextLong();
    double d = Double.longBitsToDouble(l);
    sb.append(d).append(": {");
    NonBlockingHashMapLong<AtomicLong> col1s = _col0s.get(l);
    for (NonBlockingHashMapLong.IteratorLong j = iter(col1s); j.hasNext(); ) {
      long l2 = j.nextLong();
      double d2 = Double.longBitsToDouble(l2);
      AtomicLong al = col1s.get(l2);
      sb.append(d2).append(": ").append(al.get()).append(", ");
    }
    sb.append("}\n");
  }
  return sb.toString();
}
 
开发者ID:h2oai,项目名称:h2o-3,代码行数:19,代码来源:AstTable.java

示例3: collectDomain

import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
private static double[] collectDomain( NonBlockingHashMapLong ls ) {
  int sz = ls.size();         // Uniques
  double ds[] = new double[sz];
  int x=0;
  for( NonBlockingHashMapLong.IteratorLong i = iter(ls); i.hasNext(); )
    ds[x++] = Double.longBitsToDouble(i.nextLong());
  Arrays.sort(ds);
  return ds;
}
 
开发者ID:kyoren,项目名称:https-github.com-h2oai-h2o-3,代码行数:10,代码来源:ASTTable.java

示例4: write_impl

import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
@Override public AutoBuffer write_impl(AutoBuffer ab) {
  if( _col0s == null ) return ab.put8(0);
  ab.put8(_col0s.size());
  for( long col0 : _col0s.keySetLong() ) {
    ab.put8(col0);
    NonBlockingHashMapLong<AtomicLong> col1s = _col0s.get(col0);
    ab.put8(col1s.size());
    for( long col1 : col1s.keySetLong() ) {
      ab.put8(col1);
      ab.put8(col1s.get(col1).get());
    }
  }
  return ab;
}
 
开发者ID:kyoren,项目名称:https-github.com-h2oai-h2o-3,代码行数:15,代码来源:ASTTable.java

示例5: read_impl

import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
@Override public SlowCnt read_impl(AutoBuffer ab) {
  long len0 = ab.get8();
  if( len0 == 0 ) return this;
  _col0s = new NonBlockingHashMapLong<>();
  for( long i=0; i<len0; i++ ) {
    NonBlockingHashMapLong<AtomicLong> col1s = new NonBlockingHashMapLong<>();
    _col0s.put(ab.get8(),col1s);
    long len1 = ab.get8();
    for( long j=0; j<len1; j++ )
      col1s.put(ab.get8(),new AtomicLong(ab.get8()));
  }
  return this;
}
 
开发者ID:kyoren,项目名称:https-github.com-h2oai-h2o-3,代码行数:14,代码来源:ASTTable.java

示例6: collectDomain

import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
private static double[] collectDomain(NonBlockingHashMapLong ls) {
  int sz = ls.size();         // Uniques
  double ds[] = new double[sz];
  int x = 0;
  for (NonBlockingHashMapLong.IteratorLong i = iter(ls); i.hasNext(); )
    ds[x++] = Double.longBitsToDouble(i.nextLong());
  Arrays.sort(ds);
  return ds;
}
 
开发者ID:h2oai,项目名称:h2o-3,代码行数:10,代码来源:AstTable.java

示例7: write_impl

import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
public final AutoBuffer write_impl(AutoBuffer ab) {
  if (_col0s == null) return ab.put8(0);
  ab.put8(_col0s.size());
  for (long col0 : _col0s.keySetLong()) {
    ab.put8(col0);
    NonBlockingHashMapLong<AtomicLong> col1s = _col0s.get(col0);
    ab.put8(col1s.size());
    for (long col1 : col1s.keySetLong()) {
      ab.put8(col1);
      ab.put8(col1s.get(col1).get());
    }
  }
  return ab;
}
 
开发者ID:h2oai,项目名称:h2o-3,代码行数:15,代码来源:AstTable.java

示例8: read_impl

import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
public final AstTable.SlowCnt read_impl(AutoBuffer ab) {
  long len0 = ab.get8();
  if (len0 == 0) return this;
  _col0s = new NonBlockingHashMapLong<>();
  for (long i = 0; i < len0; i++) {
    NonBlockingHashMapLong<AtomicLong> col1s = new NonBlockingHashMapLong<>();
    _col0s.put(ab.get8(), col1s);
    long len1 = ab.get8();
    for (long j = 0; j < len1; j++)
      col1s.put(ab.get8(), new AtomicLong(ab.get8()));
  }
  return this;
}
 
开发者ID:h2oai,项目名称:h2o-3,代码行数:14,代码来源:AstTable.java

示例9: iter

import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
private static NonBlockingHashMapLong.IteratorLong iter(NonBlockingHashMapLong nbhml) { 
  return (NonBlockingHashMapLong.IteratorLong)nbhml.keySet().iterator();  
}
 
开发者ID:kyoren,项目名称:https-github.com-h2oai-h2o-3,代码行数:4,代码来源:ASTTable.java

示例10: iter

import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
private static NonBlockingHashMapLong.IteratorLong iter(NonBlockingHashMapLong nbhml) {
  return (NonBlockingHashMapLong.IteratorLong) nbhml.keySet().iterator();
}
 
开发者ID:h2oai,项目名称:h2o-3,代码行数:4,代码来源:AstTable.java

示例11: setupLocal

import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
@Override
public void setupLocal() {
  _col0s = new NonBlockingHashMapLong<>();
}
 
开发者ID:h2oai,项目名称:h2o-3,代码行数:5,代码来源:AstTable.java

示例12: setupLocal

import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
@Override protected void setupLocal() { _uniques = new NonBlockingHashMapLong<>(); } 
开发者ID:kyoren,项目名称:https-github.com-h2oai-h2o-3,代码行数:2,代码来源:Vec.java

示例13: setupLocal

import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
@Override public void setupLocal() {  _col0s = new NonBlockingHashMapLong<>();  } 
开发者ID:kyoren,项目名称:https-github.com-h2oai-h2o-3,代码行数:2,代码来源:ASTTable.java

示例14: setupLocal

import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
@Override protected void setupLocal() { _uniques = new NonBlockingHashMapLong(); } 
开发者ID:h2oai,项目名称:h2o-2,代码行数:2,代码来源:Vec.java


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