本文整理汇总了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();
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例9: iter
import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
private static NonBlockingHashMapLong.IteratorLong iter(NonBlockingHashMapLong nbhml) {
return (NonBlockingHashMapLong.IteratorLong)nbhml.keySet().iterator();
}
示例10: iter
import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
private static NonBlockingHashMapLong.IteratorLong iter(NonBlockingHashMapLong nbhml) {
return (NonBlockingHashMapLong.IteratorLong) nbhml.keySet().iterator();
}
示例11: setupLocal
import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
@Override
public void setupLocal() {
_col0s = new NonBlockingHashMapLong<>();
}
示例12: setupLocal
import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
@Override protected void setupLocal() { _uniques = new NonBlockingHashMapLong<>(); }
示例13: setupLocal
import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
@Override public void setupLocal() { _col0s = new NonBlockingHashMapLong<>(); }
示例14: setupLocal
import water.nbhm.NonBlockingHashMapLong; //导入依赖的package包/类
@Override protected void setupLocal() { _uniques = new NonBlockingHashMapLong(); }