本文整理汇总了Java中gnu.trove.set.TDoubleSet类的典型用法代码示例。如果您正苦于以下问题:Java TDoubleSet类的具体用法?Java TDoubleSet怎么用?Java TDoubleSet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TDoubleSet类属于gnu.trove.set包,在下文中一共展示了TDoubleSet类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: equals
import gnu.trove.set.TDoubleSet; //导入依赖的package包/类
/** {@inheritDoc) */
public boolean equals( Object other ) {
if (! ( other instanceof TDoubleSet ) ) {
return false;
}
final TDoubleSet that = ( TDoubleSet ) other;
if ( that.size() != this.size() ) {
return false;
}
for ( int i = _states.length; i-- > 0; ) {
if ( _states[i] == FULL ) {
if ( ! that.contains( _set[i] ) ) {
return false;
}
}
}
return true;
}
示例2: equals
import gnu.trove.set.TDoubleSet; //导入依赖的package包/类
/** {@inheritDoc} */
public boolean equals( Object other ) {
if ( ! ( other instanceof TDoubleSet ) ) {
return false;
}
TDoubleSet that = ( TDoubleSet ) other;
if ( that.size() != this.size() ) {
return false;
}
for ( int i = _states.length; i-- > 0; ) {
if ( _states[i] == FULL ) {
if ( ! that.contains( _set[i] ) ) {
return false;
}
}
}
return true;
}
示例3: distinct
import gnu.trove.set.TDoubleSet; //导入依赖的package包/类
@Override
public final Array<Double> distinct(int limit) {
final int capacity = limit < Integer.MAX_VALUE ? limit : 100;
final TDoubleSet set = new TDoubleHashSet(capacity);
final ArrayBuilder<Double> builder = ArrayBuilder.of(capacity, Double.class);
for (int i=0; i<length(); ++i) {
final double value = getDouble(i);
if (set.add(value)) {
builder.addDouble(value);
if (set.size() >= limit) {
break;
}
}
}
return builder.toArray();
}
示例4: equals
import gnu.trove.set.TDoubleSet; //导入依赖的package包/类
public boolean equals(final Object other) {
if (!(other instanceof TDoubleSet)) {
return false;
}
final TDoubleSet that = (TDoubleSet) other;
if (that.size() != this.size()) {
return false;
}
for (int i = _states.length; i-- > 0; ) {
if (_states[i] == FULL) {
if (that.contains(_set[i])) {
return false;
}
}
}
return true;
}
示例5: equals
import gnu.trove.set.TDoubleSet; //导入依赖的package包/类
/** {@inheritDoc) */
@Override
public boolean equals( Object other ) {
if (! ( other instanceof TDoubleSet ) ) {
return false;
}
final TDoubleSet that = ( TDoubleSet ) other;
if ( that.size() != this.size() ) {
return false;
}
for ( int i = _states.length; i-- > 0; ) {
if ( _states[i] == FULL ) {
if ( ! that.contains( _set[i] ) ) {
return false;
}
}
}
return true;
}
示例6: equals
import gnu.trove.set.TDoubleSet; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean equals( Object other ) {
if ( ! ( other instanceof TDoubleSet ) ) {
return false;
}
TDoubleSet that = ( TDoubleSet ) other;
if ( that.size() != this.size() ) {
return false;
}
for ( int i = _states.length; i-- > 0; ) {
if ( _states[i] == FULL ) {
if ( ! that.contains( _set[i] ) ) {
return false;
}
}
}
return true;
}
示例7: equals
import gnu.trove.set.TDoubleSet; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean equals( Object other ) {
if ( ! ( other instanceof TDoubleSet ) ) {
return false;
}
TDoubleSet that = ( TDoubleSet ) other;
if ( that.size() != this.size() ) {
return false;
}
for ( int i = capacity(); i-- > 0; ) {
if ( _states.get(i) == FULL ) {
if ( ! that.contains( _set.get( i ) ) ) {
return false;
}
}
}
return true;
}
示例8: readExternal
import gnu.trove.set.TDoubleSet; //导入依赖的package包/类
public void readExternal( ObjectInput in )
throws IOException, ClassNotFoundException {
// VERSION
in.readByte();
// SET
_set = ( TDoubleSet ) in.readObject();
}
示例9: readExternal
import gnu.trove.set.TDoubleSet; //导入依赖的package包/类
@Override
public void readExternal( ObjectInput in )
throws IOException, ClassNotFoundException {
// VERSION
in.readByte();
// SET
_set = ( TDoubleSet ) in.readObject();
}
示例10: keySet
import gnu.trove.set.TDoubleSet; //导入依赖的package包/类
/** {@inheritDoc} */
public TDoubleSet keySet() {
return new KeyView();
}
示例11: keySet
import gnu.trove.set.TDoubleSet; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
public TDoubleSet keySet() {
return new KeyView();
}
示例12: keySet
import gnu.trove.set.TDoubleSet; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public TDoubleSet keySet() {
return new KeyView();
}
示例13: keySet
import gnu.trove.set.TDoubleSet; //导入依赖的package包/类
/**
* Returns a {@link TDoubleSet} view of the keys contained in this map.
* The set is backed by the map, so changes to the map are
* reflected in the set, and vice-versa. If the map is modified
* while an iteration over the set is in progress (except through
* the iterator's own <tt>remove</tt> operation), the results of
* the iteration are undefined. The set supports element removal,
* which removes the corresponding mapping from the map, via the
* <tt>Iterator.remove</tt>, <tt>Set.remove</tt>,
* <tt>removeAll</tt>, <tt>retainAll</tt>, and <tt>clear</tt>
* operations. It does not support the <tt>add</tt> or <tt>addAll</tt>
* operations.
*
* @return a set view of the keys contained in this map
*/
TDoubleSet keySet();
示例14: TDoubleSetDecorator
import gnu.trove.set.TDoubleSet; //导入依赖的package包/类
/**
* Creates a wrapper that decorates the specified primitive set.
*
* @param set the <tt>TDoubleSet</tt> to wrap.
*/
public TDoubleSetDecorator( TDoubleSet set ) {
super();
this._set = set;
}